diff --git a/builder/oracle/oci/artifact.go b/builder/oracle/oci/artifact.go index e237d48e4..a454ff7c7 100644 --- a/builder/oracle/oci/artifact.go +++ b/builder/oracle/oci/artifact.go @@ -3,12 +3,12 @@ package oci import ( "fmt" - client "github.com/hashicorp/packer/builder/oracle/oci/client" + "github.com/oracle/oci-go-sdk/core" ) // Artifact is an artifact implementation that contains a built Custom Image. type Artifact struct { - Image client.Image + Image core.Image Region string driver Driver } @@ -26,13 +26,18 @@ func (a *Artifact) Files() []string { // Id returns the OCID of the associated Image. func (a *Artifact) Id() string { - return a.Image.ID + return *a.Image.Id } func (a *Artifact) String() string { + var displayName string + if a.Image.DisplayName != nil { + displayName = *a.Image.DisplayName + } + return fmt.Sprintf( "An image was created: '%v' (OCID: %v) in region '%v'", - a.Image.DisplayName, a.Image.ID, a.Region, + displayName, *a.Image.Id, a.Region, ) } @@ -42,5 +47,5 @@ func (a *Artifact) State(name string) interface{} { // Destroy deletes the custom image associated with the artifact. func (a *Artifact) Destroy() error { - return a.driver.DeleteImage(a.Image.ID) + return a.driver.DeleteImage(*a.Image.Id) } diff --git a/builder/oracle/oci/builder.go b/builder/oracle/oci/builder.go index 612fdf4f6..6ceaaf2d2 100644 --- a/builder/oracle/oci/builder.go +++ b/builder/oracle/oci/builder.go @@ -7,11 +7,11 @@ import ( "log" ocommon "github.com/hashicorp/packer/builder/oracle/common" - client "github.com/hashicorp/packer/builder/oracle/oci/client" "github.com/hashicorp/packer/common" "github.com/hashicorp/packer/helper/communicator" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" + "github.com/oracle/oci-go-sdk/core" ) // BuilderId uniquely identifies the builder @@ -78,10 +78,15 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe return nil, rawErr.(error) } + region, err := b.config.ConfigProvider.Region() + if err != nil { + return nil, err + } + // Build the artifact and return it artifact := &Artifact{ - Image: state.Get("image").(client.Image), - Region: b.config.AccessCfg.Region, + Image: state.Get("image").(core.Image), + Region: region, driver: driver, } diff --git a/builder/oracle/oci/client/base_client.go b/builder/oracle/oci/client/base_client.go deleted file mode 100644 index 01d66215a..000000000 --- a/builder/oracle/oci/client/base_client.go +++ /dev/null @@ -1,216 +0,0 @@ -package oci - -import ( - "bytes" - "encoding/json" - "net/http" - "net/url" - - "github.com/google/go-querystring/query" -) - -const ( - contentType = "Content-Type" - jsonContentType = "application/json" -) - -// baseClient provides a basic (AND INTENTIONALLY INCOMPLETE) JSON REST client -// that abstracts away some of the repetitive code required in the OCI Client. -type baseClient struct { - httpClient *http.Client - method string - url string - queryStruct interface{} - header http.Header - body interface{} -} - -// newBaseClient constructs a default baseClient. -func newBaseClient() *baseClient { - return &baseClient{ - httpClient: http.DefaultClient, - method: "GET", - header: make(http.Header), - } -} - -// New creates a copy of an existing baseClient. -func (c *baseClient) New() *baseClient { - // Copy headers - header := make(http.Header) - for k, v := range c.header { - header[k] = v - } - - return &baseClient{ - httpClient: c.httpClient, - method: c.method, - url: c.url, - header: header, - } -} - -// Client sets the http Client used to perform requests. -func (c *baseClient) Client(httpClient *http.Client) *baseClient { - if httpClient == nil { - c.httpClient = http.DefaultClient - } else { - c.httpClient = httpClient - } - return c -} - -// Base sets the base client url. -func (c *baseClient) Base(path string) *baseClient { - c.url = path - return c -} - -// Path extends the client url. -func (c *baseClient) Path(path string) *baseClient { - baseURL, baseErr := url.Parse(c.url) - pathURL, pathErr := url.Parse(path) - // Bail on parsing error leaving the client's url unmodified - if baseErr != nil || pathErr != nil { - return c - } - - c.url = baseURL.ResolveReference(pathURL).String() - return c -} - -// QueryStruct sets the struct from which the request querystring is built. -func (c *baseClient) QueryStruct(params interface{}) *baseClient { - c.queryStruct = params - return c -} - -// SetBody wraps a given struct for serialisation and sets the client body. -func (c *baseClient) SetBody(params interface{}) *baseClient { - c.body = params - return c -} - -// Header - -// AddHeader adds a HTTP header to the client. Existing keys will be extended. -func (c *baseClient) AddHeader(key, value string) *baseClient { - c.header.Add(key, value) - return c -} - -// SetHeader sets a HTTP header on the client. Existing keys will be -// overwritten. -func (c *baseClient) SetHeader(key, value string) *baseClient { - c.header.Add(key, value) - return c -} - -// HTTP methods (subset) - -// Get sets the client's HTTP method to GET. -func (c *baseClient) Get(path string) *baseClient { - c.method = "GET" - return c.Path(path) -} - -// Post sets the client's HTTP method to POST. -func (c *baseClient) Post(path string) *baseClient { - c.method = "POST" - return c.Path(path) -} - -// Delete sets the client's HTTP method to DELETE. -func (c *baseClient) Delete(path string) *baseClient { - c.method = "DELETE" - return c.Path(path) -} - -// Do executes a HTTP request and returns the response encoded as either error -// or success values. -func (c *baseClient) Do(req *http.Request, successV, failureV interface{}) (*http.Response, error) { - resp, err := c.httpClient.Do(req) - if err != nil { - return nil, err - } - defer resp.Body.Close() - - if resp.StatusCode >= 200 && resp.StatusCode < 300 { - if successV != nil { - err = json.NewDecoder(resp.Body).Decode(successV) - } - } else { - if failureV != nil { - err = json.NewDecoder(resp.Body).Decode(failureV) - } - } - - return resp, err -} - -// Request builds a http.Request from the baseClient instance. -func (c *baseClient) Request() (*http.Request, error) { - reqURL, err := url.Parse(c.url) - if err != nil { - return nil, err - } - - if c.queryStruct != nil { - err = addQueryStruct(reqURL, c.queryStruct) - if err != nil { - return nil, err - } - } - - body := &bytes.Buffer{} - if c.body != nil { - if err := json.NewEncoder(body).Encode(c.body); err != nil { - return nil, err - } - } - - req, err := http.NewRequest(c.method, reqURL.String(), body) - if err != nil { - return nil, err - } - - // Add headers to request - for k, vs := range c.header { - for _, v := range vs { - req.Header.Add(k, v) - } - } - - return req, nil -} - -// Receive creates a http request from the client and executes it returning the -// response. -func (c *baseClient) Receive(successV, failureV interface{}) (*http.Response, error) { - req, err := c.Request() - if err != nil { - return nil, err - } - return c.Do(req, successV, failureV) -} - -// addQueryStruct converts a struct to a querystring and merges any values -// provided in the URL itself. -func addQueryStruct(reqURL *url.URL, queryStruct interface{}) error { - urlValues, err := url.ParseQuery(reqURL.RawQuery) - if err != nil { - return err - } - queryValues, err := query.Values(queryStruct) - if err != nil { - return err - } - - for k, vs := range queryValues { - for _, v := range vs { - urlValues.Add(k, v) - } - } - reqURL.RawQuery = urlValues.Encode() - return nil -} diff --git a/builder/oracle/oci/client/client.go b/builder/oracle/oci/client/client.go deleted file mode 100644 index 8e6c1762d..000000000 --- a/builder/oracle/oci/client/client.go +++ /dev/null @@ -1,31 +0,0 @@ -package oci - -import ( - "net/http" -) - -const ( - apiVersion = "20160918" - userAgent = "go-oci/" + apiVersion - baseURLPattern = "https://%s.%s.oraclecloud.com/%s/" -) - -// Client is the main interface through which consumers interact with the OCI -// API. -type Client struct { - UserAgent string - Compute *ComputeClient - Config *Config -} - -// NewClient creates a new Client for communicating with the OCI API. -func NewClient(config *Config) (*Client, error) { - transport := NewTransport(http.DefaultTransport, config) - base := newBaseClient().Client(&http.Client{Transport: transport}) - - return &Client{ - UserAgent: userAgent, - Compute: NewComputeClient(base.New().Base(config.getBaseURL("iaas"))), - Config: config, - }, nil -} diff --git a/builder/oracle/oci/client/client_test.go b/builder/oracle/oci/client/client_test.go deleted file mode 100644 index f2ebd8f87..000000000 --- a/builder/oracle/oci/client/client_test.go +++ /dev/null @@ -1,49 +0,0 @@ -package oci - -import ( - "net/http" - "net/http/httptest" - "net/url" - "os" - - "github.com/go-ini/ini" -) - -var ( - mux *http.ServeMux - client *Client - server *httptest.Server - keyFile *os.File -) - -// setup sets up a test HTTP server along with a oci.Client that is -// configured to talk to that test server. Tests should register handlers on -// mux which provide mock responses for the API method being tested. -func setup() { - mux = http.NewServeMux() - server = httptest.NewServer(mux) - parsedURL, _ := url.Parse(server.URL) - - config := &Config{} - config.baseURL = parsedURL.String() - - var cfg *ini.File - var err error - cfg, keyFile, err = BaseTestConfig() - - config, err = loadConfigSection(cfg, "DEFAULT", config) - if err != nil { - panic(err) - } - - client, err = NewClient(config) - if err != nil { - panic("Failed to instantiate test client") - } -} - -// teardown closes the test HTTP server -func teardown() { - server.Close() - os.Remove(keyFile.Name()) -} diff --git a/builder/oracle/oci/client/compute.go b/builder/oracle/oci/client/compute.go deleted file mode 100644 index 183a3794f..000000000 --- a/builder/oracle/oci/client/compute.go +++ /dev/null @@ -1,21 +0,0 @@ -package oci - -// ComputeClient is a client for the OCI Compute API. -type ComputeClient struct { - BaseURL string - Instances *InstanceService - Images *ImageService - VNICAttachments *VNICAttachmentService - VNICs *VNICService -} - -// NewComputeClient creates a new client for communicating with the OCI -// Compute API. -func NewComputeClient(s *baseClient) *ComputeClient { - return &ComputeClient{ - Instances: NewInstanceService(s), - Images: NewImageService(s), - VNICAttachments: NewVNICAttachmentService(s), - VNICs: NewVNICService(s), - } -} diff --git a/builder/oracle/oci/client/config.go b/builder/oracle/oci/client/config.go deleted file mode 100644 index 4df6b6a01..000000000 --- a/builder/oracle/oci/client/config.go +++ /dev/null @@ -1,240 +0,0 @@ -package oci - -import ( - "crypto/rand" - "crypto/rsa" - "crypto/x509" - "encoding/pem" - "errors" - "fmt" - "io/ioutil" - "os" - - "github.com/go-ini/ini" - "github.com/mitchellh/go-homedir" -) - -// Config API authentication and target configuration -type Config struct { - // User OCID e.g. ocid1.user.oc1..aaaaaaaadcshyehbkvxl7arse3lv7z5oknexjgfhnhwidtugsxhlm4247 - User string `ini:"user"` - - // User's Tenancy OCID e.g. ocid1.tenancy.oc1..aaaaaaaagtgvshv6opxzjyzkupkt64ymd32n6kbomadanpcg43d - Tenancy string `ini:"tenancy"` - - // Bare metal region identifier (e.g. us-phoenix-1) - Region string `ini:"region"` - - // Hex key fingerprint (e.g. b5:a0:62:57:28:0d:fd:c9:59:16:eb:d4:51:9f:70:e4) - Fingerprint string `ini:"fingerprint"` - - // Path to OCI config file (e.g. ~/.oci/config) - KeyFile string `ini:"key_file"` - - // Passphrase used for the key, if it is encrypted. - PassPhrase string `ini:"pass_phrase"` - - // Private key (loaded via LoadPrivateKey or ParsePrivateKey) - Key *rsa.PrivateKey - - // Used to override base API URL. - baseURL string -} - -// getBaseURL returns either the specified base URL or builds the appropriate -// URL based on service, region, and API version. -func (c *Config) getBaseURL(service string) string { - if c.baseURL != "" { - return c.baseURL - } - return fmt.Sprintf(baseURLPattern, service, c.Region, apiVersion) -} - -// LoadConfigsFromFile loads all oracle oci configurations from a file -// (generally ~/.oci/config). -func LoadConfigsFromFile(path string) (map[string]*Config, error) { - if _, err := os.Stat(path); err != nil { - return nil, fmt.Errorf("Oracle OCI config file is missing: %s", path) - } - - cfgFile, err := ini.Load(path) - if err != nil { - err := fmt.Errorf("Failed to parse config file %s: %s", path, err.Error()) - return nil, err - } - - configs := make(map[string]*Config) - - // Load DEFAULT section to populate defaults for all other configs - config, err := loadConfigSection(cfgFile, "DEFAULT", nil) - if err != nil { - return nil, err - } - configs["DEFAULT"] = config - - // Load other sections. - for _, sectionName := range cfgFile.SectionStrings() { - if sectionName == "DEFAULT" { - continue - } - - // Map to Config struct with defaults from DEFAULT section. - config, err := loadConfigSection(cfgFile, sectionName, configs["DEFAULT"]) - if err != nil { - return nil, err - } - configs[sectionName] = config - } - - return configs, nil -} - -// Loads an individual Config object from a ini.Section in the Oracle OCI config -// file. -func loadConfigSection(f *ini.File, sectionName string, config *Config) (*Config, error) { - if config == nil { - config = &Config{} - } - - section, err := f.GetSection(sectionName) - if err != nil { - return nil, fmt.Errorf("Config file does not contain a %s section", sectionName) - } - - if err := section.MapTo(config); err != nil { - return nil, err - } - - config.Key, err = LoadPrivateKey(config) - if err != nil { - return nil, err - } - - return config, err -} - -// LoadPrivateKey loads private key from disk and parses it. -func LoadPrivateKey(config *Config) (*rsa.PrivateKey, error) { - // Expand '~' to $HOME - path, err := homedir.Expand(config.KeyFile) - if err != nil { - return nil, err - } - - // Read and parse API signing key - keyContent, err := ioutil.ReadFile(path) - if err != nil { - return nil, err - } - key, err := ParsePrivateKey(keyContent, []byte(config.PassPhrase)) - - return key, err -} - -// ParsePrivateKey parses a PEM encoded array of bytes into an rsa.PrivateKey. -// Attempts to decrypt the PEM encoded array of bytes with the given password -// if the PEM encoded byte array is encrypted. -func ParsePrivateKey(content, password []byte) (*rsa.PrivateKey, error) { - keyBlock, _ := pem.Decode(content) - - if keyBlock == nil { - return nil, errors.New("could not decode PEM private key") - } - - var der []byte - var err error - if x509.IsEncryptedPEMBlock(keyBlock) { - if len(password) < 1 { - return nil, errors.New("encrypted private key but no pass phrase provided") - } - der, err = x509.DecryptPEMBlock(keyBlock, password) - if err != nil { - return nil, err - } - } else { - der = keyBlock.Bytes - } - - if key, err := x509.ParsePKCS1PrivateKey(der); err == nil { - return key, nil - } - - key, err := x509.ParsePKCS8PrivateKey(der) - if err == nil { - switch key := key.(type) { - case *rsa.PrivateKey: - return key, nil - default: - return nil, errors.New("Private key is not an RSA private key") - } - } - return nil, fmt.Errorf("Failed to parse private key :%s", err) -} - -// BaseTestConfig creates the base (DEFAULT) config including a temporary key -// file. -// NOTE: Caller is responsible for removing temporary key file. -func BaseTestConfig() (*ini.File, *os.File, error) { - keyFile, err := generateRSAKeyFile() - if err != nil { - return nil, keyFile, err - } - // Build ini - cfg := ini.Empty() - section, _ := cfg.NewSection("DEFAULT") - section.NewKey("region", "us-ashburn-1") - section.NewKey("tenancy", "ocid1.tenancy.oc1..aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") - section.NewKey("user", "ocid1.user.oc1..aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") - section.NewKey("fingerprint", "3c:b6:44:d7:49:1a:ac:bf:de:7d:76:22:a7:f5:df:55") - section.NewKey("key_file", keyFile.Name()) - - return cfg, keyFile, nil -} - -// WriteTestConfig writes a ini.File to a temporary file for use in unit tests. -// NOTE: Caller is responsible for removing temporary file. -func WriteTestConfig(cfg *ini.File) (*os.File, error) { - confFile, err := ioutil.TempFile("", "config_file") - if err != nil { - return nil, err - } - - _, err = cfg.WriteTo(confFile) - if err != nil { - os.Remove(confFile.Name()) - return nil, err - } - - return confFile, nil -} - -// generateRSAKeyFile generates an RSA key file for use in unit tests. -// NOTE: The caller is responsible for deleting the temporary file. -func generateRSAKeyFile() (*os.File, error) { - // Create temporary file for the key - f, err := ioutil.TempFile("", "key") - if err != nil { - return nil, err - } - - // Generate key - priv, err := rsa.GenerateKey(rand.Reader, 2014) - if err != nil { - return nil, err - } - - // ASN.1 DER encoded form - privDer := x509.MarshalPKCS1PrivateKey(priv) - privBlk := pem.Block{ - Type: "RSA PRIVATE KEY", - Headers: nil, - Bytes: privDer, - } - - // Write the key out - if _, err := f.Write(pem.EncodeToMemory(&privBlk)); err != nil { - return nil, err - } - - return f, nil -} diff --git a/builder/oracle/oci/client/config_test.go b/builder/oracle/oci/client/config_test.go deleted file mode 100644 index 1be34c5f0..000000000 --- a/builder/oracle/oci/client/config_test.go +++ /dev/null @@ -1,283 +0,0 @@ -package oci - -import ( - "crypto/rand" - "crypto/rsa" - "crypto/x509" - "encoding/asn1" - "encoding/pem" - "os" - "reflect" - "strings" - "testing" -) - -func TestNewConfigMissingFile(t *testing.T) { - // WHEN - _, err := LoadConfigsFromFile("some/invalid/path") - - // THEN - - if err == nil { - t.Error("Expected missing file error") - } -} - -func TestNewConfigDefaultOnly(t *testing.T) { - // GIVEN - - // Get DEFAULT config - cfg, keyFile, err := BaseTestConfig() - defer os.Remove(keyFile.Name()) - - // Write test config to file - f, err := WriteTestConfig(cfg) - if err != nil { - t.Fatal(err) - } - defer os.Remove(f.Name()) // clean up - - // WHEN - - // Load configs - cfgs, err := LoadConfigsFromFile(f.Name()) - if err != nil { - t.Fatal(err) - } - - // THEN - - if _, ok := cfgs["DEFAULT"]; !ok { - t.Fatal("Expected DEFAULT config to exist in map") - } -} - -func TestNewConfigDefaultsPopulated(t *testing.T) { - // GIVEN - - // Get DEFAULT config - cfg, keyFile, err := BaseTestConfig() - defer os.Remove(keyFile.Name()) - - admin := cfg.Section("ADMIN") - admin.NewKey("user", "ocid1.user.oc1..bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb") - admin.NewKey("fingerprint", "11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11") - - // Write test config to file - f, err := WriteTestConfig(cfg) - if err != nil { - t.Fatal(err) - } - defer os.Remove(f.Name()) // clean up - - // WHEN - - cfgs, err := LoadConfigsFromFile(f.Name()) - adminConfig, ok := cfgs["ADMIN"] - - // THEN - - if !ok { - t.Fatal("Expected ADMIN config to exist in map") - } - - if adminConfig.Region != "us-ashburn-1" { - t.Errorf("Expected 'us-ashburn-1', got '%s'", adminConfig.Region) - } -} - -func TestNewConfigDefaultsOverridden(t *testing.T) { - // GIVEN - - // Get DEFAULT config - cfg, keyFile, err := BaseTestConfig() - defer os.Remove(keyFile.Name()) - - admin := cfg.Section("ADMIN") - admin.NewKey("user", "ocid1.user.oc1..bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb") - admin.NewKey("fingerprint", "11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11") - - // Write test config to file - f, err := WriteTestConfig(cfg) - if err != nil { - t.Fatal(err) - } - defer os.Remove(f.Name()) // clean up - - // WHEN - - cfgs, err := LoadConfigsFromFile(f.Name()) - adminConfig, ok := cfgs["ADMIN"] - - // THEN - - if !ok { - t.Fatal("Expected ADMIN config to exist in map") - } - - if adminConfig.Fingerprint != "11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11" { - t.Errorf("Expected fingerprint '11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11', got '%s'", - adminConfig.Fingerprint) - } -} - -func TestParseEncryptedPrivateKeyValidPassword(t *testing.T) { - // Generate private key - priv, err := rsa.GenerateKey(rand.Reader, 2014) - if err != nil { - t.Fatalf("Unexpected generating RSA key: %+v", err) - } - publicKey := priv.PublicKey - - // ASN.1 DER encoded form - privDer := x509.MarshalPKCS1PrivateKey(priv) - - blockType := "RSA PRIVATE KEY" - password := []byte("password") - cipherType := x509.PEMCipherAES256 - - // Encrypt priv with password - encryptedPEMBlock, err := x509.EncryptPEMBlock( - rand.Reader, - blockType, - privDer, - password, - cipherType) - if err != nil { - t.Fatalf("Unexpected error encrypting PEM block: %+v", err) - } - - // Parse private key - key, err := ParsePrivateKey(pem.EncodeToMemory(encryptedPEMBlock), password) - if err != nil { - t.Fatalf("unexpected error: %+v", err) - } - - // Check we get the same key back - if !reflect.DeepEqual(publicKey, key.PublicKey) { - t.Errorf("expected public key of encrypted and decrypted key to match") - } -} - -func TestParseEncryptedPrivateKeyPKCS8(t *testing.T) { - // Generate private key - priv, err := rsa.GenerateKey(rand.Reader, 2014) - if err != nil { - t.Fatalf("Unexpected generating RSA key: %+v", err) - } - publicKey := priv.PublicKey - - // Implements x509.MarshalPKCS8PrivateKey which is not included in the - // standard library. - pkey := struct { - Version int - PrivateKeyAlgorithm []asn1.ObjectIdentifier - PrivateKey []byte - }{ - Version: 0, - PrivateKeyAlgorithm: []asn1.ObjectIdentifier{{1, 2, 840, 113549, 1, 1, 1}}, - PrivateKey: x509.MarshalPKCS1PrivateKey(priv), - } - privDer, err := asn1.Marshal(pkey) - if err != nil { - t.Fatalf("Unexpected marshaling RSA key: %+v", err) - } - - blockType := "RSA PRIVATE KEY" - password := []byte("password") - cipherType := x509.PEMCipherAES256 - - // Encrypt priv with password - encryptedPEMBlock, err := x509.EncryptPEMBlock( - rand.Reader, - blockType, - privDer, - password, - cipherType) - if err != nil { - t.Fatalf("Unexpected error encrypting PEM block: %+v", err) - } - - // Parse private key - key, err := ParsePrivateKey(pem.EncodeToMemory(encryptedPEMBlock), password) - if err != nil { - t.Fatalf("unexpected error: %+v", err) - } - - // Check we get the same key back - if !reflect.DeepEqual(publicKey, key.PublicKey) { - t.Errorf("expected public key of encrypted and decrypted key to match") - } -} - -func TestParseEncryptedPrivateKeyInvalidPassword(t *testing.T) { - // Generate private key - priv, err := rsa.GenerateKey(rand.Reader, 2014) - if err != nil { - t.Fatalf("Unexpected generating RSA key: %+v", err) - } - - // ASN.1 DER encoded form - privDer := x509.MarshalPKCS1PrivateKey(priv) - - blockType := "RSA PRIVATE KEY" - password := []byte("password") - cipherType := x509.PEMCipherAES256 - - // Encrypt priv with password - encryptedPEMBlock, err := x509.EncryptPEMBlock( - rand.Reader, - blockType, - privDer, - password, - cipherType) - if err != nil { - t.Fatalf("Unexpected error encrypting PEM block: %+v", err) - } - - // Parse private key (with wrong password) - _, err = ParsePrivateKey(pem.EncodeToMemory(encryptedPEMBlock), []byte("foo")) - if err == nil { - t.Fatalf("Expected error, got nil") - } - - if !strings.Contains(err.Error(), "decryption password incorrect") { - t.Errorf("Expected error to contain 'decryption password incorrect', got %+v", err) - } -} - -func TestParseEncryptedPrivateKeyInvalidNoPassword(t *testing.T) { - // Generate private key - priv, err := rsa.GenerateKey(rand.Reader, 2014) - if err != nil { - t.Fatalf("Unexpected generating RSA key: %+v", err) - } - - // ASN.1 DER encoded form - privDer := x509.MarshalPKCS1PrivateKey(priv) - - blockType := "RSA PRIVATE KEY" - password := []byte("password") - cipherType := x509.PEMCipherAES256 - - // Encrypt priv with password - encryptedPEMBlock, err := x509.EncryptPEMBlock( - rand.Reader, - blockType, - privDer, - password, - cipherType) - if err != nil { - t.Fatalf("Unexpected error encrypting PEM block: %+v", err) - } - - // Parse private key (with wrong password) - _, err = ParsePrivateKey(pem.EncodeToMemory(encryptedPEMBlock), []byte{}) - if err == nil { - t.Fatalf("Expected error, got nil") - } - - if !strings.Contains(err.Error(), "no pass phrase provided") { - t.Errorf("Expected error to contain 'no pass phrase provided', got %+v", err) - } -} diff --git a/builder/oracle/oci/client/error.go b/builder/oracle/oci/client/error.go deleted file mode 100644 index a97112f81..000000000 --- a/builder/oracle/oci/client/error.go +++ /dev/null @@ -1,27 +0,0 @@ -package oci - -import "fmt" - -// APIError encapsulates an error returned from the API -type APIError struct { - Code string `json:"code"` - Message string `json:"message"` -} - -func (e APIError) Error() string { - return fmt.Sprintf("OCI: [%s] '%s'", e.Code, e.Message) -} - -// firstError is a helper function to work out which error to return from calls -// to the API. -func firstError(err error, apiError *APIError) error { - if err != nil { - return err - } - - if apiError != nil && len(apiError.Code) > 0 { - return apiError - } - - return nil -} diff --git a/builder/oracle/oci/client/image.go b/builder/oracle/oci/client/image.go deleted file mode 100644 index 67ada02d5..000000000 --- a/builder/oracle/oci/client/image.go +++ /dev/null @@ -1,122 +0,0 @@ -package oci - -import ( - "time" -) - -// ImageService enables communicating with the OCI compute API's instance -// related endpoints. -type ImageService struct { - client *baseClient -} - -// NewImageService creates a new ImageService for communicating with the -// OCI compute API's instance related endpoints. -func NewImageService(s *baseClient) *ImageService { - return &ImageService{ - client: s.New().Path("images/"), - } -} - -// Image details a OCI boot disk image. -type Image struct { - // The OCID of the image originally used to launch the instance. - BaseImageID string `json:"baseImageId,omitempty"` - - // The OCID of the compartment containing the instance you want to use - // as the basis for the image. - CompartmentID string `json:"compartmentId"` - - // Whether instances launched with this image can be used to create new - // images. - CreateImageAllowed bool `json:"createImageAllowed"` - - // A user-friendly name for the image. It does not have to be unique, - // and it's changeable. You cannot use an Oracle-provided image name - // as a custom image name. - DisplayName string `json:"displayName,omitempty"` - - // The OCID of the image. - ID string `json:"id"` - - // Current state of the image. Allowed values are: - // - PROVISIONING - // - AVAILABLE - // - DISABLED - // - DELETED - LifecycleState string `json:"lifecycleState"` - - // The image's operating system (e.g. Oracle Linux). - OperatingSystem string `json:"operatingSystem"` - - // The image's operating system version (e.g. 7.2). - OperatingSystemVersion string `json:"operatingSystemVersion"` - - // The date and time the image was created. - TimeCreated time.Time `json:"timeCreated"` -} - -// GetImageParams are the parameters available when communicating with the -// GetImage API endpoint. -type GetImageParams struct { - ID string `url:"imageId"` -} - -// Get returns a single Image -func (s *ImageService) Get(params *GetImageParams) (Image, error) { - image := Image{} - e := &APIError{} - - _, err := s.client.New().Get(params.ID).Receive(&image, e) - err = firstError(err, e) - - return image, err -} - -// CreateImageParams are the parameters available when communicating with -// the CreateImage API endpoint. -type CreateImageParams struct { - CompartmentID string `json:"compartmentId"` - DisplayName string `json:"displayName,omitempty"` - InstanceID string `json:"instanceId"` -} - -// Create creates a new custom image based on a running compute instance. It -// does *not* wait for the imaging process to finish. -func (s *ImageService) Create(params *CreateImageParams) (Image, error) { - image := Image{} - e := &APIError{} - - _, err := s.client.New().Post("").SetBody(params).Receive(&image, &e) - err = firstError(err, e) - - return image, err -} - -// GetResourceState GETs the LifecycleState of the given image id. -func (s *ImageService) GetResourceState(id string) (string, error) { - image, err := s.Get(&GetImageParams{ID: id}) - if err != nil { - return "", err - } - return image.LifecycleState, nil - -} - -// DeleteImageParams are the parameters available when communicating with -// the DeleteImage API endpoint. -type DeleteImageParams struct { - ID string `url:"imageId"` -} - -// Delete deletes an existing custom image. -// NOTE: Deleting an image results in the API endpoint returning 404 on -// subsequent calls. As such deletion can't be waited on with a Waiter. -func (s *ImageService) Delete(params *DeleteImageParams) error { - e := &APIError{} - - _, err := s.client.New().Delete(params.ID).SetBody(params).Receive(nil, e) - err = firstError(err, e) - - return err -} diff --git a/builder/oracle/oci/client/image_test.go b/builder/oracle/oci/client/image_test.go deleted file mode 100644 index ef55cc552..000000000 --- a/builder/oracle/oci/client/image_test.go +++ /dev/null @@ -1,115 +0,0 @@ -package oci - -import ( - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestGetImage(t *testing.T) { - setup() - defer teardown() - - id := "ocid1.image.oc1.phx.a" - path := fmt.Sprintf("/images/%s", id) - mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) { - fmt.Fprintf(w, `{"id":"%s"}`, id) - }) - - image, err := client.Compute.Images.Get(&GetImageParams{ID: id}) - if err != nil { - t.Errorf("Client.Compute.Images.Get() returned error: %v", err) - } - - want := Image{ID: id} - - if !reflect.DeepEqual(image, want) { - t.Errorf("Client.Compute.Images.Get() returned %+v, want %+v", image, want) - } -} - -func TestCreateImage(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/images/", func(w http.ResponseWriter, r *http.Request) { - fmt.Fprint(w, `{"displayName": "go-oci test"}`) - }) - - params := &CreateImageParams{ - CompartmentID: "ocid1.compartment.oc1..a", - DisplayName: "go-oci test image", - InstanceID: "ocid1.image.oc1.phx.a", - } - - image, err := client.Compute.Images.Create(params) - if err != nil { - t.Errorf("Client.Compute.Images.Create() returned error: %v", err) - } - - want := Image{DisplayName: "go-oci test"} - - if !reflect.DeepEqual(image, want) { - t.Errorf("Client.Compute.Images.Create() returned %+v, want %+v", image, want) - } -} - -func TestImageGetResourceState(t *testing.T) { - setup() - defer teardown() - - id := "ocid1.image.oc1.phx.a" - path := fmt.Sprintf("/images/%s", id) - mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) { - fmt.Fprint(w, `{"LifecycleState": "AVAILABLE"}`) - }) - - state, err := client.Compute.Images.GetResourceState(id) - if err != nil { - t.Errorf("Client.Compute.Images.GetResourceState() returned error: %v", err) - } - - want := "AVAILABLE" - if state != want { - t.Errorf("Client.Compute.Images.GetResourceState() returned %+v, want %+v", state, want) - } -} - -func TestImageGetResourceStateInvalidID(t *testing.T) { - setup() - defer teardown() - - id := "ocid1.image.oc1.phx.a" - path := fmt.Sprintf("/images/%s", id) - mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(http.StatusNotFound) - fmt.Fprint(w, `{"code": "NotAuthorizedOrNotFound"}`) - }) - - state, err := client.Compute.Images.GetResourceState(id) - if err == nil { - t.Errorf("Client.Compute.Images.GetResourceState() expected error, got %v", state) - } - - want := &APIError{Code: "NotAuthorizedOrNotFound"} - if !reflect.DeepEqual(err, want) { - t.Errorf("Client.Compute.Images.GetResourceState() errored with %+v, want %+v", err, want) - } -} - -func TestDeleteInstance(t *testing.T) { - setup() - defer teardown() - - id := "ocid1.image.oc1.phx.a" - path := fmt.Sprintf("/images/%s", id) - mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(http.StatusNoContent) - }) - - err := client.Compute.Images.Delete(&DeleteImageParams{ID: id}) - if err != nil { - t.Errorf("Client.Compute.Images.Delete() returned error: %v", err) - } -} diff --git a/builder/oracle/oci/client/instance.go b/builder/oracle/oci/client/instance.go deleted file mode 100644 index e81ad3a44..000000000 --- a/builder/oracle/oci/client/instance.go +++ /dev/null @@ -1,129 +0,0 @@ -package oci - -import ( - "time" -) - -// InstanceService enables communicating with the OCI compute API's instance -// related endpoints. -type InstanceService struct { - client *baseClient -} - -// NewInstanceService creates a new InstanceService for communicating with the -// OCI compute API's instance related endpoints. -func NewInstanceService(s *baseClient) *InstanceService { - return &InstanceService{ - client: s.New().Path("instances/"), - } -} - -// Instance details a OCI compute instance. -type Instance struct { - // The Availability Domain the instance is running in. - AvailabilityDomain string `json:"availabilityDomain"` - - // The OCID of the compartment that contains the instance. - CompartmentID string `json:"compartmentId"` - - // A user-friendly name. Does not have to be unique, and it's changeable. - DisplayName string `json:"displayName,omitempty"` - - // The OCID of the instance. - ID string `json:"id"` - - // The image used to boot the instance. - ImageID string `json:"imageId,omitempty"` - - // The current state of the instance. Allowed values: - // - PROVISIONING - // - RUNNING - // - STARTING - // - STOPPING - // - STOPPED - // - CREATING_IMAGE - // - TERMINATING - // - TERMINATED - LifecycleState string `json:"lifecycleState"` - - // Custom metadata that you provide. - Metadata map[string]string `json:"metadata,omitempty"` - - // The region that contains the Availability Domain the instance is running in. - Region string `json:"region"` - - // The shape of the instance. The shape determines the number of CPUs - // and the amount of memory allocated to the instance. - Shape string `json:"shape"` - - // The date and time the instance was created. - TimeCreated time.Time `json:"timeCreated"` -} - -// GetInstanceParams are the parameters available when communicating with the -// GetInstance API endpoint. -type GetInstanceParams struct { - ID string `url:"instanceId,omitempty"` -} - -// Get returns a single Instance -func (s *InstanceService) Get(params *GetInstanceParams) (Instance, error) { - instance := Instance{} - e := &APIError{} - - _, err := s.client.New().Get(params.ID).Receive(&instance, e) - err = firstError(err, e) - - return instance, err -} - -// LaunchInstanceParams are the parameters available when communicating with -// the LunchInstance API endpoint. -type LaunchInstanceParams struct { - AvailabilityDomain string `json:"availabilityDomain,omitempty"` - CompartmentID string `json:"compartmentId,omitempty"` - DisplayName string `json:"displayName,omitempty"` - ImageID string `json:"imageId,omitempty"` - Metadata map[string]string `json:"metadata,omitempty"` - OPCiPXEScript string `json:"opcIpxeScript,omitempty"` - Shape string `json:"shape,omitempty"` - SubnetID string `json:"subnetId,omitempty"` -} - -// Launch creates a new OCI compute instance. It does *not* wait for the -// instance to boot. -func (s *InstanceService) Launch(params *LaunchInstanceParams) (Instance, error) { - instance := &Instance{} - e := &APIError{} - - _, err := s.client.New().Post("").SetBody(params).Receive(instance, e) - err = firstError(err, e) - - return *instance, err -} - -// TerminateInstanceParams are the parameters available when communicating with -// the TerminateInstance API endpoint. -type TerminateInstanceParams struct { - ID string `url:"instanceId,omitempty"` -} - -// Terminate terminates a running OCI compute instance. -// instance to boot. -func (s *InstanceService) Terminate(params *TerminateInstanceParams) error { - e := &APIError{} - - _, err := s.client.New().Delete(params.ID).SetBody(params).Receive(nil, e) - err = firstError(err, e) - - return err -} - -// GetResourceState GETs the LifecycleState of the given instance id. -func (s *InstanceService) GetResourceState(id string) (string, error) { - instance, err := s.Get(&GetInstanceParams{ID: id}) - if err != nil { - return "", err - } - return instance.LifecycleState, nil -} diff --git a/builder/oracle/oci/client/instance_test.go b/builder/oracle/oci/client/instance_test.go deleted file mode 100644 index e45b707af..000000000 --- a/builder/oracle/oci/client/instance_test.go +++ /dev/null @@ -1,96 +0,0 @@ -package oci - -import ( - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestGetInstance(t *testing.T) { - setup() - defer teardown() - - id := "ocid1.instance.oc1.phx.a" - path := fmt.Sprintf("/instances/%s", id) - mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) { - fmt.Fprintf(w, `{"id":"%s"}`, id) - }) - - instance, err := client.Compute.Instances.Get(&GetInstanceParams{ID: id}) - if err != nil { - t.Errorf("Client.Compute.Instances.Get() returned error: %v", err) - } - - want := Instance{ID: id} - - if !reflect.DeepEqual(instance, want) { - t.Errorf("Client.Compute.Instances.Get() returned %+v, want %+v", instance, want) - } -} - -func TestLaunchInstance(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/instances/", func(w http.ResponseWriter, r *http.Request) { - fmt.Fprint(w, `{"displayName": "go-oci test"}`) - }) - - params := &LaunchInstanceParams{ - AvailabilityDomain: "aaaa:PHX-AD-1", - CompartmentID: "ocid1.compartment.oc1..a", - DisplayName: "go-oci test", - ImageID: "ocid1.image.oc1.phx.a", - Shape: "VM.Standard1.1", - SubnetID: "ocid1.subnet.oc1.phx.a", - } - - instance, err := client.Compute.Instances.Launch(params) - if err != nil { - t.Errorf("Client.Compute.Instances.Launch() returned error: %v", err) - } - - want := Instance{DisplayName: "go-oci test"} - - if !reflect.DeepEqual(instance, want) { - t.Errorf("Client.Compute.Instances.Launch() returned %+v, want %+v", instance, want) - } -} - -func TestTerminateInstance(t *testing.T) { - setup() - defer teardown() - - id := "ocid1.instance.oc1.phx.a" - path := fmt.Sprintf("/instances/%s", id) - mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(http.StatusNoContent) - }) - - err := client.Compute.Instances.Terminate(&TerminateInstanceParams{ID: id}) - if err != nil { - t.Errorf("Client.Compute.Instances.Terminate() returned error: %v", err) - } -} - -func TestInstanceGetResourceState(t *testing.T) { - setup() - defer teardown() - - id := "ocid1.instance.oc1.phx.a" - path := fmt.Sprintf("/instances/%s", id) - mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) { - fmt.Fprint(w, `{"LifecycleState": "RUNNING"}`) - }) - - state, err := client.Compute.Instances.GetResourceState(id) - if err != nil { - t.Errorf("Client.Compute.Instances.GetResourceState() returned error: %v", err) - } - - want := "RUNNING" - if state != want { - t.Errorf("Client.Compute.Instances.GetResourceState() returned %+v, want %+v", state, want) - } -} diff --git a/builder/oracle/oci/client/transport.go b/builder/oracle/oci/client/transport.go deleted file mode 100644 index 79da20509..000000000 --- a/builder/oracle/oci/client/transport.go +++ /dev/null @@ -1,116 +0,0 @@ -package oci - -import ( - "bytes" - "crypto" - "crypto/rand" - "crypto/rsa" - "crypto/sha256" - "encoding/base64" - "fmt" - "io" - "net/http" - "strconv" - "strings" - "time" -) - -type nopCloser struct { - io.Reader -} - -func (nopCloser) Close() error { - return nil -} - -// Transport adds OCI signature authentication to each outgoing request. -type Transport struct { - transport http.RoundTripper - config *Config -} - -// NewTransport creates a new Transport to add OCI signature authentication -// to each outgoing request. -func NewTransport(transport http.RoundTripper, config *Config) *Transport { - return &Transport{ - transport: transport, - config: config, - } -} - -func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { - var buf *bytes.Buffer - - if req.Body != nil { - buf = new(bytes.Buffer) - buf.ReadFrom(req.Body) - req.Body = nopCloser{buf} - } - if req.Header.Get("date") == "" { - req.Header.Set("date", time.Now().UTC().Format(http.TimeFormat)) - } - if req.Header.Get("content-type") == "" { - req.Header.Set("content-type", "application/json") - } - if req.Header.Get("accept") == "" { - req.Header.Set("accept", "application/json") - } - if req.Header.Get("host") == "" { - req.Header.Set("host", req.URL.Host) - } - - var signheaders []string - if (req.Method == "PUT" || req.Method == "POST") && buf != nil { - signheaders = []string{"(request-target)", "host", "date", - "content-length", "content-type", "x-content-sha256"} - - if req.Header.Get("content-length") == "" { - req.Header.Set("content-length", strconv.Itoa(buf.Len())) - } - - hasher := sha256.New() - hasher.Write(buf.Bytes()) - hash := hasher.Sum(nil) - req.Header.Set("x-content-sha256", base64.StdEncoding.EncodeToString(hash)) - } else { - signheaders = []string{"date", "host", "(request-target)"} - } - - var signbuffer bytes.Buffer - for idx, header := range signheaders { - signbuffer.WriteString(header) - signbuffer.WriteString(": ") - - if header == "(request-target)" { - signbuffer.WriteString(strings.ToLower(req.Method)) - signbuffer.WriteString(" ") - signbuffer.WriteString(req.URL.RequestURI()) - } else { - signbuffer.WriteString(req.Header.Get(header)) - } - - if idx < len(signheaders)-1 { - signbuffer.WriteString("\n") - } - } - - h := sha256.New() - h.Write(signbuffer.Bytes()) - digest := h.Sum(nil) - signature, err := rsa.SignPKCS1v15(rand.Reader, t.config.Key, crypto.SHA256, digest) - if err != nil { - return nil, err - } - - authHeader := fmt.Sprintf("Signature headers=\"%s\","+ - "keyId=\"%s/%s/%s\","+ - "algorithm=\"rsa-sha256\","+ - "signature=\"%s\","+ - "version=\"1\"", - strings.Join(signheaders, " "), - t.config.Tenancy, t.config.User, t.config.Fingerprint, - base64.StdEncoding.EncodeToString(signature)) - req.Header.Add("Authorization", authHeader) - - return t.transport.RoundTrip(req) -} diff --git a/builder/oracle/oci/client/transport_test.go b/builder/oracle/oci/client/transport_test.go deleted file mode 100644 index ebf02040b..000000000 --- a/builder/oracle/oci/client/transport_test.go +++ /dev/null @@ -1,156 +0,0 @@ -package oci - -import ( - "net/http" - "strings" - "testing" -) - -const testKey = `-----BEGIN RSA PRIVATE KEY----- -MIIEpQIBAAKCAQEAyLnyzmYj0dZuDo2nclIdEyLZrFZLtw5xFldWpCUl5W3SxKDL -iIgwxpSO75Yf++Rzqc5j6S5bpIrdca6AwVXCNmjjxMPO7vLLm4l4IUOZMv5FqKaC -I2plFz9uBkzGscnYnMbsDA430082E07lYpNv1xy8JwpbrIsqIMh4XCKci/Od5sLR -kEicmOpQK42FGRTQjjmQoWtv+9XED+vYTRL0AxQEC/6i/E7yssFXZ+fpHSKWeKTQ -K/1Fc4pZ1zNzJcDXGuweISx/QMLz78TAPH5OBq/EQzHKSpKvfnWFRyBHne8pwuN8 -8wzbbD+/7OFjz28jNSERVJvfYe3X1k69IWMNGwIDAQABAoIBAQCZhcdU38AzxSrG -DMfuYymDslsEObiNWQlbig9lWlhCwx26cDVbxrZvm747NvpdgVyJmqbF+UP0dJVs -Voh51qrFTLIwk4bZMXBTFPCBmJ865knG9RuCFOUew8/WF7C82GHJf0eY7OL7xpDY -cbZ2D8gxofOydHSrYoElM88CwSI00xPCbBKEMrBO94oXC8yfp2bmV6bNhVXwFDEM -qda7M6jVAsBrTOzxUF5VdUUU/MLsu2cCk/ap1zer2Bml9Afk1bMeGJ3XDQgol0pS -CLxaGczpSNVMF9+pjA5sFHR5rmcl0b/kC9HsgOJGhLOimtS94O64dSdWifgsjf6+ -fhT2SMiRAoGBAOUDwkdzNqQfvS+qrP2ULpB4vt7MZ70rDGmyMDLZ1VWgcm2cDIad -b7MkFG6GCa48mKkFXK9mOPyq8ELoTjZo2p+relEqf49BpaNxr+cp11pX7g0AkzCa -a8LwdOOUW/poqYl2xLuw9Rz6ky6ybzatMvCwpQCwnbAdABIVxz4oQKHpAoGBAOBg -3uYC/ynGdF9gJTfdS5XPYoLcKKRRspBZrvvDHaWyBnanm5KYwDAZPzLQMqcpyPeo -5xgwMmtNlc6lKKyGkhSLNCV+eO3yAx1h/cq7ityvMS7u6o5sq+/bvtEnbUPYbEtk -AhVD7/w5Yyzzi4beiQxDKe0q1mvUAH56aGqJivBjAoGBALmUMTPbDhUzTwg4Y1Rd -ZtpVrj43H31wS+++oEYktTZc/T0LLi9Llr9w5kmlvmR94CtfF/ted6FwF5/wRajb -kQXAXC83pAR/au0mbCeDhWpFRLculxfUmqxuVBozF9G0TGYDY2rA+++OsgQuPebt -tRDL4/nKJQ4Ygf0lvr4EulM5AoGBALoIdyabu3WmfhwJujH8P8wA+ztmUCgVOIio -YwWIe49C8Er2om1ESqxWcmit6CFi6qY0Gw6Z/2OqGxgPJY8NsBZqaBziJF+cdWqq -MWMiZXqdopi4LC9T+KZROn9tQhGrYfaL/5IkFti3t/uwHbH/1f8dvKhQCSGzz4kN -8n7KdTDjAoGAKh8XdIOQlThFK108VT2yp4BGZXEOvWrR19DLbuUzHVrEX+Bd+uFo -Ruk9iKEH7PSnlRnIvWc1y9qN7fUi5OR3LvQNGlXHyUl6CtmH3/b064bBKudC+XTn -VBelcIoGpH7Dn9I6pKUFauJz1TSbQCIjYGNqrjyzLtG+lH/gy5q4xs8= ------END RSA PRIVATE KEY-----` - -type testTarget struct { - CapturedReq *http.Request - Response *http.Response -} - -func (target *testTarget) RoundTrip(req *http.Request) (*http.Response, error) { - target.CapturedReq = req - return target.Response, nil -} - -func testReq(method string, url string, body string, headers map[string]string) *http.Request { - req, err := http.NewRequest(method, url, strings.NewReader(body)) - if err != nil { - panic(err.Error()) - } - - for k, v := range headers { - req.Header.Add(k, v) - } - return req -} - -var KnownGoodCases = []struct { - name string - inputRequest func() *http.Request - expectedHeaders map[string]string -}{ - { - name: "Simple GET", - inputRequest: func() *http.Request { - return testReq("GET", "https://example.com/", "", map[string]string{ - "date": "Mon, 26 Sep 2016 11:04:22 GMT"}) - }, - expectedHeaders: map[string]string{ - "date": "Mon, 26 Sep 2016 11:04:22 GMT", - "content-type": "application/json", - "host": "example.com", - "accept": "application/json", - "Authorization": "Signature headers=\"date host (request-target)\",keyId=\"tenant/testuser/3c:b6:44:d7:49:1a:ac:bf:de:7d:76:22:a7:f5:df:55\",algorithm=\"rsa-sha256\",signature=\"UMw/FImQYZ5JBpfYcR9YN72lhupGl5yS+522NS9glLodU9f4oKRqaocpGdSUSRhhSDKxIx01rV547/HemJ6QqEPaJJuDQPXsGthokWMU2DBGyaMAqhLClgCJiRQMwpg4rdL2tETzkM3wy6UN+I52RYoNSdsnat2ZArCkfl8dIl9ydcwD8/+BqB8d2wyaAIS4iagdPKLAC/Mu9OzyUPOXQhYGYsoEdOowOUkHOlob65PFrlHmKJDdjEF3MDcygEpApItf4iUEloP5bjixAbZEVpj3HLQ5uaPx9m+RsLzYMeO0adE0wOv2YNmwZrExGhXh1BpTU33m5amHeUBxSaG+2A==\",version=\"1\"", - }, - }, - { - name: "Simple PUT request", - inputRequest: func() *http.Request { - return testReq("PUT", "https://example.com/", "Some Content", map[string]string{ - "date": "Mon, 26 Sep 2016 11:04:22 GMT"}) - }, - expectedHeaders: map[string]string{ - "date": "Mon, 26 Sep 2016 11:04:22 GMT", - "content-type": "application/json", - "content-length": "12", - "x-content-sha256": "lQ8fsURxamLtHxnwTYqd3MNYadJ4ZB/U9yQBKzu/fXA=", - "accept": "application/json", - "Authorization": "Signature headers=\"(request-target) host date content-length content-type x-content-sha256\",keyId=\"tenant/testuser/3c:b6:44:d7:49:1a:ac:bf:de:7d:76:22:a7:f5:df:55\",algorithm=\"rsa-sha256\",signature=\"FHyPt4PE2HGH+iftzcViB76pCJ2R9+DdTCo1Ss4mH4KHQJdyQtPsCpe6Dc19zie6cRr6dsenk21yYnncic8OwZhII8DULj2//qLFGmgFi84s7LJqMQ/COiP7O9KtCN+U8MMt4PV7ZDsiGFn3/8EUJ1wxYscxSIB19S1NpuEL062JgGfkqxTkTPd7V3Xh1NlmUUtQrAMR3l56k1iV0zXY9Uw0CjWYjueMP0JUmkO7zycYAVBrx7Q8wkmejlyD7yFrAnObyEsMm9cIL9IcruWFHeCHFxRLslw7AoLxibAm2Dc9EROuvCK2UkUp8AFkE+QyYDMrrSm1NLBMWdnYqdickA==\",version=\"1\"", - }, - }, - { - name: "Simple POST request", - inputRequest: func() *http.Request { - return testReq("POST", "https://example.com/", "Some Content", map[string]string{ - "date": "Mon, 26 Sep 2016 11:04:22 GMT"}) - }, - expectedHeaders: map[string]string{ - "date": "Mon, 26 Sep 2016 11:04:22 GMT", - "content-type": "application/json", - "content-length": "12", - "x-content-sha256": "lQ8fsURxamLtHxnwTYqd3MNYadJ4ZB/U9yQBKzu/fXA=", - "accept": "application/json", - "Authorization": "Signature headers=\"(request-target) host date content-length content-type x-content-sha256\",keyId=\"tenant/testuser/3c:b6:44:d7:49:1a:ac:bf:de:7d:76:22:a7:f5:df:55\",algorithm=\"rsa-sha256\",signature=\"WzGIoySkjqydwabMTxjVs05UBu0hThAEBzVs7HbYO45o2XpaoqGiNX67mNzs1PeYrGHpJp8+Ysoz66PChWV/1trxuTU92dQ/FgwvcwBRy5dQvdLkjWCZihNunSk4gt9652w6zZg/ybLon0CFbLRnlanDJDX9BgR3ttuTxf30t5qr2A4fnjFF4VjaU/CzE13cNfaWftjSd+xNcla2sbArF3R0+CEEb0xZEPzTyjjjkyvXdaPZwEprVn8IDmdJvLmRP4EniAPxE1EZIhd712M5ondQkR4/WckM44/hlKDeXGFb4y+QnU02i4IWgOWs3dh2tuzS1hp1zfq7qgPbZ4hp0A==\",version=\"1\"", - }, - }, - - { - name: "Simple DELETE", - inputRequest: func() *http.Request { - return testReq("DELETE", "https://example.com/", "Some Content", map[string]string{ - "date": "Mon, 26 Sep 2016 11:04:22 GMT"}) - }, - expectedHeaders: map[string]string{ - "date": "Mon, 26 Sep 2016 11:04:22 GMT", - "content-type": "application/json", - "accept": "application/json", - "Authorization": "Signature headers=\"date host (request-target)\",keyId=\"tenant/testuser/3c:b6:44:d7:49:1a:ac:bf:de:7d:76:22:a7:f5:df:55\",algorithm=\"rsa-sha256\",signature=\"Kj4YSpONZG1cibLbNgxIp4VoS5+80fsB2Fh2Ue28+QyXq4wwrJpMP+8jEupz1yTk1SNPYuxsk7lNOgtI6G1Hq0YJJVum74j46sUwRWe+f08tMJ3c9J+rrzLfpIrakQ8PaudLhHU0eK5kuTZme1dCwRWXvZq3r5IqkGot/OGMabKpBygRv9t0i5ry+bTslSjMqafTWLosY9hgIiGrXD+meB5tpyn+gPVYc//Hc/C7uNNgLJIMk5DKVa4U0YnoY3ojafZTXZQQNGRn2NDMcZUX3f3nJlUIfiZRiOCTkbPwx/fWb4MZtYaEsY5OPficbJRvfOBxSG1wjX+8rgO7ijhMAA==\",version=\"1\"", - }, - }, -} - -func TestKnownGoodRequests(t *testing.T) { - pKey, err := ParsePrivateKey([]byte(testKey), []byte{}) - if err != nil { - t.Fatalf("Failed to parse test key: %s", err.Error()) - } - - config := &Config{ - Key: pKey, - User: "testuser", - Tenancy: "tenant", - Fingerprint: "3c:b6:44:d7:49:1a:ac:bf:de:7d:76:22:a7:f5:df:55", - } - - expectedResponse := &http.Response{} - for _, tt := range KnownGoodCases { - targetBackend := &testTarget{Response: expectedResponse} - target := NewTransport(targetBackend, config) - - _, err = target.RoundTrip(tt.inputRequest()) - if err != nil { - t.Fatalf("%s: Failed to handle request %s", tt.name, err.Error()) - } - - sentReq := targetBackend.CapturedReq - - for header, val := range tt.expectedHeaders { - if sentReq.Header.Get(header) != val { - t.Fatalf("%s: Header mismatch in response,\n\t expecting \"%s\"\n\t got \"%s\"", tt.name, val, sentReq.Header.Get(header)) - } - } - } - -} diff --git a/builder/oracle/oci/client/vnic.go b/builder/oracle/oci/client/vnic.go deleted file mode 100644 index 9922d34aa..000000000 --- a/builder/oracle/oci/client/vnic.go +++ /dev/null @@ -1,47 +0,0 @@ -package oci - -import ( - "time" -) - -// VNICService enables communicating with the OCI compute API's VNICs -// endpoint. -type VNICService struct { - client *baseClient -} - -// NewVNICService creates a new VNICService for communicating with the -// OCI compute API's instance related endpoints. -func NewVNICService(s *baseClient) *VNICService { - return &VNICService{client: s.New().Path("vnics/")} -} - -// VNIC - a virtual network interface card. -type VNIC struct { - AvailabilityDomain string `json:"availabilityDomain"` - CompartmentID string `json:"compartmentId"` - DisplayName string `json:"displayName,omitempty"` - ID string `json:"id"` - LifecycleState string `json:"lifecycleState"` - PrivateIP string `json:"privateIp"` - PublicIP string `json:"publicIp"` - SubnetID string `json:"subnetId"` - TimeCreated time.Time `json:"timeCreated"` -} - -// GetVNICParams are the parameters available when communicating with the -// ListVNICs API endpoint. -type GetVNICParams struct { - ID string `url:"vnicId"` -} - -// Get returns an individual VNIC. -func (s *VNICService) Get(params *GetVNICParams) (VNIC, error) { - VNIC := &VNIC{} - e := &APIError{} - - _, err := s.client.New().Get(params.ID).Receive(VNIC, e) - err = firstError(err, e) - - return *VNIC, err -} diff --git a/builder/oracle/oci/client/vnic_attachment.go b/builder/oracle/oci/client/vnic_attachment.go deleted file mode 100644 index 1e42a0573..000000000 --- a/builder/oracle/oci/client/vnic_attachment.go +++ /dev/null @@ -1,52 +0,0 @@ -package oci - -import ( - "time" -) - -// VNICAttachmentService enables communicating with the OCI compute API's VNIC -// attachment endpoint. -type VNICAttachmentService struct { - client *baseClient -} - -// NewVNICAttachmentService creates a new VNICAttachmentService for communicating with the -// OCI compute API's instance related endpoints. -func NewVNICAttachmentService(s *baseClient) *VNICAttachmentService { - return &VNICAttachmentService{ - client: s.New().Path("vnicAttachments/"), - } -} - -// VNICAttachment details the attachment of a VNIC to a OCI instance. -type VNICAttachment struct { - AvailabilityDomain string `json:"availabilityDomain"` - CompartmentID string `json:"compartmentId"` - DisplayName string `json:"displayName,omitempty"` - ID string `json:"id"` - InstanceID string `json:"instanceId"` - LifecycleState string `json:"lifecycleState"` - SubnetID string `json:"subnetId"` - TimeCreated time.Time `json:"timeCreated"` - VNICID string `json:"vnicId"` -} - -// ListVnicAttachmentsParams are the parameters available when communicating -// with the ListVnicAttachments API endpoint. -type ListVnicAttachmentsParams struct { - AvailabilityDomain string `url:"availabilityDomain,omitempty"` - CompartmentID string `url:"compartmentId"` - InstanceID string `url:"instanceId,omitempty"` - VNICID string `url:"vnicId,omitempty"` -} - -// List returns an array of VNICAttachments. -func (s *VNICAttachmentService) List(params *ListVnicAttachmentsParams) ([]VNICAttachment, error) { - vnicAttachments := new([]VNICAttachment) - e := new(APIError) - - _, err := s.client.New().Get("").QueryStruct(params).Receive(vnicAttachments, e) - err = firstError(err, e) - - return *vnicAttachments, err -} diff --git a/builder/oracle/oci/client/vnic_attachment_test.go b/builder/oracle/oci/client/vnic_attachment_test.go deleted file mode 100644 index 704423fb0..000000000 --- a/builder/oracle/oci/client/vnic_attachment_test.go +++ /dev/null @@ -1,31 +0,0 @@ -package oci - -import ( - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestListVNICAttachments(t *testing.T) { - setup() - defer teardown() - - id := "ocid1.image.oc1.phx.a" - mux.HandleFunc("/vnicAttachments/", func(w http.ResponseWriter, r *http.Request) { - fmt.Fprintf(w, `[{"id":"%s"}]`, id) - }) - - params := &ListVnicAttachmentsParams{InstanceID: id} - - vnicAttachment, err := client.Compute.VNICAttachments.List(params) - if err != nil { - t.Errorf("Client.Compute.VNICAttachments.List() returned error: %v", err) - } - - want := []VNICAttachment{{ID: id}} - - if !reflect.DeepEqual(vnicAttachment, want) { - t.Errorf("Client.Compute.VNICAttachments.List() returned %+v, want %+v", vnicAttachment, want) - } -} diff --git a/builder/oracle/oci/client/vnic_test.go b/builder/oracle/oci/client/vnic_test.go deleted file mode 100644 index c208db5c4..000000000 --- a/builder/oracle/oci/client/vnic_test.go +++ /dev/null @@ -1,29 +0,0 @@ -package oci - -import ( - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestGetVNIC(t *testing.T) { - setup() - defer teardown() - - id := "ocid1.vnic.oc1.phx.a" - path := fmt.Sprintf("/vnics/%s", id) - mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) { - fmt.Fprintf(w, `{"id": "%s"}`, id) - }) - - vnic, err := client.Compute.VNICs.Get(&GetVNICParams{ID: id}) - if err != nil { - t.Errorf("Client.Compute.VNICs.Get() returned error: %v", err) - } - - want := &VNIC{ID: id} - if reflect.DeepEqual(vnic, want) { - t.Errorf("Client.Compute.VNICs.Get() returned %+v, want %+v", vnic, want) - } -} diff --git a/builder/oracle/oci/client/waiters.go b/builder/oracle/oci/client/waiters.go deleted file mode 100644 index bb9ca1c19..000000000 --- a/builder/oracle/oci/client/waiters.go +++ /dev/null @@ -1,59 +0,0 @@ -package oci - -import ( - "fmt" - "time" -) - -const ( - defaultWaitDurationMS = 5000 - defaultMaxRetries = 0 -) - -type Waiter struct { - WaitDurationMS int - MaxRetries int -} - -type WaitableService interface { - GetResourceState(id string) (string, error) -} - -func stringSliceContains(slice []string, value string) bool { - for _, elem := range slice { - if elem == value { - return true - } - } - return false -} - -// NewWaiter creates a waiter with default wait duration and unlimited retry -// operations. -func NewWaiter() *Waiter { - return &Waiter{WaitDurationMS: defaultWaitDurationMS, MaxRetries: defaultMaxRetries} -} - -// WaitForResourceToReachState polls a resource that implements WaitableService -// repeatedly until it reaches a known state or fails if it reaches an -// unexpected state. The duration of the interval and number of polls is -// determined by the Waiter configuration. -func (w *Waiter) WaitForResourceToReachState(svc WaitableService, id string, waitStates []string, terminalState string) error { - for i := 0; w.MaxRetries == 0 || i < w.MaxRetries; i++ { - state, err := svc.GetResourceState(id) - if err != nil { - return err - } - - if stringSliceContains(waitStates, state) { - time.Sleep(time.Duration(w.WaitDurationMS) * time.Millisecond) - continue - } else if state == terminalState { - return nil - } - - return fmt.Errorf("Unexpected resource state %s, expecting a waiting state %s or terminal state %s ", state, waitStates, terminalState) - } - - return fmt.Errorf("Maximum number of retries (%d) exceeded; resource did not reach state %s", w.MaxRetries, terminalState) -} diff --git a/builder/oracle/oci/client/waiters_test.go b/builder/oracle/oci/client/waiters_test.go deleted file mode 100644 index ce52b7922..000000000 --- a/builder/oracle/oci/client/waiters_test.go +++ /dev/null @@ -1,80 +0,0 @@ -package oci - -import ( - "errors" - "fmt" - "testing" -) - -const ( - ValidID = "ID" -) - -type testWaitSvc struct { - states []string - idx int - err error -} - -func (tw *testWaitSvc) GetResourceState(id string) (string, error) { - if id != ValidID { - return "", fmt.Errorf("Invalid id %s", id) - } - if tw.err != nil { - return "", tw.err - } - - if tw.idx >= len(tw.states) { - panic("Invalid test state") - } - state := tw.states[tw.idx] - tw.idx++ - return state, nil -} - -func TestReturnsWhenWaitStateIsReachedImmediately(t *testing.T) { - ws := &testWaitSvc{states: []string{"OK"}} - w := NewWaiter() - err := w.WaitForResourceToReachState(ws, ValidID, []string{}, "OK") - if err != nil { - t.Errorf("Failed to reach expected state, got %s", err) - } -} - -func TestReturnsWhenResourceWaitsInValidWaitingState(t *testing.T) { - w := &Waiter{WaitDurationMS: 1, MaxRetries: defaultMaxRetries} - ws := &testWaitSvc{states: []string{"WAITING", "OK"}} - err := w.WaitForResourceToReachState(ws, ValidID, []string{"WAITING"}, "OK") - if err != nil { - t.Errorf("Failed to reach expected state, got %s", err) - } -} - -func TestPropagatesErrorFromGetter(t *testing.T) { - w := NewWaiter() - ws := &testWaitSvc{states: []string{}, err: errors.New("ERROR")} - err := w.WaitForResourceToReachState(ws, ValidID, []string{"WAITING"}, "OK") - if err != ws.err { - t.Errorf("Expected error from getter got %s", err) - } -} - -func TestReportsInvalidTransitionStateAsError(t *testing.T) { - w := NewWaiter() - tw := &testWaitSvc{states: []string{"UNKNOWN_STATE"}, err: errors.New("ERROR")} - err := w.WaitForResourceToReachState(tw, ValidID, []string{"WAITING"}, "OK") - if err == nil { - t.Fatal("Expected error from getter") - } -} - -func TestErrorsWhenMaxWaitTriesExceeded(t *testing.T) { - w := Waiter{WaitDurationMS: 1, MaxRetries: 1} - - ws := &testWaitSvc{states: []string{"WAITING", "OK"}} - - err := w.WaitForResourceToReachState(ws, ValidID, []string{"WAITING"}, "OK") - if err == nil { - t.Fatal("Expecting error but wait terminated") - } -} diff --git a/builder/oracle/oci/config.go b/builder/oracle/oci/config.go index 3af6dcbdf..75fea183b 100644 --- a/builder/oracle/oci/config.go +++ b/builder/oracle/oci/config.go @@ -9,12 +9,12 @@ import ( "os" "path/filepath" - client "github.com/hashicorp/packer/builder/oracle/oci/client" "github.com/hashicorp/packer/common" "github.com/hashicorp/packer/helper/communicator" "github.com/hashicorp/packer/helper/config" "github.com/hashicorp/packer/packer" "github.com/hashicorp/packer/template/interpolate" + ocicommon "github.com/oracle/oci-go-sdk/common" "github.com/mitchellh/go-homedir" ) @@ -23,7 +23,7 @@ type Config struct { common.PackerConfig `mapstructure:",squash"` Comm communicator.Config `mapstructure:",squash"` - AccessCfg *client.Config + ConfigProvider ocicommon.ConfigurationProvider AccessCfgFile string `mapstructure:"access_cfg_file"` AccessCfgFileAccount string `mapstructure:"access_cfg_file_account"` @@ -67,68 +67,54 @@ func NewConfig(raws ...interface{}) (*Config, error) { } // Determine where the SDK config is located - var accessCfgFile string - if c.AccessCfgFile != "" { - accessCfgFile = c.AccessCfgFile - } else { - accessCfgFile, err = getDefaultOCISettingsPath() + if c.AccessCfgFile == "" { + c.AccessCfgFile, err = getDefaultOCISettingsPath() if err != nil { - accessCfgFile = "" // Access cfg might be in template + log.Println("Default OCI settings file not found") } } - accessCfg := &client.Config{} - - if accessCfgFile != "" { - loadedAccessCfgs, err := client.LoadConfigsFromFile(accessCfgFile) - if err != nil { - return nil, fmt.Errorf("Invalid config file %s: %s", accessCfgFile, err) - } - cfgAccount := "DEFAULT" - if c.AccessCfgFileAccount != "" { - cfgAccount = c.AccessCfgFileAccount - } - - var ok bool - accessCfg, ok = loadedAccessCfgs[cfgAccount] - if !ok { - return nil, fmt.Errorf("No account section '%s' found in config file %s", cfgAccount, accessCfgFile) - } - } - - // Override SDK client config with any non-empty template properties - - if c.UserID != "" { - accessCfg.User = c.UserID - } - - if c.TenancyID != "" { - accessCfg.Tenancy = c.TenancyID - } - - if c.Region != "" { - accessCfg.Region = c.Region - } - - // Default if the template nor the API config contains a region. - if accessCfg.Region == "" { - accessCfg.Region = "us-phoenix-1" - } - - if c.Fingerprint != "" { - accessCfg.Fingerprint = c.Fingerprint - } - - if c.PassPhrase != "" { - accessCfg.PassPhrase = c.PassPhrase + if c.AccessCfgFileAccount == "" { + c.AccessCfgFileAccount = "DEFAULT" } + var keyContent []byte if c.KeyFile != "" { - accessCfg.KeyFile = c.KeyFile - accessCfg.Key, err = client.LoadPrivateKey(accessCfg) + path, err := homedir.Expand(c.KeyFile) if err != nil { - return nil, fmt.Errorf("Failed to load private key %s : %s", accessCfg.KeyFile, err) + return nil, err } + + // Read API signing key + keyContent, err = ioutil.ReadFile(path) + if err != nil { + return nil, err + } + } + + fileProvider, _ := ocicommon.ConfigurationProviderFromFileWithProfile(c.AccessCfgFile, c.AccessCfgFileAccount, c.PassPhrase) + if c.Region == "" { + var region string + if fileProvider != nil { + region, _ = fileProvider.Region() + } + if region == "" { + c.Region = "us-phoenix-1" + } + } + + providers := []ocicommon.ConfigurationProvider{ + NewRawConfigurationProvider(c.TenancyID, c.UserID, c.Region, c.Fingerprint, string(keyContent), &c.PassPhrase), + } + + if fileProvider != nil { + providers = append(providers, fileProvider) + } + + // Load API access configuration from SDK + configProvider, err := ocicommon.ComposingConfigurationProvider(providers) + if err != nil { + return nil, err } var errs *packer.MultiError @@ -136,44 +122,36 @@ func NewConfig(raws ...interface{}) (*Config, error) { errs = packer.MultiErrorAppend(errs, es...) } - // Required AccessCfg configuration options - - if accessCfg.User == "" { + if userOCID, _ := configProvider.UserOCID(); userOCID == "" { errs = packer.MultiErrorAppend( errs, errors.New("'user_ocid' must be specified")) } - if accessCfg.Tenancy == "" { + tenancyOCID, _ := configProvider.TenancyOCID() + if tenancyOCID == "" { errs = packer.MultiErrorAppend( errs, errors.New("'tenancy_ocid' must be specified")) } - if accessCfg.Region == "" { - errs = packer.MultiErrorAppend( - errs, errors.New("'region' must be specified")) - } - - if accessCfg.Fingerprint == "" { + if fingerprint, _ := configProvider.KeyFingerprint(); fingerprint == "" { errs = packer.MultiErrorAppend( errs, errors.New("'fingerprint' must be specified")) } - if accessCfg.Key == nil { + if _, err := configProvider.PrivateRSAKey(); err != nil { errs = packer.MultiErrorAppend( errs, errors.New("'key_file' must be specified")) } - c.AccessCfg = accessCfg - - // Required non AccessCfg configuration options + c.ConfigProvider = configProvider if c.AvailabilityDomain == "" { errs = packer.MultiErrorAppend( errs, errors.New("'availability_domain' must be specified")) } - if c.CompartmentID == "" { - c.CompartmentID = accessCfg.Tenancy + if c.CompartmentID == "" && tenancyOCID != "" { + c.CompartmentID = tenancyOCID } if c.Shape == "" { diff --git a/builder/oracle/oci/config_provider.go b/builder/oracle/oci/config_provider.go new file mode 100644 index 000000000..25d467a4c --- /dev/null +++ b/builder/oracle/oci/config_provider.go @@ -0,0 +1,76 @@ +package oci + +import ( + "crypto/rsa" + "errors" + "fmt" + + "github.com/oracle/oci-go-sdk/common" +) + +// rawConfigurationProvider allows a user to simply construct a configuration +// provider from raw values. It errors on access when those values are empty. +type rawConfigurationProvider struct { + tenancy string + user string + region string + fingerprint string + privateKey string + privateKeyPassphrase *string +} + +// NewRawConfigurationProvider will create a rawConfigurationProvider. +func NewRawConfigurationProvider(tenancy, user, region, fingerprint, privateKey string, privateKeyPassphrase *string) common.ConfigurationProvider { + return rawConfigurationProvider{tenancy, user, region, fingerprint, privateKey, privateKeyPassphrase} +} + +func (p rawConfigurationProvider) PrivateRSAKey() (key *rsa.PrivateKey, err error) { + return common.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 "", errors.New("no tenancy provided") + } + return p.tenancy, nil +} + +func (p rawConfigurationProvider) UserOCID() (string, error) { + if p.user == "" { + return "", errors.New("no user provided") + } + return p.user, nil +} + +func (p rawConfigurationProvider) KeyFingerprint() (string, error) { + if p.fingerprint == "" { + return "", errors.New("no fingerprint provided") + } + return p.fingerprint, nil +} + +func (p rawConfigurationProvider) Region() (string, error) { + if p.region == "" { + return "", errors.New("no region provided") + } + return p.region, nil +} diff --git a/builder/oracle/oci/config_test.go b/builder/oracle/oci/config_test.go index 84002e937..72491d8d0 100644 --- a/builder/oracle/oci/config_test.go +++ b/builder/oracle/oci/config_test.go @@ -1,13 +1,16 @@ package oci import ( + "crypto/rand" + "crypto/rsa" + "crypto/x509" + "encoding/pem" "io/ioutil" "os" - "reflect" "strings" "testing" - client "github.com/hashicorp/packer/builder/oracle/oci/client" + "github.com/go-ini/ini" ) func testConfig(accessConfFile *os.File) map[string]interface{} { @@ -29,22 +32,16 @@ func testConfig(accessConfFile *os.File) map[string]interface{} { } } -func getField(c *client.Config, field string) string { - r := reflect.ValueOf(c) - f := reflect.Indirect(r).FieldByName(field) - return string(f.String()) -} - func TestConfig(t *testing.T) { // Shared set-up and defered deletion - cfg, keyFile, err := client.BaseTestConfig() + cfg, keyFile, err := baseTestConfigWithTmpKeyFile() if err != nil { t.Fatal(err) } defer os.Remove(keyFile.Name()) - cfgFile, err := client.WriteTestConfig(cfg) + cfgFile, err := writeTestConfig(cfg) if err != nil { t.Fatal(err) } @@ -55,7 +52,7 @@ func TestConfig(t *testing.T) { tmpHome, err := ioutil.TempDir("", "packer_config_test") if err != nil { - t.Fatalf("err: %+v", err) + t.Fatalf("Unexpected error when creating temporary directory: %+v", err) } defer os.Remove(tmpHome) @@ -64,15 +61,13 @@ func TestConfig(t *testing.T) { defer os.Setenv("HOME", home) // Config tests - t.Run("BaseConfig", func(t *testing.T) { raw := testConfig(cfgFile) _, errs := NewConfig(raw) if errs != nil { - t.Fatalf("err: %+v", errs) + t.Fatalf("Unexpected error in configuration %+v", errs) } - }) t.Run("NoAccessConfig", func(t *testing.T) { @@ -81,14 +76,14 @@ func TestConfig(t *testing.T) { _, errs := NewConfig(raw) - s := errs.Error() expectedErrors := []string{ - "'user_ocid'", "'tenancy_ocid'", "'fingerprint'", - "'key_file'", + "'user_ocid'", "'tenancy_ocid'", "'fingerprint'", "'key_file'", } + + s := errs.Error() for _, expected := range expectedErrors { if !strings.Contains(s, expected) { - t.Errorf("Expected %s to contain '%s'", s, expected) + t.Errorf("Expected %q to contain '%s'", s, expected) } } }) @@ -113,12 +108,17 @@ func TestConfig(t *testing.T) { raw := testConfig(cfgFile) c, errs := NewConfig(raw) if errs != nil { - t.Fatalf("err: %+v", errs) + t.Fatalf("Unexpected error in configuration %+v", errs) } - expected := "ocid1.tenancy.oc1..aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - if c.AccessCfg.Tenancy != expected { - t.Errorf("Expected tenancy: %s, got %s.", expected, c.AccessCfg.Tenancy) + tenancy, err := c.ConfigProvider.TenancyOCID() + if err != nil { + t.Fatalf("Unexpected error getting tenancy ocid: %v", err) + } + + expected := "ocid1.tenancy.oc1..aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + if tenancy != expected { + t.Errorf("Expected tenancy: %s, got %s.", expected, tenancy) } }) @@ -127,12 +127,17 @@ func TestConfig(t *testing.T) { raw := testConfig(cfgFile) c, errs := NewConfig(raw) if errs != nil { - t.Fatalf("err: %+v", errs) + t.Fatalf("Unexpected error in configuration %+v", errs) + } + + region, err := c.ConfigProvider.Region() + if err != nil { + t.Fatalf("Unexpected error getting region: %v", err) } expected := "us-ashburn-1" - if c.AccessCfg.Region != expected { - t.Errorf("Expected region: %s, got %s.", expected, c.AccessCfg.Region) + if region != expected { + t.Errorf("Expected region: %s, got %s.", expected, region) } }) @@ -159,7 +164,7 @@ func TestConfig(t *testing.T) { c, errs := NewConfig(raw) if errs != nil { - t.Errorf("Unexpected error(s): %s", errs) + t.Fatalf("Unexpected error in configuration %+v", errs) } if !strings.Contains(c.ImageName, "packer-") { @@ -167,30 +172,138 @@ func TestConfig(t *testing.T) { } }) - // Test that AccessCfgFile properties are overridden by their - // corresponding template keys. - accessOverrides := map[string]string{ - "user_ocid": "User", - "tenancy_ocid": "Tenancy", - "region": "Region", - "fingerprint": "Fingerprint", - } - for k, v := range accessOverrides { - t.Run("AccessCfg."+v+"Overridden", func(t *testing.T) { - expected := "override" + t.Run("user_ocid_overridden", func(t *testing.T) { + expected := "override" + raw := testConfig(cfgFile) + raw["user_ocid"] = expected - raw := testConfig(cfgFile) - raw[k] = expected + c, errs := NewConfig(raw) + if errs != nil { + t.Fatalf("Unexpected error in configuration %+v", errs) + } - c, errs := NewConfig(raw) - if errs != nil { - t.Fatalf("err: %+v", errs) - } + user, _ := c.ConfigProvider.UserOCID() + if user != expected { + t.Errorf("Expected ConfigProvider.UserOCID: %s, got %s", expected, user) + } + }) - accessVal := getField(c.AccessCfg, v) - if accessVal != expected { - t.Errorf("Expected AccessCfg.%s: %s, got %s", v, expected, accessVal) - } - }) + t.Run("tenancy_ocid_overidden", func(t *testing.T) { + expected := "override" + raw := testConfig(cfgFile) + raw["tenancy_ocid"] = expected + + c, errs := NewConfig(raw) + if errs != nil { + t.Fatalf("Unexpected error in configuration %+v", errs) + } + + tenancy, _ := c.ConfigProvider.TenancyOCID() + if tenancy != expected { + t.Errorf("Expected ConfigProvider.TenancyOCID: %s, got %s", expected, tenancy) + } + }) + + t.Run("region_overidden", func(t *testing.T) { + expected := "override" + raw := testConfig(cfgFile) + raw["region"] = expected + + c, errs := NewConfig(raw) + if errs != nil { + t.Fatalf("Unexpected error in configuration %+v", errs) + } + + region, _ := c.ConfigProvider.Region() + if region != expected { + t.Errorf("Expected ConfigProvider.Region: %s, got %s", expected, region) + } + }) + + t.Run("fingerprint_overidden", func(t *testing.T) { + expected := "override" + raw := testConfig(cfgFile) + raw["fingerprint"] = expected + + c, errs := NewConfig(raw) + if errs != nil { + t.Fatalf("Unexpected error in configuration: %+v", errs) + } + + fingerprint, _ := c.ConfigProvider.KeyFingerprint() + if fingerprint != expected { + t.Errorf("Expected ConfigProvider.KeyFingerprint: %s, got %s", expected, fingerprint) + } + }) +} + +// BaseTestConfig creates the base (DEFAULT) config including a temporary key +// file. +// NOTE: Caller is responsible for removing temporary key file. +func baseTestConfigWithTmpKeyFile() (*ini.File, *os.File, error) { + keyFile, err := generateRSAKeyFile() + if err != nil { + return nil, keyFile, err } + // Build ini + cfg := ini.Empty() + section, _ := cfg.NewSection("DEFAULT") + section.NewKey("region", "us-ashburn-1") + section.NewKey("tenancy", "ocid1.tenancy.oc1..aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") + section.NewKey("user", "ocid1.user.oc1..aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") + section.NewKey("fingerprint", "70:04:5z:b3:19:ab:90:75:a4:1f:50:d4:c7:c3:33:20") + section.NewKey("key_file", keyFile.Name()) + + return cfg, keyFile, nil +} + +// WriteTestConfig writes a ini.File to a temporary file for use in unit tests. +// NOTE: Caller is responsible for removing temporary file. +func writeTestConfig(cfg *ini.File) (*os.File, error) { + confFile, err := ioutil.TempFile("", "config_file") + if err != nil { + return nil, err + } + + if _, err := confFile.Write([]byte("[DEFAULT]\n")); err != nil { + os.Remove(confFile.Name()) + return nil, err + } + + if _, err := cfg.WriteTo(confFile); err != nil { + os.Remove(confFile.Name()) + return nil, err + } + return confFile, nil +} + +// generateRSAKeyFile generates an RSA key file for use in unit tests. +// NOTE: The caller is responsible for deleting the temporary file. +func generateRSAKeyFile() (*os.File, error) { + // Create temporary file for the key + f, err := ioutil.TempFile("", "key") + if err != nil { + return nil, err + } + + // Generate key + priv, err := rsa.GenerateKey(rand.Reader, 2014) + if err != nil { + return nil, err + } + + // ASN.1 DER encoded form + privDer := x509.MarshalPKCS1PrivateKey(priv) + privBlk := pem.Block{ + Type: "RSA PRIVATE KEY", + Headers: nil, + Bytes: privDer, + } + + // Write the key out + if _, err := f.Write(pem.EncodeToMemory(&privBlk)); err != nil { + return nil, err + } + + return f, nil } diff --git a/builder/oracle/oci/driver.go b/builder/oracle/oci/driver.go index 51f6c364a..704b2f2a9 100644 --- a/builder/oracle/oci/driver.go +++ b/builder/oracle/oci/driver.go @@ -1,13 +1,11 @@ package oci -import ( - client "github.com/hashicorp/packer/builder/oracle/oci/client" -) +import "github.com/oracle/oci-go-sdk/core" // Driver interfaces between the builder steps and the OCI SDK. type Driver interface { CreateInstance(publicKey string) (string, error) - CreateImage(id string) (client.Image, error) + CreateImage(id string) (core.Image, error) DeleteImage(id string) error GetInstanceIP(id string) (string, error) TerminateInstance(id string) error diff --git a/builder/oracle/oci/driver_mock.go b/builder/oracle/oci/driver_mock.go index f8bd9f920..1f2e7ec2b 100644 --- a/builder/oracle/oci/driver_mock.go +++ b/builder/oracle/oci/driver_mock.go @@ -1,8 +1,6 @@ package oci -import ( - client "github.com/hashicorp/packer/builder/oracle/oci/client" -) +import "github.com/oracle/oci-go-sdk/core" // driverMock implements the Driver interface and communicates with Oracle // OCI. @@ -40,12 +38,12 @@ func (d *driverMock) CreateInstance(publicKey string) (string, error) { } // CreateImage creates a new custom image. -func (d *driverMock) CreateImage(id string) (client.Image, error) { +func (d *driverMock) CreateImage(id string) (core.Image, error) { if d.CreateImageErr != nil { - return client.Image{}, d.CreateImageErr + return core.Image{}, d.CreateImageErr } d.CreateImageID = id - return client.Image{ID: id}, nil + return core.Image{Id: &id}, nil } // DeleteImage mocks deleting a custom image. diff --git a/builder/oracle/oci/driver_oci.go b/builder/oracle/oci/driver_oci.go index 1b6b0a3f9..90d05ea0a 100644 --- a/builder/oracle/oci/driver_oci.go +++ b/builder/oracle/oci/driver_oci.go @@ -1,123 +1,191 @@ package oci import ( + "context" "errors" "fmt" + "time" - client "github.com/hashicorp/packer/builder/oracle/oci/client" + core "github.com/oracle/oci-go-sdk/core" ) // driverOCI implements the Driver interface and communicates with Oracle // OCI. type driverOCI struct { - client *client.Client - cfg *Config + computeClient core.ComputeClient + vcnClient core.VirtualNetworkClient + cfg *Config } -// NewDriverOCI Creates a new driverOCI with a connected client. +// NewDriverOCI Creates a new driverOCI with a connected compute client and a connected vcn client. func NewDriverOCI(cfg *Config) (Driver, error) { - client, err := client.NewClient(cfg.AccessCfg) + coreClient, err := core.NewComputeClientWithConfigurationProvider(cfg.ConfigProvider) if err != nil { return nil, err } - return &driverOCI{client: client, cfg: cfg}, nil + + vcnClient, err := core.NewVirtualNetworkClientWithConfigurationProvider(cfg.ConfigProvider) + if err != nil { + return nil, err + } + + return &driverOCI{ + computeClient: coreClient, + vcnClient: vcnClient, + cfg: cfg, + }, nil } // CreateInstance creates a new compute instance. func (d *driverOCI) CreateInstance(publicKey string) (string, error) { - params := &client.LaunchInstanceParams{ - AvailabilityDomain: d.cfg.AvailabilityDomain, - CompartmentID: d.cfg.CompartmentID, - ImageID: d.cfg.BaseImageID, - Shape: d.cfg.Shape, - SubnetID: d.cfg.SubnetID, - Metadata: map[string]string{ - "ssh_authorized_keys": publicKey, - }, + metadata := map[string]string{ + "ssh_authorized_keys": publicKey, } if d.cfg.UserData != "" { - params.Metadata["user_data"] = d.cfg.UserData + metadata["user_data"] = d.cfg.UserData } - instance, err := d.client.Compute.Instances.Launch(params) + + instance, err := d.computeClient.LaunchInstance(context.TODO(), core.LaunchInstanceRequest{LaunchInstanceDetails: core.LaunchInstanceDetails{ + AvailabilityDomain: &d.cfg.AvailabilityDomain, + CompartmentId: &d.cfg.CompartmentID, + ImageId: &d.cfg.BaseImageID, + Shape: &d.cfg.Shape, + SubnetId: &d.cfg.SubnetID, + Metadata: metadata, + }}) + if err != nil { return "", err } - return instance.ID, nil + return *instance.Id, nil } // CreateImage creates a new custom image. -func (d *driverOCI) CreateImage(id string) (client.Image, error) { - params := &client.CreateImageParams{ - CompartmentID: d.cfg.CompartmentID, - InstanceID: id, - DisplayName: d.cfg.ImageName, - } - image, err := d.client.Compute.Images.Create(params) +func (d *driverOCI) CreateImage(id string) (core.Image, error) { + res, err := d.computeClient.CreateImage(context.TODO(), core.CreateImageRequest{CreateImageDetails: core.CreateImageDetails{ + CompartmentId: &d.cfg.CompartmentID, + InstanceId: &id, + DisplayName: &d.cfg.ImageName, + }}) + if err != nil { - return client.Image{}, err + return core.Image{}, err } - return image, nil + return res.Image, nil } // DeleteImage deletes a custom image. func (d *driverOCI) DeleteImage(id string) error { - return d.client.Compute.Images.Delete(&client.DeleteImageParams{ID: id}) + _, err := d.computeClient.DeleteImage(context.TODO(), core.DeleteImageRequest{ImageId: &id}) + return err } // GetInstanceIP returns the public or private IP corresponding to the given instance id. func (d *driverOCI) GetInstanceIP(id string) (string, error) { - // get nvic and cross ref to find pub ip address - vnics, err := d.client.Compute.VNICAttachments.List( - &client.ListVnicAttachmentsParams{ - InstanceID: id, - CompartmentID: d.cfg.CompartmentID, - }, - ) + vnics, err := d.computeClient.ListVnicAttachments(context.TODO(), core.ListVnicAttachmentsRequest{ + InstanceId: &id, + CompartmentId: &d.cfg.CompartmentID, + }) if err != nil { return "", err } - if len(vnics) < 1 { + if len(vnics.Items) == 0 { return "", errors.New("instance has zero VNICs") } - vnic, err := d.client.Compute.VNICs.Get(&client.GetVNICParams{ID: vnics[0].VNICID}) + vnic, err := d.vcnClient.GetVnic(context.TODO(), core.GetVnicRequest{VnicId: vnics.Items[0].VnicId}) if err != nil { return "", fmt.Errorf("Error getting VNIC details: %s", err) } if d.cfg.UsePrivateIP { - return vnic.PrivateIP, nil + return *vnic.PrivateIp, nil } - return vnic.PublicIP, nil + + if vnic.PublicIp == nil { + return "", fmt.Errorf("Error getting VNIC Public Ip for: %s", id) + } + + return *vnic.PublicIp, nil } // TerminateInstance terminates a compute instance. func (d *driverOCI) TerminateInstance(id string) error { - params := &client.TerminateInstanceParams{ID: id} - return d.client.Compute.Instances.Terminate(params) + _, err := d.computeClient.TerminateInstance(context.TODO(), core.TerminateInstanceRequest{ + InstanceId: &id, + }) + return err } // WaitForImageCreation waits for a provisioning custom image to reach the // "AVAILABLE" state. func (d *driverOCI) WaitForImageCreation(id string) error { - return client.NewWaiter().WaitForResourceToReachState( - d.client.Compute.Images, + return waitForResourceToReachState( + func(string) (string, error) { + image, err := d.computeClient.GetImage(context.TODO(), core.GetImageRequest{ImageId: &id}) + if err != nil { + return "", err + } + return string(image.LifecycleState), nil + }, id, []string{"PROVISIONING"}, "AVAILABLE", + 0, //Unlimited Retries + 5*time.Second, //5 second wait between retries ) } // WaitForInstanceState waits for an instance to reach the a given terminal // state. func (d *driverOCI) WaitForInstanceState(id string, waitStates []string, terminalState string) error { - return client.NewWaiter().WaitForResourceToReachState( - d.client.Compute.Instances, + return waitForResourceToReachState( + func(string) (string, error) { + instance, err := d.computeClient.GetInstance(context.TODO(), core.GetInstanceRequest{InstanceId: &id}) + if err != nil { + return "", err + } + return string(instance.LifecycleState), nil + }, id, waitStates, terminalState, + 0, //Unlimited Retries + 5*time.Second, //5 second wait between retries ) } + +// WaitForResourceToReachState checks the response of a request through a +// polled get and waits until the desired state or until the max retried has +// been reached. +func waitForResourceToReachState(getResourceState func(string) (string, error), id string, waitStates []string, terminalState string, maxRetries int, waitDuration time.Duration) error { + for i := 0; maxRetries == 0 || i < maxRetries; i++ { + state, err := getResourceState(id) + if err != nil { + return err + } + + if stringSliceContains(waitStates, state) { + time.Sleep(waitDuration) + continue + } else if state == terminalState { + return nil + } + return fmt.Errorf("Unexpected resource state %q, expecting a waiting state %s or terminal state %q ", state, waitStates, terminalState) + } + return fmt.Errorf("Maximum number of retries (%d) exceeded; resource did not reach state %q", maxRetries, terminalState) +} + +// stringSliceContains loops through a slice of strings returning a boolean +// based on whether a given value is contained in the slice. +func stringSliceContains(slice []string, value string) bool { + for _, elem := range slice { + if elem == value { + return true + } + } + return false +} diff --git a/builder/oracle/oci/step_image.go b/builder/oracle/oci/step_image.go index ff767f709..9589594c8 100644 --- a/builder/oracle/oci/step_image.go +++ b/builder/oracle/oci/step_image.go @@ -27,7 +27,7 @@ func (s *stepImage) Run(_ context.Context, state multistep.StateBag) multistep.S return multistep.ActionHalt } - err = driver.WaitForImageCreation(image.ID) + err = driver.WaitForImageCreation(*image.Id) if err != nil { err = fmt.Errorf("Error waiting for image creation to finish: %s", err) ui.Error(err.Error()) diff --git a/builder/oracle/oci/step_test.go b/builder/oracle/oci/step_test.go index cca58666c..55afba523 100644 --- a/builder/oracle/oci/step_test.go +++ b/builder/oracle/oci/step_test.go @@ -6,33 +6,32 @@ import ( "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" - - client "github.com/hashicorp/packer/builder/oracle/oci/client" ) // TODO(apryde): It would be good not to have to write a key file to disk to // load the config. func baseTestConfig() *Config { - _, keyFile, err := client.BaseTestConfig() + _, keyFile, err := baseTestConfigWithTmpKeyFile() if err != nil { panic(err) } cfg, err := NewConfig(map[string]interface{}{ - "availability_domain": "aaaa:PHX-AD-3", + "availability_domain": "aaaa:US-ASHBURN-AD-1", // Image - "base_image_ocid": "ocd1...", + "base_image_ocid": "ocid1.image.oc1.iad.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "shape": "VM.Standard1.1", "image_name": "HelloWorld", + "region": "us-ashburn-1", // Networking - "subnet_ocid": "ocd1...", + "subnet_ocid": "ocid1.subnet.oc1.iad.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", // AccessConfig - "user_ocid": "ocid1...", - "tenancy_ocid": "ocid1...", - "fingerprint": "00:00...", + "user_ocid": "ocid1.user.oc1..aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "tenancy_ocid": "ocid1.tenancy.oc1..aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "fingerprint": "70:04:5z:b3:19:ab:90:75:a4:1f:50:d4:c7:c3:33:20", "key_file": keyFile.Name(), // Comm diff --git a/vendor/github.com/oracle/oci-go-sdk/CHANGELOG.md b/vendor/github.com/oracle/oci-go-sdk/CHANGELOG.md new file mode 100644 index 000000000..e1a29e257 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/CHANGELOG.md @@ -0,0 +1,15 @@ +# CHANGELOG + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/) + + +## 1.0.0 - 2018-02-28 Initial Release +### Added +- Support for Audit service +- Support for Core Services (Networking, Compute, Block Volume) +- Support for Database service +- Support for IAM service +- Support for Load Balancing service +- Suport for Object Storage service diff --git a/vendor/github.com/oracle/oci-go-sdk/CONTRIBUTING.md b/vendor/github.com/oracle/oci-go-sdk/CONTRIBUTING.md new file mode 100644 index 000000000..31e4b6c60 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/CONTRIBUTING.md @@ -0,0 +1,24 @@ +# Contributing to the Oracle Cloud Infrastructure Go SDK + +*Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.* + +Pull requests can be made under +[The Oracle Contributor Agreement](https://www.oracle.com/technetwork/community/oca-486395.html) +(OCA). + +For pull requests to be accepted, the bottom of +your commit message must have the following line using your name and +e-mail address as it appears in the OCA Signatories list. + +``` +Signed-off-by: Your Name +``` + +This can be automatically added to pull requests by committing with: + +``` +git commit --signoff +```` + +Only pull requests from committers that can be verified as having +signed the OCA can be accepted. \ No newline at end of file diff --git a/vendor/github.com/oracle/oci-go-sdk/LICENSE.txt b/vendor/github.com/oracle/oci-go-sdk/LICENSE.txt new file mode 100644 index 000000000..63bc0c882 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/LICENSE.txt @@ -0,0 +1,82 @@ +Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +This software is dual-licensed to you under the Universal Permissive License (UPL) and Apache License 2.0.  See below for license terms.  You may choose either license, or both. + ____________________________ +The Universal Permissive License (UPL), Version 1.0 +Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +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, 2018, 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/Makefile b/vendor/github.com/oracle/oci-go-sdk/Makefile new file mode 100644 index 000000000..d69dfd999 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/Makefile @@ -0,0 +1,55 @@ +DOC_SERVER_URL=https:\/\/docs.us-phoenix-1.oraclecloud.com + +GEN_TARGETS = identity core objectstorage loadbalancer database audit +NON_GEN_TARGETS = common common/auth +TARGETS = $(NON_GEN_TARGETS) $(GEN_TARGETS) + +TARGETS_WITH_TESTS = common common/auth +TARGETS_BUILD = $(patsubst %,build-%, $(TARGETS)) +TARGETS_CLEAN = $(patsubst %,clean-%, $(GEN_TARGETS)) +TARGETS_LINT = $(patsubst %,lint-%, $(TARGETS)) +TARGETS_TEST = $(patsubst %,test-%, $(TARGETS_WITH_TESTS)) +TARGETS_RELEASE= $(patsubst %,release-%, $(TARGETS)) +GOLINT=$(GOPATH)/bin/golint +LINT_FLAGS=-min_confidence 0.9 -set_exit_status + + +.PHONY: $(TARGETS_BUILD) $(TARGET_TEST) + +build: lint $(TARGETS_BUILD) + +test: build $(TARGETS_TEST) + +lint: $(TARGETS_LINT) + +clean: $(TARGETS_CLEAN) + +$(TARGETS_LINT): lint-%:% + @echo "linting and formatting: $<" + @(cd $< && gofmt -s -w .) + @if [ \( $< = common \) -o \( $< = common/auth \) ]; then\ + (cd $< && $(GOLINT) -set_exit_status .);\ + else\ + (cd $< && $(GOLINT) $(LINT_FLAGS) .);\ + fi + +$(TARGETS_BUILD): build-%:% + @echo "building: $<" + @(cd $< && find . -name '*_integ_test.go' | xargs -I{} mv {} ../integtest) + @(cd $< && go build -v) + +$(TARGETS_TEST): test-%:% + @(cd $< && go test -v) + +$(TARGETS_CLEAN): clean-%:% + @echo "cleaning $<" + @-rm -rf $< + +pre-doc: + @echo "Rendering doc server to ${DOC_SERVER_URL}" + find . -name \*.go |xargs sed -i '' 's/{{DOC_SERVER_URL}}/${DOC_SERVER_URL}/g' + +gen-version: + go generate -x + +release: gen-version build pre-doc diff --git a/vendor/github.com/oracle/oci-go-sdk/README.md b/vendor/github.com/oracle/oci-go-sdk/README.md new file mode 100644 index 000000000..4065a1529 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/README.md @@ -0,0 +1,153 @@ +# Oracle Cloud Infrastructure Golang SDK +[![wercker status](https://app.wercker.com/status/09bc4818e7b1d70b04285331a9bdbc41/s/master "wercker status")](https://app.wercker.com/project/byKey/09bc4818e7b1d70b04285331a9bdbc41) + +This is the Go SDK for Oracle Cloud Infrastructure. This project is open source and maintained by Oracle Corp. +The home page for the project is [here](https://godoc.org/github.com/oracle/oci-go-sdk/). +>***WARNING:***: To avoid automatically consuming breaking changes if we have to rev the major version of the Go SDK, +please consider using the [Go dependency management tool](https://github.com/golang/dep), or vendoring the SDK. +This will allow you to pin to a specific version of the Go SDK in your project, letting you control how and when you move to the next major version. + +## Dependencies +- Install [Go programming language](https://golang.org/dl/). +- Install [GNU Make](https://www.gnu.org/software/make/), using the package manager or binary distribution tool appropriate for your platform. + + + +## Installing +Use the following command to install this SDK: + +``` +go get -u github.com/oracle/oci-go-sdk +``` +Alternatively you can git clone this repo. + +## Working with the Go SDK +To start working with the Go SDK, you import the service package, create a client, and then use that client to make calls. + +### Configuring +Before using the SDK, set up a config file with the required credentials. See [SDK and Tool Configuration](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdkconfig.htm) for instructions. + +Once a config file has been setup, call `common.DefaultConfigProvider()` function as follows: + + ```go + // Import necessary packages + import ( + "github.com/oracle/oci-go-sdk/common" + "github.com/oracle/oci-go-sdk/identity" // Identity or any other service you wish to make requests to +) + + //... + +configProvider := common.DefaultConfigProvider() +``` + + Or, to configure the SDK programmatically instead, implement the `ConfigurationProvider` interface shown below: + ```go +// ConfigurationProvider wraps information about the account owner +type ConfigurationProvider interface { + KeyProvider + TenancyOCID() (string, error) + UserOCID() (string, error) + KeyFingerprint() (string, error) + Region() (string, error) +} +``` + +### Making a request +To make a request to an OCI service, create a client for the service and then use the client to call a function from the service. + +- *Creating a client*: All packages provide a function to create clients, using the naming convention `NewClientWithConfigurationProvider`, +such as `NewVirtualNetworkClientWithConfigurationProvider` or `NewIdentityClientWithConfigurationProvider`. To create a new client, +pass a struct that conforms to the `ConfigurationProvider` interface, or use the `DefaultConfigProvider()` function in the common package. + +For example: +```go +config := common.DefaultConfigProvider() +client, err := identity.NewIdentityClientWithConfigurationProvider(config) +if err != nil { + panic(err) +} +``` + +- *Making calls*: After successfully creating a client, requests can now be made to the service. Generally all functions associated with an operation +accept [`context.Context`](https://golang.org/pkg/context/) and a struct that wraps all input parameters. The functions then return a response struct +that contains the desired data, and an error struct that describes the error if an error occurs. + +For example: +```go +id := "your_group_id" +response, err := client.GetGroup(context.Background(), identity.GetGroupRequest{GroupId:&id}) +if err != nil { + //Something happened + panic(err) +} +//Process the data in response struct +fmt.Println("Group's name is:", response.Name) +``` + +## Organization of the SDK +The `oci-go-sdk` contains the following: +- **Service packages**: All packages except `common` and any other package found inside `cmd`. These packages represent +the Oracle Cloud Infrastructure services supported by the Go SDK. Each package represents a service. +These packages include methods to interact with the service, structs that model +input and output parameters, and a client struct that acts as receiver for the above methods. + +- **Common package**: Found in the `common` directory. The common package provides supporting functions and structs used by service packages. +Includes HTTP request/response (de)serialization, request signing, JSON parsing, pointer to reference and other helper functions. Most of the functions +in this package are meant to be used by the service packages. + +- **cmd**: Internal tools used by the `oci-go-sdk`. + +## Examples +Examples can be found [here](https://github.com/oracle/oci-go-sdk/tree/master/example) + +## Documentation +Full documentation can be found [on the godocs site](https://godoc.org/github.com/oracle/oci-go-sdk/). + +## Help +* The [Issues](https://github.com/oracle/oci-go-sdk/issues) page of this GitHub repository. +* [Stack Overflow](https://stackoverflow.com/), use the [oracle-cloud-infrastructure](https://stackoverflow.com/questions/tagged/oracle-cloud-infrastructure) and [oci-go-sdk](https://stackoverflow.com/questions/tagged/oci-go-sdk) tags in your post. +* [Developer Tools](https://community.oracle.com/community/cloud_computing/bare-metal/content?filterID=contentstatus%5Bpublished%5D~category%5Bdeveloper-tools%5D&filterID=contentstatus%5Bpublished%5D~objecttype~objecttype%5Bthread%5D) of the Oracle Cloud forums. +* [My Oracle Support](https://support.oracle.com). + + +## Contributing +`oci-go-sdk` is an open source project. See [CONTRIBUTING](/CONTRIBUTING.md) for details. + +Oracle gratefully acknowledges the contributions to oci-go-sdk that have been made by the community. + + +## License +Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +This SDK and sample is dual licensed under the Universal Permissive License 1.0 and the Apache License 2.0. + +See [LICENSE](/LICENSE.txt) for more details. + +## Changes +See [CHANGELOG](/CHANGELOG.md). + +## Known Issues +You can find information on any known issues with the SDK here and under the [Issues](https://github.com/oracle/oci-go-sdk/issues) tab of this project's GitHub repository. + +## Building and testing +### Dev dependencies +- Install [Testify](https://github.com/stretchr/testify) with the command: +```sh +go get github.com/stretchr/testify +``` +- Install [go lint](https://github.com/golang/lint) with the command: +``` +go get -u github.com/golang/lint/golint +``` +### Build +Building is provided by the make file at the root of the project. To build the project execute. + +``` +make build +``` + +To run the tests: +``` +make test +``` diff --git a/vendor/github.com/oracle/oci-go-sdk/audit/audit_client.go b/vendor/github.com/oracle/oci-go-sdk/audit/audit_client.go new file mode 100644 index 000000000..ce0ad0c55 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/audit/audit_client.go @@ -0,0 +1,113 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Audit API +// +// API for the Audit Service. You can use this API for queries, but not bulk-export operations. +// + +package audit + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +//AuditClient a client for Audit +type AuditClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewAuditClientWithConfigurationProvider Creates a new default Audit client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewAuditClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client AuditClient, err error) { + baseClient, err := common.NewClientWithConfig(configProvider) + if err != nil { + return + } + + client = AuditClient{BaseClient: baseClient} + client.BasePath = "20160918" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *AuditClient) SetRegion(region string) { + client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "audit", region) +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *AuditClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { + if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { + return err + } + + // Error has been checked already + region, _ := configProvider.Region() + client.config = &configProvider + client.SetRegion(region) + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *AuditClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// GetConfiguration Get the configuration +func (client AuditClient) GetConfiguration(ctx context.Context, request GetConfigurationRequest) (response GetConfigurationResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/configuration", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListEvents Returns all audit events for the specified compartment that were processed within the specified time range. +func (client AuditClient) ListEvents(ctx context.Context, request ListEventsRequest) (response ListEventsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/auditEvents", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateConfiguration Update the configuration +func (client AuditClient) UpdateConfiguration(ctx context.Context, request UpdateConfigurationRequest) (response UpdateConfigurationResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/configuration", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/audit/audit_event.go b/vendor/github.com/oracle/oci-go-sdk/audit/audit_event.go new file mode 100644 index 000000000..bc0012c6d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/audit/audit_event.go @@ -0,0 +1,78 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Audit API +// +// API for the Audit Service. You can use this API for queries, but not bulk-export operations. +// + +package audit + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// AuditEvent The representation of AuditEvent +type AuditEvent struct { + + // The OCID of the tenant. + TenantId *string `mandatory:"false" json:"tenantId"` + + // The OCID of the compartment. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The GUID of the event. + EventId *string `mandatory:"false" json:"eventId"` + + // The source of the event. + EventSource *string `mandatory:"false" json:"eventSource"` + + // The type of the event. + EventType *string `mandatory:"false" json:"eventType"` + + // The time the event occurred, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) timestamp format. + EventTime *common.SDKTime `mandatory:"false" json:"eventTime"` + + // The OCID of the user whose action triggered the event. + PrincipalId *string `mandatory:"false" json:"principalId"` + + // The credential ID of the user. This value is extracted from the HTTP 'Authorization' request header. It consists of the tenantId, userId, and user fingerprint, all delimited by a slash (/). + CredentialId *string `mandatory:"false" json:"credentialId"` + + // The HTTP method of the request. + RequestAction *string `mandatory:"false" json:"requestAction"` + + // The opc-request-id of the request. + RequestId *string `mandatory:"false" json:"requestId"` + + // The user agent of the client that made the request. + RequestAgent *string `mandatory:"false" json:"requestAgent"` + + // The HTTP header fields and values in the request. + RequestHeaders map[string][]string `mandatory:"false" json:"requestHeaders"` + + // The IP address of the source of the request. + RequestOrigin *string `mandatory:"false" json:"requestOrigin"` + + // The query parameter fields and values for the request. + RequestParameters map[string][]string `mandatory:"false" json:"requestParameters"` + + // The resource targeted by the request. + RequestResource *string `mandatory:"false" json:"requestResource"` + + // The headers of the response. + ResponseHeaders map[string][]string `mandatory:"false" json:"responseHeaders"` + + // The status code of the response. + ResponseStatus *string `mandatory:"false" json:"responseStatus"` + + // The time of the response to the audited request, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) timestamp format. + ResponseTime *common.SDKTime `mandatory:"false" json:"responseTime"` + + // Metadata of interest from the response payload. For example, the OCID of a resource. + ResponsePayload map[string]interface{} `mandatory:"false" json:"responsePayload"` +} + +func (m AuditEvent) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/audit/configuration.go b/vendor/github.com/oracle/oci-go-sdk/audit/configuration.go new file mode 100644 index 000000000..35d0c9b07 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/audit/configuration.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Audit API +// +// API for the Audit Service. You can use this API for queries, but not bulk-export operations. +// + +package audit + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Configuration The representation of Configuration +type Configuration struct { + + // The retention period days + RetentionPeriodDays *int `mandatory:"false" json:"retentionPeriodDays"` +} + +func (m Configuration) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/audit/get_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/audit/get_configuration_request_response.go new file mode 100644 index 000000000..684d790b0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/audit/get_configuration_request_response.go @@ -0,0 +1,34 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package audit + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetConfigurationRequest wrapper for the GetConfiguration operation +type GetConfigurationRequest struct { + + // ID of the root compartment (tenancy) + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` +} + +func (request GetConfigurationRequest) String() string { + return common.PointerString(request) +} + +// GetConfigurationResponse wrapper for the GetConfiguration operation +type GetConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Configuration instance + Configuration `presentIn:"body"` +} + +func (response GetConfigurationResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/audit/list_events_request_response.go b/vendor/github.com/oracle/oci-go-sdk/audit/list_events_request_response.go new file mode 100644 index 000000000..e8c6b8d6b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/audit/list_events_request_response.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package audit + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListEventsRequest wrapper for the ListEvents operation +type ListEventsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Returns events that were processed at or after this start date and time, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) timestamp format. + // For example, a start value of `2017-01-15T11:30:00Z` will retrieve a list of all events processed since 30 minutes after the 11th hour of January 15, 2017, in Coordinated Universal Time (UTC). + // You can specify a value with granularity to the minute. Seconds (and milliseconds, if included) must be set to `0`. + StartTime *common.SDKTime `mandatory:"true" contributesTo:"query" name:"startTime"` + + // Returns events that were processed before this end date and time, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) timestamp format. For example, a start value of `2017-01-01T00:00:00Z` and an end value of `2017-01-02T00:00:00Z` will retrieve a list of all events processed on January 1, 2017. + // Similarly, a start value of `2017-01-01T00:00:00Z` and an end value of `2017-02-01T00:00:00Z` will result in a list of all events processed between January 1, 2017 and January 31, 2017. + // You can specify a value with granularity to the minute. Seconds (and milliseconds, if included) must be set to `0`. + EndTime *common.SDKTime `mandatory:"true" contributesTo:"query" name:"endTime"` + + // The value of the `opc-next-page` response header from the previous list query. + 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"` +} + +func (request ListEventsRequest) String() string { + return common.PointerString(request) +} + +// ListEventsResponse wrapper for the ListEvents operation +type ListEventsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []AuditEvent instance + Items []AuditEvent `presentIn:"body"` + + // For pagination of a list of audit events. When this header appears in the response, + // it means you received a partial list and there are more results. + // Include this value as the `page` parameter for the subsequent ListEvents request to get the next batch of events. + 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 ListEventsResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/audit/update_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/audit/update_configuration_details.go new file mode 100644 index 000000000..a1129293b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/audit/update_configuration_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Audit API +// +// API for the Audit Service. You can use this API for queries, but not bulk-export operations. +// + +package audit + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateConfigurationDetails The representation of UpdateConfigurationDetails +type UpdateConfigurationDetails struct { + + // The retention period days + RetentionPeriodDays *int `mandatory:"false" json:"retentionPeriodDays"` +} + +func (m UpdateConfigurationDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/audit/update_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/audit/update_configuration_request_response.go new file mode 100644 index 000000000..2d709a8a8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/audit/update_configuration_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package audit + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateConfigurationRequest wrapper for the UpdateConfiguration operation +type UpdateConfigurationRequest struct { + + // ID of the root compartment (tenancy) + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The configuration properties + UpdateConfigurationDetails `contributesTo:"body"` +} + +func (request UpdateConfigurationRequest) String() string { + return common.PointerString(request) +} + +// UpdateConfigurationResponse wrapper for the UpdateConfiguration operation +type UpdateConfigurationResponse 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response UpdateConfigurationResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/cmd/genver/version_template.go b/vendor/github.com/oracle/oci-go-sdk/cmd/genver/version_template.go new file mode 100644 index 000000000..5c684fd5e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/cmd/genver/version_template.go @@ -0,0 +1,42 @@ +package main + + +const versionTemplate = ` +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated by go generate; DO NOT EDIT + +package common + +import ( + "bytes" + "fmt" + "sync" +) + +const ( + major = "{{.Major}}" + minor = "{{.Minor}}" + patch = "{{.Patch}}" + tag = "{{.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/common/auth/certificate_retriever.go b/vendor/github.com/oracle/oci-go-sdk/common/auth/certificate_retriever.go new file mode 100644 index 000000000..e2e04ee7a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/common/auth/certificate_retriever.go @@ -0,0 +1,154 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +package auth + +import ( + "bytes" + "crypto/rsa" + "crypto/x509" + "encoding/pem" + "fmt" + "github.com/oracle/oci-go-sdk/common" + "sync" +) + +// 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 +} + +func newURLBasedX509CertificateRetriever(certURL, privateKeyURL, passphrase string) x509CertificateRetriever { + return &urlBasedX509CertificateRetriever{ + certURL: certURL, + privateKeyURL: privateKeyURL, + passphrase: passphrase, + mux: sync.Mutex{}, + } +} + +// 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(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 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(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() + + if r.privateKey == nil { + return nil + } + + c := *r.privateKey + return &c +} diff --git a/vendor/github.com/oracle/oci-go-sdk/common/auth/configuration.go b/vendor/github.com/oracle/oci-go-sdk/common/auth/configuration.go new file mode 100644 index 000000000..b0f455e9b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/common/auth/configuration.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +package auth + +import ( + "crypto/rsa" + "fmt" + "github.com/oracle/oci-go-sdk/common" +) + +type instancePrincipalConfigurationProvider struct { + keyProvider *instancePrincipalKeyProvider + region *common.Region +} + +//InstancePrincipalConfigurationProvider returns a configuration for instance principals +func InstancePrincipalConfigurationProvider() (common.ConfigurationProvider, error) { + var err error + var keyProvider *instancePrincipalKeyProvider + if keyProvider, err = newInstancePrincipalKeyProvider(); err != nil { + return nil, fmt.Errorf("failed to create a new key provider for instance principal: %s", err.Error()) + } + return instancePrincipalConfigurationProvider{keyProvider: keyProvider, region: nil}, nil +} + +//InstancePrincipalConfigurationProviderForRegion returns a configuration for instance principals with a given region +func InstancePrincipalConfigurationProviderForRegion(region common.Region) (common.ConfigurationProvider, error) { + var err error + var keyProvider *instancePrincipalKeyProvider + if keyProvider, err = newInstancePrincipalKeyProvider(); err != nil { + return nil, fmt.Errorf("failed to create a new key provider for instance principal: %s", err.Error()) + } + return instancePrincipalConfigurationProvider{keyProvider: keyProvider, region: ®ion}, 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 "", nil +} + +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 { + return string(p.keyProvider.RegionForFederationClient()), nil + } + return string(*p.region), nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/common/auth/federation_client.go b/vendor/github.com/oracle/oci-go-sdk/common/auth/federation_client.go new file mode 100644 index 000000000..f15aff82d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/common/auth/federation_client.go @@ -0,0 +1,288 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +// Package auth provides supporting functions and structs for authentication +package auth + +import ( + "context" + "crypto/rand" + "crypto/rsa" + "crypto/x509" + "encoding/pem" + "fmt" + "github.com/oracle/oci-go-sdk/common" + "net/http" + "strings" + "sync" +) + +// 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 { + PrivateKey() (*rsa.PrivateKey, error) + SecurityToken() (string, error) +} + +// 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) federationClient { + client := &x509FederationClient{ + tenancyID: tenancyID, + leafCertificateRetriever: leafCertificateRetriever, + intermediateCertificateRetrievers: intermediateCertificateRetrievers, + } + client.sessionKeySupplier = newSessionKeySupplier() + client.authClient = newAuthClient(region, client) + return client +} + +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) *common.BaseClient { + signer := common.RequestSigner(provider, genericHeaders, bodyHeaders) + client := common.DefaultBaseClientWithSigner(signer) + client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "auth", string(region)) + client.BasePath = "v1/x509" + 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/%s", tenancy, fingerprint), nil +} + +// For authClient to sign requests to X509 Federation Endpoint +func (c *x509FederationClient) PrivateRSAKey() (*rsa.PrivateKey, error) { + return c.leafCertificateRetriever.PrivateKey(), 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()) + } + } + + if c.securityToken, err = c.getSecurityToken(); err != nil { + return fmt.Errorf("failed to get security token: %s", err.Error()) + } + + return nil +} + +func (c *x509FederationClient) getSecurityToken() (securityToken, error) { + request := c.makeX509FederationRequest() + + var err error + var httpRequest http.Request + if httpRequest, err = common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "", request); err != nil { + return nil, fmt.Errorf("failed to make http request: %s", err.Error()) + } + + var httpResponse *http.Response + defer common.CloseBodyIfValid(httpResponse) + if httpResponse, err = c.authClient.Call(context.Background(), &httpRequest); 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 newInstancePrincipalToken(response.Token.Token) +} + +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"` +} + +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, + } + 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 +} + +// 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 securityToken interface { + fmt.Stringer + Valid() bool +} + +type instancePrincipalToken struct { + tokenString string + jwtToken *jwtToken +} + +func newInstancePrincipalToken(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 &instancePrincipalToken{tokenString, jwtToken}, nil +} + +func (t *instancePrincipalToken) String() string { + return t.tokenString +} + +func (t *instancePrincipalToken) Valid() bool { + return !t.jwtToken.expired() +} diff --git a/vendor/github.com/oracle/oci-go-sdk/common/auth/instance_principal_key_provider.go b/vendor/github.com/oracle/oci-go-sdk/common/auth/instance_principal_key_provider.go new file mode 100644 index 000000000..ecf14b072 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/common/auth/instance_principal_key_provider.go @@ -0,0 +1,95 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +package auth + +import ( + "bytes" + "crypto/rsa" + "fmt" + "github.com/oracle/oci-go-sdk/common" +) + +const ( + regionURL = `http://169.254.169.254/opc/v1/instance/region` + leafCertificateURL = `http://169.254.169.254/opc/v1/identity/cert.pem` + leafCertificateKeyURL = `http://169.254.169.254/opc/v1/identity/key.pem` + leafCertificateKeyPassphrase = `` // No passphrase for the private key for Compute instances + intermediateCertificateURL = `http://169.254.169.254/opc/v1/identity/intermediate.pem` + intermediateCertificateKeyURL = `` + intermediateCertificateKeyPassphrase = `` // No passphrase for the private key for Compute instances +) + +// 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 { + regionForFederationClient common.Region + federationClient federationClient +} + +// 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() (provider *instancePrincipalKeyProvider, err error) { + var region common.Region + if region, err = getRegionForFederationClient(regionURL); err != nil { + err = fmt.Errorf("failed to get the region name from %s: %s", regionURL, err.Error()) + common.Logln(err) + return nil, err + } + + leafCertificateRetriever := newURLBasedX509CertificateRetriever( + leafCertificateURL, leafCertificateKeyURL, leafCertificateKeyPassphrase) + intermediateCertificateRetrievers := []x509CertificateRetriever{ + newURLBasedX509CertificateRetriever( + intermediateCertificateURL, intermediateCertificateKeyURL, intermediateCertificateKeyPassphrase), + } + + if err = leafCertificateRetriever.Refresh(); err != nil { + err = fmt.Errorf("failed to refresh the leaf certificate: %s", err.Error()) + return nil, err + } + tenancyID := extractTenancyIDFromCertificate(leafCertificateRetriever.Certificate()) + + federationClient := newX509FederationClient( + region, tenancyID, leafCertificateRetriever, intermediateCertificateRetrievers) + + provider = &instancePrincipalKeyProvider{regionForFederationClient: region, federationClient: federationClient} + return +} + +func getRegionForFederationClient(url string) (r common.Region, err error) { + var body bytes.Buffer + if body, err = httpGet(url); err != nil { + return + } + return common.StringToRegion(body.String()), nil +} + +func (p *instancePrincipalKeyProvider) RegionForFederationClient() common.Region { + return p.regionForFederationClient +} + +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, err + } + return privateKey, nil +} + +func (p *instancePrincipalKeyProvider) KeyID() (string, error) { + var securityToken string + var err error + if securityToken, err = p.federationClient.SecurityToken(); err != nil { + return "", fmt.Errorf("failed to get security token: %s", err.Error()) + } + return fmt.Sprintf("ST$%s", securityToken), nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/common/auth/jwt.go b/vendor/github.com/oracle/oci-go-sdk/common/auth/jwt.go new file mode 100644 index 000000000..b199a4d68 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/common/auth/jwt.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +package auth + +import ( + "bytes" + "encoding/base64" + "encoding/json" + "fmt" + "strings" + "time" +) + +type jwtToken struct { + raw string + header map[string]interface{} + payload map[string]interface{} +} + +func (t *jwtToken) expired() bool { + exp := int64(t.payload["exp"].(float64)) + return exp <= time.Now().Unix() +} + +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/common/auth/utils.go b/vendor/github.com/oracle/oci-go-sdk/common/auth/utils.go new file mode 100644 index 000000000..f84490c7d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/common/auth/utils.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +package auth + +import ( + "bytes" + "crypto/sha1" + "crypto/x509" + "fmt" + "github.com/oracle/oci-go-sdk/common" + "net/http" + "net/http/httputil" + "strings" +) + +// 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(url string) (body bytes.Buffer, err error) { + var response *http.Response + if response, err = http.Get(url); err != nil { + return + } + + common.IfDebug(func() { + if dump, e := httputil.DumpResponse(response, true); e == nil { + common.Logf("Dump Response %v", string(dump)) + } else { + common.Debugln(e) + } + }) + + defer response.Body.Close() + if _, err = body.ReadFrom(response.Body); err != nil { + return + } + + if response.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 := sha1.Sum(certificate.Raw) + return colonSeparatedString(fingerprint) +} + +func colonSeparatedString(fingerprint [sha1.Size]byte) string { + spaceSeparated := fmt.Sprintf("% x", fingerprint) + return strings.Replace(spaceSeparated, " ", ":", -1) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/common/client.go b/vendor/github.com/oracle/oci-go-sdk/common/client.go new file mode 100644 index 000000000..d67e99777 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/common/client.go @@ -0,0 +1,253 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +// Package common provides supporting functions and structs used by service packages +package common + +import ( + "context" + "fmt" + "net/http" + "net/http/httputil" + "net/url" + "os" + "os/user" + "path" + "runtime" + "strings" + "time" +) + +const ( + // DefaultHostURLTemplate The default url template for service hosts + DefaultHostURLTemplate = "%s.%s.oraclecloud.com" + defaultScheme = "https" + defaultSDKMarker = "Oracle-GoSDK" + defaultUserAgentTemplate = "%s/%s (%s/%s; go/%s)" //SDK/SDKVersion (OS/OSVersion; Lang/LangVersion) + defaultTimeout = time.Second * 30 + defaultConfigFileName = "config" + defaultConfigDirName = ".oci" + secondaryConfigDirName = ".oraclebmc" + maxBodyLenForDebug = 1024 * 1000 +) + +// 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) +} + +// 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 +} + +func defaultUserAgent() string { + userAgent := fmt.Sprintf(defaultUserAgentTemplate, defaultSDKMarker, Version(), runtime.GOOS, runtime.GOARCH, runtime.Version()) + return userAgent +} + +func newBaseClient(signer HTTPRequestSigner, dispatcher HTTPRequestDispatcher) BaseClient { + return BaseClient{ + UserAgent: defaultUserAgent(), + Interceptor: nil, + Signer: signer, + HTTPClient: dispatcher, + } +} + +func defaultHTTPDispatcher() http.Client { + httpClient := http.Client{ + Timeout: defaultTimeout, + } + 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) + return +} + +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. +func DefaultConfigProvider() ConfigurationProvider { + homeFolder := getHomeFolder() + defaultConfigFile := path.Join(homeFolder, defaultConfigDirName, defaultConfigFileName) + secondaryConfigFile := path.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 +} + +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("User-Agent", client.UserAgent) + + 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()) + } + request.URL.Host = clientURL.Host + request.URL.Scheme = clientURL.Scheme + currentPath := request.URL.Path + request.URL.Path = path.Clean(fmt.Sprintf("/%s/%s", client.BasePath, currentPath)) + return +} + +func (client BaseClient) intercept(request *http.Request) (err error) { + if client.Interceptor != nil { + err = client.Interceptor(request) + } + return +} + +func checkForSuccessfulResponse(res *http.Response) error { + familyStatusCode := res.StatusCode / 100 + if familyStatusCode == 4 || familyStatusCode == 5 { + return newServiceFailureFromResponse(res) + } + return nil + +} + +//Call executes the underlying http requrest with the given context +func (client BaseClient) Call(ctx context.Context, request *http.Request) (response *http.Response, err error) { + Debugln("Atempting to call downstream service") + request = request.WithContext(ctx) + + err = client.prepareRequest(request) + if err != nil { + return + } + + //Intercept + err = client.intercept(request) + if err != nil { + return + } + + //Sign the request + err = client.Signer.Sign(request) + if err != nil { + return + } + + IfDebug(func() { + dumpBody := true + if request.ContentLength > maxBodyLenForDebug { + Logln("not dumping body too big") + dumpBody = false + } + if dump, e := httputil.DumpRequest(request, dumpBody); e == nil { + Logf("Dump Request %v", string(dump)) + } else { + Debugln(e) + } + }) + + //Execute the http request + response, err = client.HTTPClient.Do(request) + + IfDebug(func() { + if err != nil { + Logln(err) + return + } + + dumpBody := true + if response.ContentLength > maxBodyLenForDebug { + Logln("not dumping body too big") + dumpBody = false + } + + if dump, e := httputil.DumpResponse(response, dumpBody); e == nil { + Logf("Dump Response %v", string(dump)) + } else { + Debugln(e) + } + }) + + if err != nil { + return + } + + err = checkForSuccessfulResponse(response) + return +} + +//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 { + httpResponse.Body.Close() + } +} diff --git a/vendor/github.com/oracle/oci-go-sdk/common/common.go b/vendor/github.com/oracle/oci-go-sdk/common/common.go new file mode 100644 index 000000000..9164562b4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/common/common.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +package common + +import ( + "strings" +) + +//Region type for regions +type Region string + +const ( + //RegionSEA region SEA + RegionSEA Region = "sea" + //RegionPHX region PHX + RegionPHX Region = "us-phoenix-1" + //RegionIAD region IAD + RegionIAD Region = "us-ashburn-1" + //RegionFRA region FRA + RegionFRA Region = "eu-frankfurt-1" +) + +//StringToRegion convert a string to Region type +func StringToRegion(stringRegion string) (r Region) { + switch strings.ToLower(stringRegion) { + case "sea": + r = RegionSEA + case "phx", "us-phoenix-1": + r = RegionPHX + case "iad", "us-ashburn-1": + r = RegionIAD + case "fra", "eu-frankfurt-1": + r = RegionFRA + default: + r = Region(stringRegion) + Debugf("region named: %s, is not recognized", stringRegion) + } + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/common/configuration.go b/vendor/github.com/oracle/oci-go-sdk/common/configuration.go new file mode 100644 index 000000000..d2292bb9d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/common/configuration.go @@ -0,0 +1,487 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +package common + +import ( + "crypto/rsa" + "errors" + "fmt" + "io/ioutil" + "os" + "regexp" + "strings" +) + +// ConfigurationProvider wraps information about the account owner +type ConfigurationProvider interface { + KeyProvider + TenancyOCID() (string, error) + UserOCID() (string, error) + KeyFingerprint() (string, error) + Region() (string, error) +} + +// IsConfigurationProviderValid Tests all parts of the configuration provider do not return an error +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 rawConfigurationProvider +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) { + return p.tenancy, nil +} + +func (p rawConfigurationProvider) UserOCID() (string, error) { + return p.user, nil +} + +func (p rawConfigurationProvider) KeyFingerprint() (string, error) { + return p.fingerprint, nil +} + +func (p rawConfigurationProvider) Region() (string, error) { + return p.region, nil +} + +// environmentConfigurationProvider reads configuration from environment variables +type environmentConfigurationProvider struct { // TODO: Support Instance Principal + 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) + } + + pemFileContent, err := ioutil.ReadFile(value) + 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) + } + 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) + } + 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) + } + 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 +} + +// fileConfigurationProvider. reads configuration information from a file +type fileConfigurationProvider struct { // TODO: Support Instance Principal + //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 +} + +// 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"}, 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, fmt.Errorf("config file path can not be empty") + } + + return fileConfigurationProvider{ + ConfigPath: configFilePath, + PrivateKeyPassword: privateKeyPassword, + Profile: profile}, nil +} + +type configFileInfo struct { + UserOcid, Fingerprint, KeyFilePath, TenancyOcid, Region string + PresentConfiguration byte +} + +const ( + hasTenancy = 1 << iota + hasUser + hasFingerprint + hasRegion + hasKeyFile + none +) + +var profileRegex = regexp.MustCompile(`^\[(.*)\]`) + +func parseConfigFile(data []byte, profile string) (info *configFileInfo, err error) { + + if len(data) == 0 { + return nil, 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); match != nil && len(match) > 1 && match[1] == profile { + start := i + 1 + return parseConfigAtLine(start, splitContent) + } + } + + return nil, fmt.Errorf("configuration file did not contain profile: %s", profile) +} + +func parseConfigAtLine(start int, content []string) (info *configFileInfo, err error) { + var configurationPresent byte + 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 "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 + } + } + info.PresentConfiguration = configurationPresent + return + +} + +func openConfigFile(configFilePath string) (data []byte, err error) { + data, err = ioutil.ReadFile(configFilePath) + 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) { + if p.FileInfo != nil { + return p.FileInfo, nil + } + + if p.ConfigPath == "" { + return nil, fmt.Errorf("configuration path can not be empty") + } + + data, err := openConfigFile(p.ConfigPath) + if err != nil { + 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 byte, confMissing string) (string, error) { + if presentConf&expectedConf == expectedConf { + return value, nil + } + return "", errors.New(confMissing + " configuration is missing from file") +} + +func (p fileConfigurationProvider) TenancyOCID() (value string, err error) { + info, err := p.readAndParseConfigFile() + if err != nil { + err = fmt.Errorf("can not read tenancy configuration due to: %s", err.Error()) + return + } + + value, err = presentOrError(info.TenancyOcid, hasTenancy, info.PresentConfiguration, "tenancy") + return +} + +func (p fileConfigurationProvider) UserOCID() (value string, err error) { + info, err := p.readAndParseConfigFile() + if err != nil { + err = fmt.Errorf("can not read tenancy configuration due to: %s", err.Error()) + return + } + + value, err = presentOrError(info.UserOcid, hasUser, info.PresentConfiguration, "user") + return +} + +func (p fileConfigurationProvider) KeyFingerprint() (value string, err error) { + info, err := p.readAndParseConfigFile() + if err != nil { + err = fmt.Errorf("can not read tenancy configuration due to: %s", err.Error()) + return + } + value, err = presentOrError(info.Fingerprint, hasFingerprint, info.PresentConfiguration, "fingerprint") + return +} + +func (p fileConfigurationProvider) KeyID() (keyID string, err error) { + info, err := p.readAndParseConfigFile() + if err != nil { + err = fmt.Errorf("can not read tenancy configuration due to: %s", err.Error()) + return + } + + return fmt.Sprintf("%s/%s/%s", info.TenancyOcid, info.UserOcid, info.Fingerprint), nil +} + +func (p fileConfigurationProvider) PrivateRSAKey() (key *rsa.PrivateKey, err error) { + info, err := p.readAndParseConfigFile() + if err != nil { + 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 + } + pemFileContent, err := ioutil.ReadFile(filePath) + if err != nil { + err = fmt.Errorf("can not read PrivateKey from configuration file due to: %s", err.Error()) + return + } + + key, err = PrivateKeyFromBytes(pemFileContent, &p.PrivateKeyPassword) + return +} + +func (p fileConfigurationProvider) Region() (value string, err error) { + info, err := p.readAndParseConfigFile() + if err != nil { + err = fmt.Errorf("can not read region configuration due to: %s", err.Error()) + return + } + + value, err = presentOrError(info.Region, hasRegion, info.PresentConfiguration, "region") + return +} + +// 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") + } + 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 + } + } + 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 + } + } + 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 + } + } + return "", fmt.Errorf("did not find a proper configuration for region") +} + +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") +} diff --git a/vendor/github.com/oracle/oci-go-sdk/common/errors.go b/vendor/github.com/oracle/oci-go-sdk/common/errors.go new file mode 100644 index 000000000..290bd08bf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/common/errors.go @@ -0,0 +1,80 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +package common + +import ( + "encoding/json" + "fmt" + "io/ioutil" + "net/http" +) + +// 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.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm + GetCode() string +} + +type servicefailure struct { + StatusCode int + Code string `json:"code,omitempty"` + Message string `json:"message,omitempty"` +} + +func newServiceFailureFromResponse(response *http.Response) error { + var err error + + //If there is an error consume the body, entirely + body, err := ioutil.ReadAll(response.Body) + if err != nil { + return servicefailure{ + StatusCode: response.StatusCode, + Code: "BadErrorResponse", + Message: fmt.Sprintf("The body of the response was not readable, due to :%s", err.Error()), + } + } + + se := servicefailure{StatusCode: response.StatusCode} + err = json.Unmarshal(body, &se) + if err != nil { + Debugf("Error response could not be parsed due to: %s", err.Error()) + return servicefailure{ + StatusCode: response.StatusCode, + Code: "BadErrorResponse", + Message: fmt.Sprintf("Error while parsing failure from response"), + } + } + return se +} + +func (se servicefailure) Error() string { + return fmt.Sprintf("Service error:%s. %s. http status code: %d", + se.Code, se.Message, se.StatusCode) +} + +func (se servicefailure) GetHTTPStatusCode() int { + return se.StatusCode + +} + +func (se servicefailure) GetMessage() string { + return se.Message +} + +func (se servicefailure) GetCode() string { + return se.Code +} + +// 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.(servicefailure) + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/common/helpers.go b/vendor/github.com/oracle/oci-go-sdk/common/helpers.go new file mode 100644 index 000000000..554436944 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/common/helpers.go @@ -0,0 +1,168 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +package common + +import ( + "crypto/rsa" + "crypto/x509" + "encoding/pem" + "fmt" + "reflect" + "strings" + "time" +) + +// 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 +} + +// 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 time struct, which renders to/from json using RFC339 +type SDKTime struct { + time.Time +} + +func sdkTimeFromTime(t time.Time) SDKTime { + return SDKTime{t} +} + +func now() *SDKTime { + t := SDKTime{time.Now()} + return &t +} + +var timeType = reflect.TypeOf(SDKTime{}) +var timeTypePtr = reflect.TypeOf(&SDKTime{}) + +const sdkTimeFormat = time.RFC3339 + +const rfc1123OptionalLeadingDigitsInDay = "Mon, _2 Jan 2006 15:04:05 MST" + +func formatTime(t SDKTime) string { + return t.Format(sdkTimeFormat) +} + +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.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 +} + +// 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 +} + +// PrivateKeyFromBytes is a helper function that will produce a RSA private +// key from bytes. +func PrivateKeyFromBytes(pemData []byte, password *string) (key *rsa.PrivateKey, e error) { + if pemBlock, _ := pem.Decode(pemData); pemBlock != nil { + decrypted := pemBlock.Bytes + if x509.IsEncryptedPEMBlock(pemBlock) { + if password == nil { + e = fmt.Errorf("private_key_password is required for encrypted private keys") + return + } + if decrypted, e = x509.DecryptPEMBlock(pemBlock, []byte(*password)); e != nil { + return + } + } + + key, e = x509.ParsePKCS1PrivateKey(decrypted) + + } else { + e = fmt.Errorf("PEM data was not found in buffer") + return + } + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/common/http.go b/vendor/github.com/oracle/oci-go-sdk/common/http.go new file mode 100644 index 000000000..5e75ed4b3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/common/http.go @@ -0,0 +1,863 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +package common + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + "io/ioutil" + "net/http" + "net/url" + "path" + "reflect" + "regexp" + "strconv" + "strings" + "time" +) + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//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 + } + + 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', 6, 32), nil + case reflect.Float64: + return strconv.FormatFloat(v.Float(), 'f', 6, 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) (e error) { + readCloser, ok := value.Interface().(io.ReadCloser) + if !ok { + e = fmt.Errorf("body of the request 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("Content-Type") == "" { + request.Header.Set("Content-Type", "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 tag 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 + } + + if currentFieldValue.Type() == timeType || currentFieldValue.Type() == timeTypePtr { + 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: + jsonList := data.([]interface{}) + 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 := data.(map[string]interface{}) + 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) { + rawMap := make(map[string]interface{}) + json.Unmarshal(rawJSON, &rawMap) + fixedMap, err := omitNilFieldsInJSON(rawMap, value) + if err != nil { + return nil, err + } + return json.Marshal(fixedMap) +} + +func addToBody(request *http.Request, value reflect.Value, field reflect.StructField) (e error) { + Debugln("Marshaling to body from field:", field.Name) + if request.Body != nil { + Logln("The body of the request is already set. Structure: ", field.Name, " will overwrite it") + } + tag := field.Tag + encoding := tag.Get("encoding") + + if encoding == "binary" { + return addBinaryBody(request, value) + } + + rawJSON, e := json.Marshal(value.Interface()) + if e != nil { + return + } + marshaled, e := removeNilFieldsInJSONWithTaggedStruct(rawJSON, value) + if e != nil { + return + } + Debugf("Marshaled body is: %s", string(marshaled)) + bodyBytes := bytes.NewReader(marshaled) + request.ContentLength = int64(bodyBytes.Len()) + request.Header.Set("Content-Length", strconv.FormatInt(request.ContentLength, 10)) + request.Header.Set("Content-Type", "application/json") + request.Body = ioutil.NopCloser(bodyBytes) + request.GetBody = func() (io.ReadCloser, error) { + return ioutil.NopCloser(bodyBytes), nil + } + return +} + +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 header", field.Name) + return + } + + if queryParameterValue, e = toStringValue(value, field); 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 { + query.Set(queryParameterName, queryParameterValue) + } else { + Debugf("Omitting %s, is empty and omitEmpty tag is set", field.Name) + } + } else { + query.Set(queryParameterName, queryParameterValue) + } + + request.URL.RawQuery = query.Encode() + return +} + +// 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()) + } + + 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} + newPath := strings.Join(allPath, "/") + request.URL.Path = path.Clean(newPath) + } 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 = path.Clean(strings.Replace(urlTemplate, "{"+fieldName+"}", additionalURLPathPart, -1)) + } + return +} + +func setWellKnownHeaders(request *http.Request, headerName, headerValue string) (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) + } + return nil +} + +func addToHeader(request *http.Request, value reflect.Value, field reflect.StructField) (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) + } + + //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 + if headerValue, e = toStringValue(value, field); e != nil { + return + } + + if e = setWellKnownHeaders(request, headerName, headerValue); e != nil { + return + } + + request.Header.Set(headerName, headerValue) + return +} + +// 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() + 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) + tag := sf.Tag.Get("contributesTo") + switch tag { + case "header": + err = addToHeader(request, sv, sf) + 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) + 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 headers are and the content type was not set, we default to application/json + if request.Header != nil && request.Header.Get("Content-Type") == "" { + request.Header.Set("Content-Type", "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("Content-Length", "0") + httpRequest.Header.Set("Date", time.Now().UTC().Format(http.TimeFormat)) + httpRequest.Header.Set("Opc-Client-Info", strings.Join([]string{defaultSDKMarker, Version()}, "/")) + httpRequest.Header.Set("Accept", "*/*") + 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) + 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: + Debugln("The type is not valid: %v. Returing int size for arch", 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 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 appropiate 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) + if err != nil { + return + } + if !isPointer { + val.Set(value) + } 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("Unmarshaling from body to field:", field.Name) + if response.Body == nil { + Debugln("Unmarshaling 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) { + + 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 +} diff --git a/vendor/github.com/oracle/oci-go-sdk/common/http_signer.go b/vendor/github.com/oracle/oci-go-sdk/common/http_signer.go new file mode 100644 index 000000000..3e82931aa --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/common/http_signer.go @@ -0,0 +1,230 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +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 + } +) + +// DefaultRequestSigner creates a signer with default parameters. +func DefaultRequestSigner(provider KeyProvider) HTTPRequestSigner { + return RequestSigner(provider, defaultGenericHeaders, defaultBodyHeaders) +} + +// 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 + 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 + if request.ContentLength > 0 { + hash, err = GetBodyHash(request) + if err != nil { + return + } + } else { + hash = hashAndEncode([]byte("")) + } + request.Header.Set("X-Content-Sha256", 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 { + return "", fmt.Errorf("can not read body of request while calculating body hash, nil body?") + } + + var data []byte + bReader := request.Body + 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()) + } + 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("Authorization", authValue) + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/common/log.go b/vendor/github.com/oracle/oci-go-sdk/common/log.go new file mode 100644 index 000000000..328485fdd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/common/log.go @@ -0,0 +1,67 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + +package common + +import ( + "fmt" + "io" + "io/ioutil" + "log" + "os" + "sync" +) + +// Simple logging proxy to distinguish control for logging messages +// Debug logging is turned on/off by the presence of the environment variable "OCI_GO_SDK_DEBUG" +var debugLog = log.New(os.Stderr, "DEBUG ", log.Ldate|log.Ltime|log.Lshortfile) +var mainLog = log.New(os.Stderr, "", log.Ldate|log.Ltime|log.Lshortfile) +var isDebugLogEnabled bool +var checkDebug sync.Once + +func getOutputForEnv() (writer io.Writer) { + checkDebug.Do(func() { + isDebugLogEnabled = *new(bool) + _, isDebugLogEnabled = os.LookupEnv("OCI_GO_SDK_DEBUG") + }) + + writer = ioutil.Discard + if isDebugLogEnabled { + writer = os.Stderr + } + return +} + +// Debugf logs v with the provided format if debug mode is set +func Debugf(format string, v ...interface{}) { + debugLog.SetOutput(getOutputForEnv()) + debugLog.Output(3, fmt.Sprintf(format, v...)) +} + +// Debug logs v if debug mode is set +func Debug(v ...interface{}) { + debugLog.SetOutput(getOutputForEnv()) + debugLog.Output(3, fmt.Sprint(v...)) +} + +// Debugln logs v appending a new line if debug mode is set +func Debugln(v ...interface{}) { + debugLog.SetOutput(getOutputForEnv()) + debugLog.Output(3, fmt.Sprintln(v...)) +} + +// IfDebug executes closure if debug is enabled +func IfDebug(fn func()) { + if isDebugLogEnabled { + fn() + } +} + +// Logln logs v appending a new line at the end +func Logln(v ...interface{}) { + mainLog.Output(3, fmt.Sprintln(v...)) +} + +// Logf logs v with the provided format +func Logf(format string, v ...interface{}) { + mainLog.Output(3, fmt.Sprintf(format, v...)) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/common/version.go b/vendor/github.com/oracle/oci-go-sdk/common/version.go new file mode 100644 index 000000000..be610d170 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/common/version.go @@ -0,0 +1,36 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated by go generate; DO NOT EDIT + +package common + +import ( + "bytes" + "fmt" + "sync" +) + +const ( + major = "1" + minor = "0" + patch = "0" + 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/core/attach_boot_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/core/attach_boot_volume_details.go new file mode 100644 index 000000000..7dc403a4c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/attach_boot_volume_details.go @@ -0,0 +1,30 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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 cannot be changed. Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m AttachBootVolumeDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/attach_boot_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/attach_boot_volume_request_response.go new file mode 100644 index 000000000..f52a01930 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/attach_boot_volume_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// AttachBootVolumeRequest wrapper for the AttachBootVolume operation +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"` +} + +func (request AttachBootVolumeRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/attach_i_scsi_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/core/attach_i_scsi_volume_details.go new file mode 100644 index 000000000..827108d2f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/attach_i_scsi_volume_details.go @@ -0,0 +1,63 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// AttachIScsiVolumeDetails The representation of AttachIScsiVolumeDetails +type AttachIScsiVolumeDetails struct { + + // The OCID of the instance. + InstanceId *string `mandatory:"true" json:"instanceId"` + + // The OCID of the volume. + VolumeId *string `mandatory:"true" json:"volumeId"` + + // A user-friendly name. Does not have to be unique, and it cannot be changed. Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Whether to use CHAP authentication for the volume attachment. Defaults to false. + UseChap *bool `mandatory:"false" json:"useChap"` +} + +//GetDisplayName returns DisplayName +func (m AttachIScsiVolumeDetails) GetDisplayName() *string { + return m.DisplayName +} + +//GetInstanceId returns InstanceId +func (m AttachIScsiVolumeDetails) GetInstanceId() *string { + return m.InstanceId +} + +//GetVolumeId returns VolumeId +func (m AttachIScsiVolumeDetails) GetVolumeId() *string { + return m.VolumeId +} + +func (m AttachIScsiVolumeDetails) String() string { + return common.PointerString(m) +} + +// 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/core/attach_vnic_details.go b/vendor/github.com/oracle/oci-go-sdk/core/attach_vnic_details.go new file mode 100644 index 000000000..a6e978940 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/attach_vnic_details.go @@ -0,0 +1,37 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// AttachVnicDetails The representation of AttachVnicDetails +type AttachVnicDetails struct { + + // Details for creating a new VNIC. + CreateVnicDetails *CreateVnicDetails `mandatory:"true" json:"createVnicDetails"` + + // The OCID of the instance. + InstanceId *string `mandatory:"true" json:"instanceId"` + + // A user-friendly name for the attachment. Does not have to be unique, and it cannot be changed. + 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.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm). + NicIndex *int `mandatory:"false" json:"nicIndex"` +} + +func (m AttachVnicDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/attach_vnic_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/attach_vnic_request_response.go new file mode 100644 index 000000000..3f04c241a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/attach_vnic_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// AttachVnicRequest wrapper for the AttachVnic operation +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"` +} + +func (request AttachVnicRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/attach_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/core/attach_volume_details.go new file mode 100644 index 000000000..414fc9c3a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/attach_volume_details.go @@ -0,0 +1,86 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// AttachVolumeDetails The representation of AttachVolumeDetails +type AttachVolumeDetails interface { + + // The OCID of the instance. + GetInstanceId() *string + + // The OCID of the volume. + GetVolumeId() *string + + // A user-friendly name. Does not have to be unique, and it cannot be changed. Avoid entering confidential information. + GetDisplayName() *string +} + +type attachvolumedetails struct { + JsonData []byte + InstanceId *string `mandatory:"true" json:"instanceId"` + VolumeId *string `mandatory:"true" json:"volumeId"` + DisplayName *string `mandatory:"false" json:"displayName"` + 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.DisplayName = s.Model.DisplayName + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *attachvolumedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + var err error + switch m.Type { + case "iscsi": + mm := AttachIScsiVolumeDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + return m, nil + } +} + +//GetInstanceId returns InstanceId +func (m attachvolumedetails) GetInstanceId() *string { + return m.InstanceId +} + +//GetVolumeId returns VolumeId +func (m attachvolumedetails) GetVolumeId() *string { + return m.VolumeId +} + +//GetDisplayName returns DisplayName +func (m attachvolumedetails) GetDisplayName() *string { + return m.DisplayName +} + +func (m attachvolumedetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/attach_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/attach_volume_request_response.go new file mode 100644 index 000000000..d2f7076f8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/attach_volume_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// AttachVolumeRequest wrapper for the AttachVolume operation +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"` +} + +func (request AttachVolumeRequest) String() string { + return common.PointerString(request) +} + +// 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"` +} + +func (response AttachVolumeResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/boot_volume.go b/vendor/github.com/oracle/oci-go-sdk/core/boot_volume.go new file mode 100644 index 000000000..1f57aca45 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/boot_volume.go @@ -0,0 +1,86 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// BootVolume A detachable boot volume device that contains the image used to boot an Compute instance. For more information, see +// Overview of Boot Volumes (https://docs.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +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 *int `mandatory:"true" json:"sizeInMBs"` + + // The date and time the boot volume was created. Format defined by RFC3339. + 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 image OCID used to create the boot volume. + ImageId *string `mandatory:"false" json:"imageId"` + + // The size of the boot volume in GBs. + SizeInGBs *int `mandatory:"false" json:"sizeInGBs"` +} + +func (m BootVolume) String() string { + return common.PointerString(m) +} + +// BootVolumeLifecycleStateEnum Enum with underlying type: string +type BootVolumeLifecycleStateEnum string + +// Set of constants representing the allowable values for BootVolumeLifecycleState +const ( + BootVolumeLifecycleStateProvisioning BootVolumeLifecycleStateEnum = "PROVISIONING" + BootVolumeLifecycleStateRestoring BootVolumeLifecycleStateEnum = "RESTORING" + BootVolumeLifecycleStateAvailable BootVolumeLifecycleStateEnum = "AVAILABLE" + BootVolumeLifecycleStateTerminating BootVolumeLifecycleStateEnum = "TERMINATING" + BootVolumeLifecycleStateTerminated BootVolumeLifecycleStateEnum = "TERMINATED" + BootVolumeLifecycleStateFaulty BootVolumeLifecycleStateEnum = "FAULTY" +) + +var mappingBootVolumeLifecycleState = map[string]BootVolumeLifecycleStateEnum{ + "PROVISIONING": BootVolumeLifecycleStateProvisioning, + "RESTORING": BootVolumeLifecycleStateRestoring, + "AVAILABLE": BootVolumeLifecycleStateAvailable, + "TERMINATING": BootVolumeLifecycleStateTerminating, + "TERMINATED": BootVolumeLifecycleStateTerminated, + "FAULTY": BootVolumeLifecycleStateFaulty, +} + +// GetBootVolumeLifecycleStateEnumValues Enumerates the set of values for BootVolumeLifecycleState +func GetBootVolumeLifecycleStateEnumValues() []BootVolumeLifecycleStateEnum { + values := make([]BootVolumeLifecycleStateEnum, 0) + for _, v := range mappingBootVolumeLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/boot_volume_attachment.go b/vendor/github.com/oracle/oci-go-sdk/core/boot_volume_attachment.go new file mode 100644 index 000000000..2c24059fc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/boot_volume_attachment.go @@ -0,0 +1,76 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// BootVolumeAttachment Represents an attachment between a boot volume and an instance. +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. + // 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 cannot be changed. + // Avoid entering confidential information. + // Example: `My boot volume` + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m BootVolumeAttachment) String() string { + return common.PointerString(m) +} + +// BootVolumeAttachmentLifecycleStateEnum Enum with underlying type: string +type BootVolumeAttachmentLifecycleStateEnum string + +// Set of constants representing the allowable values for BootVolumeAttachmentLifecycleState +const ( + BootVolumeAttachmentLifecycleStateAttaching BootVolumeAttachmentLifecycleStateEnum = "ATTACHING" + BootVolumeAttachmentLifecycleStateAttached BootVolumeAttachmentLifecycleStateEnum = "ATTACHED" + BootVolumeAttachmentLifecycleStateDetaching BootVolumeAttachmentLifecycleStateEnum = "DETACHING" + BootVolumeAttachmentLifecycleStateDetached BootVolumeAttachmentLifecycleStateEnum = "DETACHED" +) + +var mappingBootVolumeAttachmentLifecycleState = map[string]BootVolumeAttachmentLifecycleStateEnum{ + "ATTACHING": BootVolumeAttachmentLifecycleStateAttaching, + "ATTACHED": BootVolumeAttachmentLifecycleStateAttached, + "DETACHING": BootVolumeAttachmentLifecycleStateDetaching, + "DETACHED": BootVolumeAttachmentLifecycleStateDetached, +} + +// GetBootVolumeAttachmentLifecycleStateEnumValues Enumerates the set of values for BootVolumeAttachmentLifecycleState +func GetBootVolumeAttachmentLifecycleStateEnumValues() []BootVolumeAttachmentLifecycleStateEnum { + values := make([]BootVolumeAttachmentLifecycleStateEnum, 0) + for _, v := range mappingBootVolumeAttachmentLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/bulk_add_virtual_circuit_public_prefixes_details.go b/vendor/github.com/oracle/oci-go-sdk/core/bulk_add_virtual_circuit_public_prefixes_details.go new file mode 100644 index 000000000..bf8afbbf2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/bulk_add_virtual_circuit_public_prefixes_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/bulk_add_virtual_circuit_public_prefixes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/bulk_add_virtual_circuit_public_prefixes_request_response.go new file mode 100644 index 000000000..749adc891 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/bulk_add_virtual_circuit_public_prefixes_request_response.go @@ -0,0 +1,34 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// BulkAddVirtualCircuitPublicPrefixesRequest wrapper for the BulkAddVirtualCircuitPublicPrefixes operation +type BulkAddVirtualCircuitPublicPrefixesRequest struct { + + // The OCID 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"` +} + +func (request BulkAddVirtualCircuitPublicPrefixesRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/bulk_delete_virtual_circuit_public_prefixes_details.go b/vendor/github.com/oracle/oci-go-sdk/core/bulk_delete_virtual_circuit_public_prefixes_details.go new file mode 100644 index 000000000..031eea71b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/bulk_delete_virtual_circuit_public_prefixes_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/bulk_delete_virtual_circuit_public_prefixes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/bulk_delete_virtual_circuit_public_prefixes_request_response.go new file mode 100644 index 000000000..a57afa64e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/bulk_delete_virtual_circuit_public_prefixes_request_response.go @@ -0,0 +1,34 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// BulkDeleteVirtualCircuitPublicPrefixesRequest wrapper for the BulkDeleteVirtualCircuitPublicPrefixes operation +type BulkDeleteVirtualCircuitPublicPrefixesRequest struct { + + // The OCID of the virtual circuit. + VirtualCircuitId *string `mandatory:"true" contributesTo:"path" name:"virtualCircuitId"` + + // Request with publix prefixes to be deleted from the virtual circuit + BulkDeleteVirtualCircuitPublicPrefixesDetails `contributesTo:"body"` +} + +func (request BulkDeleteVirtualCircuitPublicPrefixesRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/capture_console_history_details.go b/vendor/github.com/oracle/oci-go-sdk/core/capture_console_history_details.go new file mode 100644 index 000000000..9fb153ec6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/capture_console_history_details.go @@ -0,0 +1,27 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m CaptureConsoleHistoryDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/capture_console_history_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/capture_console_history_request_response.go new file mode 100644 index 000000000..8e2919b70 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/capture_console_history_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CaptureConsoleHistoryRequest wrapper for the CaptureConsoleHistory operation +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"` +} + +func (request CaptureConsoleHistoryRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/connect_local_peering_gateways_details.go b/vendor/github.com/oracle/oci-go-sdk/core/connect_local_peering_gateways_details.go new file mode 100644 index 000000000..6a2d06c2a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/connect_local_peering_gateways_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// ConnectLocalPeeringGatewaysDetails Information about the other local peering gateway (LPG). +type ConnectLocalPeeringGatewaysDetails struct { + + // The OCID of the LPG you want to peer with. + PeerId *string `mandatory:"true" json:"peerId"` +} + +func (m ConnectLocalPeeringGatewaysDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/connect_local_peering_gateways_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/connect_local_peering_gateways_request_response.go new file mode 100644 index 000000000..084abbe5d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/connect_local_peering_gateways_request_response.go @@ -0,0 +1,38 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ConnectLocalPeeringGatewaysRequest wrapper for the ConnectLocalPeeringGateways operation +type ConnectLocalPeeringGatewaysRequest struct { + + // The OCID of the local peering gateway. + LocalPeeringGatewayId *string `mandatory:"true" contributesTo:"path" name:"localPeeringGatewayId"` + + // Details regarding the local peering gateway to connect. + ConnectLocalPeeringGatewaysDetails `contributesTo:"body"` +} + +func (request ConnectLocalPeeringGatewaysRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/console_history.go b/vendor/github.com/oracle/oci-go-sdk/core/console_history.go new file mode 100644 index 000000000..27b9d760a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/console_history.go @@ -0,0 +1,75 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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. +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. + // 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. + // Example: `My console history metadata` + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m ConsoleHistory) String() string { + return common.PointerString(m) +} + +// ConsoleHistoryLifecycleStateEnum Enum with underlying type: string +type ConsoleHistoryLifecycleStateEnum string + +// Set of constants representing the allowable values for ConsoleHistoryLifecycleState +const ( + ConsoleHistoryLifecycleStateRequested ConsoleHistoryLifecycleStateEnum = "REQUESTED" + ConsoleHistoryLifecycleStateGettingHistory ConsoleHistoryLifecycleStateEnum = "GETTING-HISTORY" + ConsoleHistoryLifecycleStateSucceeded ConsoleHistoryLifecycleStateEnum = "SUCCEEDED" + ConsoleHistoryLifecycleStateFailed ConsoleHistoryLifecycleStateEnum = "FAILED" +) + +var mappingConsoleHistoryLifecycleState = map[string]ConsoleHistoryLifecycleStateEnum{ + "REQUESTED": ConsoleHistoryLifecycleStateRequested, + "GETTING-HISTORY": ConsoleHistoryLifecycleStateGettingHistory, + "SUCCEEDED": ConsoleHistoryLifecycleStateSucceeded, + "FAILED": ConsoleHistoryLifecycleStateFailed, +} + +// GetConsoleHistoryLifecycleStateEnumValues Enumerates the set of values for ConsoleHistoryLifecycleState +func GetConsoleHistoryLifecycleStateEnumValues() []ConsoleHistoryLifecycleStateEnum { + values := make([]ConsoleHistoryLifecycleStateEnum, 0) + for _, v := range mappingConsoleHistoryLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/core_blockstorage_client.go b/vendor/github.com/oracle/oci-go-sdk/core/core_blockstorage_client.go new file mode 100644 index 000000000..4b49fcaff --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/core_blockstorage_client.go @@ -0,0 +1,334 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/common" + "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) { + baseClient, err := common.NewClientWithConfig(configProvider) + if err != nil { + return + } + + 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 = fmt.Sprintf(common.DefaultHostURLTemplate, "iaas", region) +} + +// 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.config = &configProvider + client.SetRegion(region) + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *BlockstorageClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// CreateVolume Creates a new volume in the specified compartment. Volumes can be created in sizes ranging from +// 50 GB (51200 MB) to 16 TB (16777216 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.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). For information about +// Availability Domains, see Regions and Availability Domains (https://docs.us-phoenix-1.oraclecloud.com/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. +func (client BlockstorageClient) CreateVolume(ctx context.Context, request CreateVolumeRequest) (response CreateVolumeResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/volumes", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateVolumeBackup Creates a new backup of the specified volume. For general information about volume backups, +// see Overview of Block Volume Service Backups (https://docs.us-phoenix-1.oraclecloud.com/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. +func (client BlockstorageClient) CreateVolumeBackup(ctx context.Context, request CreateVolumeBackupRequest) (response CreateVolumeBackupResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/volumeBackups", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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.us-phoenix-1.oraclecloud.com/Content/Block/Tasks/deletingbootvolume.htm). +// **Warning:** All data on the boot volume will be permanently lost when the boot volume is deleted. +func (client BlockstorageClient) DeleteBootVolume(ctx context.Context, request DeleteBootVolumeRequest) (response DeleteBootVolumeResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/bootVolumes/{bootVolumeId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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.us-phoenix-1.oraclecloud.com/Content/Block/Tasks/disconnectingfromavolume.htm). +// **Warning:** All data on the volume will be permanently lost when the volume is deleted. +func (client BlockstorageClient) DeleteVolume(ctx context.Context, request DeleteVolumeRequest) (response DeleteVolumeResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/volumes/{volumeId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteVolumeBackup Deletes a volume backup. +func (client BlockstorageClient) DeleteVolumeBackup(ctx context.Context, request DeleteVolumeBackupRequest) (response DeleteVolumeBackupResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/volumeBackups/{volumeBackupId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetBootVolume Gets information for the specified boot volume. +func (client BlockstorageClient) GetBootVolume(ctx context.Context, request GetBootVolumeRequest) (response GetBootVolumeResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/bootVolumes/{bootVolumeId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetVolume Gets information for the specified volume. +func (client BlockstorageClient) GetVolume(ctx context.Context, request GetVolumeRequest) (response GetVolumeResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/volumes/{volumeId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetVolumeBackup Gets information for the specified volume backup. +func (client BlockstorageClient) GetVolumeBackup(ctx context.Context, request GetVolumeBackupRequest) (response GetVolumeBackupResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/volumeBackups/{volumeBackupId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListBootVolumes Lists the boot volumes in the specified compartment and Availability Domain. +func (client BlockstorageClient) ListBootVolumes(ctx context.Context, request ListBootVolumesRequest) (response ListBootVolumesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/bootVolumes", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListVolumeBackups Lists the volume backups in the specified compartment. You can filter the results by volume. +func (client BlockstorageClient) ListVolumeBackups(ctx context.Context, request ListVolumeBackupsRequest) (response ListVolumeBackupsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/volumeBackups", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListVolumes Lists the volumes in the specified compartment and Availability Domain. +func (client BlockstorageClient) ListVolumes(ctx context.Context, request ListVolumesRequest) (response ListVolumesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/volumes", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateBootVolume Updates the specified boot volume's display name. +func (client BlockstorageClient) UpdateBootVolume(ctx context.Context, request UpdateBootVolumeRequest) (response UpdateBootVolumeResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/bootVolumes/{bootVolumeId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateVolume Updates the specified volume's display name. +// Avoid entering confidential information. +func (client BlockstorageClient) UpdateVolume(ctx context.Context, request UpdateVolumeRequest) (response UpdateVolumeResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/volumes/{volumeId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateVolumeBackup Updates the display name for the specified volume backup. +// Avoid entering confidential information. +func (client BlockstorageClient) UpdateVolumeBackup(ctx context.Context, request UpdateVolumeBackupRequest) (response UpdateVolumeBackupResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/volumeBackups/{volumeBackupId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/core_compute_client.go b/vendor/github.com/oracle/oci-go-sdk/core/core_compute_client.go new file mode 100644 index 000000000..34b17d7b9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/core_compute_client.go @@ -0,0 +1,833 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/common" + "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) { + baseClient, err := common.NewClientWithConfig(configProvider) + if err != nil { + return + } + + 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 = fmt.Sprintf(common.DefaultHostURLTemplate, "iaas", region) +} + +// 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.config = &configProvider + client.SetRegion(region) + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *ComputeClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// AttachBootVolume Attaches the specified boot volume to the specified instance. +func (client ComputeClient) AttachBootVolume(ctx context.Context, request AttachBootVolumeRequest) (response AttachBootVolumeResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/bootVolumeAttachments/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm). +func (client ComputeClient) AttachVnic(ctx context.Context, request AttachVnicRequest) (response AttachVnicResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/vnicAttachments/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// AttachVolume Attaches the specified storage volume to the specified instance. +func (client ComputeClient) AttachVolume(ctx context.Context, request AttachVolumeRequest) (response AttachVolumeResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/volumeAttachments/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &volumeattachment{}) + return +} + +// 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. +func (client ComputeClient) CaptureConsoleHistory(ctx context.Context, request CaptureConsoleHistoryRequest) (response CaptureConsoleHistoryResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/instanceConsoleHistories/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm#URLs) and pre-authenticated requests (https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingaccess.htm#pre-auth) +// for constructing URLs for image import/export. +// For more information about importing exported images, see +// Image Import/Export (https://docs.us-phoenix-1.oraclecloud.com/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. +func (client ComputeClient) CreateImage(ctx context.Context, request CreateImageRequest) (response CreateImageResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/images/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateInstanceConsoleConnection Creates a new console connection to the specified instance. +// Once the console connection has been created and is available, +// you connect to the console using SSH. +// For more information about console access, see Accessing the Console (https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/References/serialconsole.htm). +func (client ComputeClient) CreateInstanceConsoleConnection(ctx context.Context, request CreateInstanceConsoleConnectionRequest) (response CreateInstanceConsoleConnectionResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/instanceConsoleConnections", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteConsoleHistory Deletes the specified console history metadata and the console history data. +func (client ComputeClient) DeleteConsoleHistory(ctx context.Context, request DeleteConsoleHistoryRequest) (response DeleteConsoleHistoryResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/instanceConsoleHistories/{instanceConsoleHistoryId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteImage Deletes an image. +func (client ComputeClient) DeleteImage(ctx context.Context, request DeleteImageRequest) (response DeleteImageResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/images/{imageId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteInstanceConsoleConnection Deletes the specified instance console connection. +func (client ComputeClient) DeleteInstanceConsoleConnection(ctx context.Context, request DeleteInstanceConsoleConnectionRequest) (response DeleteInstanceConsoleConnectionResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/instanceConsoleConnections/{instanceConsoleConnectionId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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. +func (client ComputeClient) DetachBootVolume(ctx context.Context, request DetachBootVolumeRequest) (response DetachBootVolumeResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/bootVolumeAttachments/{bootVolumeAttachmentId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.htm#privateip), +// deleting the VNIC causes that route rule to blackhole and the traffic +// will be dropped. +func (client ComputeClient) DetachVnic(ctx context.Context, request DetachVnicRequest) (response DetachVnicResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/vnicAttachments/{vnicAttachmentId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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. +func (client ComputeClient) DetachVolume(ctx context.Context, request DetachVolumeRequest) (response DetachVolumeResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/volumeAttachments/{volumeAttachmentId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/commonpolicies.htm#Let4). +// See Object Storage URLs (https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm#URLs) and pre-authenticated requests (https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingaccess.htm#pre-auth) +// for constructing URLs for image import/export. +func (client ComputeClient) ExportImage(ctx context.Context, request ExportImageRequest) (response ExportImageResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/images/{imageId}/actions/export", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetBootVolumeAttachment Gets information about the specified boot volume attachment. +func (client ComputeClient) GetBootVolumeAttachment(ctx context.Context, request GetBootVolumeAttachmentRequest) (response GetBootVolumeAttachmentResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/bootVolumeAttachments/{bootVolumeAttachmentId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetConsoleHistory Shows the metadata for the specified console history. +// See CaptureConsoleHistory +// for details about using the console history operations. +func (client ComputeClient) GetConsoleHistory(ctx context.Context, request GetConsoleHistoryRequest) (response GetConsoleHistoryResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/instanceConsoleHistories/{instanceConsoleHistoryId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetConsoleHistoryContent Gets the actual console history data (not the metadata). +// See CaptureConsoleHistory +// for details about using the console history operations. +func (client ComputeClient) GetConsoleHistoryContent(ctx context.Context, request GetConsoleHistoryContentRequest) (response GetConsoleHistoryContentResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/instanceConsoleHistories/{instanceConsoleHistoryId}/data", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetImage Gets the specified image. +func (client ComputeClient) GetImage(ctx context.Context, request GetImageRequest) (response GetImageResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/images/{imageId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetInstance Gets information about the specified instance. +func (client ComputeClient) GetInstance(ctx context.Context, request GetInstanceRequest) (response GetInstanceResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/instances/{instanceId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetInstanceConsoleConnection Gets the specified instance console connection's information. +func (client ComputeClient) GetInstanceConsoleConnection(ctx context.Context, request GetInstanceConsoleConnectionRequest) (response GetInstanceConsoleConnectionResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/instanceConsoleConnections/{instanceConsoleConnectionId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetVnicAttachment Gets the information for the specified VNIC attachment. +func (client ComputeClient) GetVnicAttachment(ctx context.Context, request GetVnicAttachmentRequest) (response GetVnicAttachmentResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/vnicAttachments/{vnicAttachmentId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetVolumeAttachment Gets information about the specified volume attachment. +func (client ComputeClient) GetVolumeAttachment(ctx context.Context, request GetVolumeAttachmentRequest) (response GetVolumeAttachmentResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/volumeAttachments/{volumeAttachmentId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &volumeattachment{}) + return +} + +// GetWindowsInstanceInitialCredentials Gets the generated credentials for the instance. Only works for Windows instances. The returned credentials +// are only valid for the initial login. +func (client ComputeClient) GetWindowsInstanceInitialCredentials(ctx context.Context, request GetWindowsInstanceInitialCredentialsRequest) (response GetWindowsInstanceInitialCredentialsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/instances/{instanceId}/initialCredentials", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// InstanceAction Performs one of the power actions (start, stop, softreset, or reset) +// on the specified instance. +// **start** - power on +// **stop** - power off +// **softreset** - ACPI shutdown and power on +// **reset** - power off and power on +// Note that the **stop** state has no effect on the resources you consume. +// Billing continues for instances that you stop, and related resources continue +// to apply against any relevant quotas. You must terminate an instance +// (TerminateInstance) +// to remove its resources from billing and quotas. +func (client ComputeClient) InstanceAction(ctx context.Context, request InstanceActionRequest) (response InstanceActionResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/instances/{instanceId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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.us-phoenix-1.oraclecloud.com/Content/Compute/Concepts/computeoverview.htm). +// For information about access control and compartments, see +// Overview of the IAM Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). +// For information about Availability Domains, see +// Regions and Availability Domains (https://docs.us-phoenix-1.oraclecloud.com/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. +// 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.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm). +func (client ComputeClient) LaunchInstance(ctx context.Context, request LaunchInstanceRequest) (response LaunchInstanceResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/instances/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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. +func (client ComputeClient) ListBootVolumeAttachments(ctx context.Context, request ListBootVolumeAttachmentsRequest) (response ListBootVolumeAttachmentsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/bootVolumeAttachments/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListConsoleHistories Lists the console history metadata for the specified compartment or instance. +func (client ComputeClient) ListConsoleHistories(ctx context.Context, request ListConsoleHistoriesRequest) (response ListConsoleHistoriesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/instanceConsoleHistories/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListImages Lists the available images in the specified compartment. +// If you specify a value for the `sortBy` parameter, Oracle-provided images appear first in the list, followed by custom images. +// For more +// information about images, see +// Managing Custom Images (https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/managingcustomimages.htm). +func (client ComputeClient) ListImages(ctx context.Context, request ListImagesRequest) (response ListImagesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/images/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListInstanceConsoleConnections Lists the console connections for the specified compartment or instance. +// For more information about console access, see Accessing the Instance Console (https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/References/serialconsole.htm). +func (client ComputeClient) ListInstanceConsoleConnections(ctx context.Context, request ListInstanceConsoleConnectionsRequest) (response ListInstanceConsoleConnectionsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/instanceConsoleConnections", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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). +func (client ComputeClient) ListInstances(ctx context.Context, request ListInstancesRequest) (response ListInstancesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/instances/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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. +func (client ComputeClient) ListShapes(ctx context.Context, request ListShapesRequest) (response ListShapesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/shapes", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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. +func (client ComputeClient) ListVnicAttachments(ctx context.Context, request ListVnicAttachmentsRequest) (response ListVnicAttachmentsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/vnicAttachments/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +//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 is IScsiVolumeAttachment. +func (client ComputeClient) ListVolumeAttachments(ctx context.Context, request ListVolumeAttachmentsRequest) (response ListVolumeAttachmentsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/volumeAttachments/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &listvolumeattachment{}) + return +} + +// TerminateInstance Terminates 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`. +// This is an asynchronous operation. The instance's `lifecycleState` will change to TERMINATING temporarily +// until the instance is completely removed. +func (client ComputeClient) TerminateInstance(ctx context.Context, request TerminateInstanceRequest) (response TerminateInstanceResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/instances/{instanceId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateConsoleHistory Updates the specified console history metadata. +func (client ComputeClient) UpdateConsoleHistory(ctx context.Context, request UpdateConsoleHistoryRequest) (response UpdateConsoleHistoryResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/instanceConsoleHistories/{instanceConsoleHistoryId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateImage Updates the display name of the image. Avoid entering confidential information. +func (client ComputeClient) UpdateImage(ctx context.Context, request UpdateImageRequest) (response UpdateImageResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/images/{imageId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateInstance Updates the display name of the specified instance. Avoid entering confidential information. +// The OCID of the instance remains the same. +func (client ComputeClient) UpdateInstance(ctx context.Context, request UpdateInstanceRequest) (response UpdateInstanceResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/instances/{instanceId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/core_virtualnetwork_client.go b/vendor/github.com/oracle/oci-go-sdk/core/core_virtualnetwork_client.go new file mode 100644 index 000000000..2888effff --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/core_virtualnetwork_client.go @@ -0,0 +1,2009 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/common" + "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) { + baseClient, err := common.NewClientWithConfig(configProvider) + if err != nil { + return + } + + 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 = fmt.Sprintf(common.DefaultHostURLTemplate, "iaas", region) +} + +// 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.config = &configProvider + client.SetRegion(region) + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *VirtualNetworkClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// 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. +func (client VirtualNetworkClient) BulkAddVirtualCircuitPublicPrefixes(ctx context.Context, request BulkAddVirtualCircuitPublicPrefixesRequest) (err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/virtualCircuits/{virtualCircuitId}/actions/bulkAddPublicPrefixes", request) + if err != nil { + return + } + + _, err = client.Call(ctx, &httpRequest) + return +} + +// 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. +func (client VirtualNetworkClient) BulkDeleteVirtualCircuitPublicPrefixes(ctx context.Context, request BulkDeleteVirtualCircuitPublicPrefixesRequest) (err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/virtualCircuits/{virtualCircuitId}/actions/bulkDeletePublicPrefixes", request) + if err != nil { + return + } + + _, err = client.Call(ctx, &httpRequest) + return +} + +// 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.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/VCNpeering.htm). +func (client VirtualNetworkClient) ConnectLocalPeeringGateways(ctx context.Context, request ConnectLocalPeeringGatewaysRequest) (response ConnectLocalPeeringGatewaysResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/localPeeringGateways/{localPeeringGatewayId}/actions/connect", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateCpe Creates a new virtual Customer-Premises Equipment (CPE) object in the specified compartment. For +// more information, see IPSec VPNs (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPsec.htm). +// For the purposes of access control, you must provide the OCID 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). +// For information about OCIDs, see Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). +// You must provide the public IP address of your on-premises router. See +// Configuring Your On-Premises Router for an IPSec VPN (https://docs.us-phoenix-1.oraclecloud.com/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. +func (client VirtualNetworkClient) CreateCpe(ctx context.Context, request CreateCpeRequest) (response CreateCpeResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/cpes", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm). +// For the purposes of access control, you must provide the OCID 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). +// For information about OCIDs, see +// Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/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. +func (client VirtualNetworkClient) CreateCrossConnect(ctx context.Context, request CreateCrossConnectRequest) (response CreateCrossConnectResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/crossConnects", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateCrossConnectGroup Creates a new cross-connect group to use with Oracle Cloud Infrastructure +// FastConnect. For more information, see +// FastConnect Overview (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm). +// For the purposes of access control, you must provide the OCID 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). +// For information about OCIDs, see +// Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/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. +func (client VirtualNetworkClient) CreateCrossConnectGroup(ctx context.Context, request CreateCrossConnectGroupRequest) (response CreateCrossConnectGroupResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/crossConnectGroups", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). For information about OCIDs, see +// Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/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. +func (client VirtualNetworkClient) CreateDhcpOptions(ctx context.Context, request CreateDhcpOptionsRequest) (response CreateDhcpOptionsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/dhcps", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateDrg Creates a new Dynamic Routing Gateway (DRG) in the specified compartment. For more information, +// see Dynamic Routing Gateways (DRGs) (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingDRGs.htm). +// For the purposes of access control, you must provide the OCID 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). +// For information about OCIDs, see Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/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. +func (client VirtualNetworkClient) CreateDrg(ctx context.Context, request CreateDrgRequest) (response CreateDrgResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/drgs", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateDrgAttachment Attaches the specified DRG to the specified VCN. A VCN can be attached to only one DRG at a time, +// and vice versa. The response includes a `DrgAttachment` object with its own OCID. For more +// information about DRGs, see +// Dynamic Routing Gateways (DRGs) (https://docs.us-phoenix-1.oraclecloud.com/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 same compartment +// as the VCN. For more information about compartments and access control, see +// Overview of the IAM Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). +func (client VirtualNetworkClient) CreateDrgAttachment(ctx context.Context, request CreateDrgAttachmentRequest) (response CreateDrgAttachmentResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/drgAttachments", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateIPSecConnection Creates a new IPSec connection between the specified DRG and CPE. For more information, see +// IPSec VPNs (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPsec.htm). +// In the request, you must include at least one static route to the CPE object (you're allowed a maximum +// of 10). For example: 10.0.8.0/16. +// For the purposes of access control, you must provide the OCID 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). +// For information about OCIDs, see Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.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 returned by +// GetIPSecConnectionDeviceConfig. +// For each tunnel, that operation gives you the IP address of Oracle's VPN headend and the shared secret +// (that is, the pre-shared key). For more information, see +// Configuring Your On-Premises Router for an IPSec VPN (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/configuringCPE.htm). +// To get the status of the tunnels (whether they're up or down), use +// GetIPSecConnectionDeviceStatus. +func (client VirtualNetworkClient) CreateIPSecConnection(ctx context.Context, request CreateIPSecConnectionRequest) (response CreateIPSecConnectionResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/ipsecConnections", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateInternetGateway Creates a new Internet Gateway for the specified VCN. For more information, see +// Connectivity to the Internet (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIGs.htm). +// For the purposes of access control, you must provide the OCID 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). For information about OCIDs, see +// Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.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. +func (client VirtualNetworkClient) CreateInternetGateway(ctx context.Context, request CreateInternetGatewayRequest) (response CreateInternetGatewayResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/internetGateways", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateLocalPeeringGateway Creates a new local peering gateway (LPG) for the specified VCN. +func (client VirtualNetworkClient) CreateLocalPeeringGateway(ctx context.Context, request CreateLocalPeeringGatewayRequest) (response CreateLocalPeeringGatewayResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/localPeeringGateways", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreatePrivateIp Creates a secondary private IP for the specified VNIC. +// For more information about secondary private IPs, see +// IP Addresses (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPaddresses.htm). +func (client VirtualNetworkClient) CreatePrivateIp(ctx context.Context, request CreatePrivateIpRequest) (response CreatePrivateIpResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/privateIps", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.htm). +// For the purposes of access control, you must provide the OCID 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). For information about OCIDs, see +// Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/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. +func (client VirtualNetworkClient) CreateRouteTable(ctx context.Context, request CreateRouteTableRequest) (response CreateRouteTableResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/routeTables", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateSecurityList Creates a new security list for the specified VCN. For more information +// about security lists, see Security Lists (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/securitylists.htm). +// For information on the number of rules you can have in a security list, see +// Service Limits (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/servicelimits.htm). +// For the purposes of access control, you must provide the OCID 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). For information about OCIDs, see +// Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/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. +func (client VirtualNetworkClient) CreateSecurityList(ctx context.Context, request CreateSecurityListRequest) (response CreateSecurityListResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/securityLists", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVCNs.htm). +// For information on the number of subnets you can have in a VCN, see +// Service Limits (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/servicelimits.htm). +// For the purposes of access control, you must provide the OCID 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). For information about OCIDs, +// see Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm). +func (client VirtualNetworkClient) CreateSubnet(ctx context.Context, request CreateSubnetRequest) (response CreateSubnetResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/subnets", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateVcn Creates a new Virtual Cloud Network (VCN). For more information, see +// VCNs and Subnets (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVCNs.htm). +// For the VCN you must specify a single, contiguous IPv4 CIDR block. Oracle recommends using 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 block can range from /16 to /30, and it +// must not overlap with your on-premises network. You can't change the size of the VCN after creation. +// For the purposes of access control, you must provide the OCID 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). For information about OCIDs, see +// Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/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 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 an IPSec VPN +// or FastConnect. For more information, see +// Overview of the Networking Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/overview.htm). +func (client VirtualNetworkClient) CreateVcn(ctx context.Context, request CreateVcnRequest) (response CreateVcnResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/vcns", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateVirtualCircuit Creates a new virtual circuit to use with Oracle Cloud +// Infrastructure FastConnect. For more information, see +// FastConnect Overview (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm). +// For the purposes of access control, you must provide the OCID 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). +// For information about OCIDs, see +// Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.htm). +func (client VirtualNetworkClient) CreateVirtualCircuit(ctx context.Context, request CreateVirtualCircuitRequest) (response CreateVirtualCircuitResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/virtualCircuits", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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. +func (client VirtualNetworkClient) DeleteCpe(ctx context.Context, request DeleteCpeRequest) (response DeleteCpeResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/cpes/{cpeId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteCrossConnect Deletes the specified cross-connect. It must not be mapped to a +// VirtualCircuit. +func (client VirtualNetworkClient) DeleteCrossConnect(ctx context.Context, request DeleteCrossConnectRequest) (response DeleteCrossConnectResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/crossConnects/{crossConnectId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteCrossConnectGroup Deletes the specified cross-connect group. It must not contain any +// cross-connects, and it cannot be mapped to a +// VirtualCircuit. +func (client VirtualNetworkClient) DeleteCrossConnectGroup(ctx context.Context, request DeleteCrossConnectGroupRequest) (response DeleteCrossConnectGroupResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/crossConnectGroups/{crossConnectGroupId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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. +func (client VirtualNetworkClient) DeleteDhcpOptions(ctx context.Context, request DeleteDhcpOptionsRequest) (response DeleteDhcpOptionsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/dhcps/{dhcpId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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. +func (client VirtualNetworkClient) DeleteDrg(ctx context.Context, request DeleteDrgRequest) (response DeleteDrgResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/drgs/{drgId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteDrgAttachment Detaches a DRG from a VCN by deleting the corresponding `DrgAttachment`. This is an asynchronous +// operation. The attachment's `lifecycleState` will change to DETACHING temporarily until the attachment +// is completely removed. +func (client VirtualNetworkClient) DeleteDrgAttachment(ctx context.Context, request DeleteDrgAttachmentRequest) (response DeleteDrgAttachmentResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/drgAttachments/{drgAttachmentId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteIPSecConnection Deletes the specified IPSec connection. If your goal is to disable the IPSec VPN between your VCN and +// on-premises network, it's easiest to simply detach the DRG but keep all the IPSec VPN components intact. +// If you were to delete all the components and then later need to create an IPSec 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. +func (client VirtualNetworkClient) DeleteIPSecConnection(ctx context.Context, request DeleteIPSecConnectionRequest) (response DeleteIPSecConnectionResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/ipsecConnections/{ipscId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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. +func (client VirtualNetworkClient) DeleteInternetGateway(ctx context.Context, request DeleteInternetGatewayRequest) (response DeleteInternetGatewayResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/internetGateways/{igId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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. +func (client VirtualNetworkClient) DeleteLocalPeeringGateway(ctx context.Context, request DeleteLocalPeeringGatewayRequest) (response DeleteLocalPeeringGatewayResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/localPeeringGateways/{localPeeringGatewayId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeletePrivateIp Unassigns and deletes the specified private IP. You must +// specify the object's OCID. 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.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.htm#privateip), +// unassigning it from the VNIC causes that route rule to blackhole and the traffic +// will be dropped. +func (client VirtualNetworkClient) DeletePrivateIp(ctx context.Context, request DeletePrivateIpRequest) (response DeletePrivateIpResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/privateIps/{privateIpId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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. +func (client VirtualNetworkClient) DeleteRouteTable(ctx context.Context, request DeleteRouteTableRequest) (response DeleteRouteTableResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/routeTables/{rtId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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. +func (client VirtualNetworkClient) DeleteSecurityList(ctx context.Context, request DeleteSecurityListRequest) (response DeleteSecurityListResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/securityLists/{securityListId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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. +func (client VirtualNetworkClient) DeleteSubnet(ctx context.Context, request DeleteSubnetRequest) (response DeleteSubnetResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/subnets/{subnetId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteVcn Deletes the specified VCN. The VCN must be empty and have no attached gateways. This is an asynchronous +// operation. The VCN's `lifecycleState` will change to TERMINATING temporarily until the VCN is completely +// removed. +func (client VirtualNetworkClient) DeleteVcn(ctx context.Context, request DeleteVcnRequest) (response DeleteVcnResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/vcns/{vcnId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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. +func (client VirtualNetworkClient) DeleteVirtualCircuit(ctx context.Context, request DeleteVirtualCircuitRequest) (response DeleteVirtualCircuitResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/virtualCircuits/{virtualCircuitId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetCpe Gets the specified CPE's information. +func (client VirtualNetworkClient) GetCpe(ctx context.Context, request GetCpeRequest) (response GetCpeResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/cpes/{cpeId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetCrossConnect Gets the specified cross-connect's information. +func (client VirtualNetworkClient) GetCrossConnect(ctx context.Context, request GetCrossConnectRequest) (response GetCrossConnectResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/crossConnects/{crossConnectId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetCrossConnectGroup Gets the specified cross-connect group's information. +func (client VirtualNetworkClient) GetCrossConnectGroup(ctx context.Context, request GetCrossConnectGroupRequest) (response GetCrossConnectGroupResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/crossConnectGroups/{crossConnectGroupId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetCrossConnectLetterOfAuthority Gets the Letter of Authority for the specified cross-connect. +func (client VirtualNetworkClient) GetCrossConnectLetterOfAuthority(ctx context.Context, request GetCrossConnectLetterOfAuthorityRequest) (response GetCrossConnectLetterOfAuthorityResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/crossConnects/{crossConnectId}/letterOfAuthority", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetCrossConnectStatus Gets the status of the specified cross-connect. +func (client VirtualNetworkClient) GetCrossConnectStatus(ctx context.Context, request GetCrossConnectStatusRequest) (response GetCrossConnectStatusResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/crossConnects/{crossConnectId}/status", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetDhcpOptions Gets the specified set of DHCP options. +func (client VirtualNetworkClient) GetDhcpOptions(ctx context.Context, request GetDhcpOptionsRequest) (response GetDhcpOptionsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dhcps/{dhcpId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetDrg Gets the specified DRG's information. +func (client VirtualNetworkClient) GetDrg(ctx context.Context, request GetDrgRequest) (response GetDrgResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/drgs/{drgId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetDrgAttachment Gets the information for the specified `DrgAttachment`. +func (client VirtualNetworkClient) GetDrgAttachment(ctx context.Context, request GetDrgAttachmentRequest) (response GetDrgAttachmentResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/drgAttachments/{drgAttachmentId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetFastConnectProviderService Gets the specified provider service. +// For more information, see FastConnect Overview (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm). +func (client VirtualNetworkClient) GetFastConnectProviderService(ctx context.Context, request GetFastConnectProviderServiceRequest) (response GetFastConnectProviderServiceResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/fastConnectProviderServices/{providerServiceId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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 +// GetIPSecConnectionDeviceStatus. +func (client VirtualNetworkClient) GetIPSecConnection(ctx context.Context, request GetIPSecConnectionRequest) (response GetIPSecConnectionResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/ipsecConnections/{ipscId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetIPSecConnectionDeviceConfig Gets the configuration information for the specified IPSec connection. For each tunnel, the +// response includes the IP address of Oracle's VPN headend and the shared secret. +func (client VirtualNetworkClient) GetIPSecConnectionDeviceConfig(ctx context.Context, request GetIPSecConnectionDeviceConfigRequest) (response GetIPSecConnectionDeviceConfigResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/ipsecConnections/{ipscId}/deviceConfig", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetIPSecConnectionDeviceStatus Gets the status of the specified IPSec connection (whether it's up or down). +func (client VirtualNetworkClient) GetIPSecConnectionDeviceStatus(ctx context.Context, request GetIPSecConnectionDeviceStatusRequest) (response GetIPSecConnectionDeviceStatusResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/ipsecConnections/{ipscId}/deviceStatus", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetInternetGateway Gets the specified Internet Gateway's information. +func (client VirtualNetworkClient) GetInternetGateway(ctx context.Context, request GetInternetGatewayRequest) (response GetInternetGatewayResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/internetGateways/{igId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetLocalPeeringGateway Gets the specified local peering gateway's information. +func (client VirtualNetworkClient) GetLocalPeeringGateway(ctx context.Context, request GetLocalPeeringGatewayRequest) (response GetLocalPeeringGatewayResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/localPeeringGateways/{localPeeringGatewayId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetPrivateIp Gets the specified private IP. You must specify the object's OCID. +// Alternatively, you can get the object by using +// ListPrivateIps +// with the private IP address (for example, 10.0.3.3) and subnet OCID. +func (client VirtualNetworkClient) GetPrivateIp(ctx context.Context, request GetPrivateIpRequest) (response GetPrivateIpResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/privateIps/{privateIpId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetRouteTable Gets the specified route table's information. +func (client VirtualNetworkClient) GetRouteTable(ctx context.Context, request GetRouteTableRequest) (response GetRouteTableResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/routeTables/{rtId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetSecurityList Gets the specified security list's information. +func (client VirtualNetworkClient) GetSecurityList(ctx context.Context, request GetSecurityListRequest) (response GetSecurityListResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/securityLists/{securityListId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetSubnet Gets the specified subnet's information. +func (client VirtualNetworkClient) GetSubnet(ctx context.Context, request GetSubnetRequest) (response GetSubnetResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/subnets/{subnetId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetVcn Gets the specified VCN's information. +func (client VirtualNetworkClient) GetVcn(ctx context.Context, request GetVcnRequest) (response GetVcnResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/vcns/{vcnId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetVirtualCircuit Gets the specified virtual circuit's information. +func (client VirtualNetworkClient) GetVirtualCircuit(ctx context.Context, request GetVirtualCircuitRequest) (response GetVirtualCircuitResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/virtualCircuits/{virtualCircuitId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetVnic Gets the information for the specified virtual network interface card (VNIC). +// You can get the VNIC OCID from the +// ListVnicAttachments +// operation. +func (client VirtualNetworkClient) GetVnic(ctx context.Context, request GetVnicRequest) (response GetVnicResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/vnics/{vnicId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListCpes Lists the Customer-Premises Equipment objects (CPEs) in the specified compartment. +func (client VirtualNetworkClient) ListCpes(ctx context.Context, request ListCpesRequest) (response ListCpesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/cpes", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListCrossConnectGroups Lists the cross-connect groups in the specified compartment. +func (client VirtualNetworkClient) ListCrossConnectGroups(ctx context.Context, request ListCrossConnectGroupsRequest) (response ListCrossConnectGroupsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/crossConnectGroups", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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. +func (client VirtualNetworkClient) ListCrossConnectLocations(ctx context.Context, request ListCrossConnectLocationsRequest) (response ListCrossConnectLocationsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/crossConnectLocations", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListCrossConnects Lists the cross-connects in the specified compartment. You can filter the list +// by specifying the OCID of a cross-connect group. +func (client VirtualNetworkClient) ListCrossConnects(ctx context.Context, request ListCrossConnectsRequest) (response ListCrossConnectsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/crossConnects", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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. +func (client VirtualNetworkClient) ListCrossconnectPortSpeedShapes(ctx context.Context, request ListCrossconnectPortSpeedShapesRequest) (response ListCrossconnectPortSpeedShapesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/crossConnectPortSpeedShapes", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListDhcpOptions Lists the sets of DHCP options in the specified VCN and specified compartment. +// The response includes the default set of options that automatically comes with each VCN, +// plus any other sets you've created. +func (client VirtualNetworkClient) ListDhcpOptions(ctx context.Context, request ListDhcpOptionsRequest) (response ListDhcpOptionsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dhcps", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListDrgAttachments Lists the `DrgAttachment` objects for the specified compartment. You can filter the +// results by VCN or DRG. +func (client VirtualNetworkClient) ListDrgAttachments(ctx context.Context, request ListDrgAttachmentsRequest) (response ListDrgAttachmentsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/drgAttachments", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListDrgs Lists the DRGs in the specified compartment. +func (client VirtualNetworkClient) ListDrgs(ctx context.Context, request ListDrgsRequest) (response ListDrgsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/drgs", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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 of your tenancy (the root compartment). +// For more information, see FastConnect Overview (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm). +func (client VirtualNetworkClient) ListFastConnectProviderServices(ctx context.Context, request ListFastConnectProviderServicesRequest) (response ListFastConnectProviderServicesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/fastConnectProviderServices", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm). +func (client VirtualNetworkClient) ListFastConnectProviderVirtualCircuitBandwidthShapes(ctx context.Context, request ListFastConnectProviderVirtualCircuitBandwidthShapesRequest) (response ListFastConnectProviderVirtualCircuitBandwidthShapesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/fastConnectProviderServices/{providerServiceId}/virtualCircuitBandwidthShapes", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListIPSecConnections Lists the IPSec connections for the specified compartment. You can filter the +// results by DRG or CPE. +func (client VirtualNetworkClient) ListIPSecConnections(ctx context.Context, request ListIPSecConnectionsRequest) (response ListIPSecConnectionsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/ipsecConnections", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListInternetGateways Lists the Internet Gateways in the specified VCN and the specified compartment. +func (client VirtualNetworkClient) ListInternetGateways(ctx context.Context, request ListInternetGatewaysRequest) (response ListInternetGatewaysResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/internetGateways", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListLocalPeeringGateways Lists the local peering gateways (LPGs) for the specified VCN and compartment +// (the LPG's compartment). +func (client VirtualNetworkClient) ListLocalPeeringGateways(ctx context.Context, request ListLocalPeeringGatewaysRequest) (response ListLocalPeeringGatewaysResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/localPeeringGateways", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListPrivateIps Lists the PrivateIp objects based +// on one of these filters: +// - Subnet OCID. +// - VNIC OCID. +// - 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. For comparison, +// GetPrivateIp +// requires the OCID. +// If you're listing all the private IPs associated with a given subnet +// or VNIC, the response includes both primary and secondary private IPs. +func (client VirtualNetworkClient) ListPrivateIps(ctx context.Context, request ListPrivateIpsRequest) (response ListPrivateIpsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/privateIps", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListRouteTables Lists the route tables in the specified VCN and specified compartment. The response +// includes the default route table that automatically comes with each VCN, plus any route tables +// you've created. +func (client VirtualNetworkClient) ListRouteTables(ctx context.Context, request ListRouteTablesRequest) (response ListRouteTablesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/routeTables", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListSecurityLists Lists the security lists in the specified VCN and compartment. +func (client VirtualNetworkClient) ListSecurityLists(ctx context.Context, request ListSecurityListsRequest) (response ListSecurityListsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/securityLists", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListSubnets Lists the subnets in the specified VCN and the specified compartment. +func (client VirtualNetworkClient) ListSubnets(ctx context.Context, request ListSubnetsRequest) (response ListSubnetsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/subnets", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListVcns Lists the Virtual Cloud Networks (VCNs) in the specified compartment. +func (client VirtualNetworkClient) ListVcns(ctx context.Context, request ListVcnsRequest) (response ListVcnsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/vcns", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListVirtualCircuitBandwidthShapes The deprecated operation lists available bandwidth levels for virtual circuits. For the compartment ID, provide the OCID of your tenancy (the root compartment). +func (client VirtualNetworkClient) ListVirtualCircuitBandwidthShapes(ctx context.Context, request ListVirtualCircuitBandwidthShapesRequest) (response ListVirtualCircuitBandwidthShapesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/virtualCircuitBandwidthShapes", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListVirtualCircuitPublicPrefixes Lists the public IP prefixes and their details for the specified +// public virtual circuit. +func (client VirtualNetworkClient) ListVirtualCircuitPublicPrefixes(ctx context.Context, request ListVirtualCircuitPublicPrefixesRequest) (response ListVirtualCircuitPublicPrefixesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/virtualCircuits/{virtualCircuitId}/publicPrefixes", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListVirtualCircuits Lists the virtual circuits in the specified compartment. +func (client VirtualNetworkClient) ListVirtualCircuits(ctx context.Context, request ListVirtualCircuitsRequest) (response ListVirtualCircuitsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/virtualCircuits", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateCpe Updates the specified CPE's display name. +// Avoid entering confidential information. +func (client VirtualNetworkClient) UpdateCpe(ctx context.Context, request UpdateCpeRequest) (response UpdateCpeResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/cpes/{cpeId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateCrossConnect Updates the specified cross-connect. +func (client VirtualNetworkClient) UpdateCrossConnect(ctx context.Context, request UpdateCrossConnectRequest) (response UpdateCrossConnectResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/crossConnects/{crossConnectId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateCrossConnectGroup Updates the specified cross-connect group's display name. +// Avoid entering confidential information. +func (client VirtualNetworkClient) UpdateCrossConnectGroup(ctx context.Context, request UpdateCrossConnectGroupRequest) (response UpdateCrossConnectGroupResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/crossConnectGroups/{crossConnectGroupId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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. +func (client VirtualNetworkClient) UpdateDhcpOptions(ctx context.Context, request UpdateDhcpOptionsRequest) (response UpdateDhcpOptionsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/dhcps/{dhcpId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateDrg Updates the specified DRG's display name. Avoid entering confidential information. +func (client VirtualNetworkClient) UpdateDrg(ctx context.Context, request UpdateDrgRequest) (response UpdateDrgResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/drgs/{drgId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateDrgAttachment Updates the display name for the specified `DrgAttachment`. +// Avoid entering confidential information. +func (client VirtualNetworkClient) UpdateDrgAttachment(ctx context.Context, request UpdateDrgAttachmentRequest) (response UpdateDrgAttachmentResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/drgAttachments/{drgAttachmentId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateIPSecConnection Updates the display name for the specified IPSec connection. +// Avoid entering confidential information. +func (client VirtualNetworkClient) UpdateIPSecConnection(ctx context.Context, request UpdateIPSecConnectionRequest) (response UpdateIPSecConnectionResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/ipsecConnections/{ipscId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateInternetGateway Updates the specified Internet Gateway. You can disable/enable it, or change its display name. +// 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. +func (client VirtualNetworkClient) UpdateInternetGateway(ctx context.Context, request UpdateInternetGatewayRequest) (response UpdateInternetGatewayResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/internetGateways/{igId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateLocalPeeringGateway Updates the specified local peering gateway (LPG). +func (client VirtualNetworkClient) UpdateLocalPeeringGateway(ctx context.Context, request UpdateLocalPeeringGatewayRequest) (response UpdateLocalPeeringGatewayResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/localPeeringGateways/{localPeeringGatewayId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdatePrivateIp Updates the specified private IP. You must specify the object's OCID. +// 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. +func (client VirtualNetworkClient) UpdatePrivateIp(ctx context.Context, request UpdatePrivateIpRequest) (response UpdatePrivateIpResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/privateIps/{privateIpId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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. +func (client VirtualNetworkClient) UpdateRouteTable(ctx context.Context, request UpdateRouteTableRequest) (response UpdateRouteTableResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/routeTables/{rtId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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. +func (client VirtualNetworkClient) UpdateSecurityList(ctx context.Context, request UpdateSecurityListRequest) (response UpdateSecurityListResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/securityLists/{securityListId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateSubnet Updates the specified subnet's display name. Avoid entering confidential information. +func (client VirtualNetworkClient) UpdateSubnet(ctx context.Context, request UpdateSubnetRequest) (response UpdateSubnetResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/subnets/{subnetId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateVcn Updates the specified VCN's display name. +// Avoid entering confidential information. +func (client VirtualNetworkClient) UpdateVcn(ctx context.Context, request UpdateVcnRequest) (response UpdateVcnResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/vcns/{vcnId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// 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.us-phoenix-1.oraclecloud.com/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. +func (client VirtualNetworkClient) UpdateVirtualCircuit(ctx context.Context, request UpdateVirtualCircuitRequest) (response UpdateVirtualCircuitResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/virtualCircuits/{virtualCircuitId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateVnic Updates the specified VNIC. +func (client VirtualNetworkClient) UpdateVnic(ctx context.Context, request UpdateVnicRequest) (response UpdateVnicResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/vnics/{vnicId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/cpe.go b/vendor/github.com/oracle/oci-go-sdk/core/cpe.go new file mode 100644 index 000000000..9759c8cbf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/cpe.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Cpe An object you create when setting up an IPSec 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 IPSec VPN connection. +// For more information, +// see Overview of the Networking Service (https://docs.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type Cpe struct { + + // The OCID 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"` + + // 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 CPE was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m Cpe) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_cpe_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_cpe_details.go new file mode 100644 index 000000000..0dff34734 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_cpe_details.go @@ -0,0 +1,31 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateCpeDetails The representation of CreateCpeDetails +type CreateCpeDetails struct { + + // The OCID of the compartment to contain the CPE. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The public IP address of the on-premises router. + // Example: `143.19.23.16` + IpAddress *string `mandatory:"true" json:"ipAddress"` + + // 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 CreateCpeDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_cpe_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_cpe_request_response.go new file mode 100644 index 000000000..c4a5314a8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_cpe_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateCpeRequest wrapper for the CreateCpe operation +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"` +} + +func (request CreateCpeRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_cross_connect_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_cross_connect_details.go new file mode 100644 index 000000000..6a17ea194 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_cross_connect_details.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateCrossConnectDetails The representation of CreateCrossConnectDetails +type CreateCrossConnectDetails struct { + + // The OCID 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 of the cross-connect group to put this cross-connect in. + CrossConnectGroupId *string `mandatory:"false" json:"crossConnectGroupId"` + + // 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 of that existing cross-connect or + // cross-connect group. + FarCrossConnectOrCrossConnectGroupId *string `mandatory:"false" json:"farCrossConnectOrCrossConnectGroupId"` + + // 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 of that existing cross-connect or cross-connect group. + NearCrossConnectOrCrossConnectGroupId *string `mandatory:"false" json:"nearCrossConnectOrCrossConnectGroupId"` +} + +func (m CreateCrossConnectDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_cross_connect_group_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_cross_connect_group_details.go new file mode 100644 index 000000000..c1232cfca --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_cross_connect_group_details.go @@ -0,0 +1,28 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateCrossConnectGroupDetails The representation of CreateCrossConnectGroupDetails +type CreateCrossConnectGroupDetails struct { + + // The OCID of the compartment to contain the cross-connect 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:"false" json:"displayName"` +} + +func (m CreateCrossConnectGroupDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_cross_connect_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_cross_connect_group_request_response.go new file mode 100644 index 000000000..33cdec7e9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_cross_connect_group_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateCrossConnectGroupRequest wrapper for the CreateCrossConnectGroup operation +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"` +} + +func (request CreateCrossConnectGroupRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_cross_connect_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_cross_connect_request_response.go new file mode 100644 index 000000000..b9bf4a46e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_cross_connect_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateCrossConnectRequest wrapper for the CreateCrossConnect operation +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"` +} + +func (request CreateCrossConnectRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_dhcp_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_dhcp_details.go new file mode 100644 index 000000000..a29660b37 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_dhcp_details.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// CreateDhcpDetails The representation of CreateDhcpDetails +type CreateDhcpDetails struct { + + // The OCID 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 of the VCN the set of DHCP options belongs to. + VcnId *string `mandatory:"true" json:"vcnId"` + + // 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 CreateDhcpDetails) String() string { + return common.PointerString(m) +} + +// UnmarshalJSON unmarshals from json +func (m *CreateDhcpDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DisplayName *string `json:"displayName"` + CompartmentId *string `json:"compartmentId"` + Options []dhcpoption `json:"options"` + VcnId *string `json:"vcnId"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + m.DisplayName = model.DisplayName + m.CompartmentId = model.CompartmentId + m.Options = make([]DhcpOption, len(model.Options)) + for i, n := range model.Options { + nn, err := n.UnmarshalPolymorphicJSON(n.JsonData) + if err != nil { + return err + } + m.Options[i] = nn + } + m.VcnId = model.VcnId + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_dhcp_options_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_dhcp_options_request_response.go new file mode 100644 index 000000000..6fed1770d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_dhcp_options_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateDhcpOptionsRequest wrapper for the CreateDhcpOptions operation +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"` +} + +func (request CreateDhcpOptionsRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_drg_attachment_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_drg_attachment_details.go new file mode 100644 index 000000000..d76431fc9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_drg_attachment_details.go @@ -0,0 +1,30 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateDrgAttachmentDetails The representation of CreateDrgAttachmentDetails +type CreateDrgAttachmentDetails struct { + + // The OCID of the DRG. + DrgId *string `mandatory:"true" json:"drgId"` + + // The OCID of the VCN. + VcnId *string `mandatory:"true" json:"vcnId"` + + // A user-friendly name. Does not have to be unique. Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m CreateDrgAttachmentDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_drg_attachment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_drg_attachment_request_response.go new file mode 100644 index 000000000..4e50c9bd6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_drg_attachment_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateDrgAttachmentRequest wrapper for the CreateDrgAttachment operation +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"` +} + +func (request CreateDrgAttachmentRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_drg_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_drg_details.go new file mode 100644 index 000000000..a4a7d6f65 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_drg_details.go @@ -0,0 +1,27 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateDrgDetails The representation of CreateDrgDetails +type CreateDrgDetails struct { + + // The OCID of the compartment to contain the DRG. + 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"` +} + +func (m CreateDrgDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_drg_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_drg_request_response.go new file mode 100644 index 000000000..a1fa6bae0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_drg_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateDrgRequest wrapper for the CreateDrg operation +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"` +} + +func (request CreateDrgRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_i_p_sec_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_i_p_sec_connection_request_response.go new file mode 100644 index 000000000..877bcc9c8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_i_p_sec_connection_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateIPSecConnectionRequest wrapper for the CreateIPSecConnection operation +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"` +} + +func (request CreateIPSecConnectionRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_image_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_image_details.go new file mode 100644 index 000000000..6a482ea01 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_image_details.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// CreateImageDetails Either instanceId or imageSourceDetails must be provided in addition to other required parameters. +type CreateImageDetails 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"` + + // 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 an Oracle-provided image name as a custom image name. + // Example: `My Oracle Linux image` + DisplayName *string `mandatory:"false" json:"displayName"` + + // Details for creating an image through import + 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"` +} + +func (m CreateImageDetails) String() string { + return common.PointerString(m) +} + +// UnmarshalJSON unmarshals from json +func (m *CreateImageDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DisplayName *string `json:"displayName"` + ImageSourceDetails imagesourcedetails `json:"imageSourceDetails"` + InstanceId *string `json:"instanceId"` + CompartmentId *string `json:"compartmentId"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + m.DisplayName = model.DisplayName + nn, e := model.ImageSourceDetails.UnmarshalPolymorphicJSON(model.ImageSourceDetails.JsonData) + if e != nil { + return + } + m.ImageSourceDetails = nn + m.InstanceId = model.InstanceId + m.CompartmentId = model.CompartmentId + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_image_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_image_request_response.go new file mode 100644 index 000000000..0481d6924 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_image_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateImageRequest wrapper for the CreateImage operation +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"` +} + +func (request CreateImageRequest) String() string { + return common.PointerString(request) +} + +// 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"` +} + +func (response CreateImageResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_instance_console_connection_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_instance_console_connection_details.go new file mode 100644 index 000000000..3d3225bf7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_instance_console_connection_details.go @@ -0,0 +1,28 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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"` +} + +func (m CreateInstanceConsoleConnectionDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_instance_console_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_instance_console_connection_request_response.go new file mode 100644 index 000000000..456bd9b78 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_instance_console_connection_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateInstanceConsoleConnectionRequest wrapper for the CreateInstanceConsoleConnection operation +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"` +} + +func (request CreateInstanceConsoleConnectionRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_internet_gateway_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_internet_gateway_details.go new file mode 100644 index 000000000..df49670c6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_internet_gateway_details.go @@ -0,0 +1,33 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateInternetGatewayDetails The representation of CreateInternetGatewayDetails +type CreateInternetGatewayDetails struct { + + // The OCID 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 of the VCN the Internet Gateway is attached to. + VcnId *string `mandatory:"true" json:"vcnId"` + + // 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 CreateInternetGatewayDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_internet_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_internet_gateway_request_response.go new file mode 100644 index 000000000..767747486 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_internet_gateway_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateInternetGatewayRequest wrapper for the CreateInternetGateway operation +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"` +} + +func (request CreateInternetGatewayRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_ip_sec_connection_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_ip_sec_connection_details.go new file mode 100644 index 000000000..31cf23fa8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_ip_sec_connection_details.go @@ -0,0 +1,38 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateIpSecConnectionDetails The representation of CreateIpSecConnectionDetails +type CreateIpSecConnectionDetails struct { + + // The OCID of the compartment to contain the IPSec connection. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the CPE. + CpeId *string `mandatory:"true" json:"cpeId"` + + // The OCID of the DRG. + DrgId *string `mandatory:"true" json:"drgId"` + + // Static routes to the CPE. At least one route must be included. The CIDR must not be a + // multicast address or class E address. + // Example: `10.0.1.0/24` + StaticRoutes []string `mandatory:"true" json:"staticRoutes"` + + // 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 CreateIpSecConnectionDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_local_peering_gateway_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_local_peering_gateway_details.go new file mode 100644 index 000000000..6e0b45439 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_local_peering_gateway_details.go @@ -0,0 +1,31 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateLocalPeeringGatewayDetails The representation of CreateLocalPeeringGatewayDetails +type CreateLocalPeeringGatewayDetails struct { + + // The OCID of the compartment containing the local peering gateway (LPG). + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the VCN the LPG belongs to. + VcnId *string `mandatory:"true" json:"vcnId"` + + // 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 CreateLocalPeeringGatewayDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_local_peering_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_local_peering_gateway_request_response.go new file mode 100644 index 000000000..4f72bdb5c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_local_peering_gateway_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateLocalPeeringGatewayRequest wrapper for the CreateLocalPeeringGateway operation +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"` +} + +func (request CreateLocalPeeringGatewayRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_private_ip_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_private_ip_details.go new file mode 100644 index 000000000..b9da8cc51 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_private_ip_details.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreatePrivateIpDetails The representation of CreatePrivateIpDetails +type CreatePrivateIpDetails struct { + + // The OCID of the VNIC to assign the private IP to. The VNIC and private IP + // must be in the same subnet. + VnicId *string `mandatory:"true" json:"vnicId"` + + // 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 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, `bminstance-1` in FQDN `bminstance-1.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.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm). + // Example: `bminstance-1` + 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"` +} + +func (m CreatePrivateIpDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_private_ip_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_private_ip_request_response.go new file mode 100644 index 000000000..941d3a3ed --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_private_ip_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreatePrivateIpRequest wrapper for the CreatePrivateIp operation +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"` +} + +func (request CreatePrivateIpRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_route_table_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_route_table_details.go new file mode 100644 index 000000000..8f3005acd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_route_table_details.go @@ -0,0 +1,33 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateRouteTableDetails The representation of CreateRouteTableDetails +type CreateRouteTableDetails struct { + + // The OCID 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 of the VCN the route table belongs to. + VcnId *string `mandatory:"true" json:"vcnId"` + + // 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 CreateRouteTableDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_route_table_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_route_table_request_response.go new file mode 100644 index 000000000..7e70b4de8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_route_table_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateRouteTableRequest wrapper for the CreateRouteTable operation +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"` +} + +func (request CreateRouteTableRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_security_list_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_security_list_details.go new file mode 100644 index 000000000..06d4c4ec9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_security_list_details.go @@ -0,0 +1,36 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateSecurityListDetails The representation of CreateSecurityListDetails +type CreateSecurityListDetails struct { + + // The OCID 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 of the VCN the security list belongs to. + VcnId *string `mandatory:"true" json:"vcnId"` + + // 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 CreateSecurityListDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_security_list_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_security_list_request_response.go new file mode 100644 index 000000000..e652c644b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_security_list_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateSecurityListRequest wrapper for the CreateSecurityList operation +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"` +} + +func (request CreateSecurityListRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_subnet_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_subnet_details.go new file mode 100644 index 000000000..bc50b2add --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_subnet_details.go @@ -0,0 +1,76 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateSubnetDetails The representation of CreateSubnetDetails +type CreateSubnetDetails struct { + + // The Availability Domain to contain the subnet. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The CIDR IP address range of the subnet. + // Example: `172.16.1.0/24` + CidrBlock *string `mandatory:"true" json:"cidrBlock"` + + // The OCID of the compartment to contain the subnet. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the VCN to contain the subnet. + VcnId *string `mandatory:"true" json:"vcnId"` + + // The OCID of the set of DHCP options the subnet will use. If you don't + // provide a value, the subnet will use 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, `bminstance-1.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.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm). + // Example: `subnet123` + DnsLabel *string `mandatory:"false" json:"dnsLabel"` + + // 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 OCID of the route table the subnet will use. If you don't provide a value, + // the subnet will use the VCN's default route table. + RouteTableId *string `mandatory:"false" json:"routeTableId"` + + // OCIDs for the security lists to associate with the subnet. If you don't + // provide a value, the VCN's default security list will be associated with + // the subnet. Remember that security lists are associated at the subnet + // level, 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_subnet_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_subnet_request_response.go new file mode 100644 index 000000000..8d5818ec7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_subnet_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateSubnetRequest wrapper for the CreateSubnet operation +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"` +} + +func (request CreateSubnetRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_vcn_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_vcn_details.go new file mode 100644 index 000000000..70eb2c240 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_vcn_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateVcnDetails The representation of CreateVcnDetails +type CreateVcnDetails struct { + + // The CIDR IP address block of the VCN. + // Example: `172.16.0.0/16` + CidrBlock *string `mandatory:"true" json:"cidrBlock"` + + // The OCID of the compartment to contain the VCN. + 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"` + + // 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, `bminstance-1.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.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm). + // Example: `vcn1` + DnsLabel *string `mandatory:"false" json:"dnsLabel"` +} + +func (m CreateVcnDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_vcn_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_vcn_request_response.go new file mode 100644 index 000000000..99cd907af --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_vcn_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateVcnRequest wrapper for the CreateVcn operation +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"` +} + +func (request CreateVcnRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_virtual_circuit_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_virtual_circuit_details.go new file mode 100644 index 000000000..f663f9854 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_virtual_circuit_details.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateVirtualCircuitDetails The representation of CreateVirtualCircuitDetails +type CreateVirtualCircuitDetails struct { + + // The OCID 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). Only PRIVATE is supported. + 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"` + + // 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. + CustomerBgpAsn *int `mandatory:"false" json:"customerBgpAsn"` + + // A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // For private virtual circuits only. The OCID 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 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"` + + // 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"` +} + +func (m CreateVirtualCircuitDetails) String() string { + return common.PointerString(m) +} + +// CreateVirtualCircuitDetailsTypeEnum Enum with underlying type: string +type CreateVirtualCircuitDetailsTypeEnum string + +// Set of constants representing the allowable values for CreateVirtualCircuitDetailsType +const ( + CreateVirtualCircuitDetailsTypePublic CreateVirtualCircuitDetailsTypeEnum = "PUBLIC" + CreateVirtualCircuitDetailsTypePrivate CreateVirtualCircuitDetailsTypeEnum = "PRIVATE" +) + +var mappingCreateVirtualCircuitDetailsType = map[string]CreateVirtualCircuitDetailsTypeEnum{ + "PUBLIC": CreateVirtualCircuitDetailsTypePublic, + "PRIVATE": CreateVirtualCircuitDetailsTypePrivate, +} + +// GetCreateVirtualCircuitDetailsTypeEnumValues Enumerates the set of values for CreateVirtualCircuitDetailsType +func GetCreateVirtualCircuitDetailsTypeEnumValues() []CreateVirtualCircuitDetailsTypeEnum { + values := make([]CreateVirtualCircuitDetailsTypeEnum, 0) + for _, v := range mappingCreateVirtualCircuitDetailsType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_virtual_circuit_public_prefix_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_virtual_circuit_public_prefix_details.go new file mode 100644 index 000000000..10e13c8f5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_virtual_circuit_public_prefix_details.go @@ -0,0 +1,25 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateVirtualCircuitPublicPrefixDetails The representation of CreateVirtualCircuitPublicPrefixDetails +type CreateVirtualCircuitPublicPrefixDetails struct { + + // An individual public IP prefix (CIDR) to add to the public virtual circuit. + // Must be /24 or less specific. + CidrBlock *string `mandatory:"true" json:"cidrBlock"` +} + +func (m CreateVirtualCircuitPublicPrefixDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_virtual_circuit_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_virtual_circuit_request_response.go new file mode 100644 index 000000000..629fc3e8a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_virtual_circuit_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateVirtualCircuitRequest wrapper for the CreateVirtualCircuit operation +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"` +} + +func (request CreateVirtualCircuitRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_vnic_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_vnic_details.go new file mode 100644 index 000000000..c92cd1a5c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_vnic_details.go @@ -0,0 +1,85 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm). +type CreateVnicDetails struct { + + // The OCID 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. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // 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. Secondary private IPs cannot have public IP + // addresses associated with them. For more information, see + // IP Addresses (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPaddresses.htm). + // Example: `false` + AssignPublicIp *bool `mandatory:"false" json:"assignPublicIp"` + + // A user-friendly name for the VNIC. Does not have to be unique. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // 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, `bminstance-1` in FQDN `bminstance-1.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.us-phoenix-1.oraclecloud.com/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: `bminstance-1` + HostnameLabel *string `mandatory:"false" json:"hostnameLabel"` + + // 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. + // Example: `10.0.3.3` + PrivateIp *string `mandatory:"false" json:"privateIp"` + + // 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.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.htm#privateip). + // Example: `true` + SkipSourceDestCheck *bool `mandatory:"false" json:"skipSourceDestCheck"` +} + +func (m CreateVnicDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_volume_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_backup_details.go new file mode 100644 index 000000000..8a1907cb0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_backup_details.go @@ -0,0 +1,28 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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"` + + // A user-friendly name for the volume backup. Does not have to be unique and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m CreateVolumeBackupDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_volume_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_backup_request_response.go new file mode 100644 index 000000000..44e47b735 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_backup_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateVolumeBackupRequest wrapper for the CreateVolumeBackup operation +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"` +} + +func (request CreateVolumeBackupRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_details.go new file mode 100644 index 000000000..492c815fb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_details.go @@ -0,0 +1,80 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// CreateVolumeDetails The representation of CreateVolumeDetails +type CreateVolumeDetails 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:"false" json:"displayName"` + + // The size of the volume in GBs. + SizeInGBs *int `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 *int `mandatory:"false" json:"sizeInMBs"` + + // 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. + 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"` +} + +func (m CreateVolumeDetails) String() string { + return common.PointerString(m) +} + +// UnmarshalJSON unmarshals from json +func (m *CreateVolumeDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DisplayName *string `json:"displayName"` + SizeInGBs *int `json:"sizeInGBs"` + SizeInMBs *int `json:"sizeInMBs"` + SourceDetails volumesourcedetails `json:"sourceDetails"` + VolumeBackupId *string `json:"volumeBackupId"` + AvailabilityDomain *string `json:"availabilityDomain"` + CompartmentId *string `json:"compartmentId"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + m.DisplayName = model.DisplayName + m.SizeInGBs = model.SizeInGBs + m.SizeInMBs = model.SizeInMBs + nn, e := model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) + if e != nil { + return + } + m.SourceDetails = nn + m.VolumeBackupId = model.VolumeBackupId + m.AvailabilityDomain = model.AvailabilityDomain + m.CompartmentId = model.CompartmentId + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/create_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_request_response.go new file mode 100644 index 000000000..d505805f4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/create_volume_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateVolumeRequest wrapper for the CreateVolume operation +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"` +} + +func (request CreateVolumeRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/cross_connect.go b/vendor/github.com/oracle/oci-go-sdk/core/cross_connect.go new file mode 100644 index 000000000..67f43bf74 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/cross_connect.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type CrossConnect struct { + + // The OCID of the compartment containing the cross-connect group. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The OCID of the cross-connect group this cross-connect belongs to (if any). + CrossConnectGroupId *string `mandatory:"false" json:"crossConnectGroupId"` + + // 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 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"` + + // The date and time the cross-connect was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m CrossConnect) String() string { + return common.PointerString(m) +} + +// CrossConnectLifecycleStateEnum Enum with underlying type: string +type CrossConnectLifecycleStateEnum string + +// Set of constants representing the allowable values for CrossConnectLifecycleState +const ( + CrossConnectLifecycleStatePendingCustomer CrossConnectLifecycleStateEnum = "PENDING_CUSTOMER" + CrossConnectLifecycleStateProvisioning CrossConnectLifecycleStateEnum = "PROVISIONING" + CrossConnectLifecycleStateProvisioned CrossConnectLifecycleStateEnum = "PROVISIONED" + CrossConnectLifecycleStateInactive CrossConnectLifecycleStateEnum = "INACTIVE" + CrossConnectLifecycleStateTerminating CrossConnectLifecycleStateEnum = "TERMINATING" + CrossConnectLifecycleStateTerminated CrossConnectLifecycleStateEnum = "TERMINATED" +) + +var mappingCrossConnectLifecycleState = map[string]CrossConnectLifecycleStateEnum{ + "PENDING_CUSTOMER": CrossConnectLifecycleStatePendingCustomer, + "PROVISIONING": CrossConnectLifecycleStateProvisioning, + "PROVISIONED": CrossConnectLifecycleStateProvisioned, + "INACTIVE": CrossConnectLifecycleStateInactive, + "TERMINATING": CrossConnectLifecycleStateTerminating, + "TERMINATED": CrossConnectLifecycleStateTerminated, +} + +// GetCrossConnectLifecycleStateEnumValues Enumerates the set of values for CrossConnectLifecycleState +func GetCrossConnectLifecycleStateEnumValues() []CrossConnectLifecycleStateEnum { + values := make([]CrossConnectLifecycleStateEnum, 0) + for _, v := range mappingCrossConnectLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/cross_connect_group.go b/vendor/github.com/oracle/oci-go-sdk/core/cross_connect_group.go new file mode 100644 index 000000000..2193bf7e7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/cross_connect_group.go @@ -0,0 +1,77 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type CrossConnectGroup struct { + + // The OCID of the compartment containing the cross-connect group. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The display name of 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 cross-connect group's Oracle ID (OCID). + Id *string `mandatory:"false" json:"id"` + + // The cross-connect group's current state. + LifecycleState CrossConnectGroupLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // The date and time the cross-connect group was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m CrossConnectGroup) String() string { + return common.PointerString(m) +} + +// CrossConnectGroupLifecycleStateEnum Enum with underlying type: string +type CrossConnectGroupLifecycleStateEnum string + +// Set of constants representing the allowable values for CrossConnectGroupLifecycleState +const ( + CrossConnectGroupLifecycleStateProvisioning CrossConnectGroupLifecycleStateEnum = "PROVISIONING" + CrossConnectGroupLifecycleStateProvisioned CrossConnectGroupLifecycleStateEnum = "PROVISIONED" + CrossConnectGroupLifecycleStateInactive CrossConnectGroupLifecycleStateEnum = "INACTIVE" + CrossConnectGroupLifecycleStateTerminating CrossConnectGroupLifecycleStateEnum = "TERMINATING" + CrossConnectGroupLifecycleStateTerminated CrossConnectGroupLifecycleStateEnum = "TERMINATED" +) + +var mappingCrossConnectGroupLifecycleState = map[string]CrossConnectGroupLifecycleStateEnum{ + "PROVISIONING": CrossConnectGroupLifecycleStateProvisioning, + "PROVISIONED": CrossConnectGroupLifecycleStateProvisioned, + "INACTIVE": CrossConnectGroupLifecycleStateInactive, + "TERMINATING": CrossConnectGroupLifecycleStateTerminating, + "TERMINATED": CrossConnectGroupLifecycleStateTerminated, +} + +// GetCrossConnectGroupLifecycleStateEnumValues Enumerates the set of values for CrossConnectGroupLifecycleState +func GetCrossConnectGroupLifecycleStateEnumValues() []CrossConnectGroupLifecycleStateEnum { + values := make([]CrossConnectGroupLifecycleStateEnum, 0) + for _, v := range mappingCrossConnectGroupLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/cross_connect_location.go b/vendor/github.com/oracle/oci-go-sdk/core/cross_connect_location.go new file mode 100644 index 000000000..3a291556b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/cross_connect_location.go @@ -0,0 +1,28 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/cross_connect_mapping.go b/vendor/github.com/oracle/oci-go-sdk/core/cross_connect_mapping.go new file mode 100644 index 000000000..43ec7d68e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/cross_connect_mapping.go @@ -0,0 +1,76 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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 IP +// 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 IP addresses. +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 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 IP 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 IP address of the customer's edge router. If the + // session goes from Oracle to a provider, this is the BGP IP address of the + // provider's edge router. Must use a /30 or /31 subnet mask. + // There's one exception: for a public virtual circuit, Oracle specifies the BGP IP addresses. + // Example: `10.0.0.18/31` + CustomerBgpPeeringIp *string `mandatory:"false" json:"customerBgpPeeringIp"` + + // The IP address for Oracle's end of the BGP session. Must use a /30 or /31 + // subnet mask. 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 IP addresses. + // Example: `10.0.0.19/31` + OracleBgpPeeringIp *string `mandatory:"false" json:"oracleBgpPeeringIp"` + + // 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/cross_connect_port_speed_shape.go b/vendor/github.com/oracle/oci-go-sdk/core/cross_connect_port_speed_shape.go new file mode 100644 index 000000000..3e854fa23 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/cross_connect_port_speed_shape.go @@ -0,0 +1,29 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/cross_connect_status.go b/vendor/github.com/oracle/oci-go-sdk/core/cross_connect_status.go new file mode 100644 index 000000000..608ab9c80 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/cross_connect_status.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CrossConnectStatus The status of the cross-connect. +type CrossConnectStatus struct { + + // The OCID of the cross-connect. + CrossConnectId *string `mandatory:"true" json:"crossConnectId"` + + // 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"` +} + +func (m CrossConnectStatus) String() string { + return common.PointerString(m) +} + +// CrossConnectStatusInterfaceStateEnum Enum with underlying type: string +type CrossConnectStatusInterfaceStateEnum string + +// Set of constants representing the allowable values for CrossConnectStatusInterfaceState +const ( + CrossConnectStatusInterfaceStateUp CrossConnectStatusInterfaceStateEnum = "UP" + CrossConnectStatusInterfaceStateDown CrossConnectStatusInterfaceStateEnum = "DOWN" +) + +var mappingCrossConnectStatusInterfaceState = map[string]CrossConnectStatusInterfaceStateEnum{ + "UP": CrossConnectStatusInterfaceStateUp, + "DOWN": CrossConnectStatusInterfaceStateDown, +} + +// GetCrossConnectStatusInterfaceStateEnumValues Enumerates the set of values for CrossConnectStatusInterfaceState +func GetCrossConnectStatusInterfaceStateEnumValues() []CrossConnectStatusInterfaceStateEnum { + values := make([]CrossConnectStatusInterfaceStateEnum, 0) + for _, v := range mappingCrossConnectStatusInterfaceState { + values = append(values, v) + } + return values +} + +// CrossConnectStatusLightLevelIndicatorEnum Enum with underlying type: string +type CrossConnectStatusLightLevelIndicatorEnum string + +// Set of constants representing the allowable values for CrossConnectStatusLightLevelIndicator +const ( + CrossConnectStatusLightLevelIndicatorNoLight CrossConnectStatusLightLevelIndicatorEnum = "NO_LIGHT" + CrossConnectStatusLightLevelIndicatorLowWarn CrossConnectStatusLightLevelIndicatorEnum = "LOW_WARN" + CrossConnectStatusLightLevelIndicatorHighWarn CrossConnectStatusLightLevelIndicatorEnum = "HIGH_WARN" + CrossConnectStatusLightLevelIndicatorBad CrossConnectStatusLightLevelIndicatorEnum = "BAD" + CrossConnectStatusLightLevelIndicatorGood CrossConnectStatusLightLevelIndicatorEnum = "GOOD" +) + +var mappingCrossConnectStatusLightLevelIndicator = map[string]CrossConnectStatusLightLevelIndicatorEnum{ + "NO_LIGHT": CrossConnectStatusLightLevelIndicatorNoLight, + "LOW_WARN": CrossConnectStatusLightLevelIndicatorLowWarn, + "HIGH_WARN": CrossConnectStatusLightLevelIndicatorHighWarn, + "BAD": CrossConnectStatusLightLevelIndicatorBad, + "GOOD": CrossConnectStatusLightLevelIndicatorGood, +} + +// GetCrossConnectStatusLightLevelIndicatorEnumValues Enumerates the set of values for CrossConnectStatusLightLevelIndicator +func GetCrossConnectStatusLightLevelIndicatorEnumValues() []CrossConnectStatusLightLevelIndicatorEnum { + values := make([]CrossConnectStatusLightLevelIndicatorEnum, 0) + for _, v := range mappingCrossConnectStatusLightLevelIndicator { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_boot_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_boot_volume_request_response.go new file mode 100644 index 000000000..1f5d59d9a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_boot_volume_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteBootVolumeRequest wrapper for the DeleteBootVolume operation +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"` +} + +func (request DeleteBootVolumeRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_console_history_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_console_history_request_response.go new file mode 100644 index 000000000..e964e9bf4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_console_history_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteConsoleHistoryRequest wrapper for the DeleteConsoleHistory operation +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"` +} + +func (request DeleteConsoleHistoryRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_cpe_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_cpe_request_response.go new file mode 100644 index 000000000..6a398d922 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_cpe_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteCpeRequest wrapper for the DeleteCpe operation +type DeleteCpeRequest struct { + + // The OCID 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"` +} + +func (request DeleteCpeRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_cross_connect_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_cross_connect_group_request_response.go new file mode 100644 index 000000000..fbfaf81e1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_cross_connect_group_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteCrossConnectGroupRequest wrapper for the DeleteCrossConnectGroup operation +type DeleteCrossConnectGroupRequest struct { + + // The OCID 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"` +} + +func (request DeleteCrossConnectGroupRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_cross_connect_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_cross_connect_request_response.go new file mode 100644 index 000000000..f3641dfd2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_cross_connect_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteCrossConnectRequest wrapper for the DeleteCrossConnect operation +type DeleteCrossConnectRequest struct { + + // The OCID 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"` +} + +func (request DeleteCrossConnectRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_dhcp_options_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_dhcp_options_request_response.go new file mode 100644 index 000000000..e89249eec --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_dhcp_options_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteDhcpOptionsRequest wrapper for the DeleteDhcpOptions operation +type DeleteDhcpOptionsRequest struct { + + // The OCID 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"` +} + +func (request DeleteDhcpOptionsRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_drg_attachment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_drg_attachment_request_response.go new file mode 100644 index 000000000..a921056e5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_drg_attachment_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteDrgAttachmentRequest wrapper for the DeleteDrgAttachment operation +type DeleteDrgAttachmentRequest struct { + + // The OCID 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"` +} + +func (request DeleteDrgAttachmentRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_drg_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_drg_request_response.go new file mode 100644 index 000000000..225db2c44 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_drg_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteDrgRequest wrapper for the DeleteDrg operation +type DeleteDrgRequest struct { + + // The OCID 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"` +} + +func (request DeleteDrgRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_i_p_sec_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_i_p_sec_connection_request_response.go new file mode 100644 index 000000000..47a19acff --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_i_p_sec_connection_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteIPSecConnectionRequest wrapper for the DeleteIPSecConnection operation +type DeleteIPSecConnectionRequest struct { + + // The OCID 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"` +} + +func (request DeleteIPSecConnectionRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_image_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_image_request_response.go new file mode 100644 index 000000000..f7c0a2b7f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_image_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteImageRequest wrapper for the DeleteImage operation +type DeleteImageRequest struct { + + // The OCID 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"` +} + +func (request DeleteImageRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_instance_console_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_instance_console_connection_request_response.go new file mode 100644 index 000000000..126d52c84 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_instance_console_connection_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteInstanceConsoleConnectionRequest wrapper for the DeleteInstanceConsoleConnection operation +type DeleteInstanceConsoleConnectionRequest struct { + + // The OCID of the intance 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"` +} + +func (request DeleteInstanceConsoleConnectionRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_internet_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_internet_gateway_request_response.go new file mode 100644 index 000000000..e1c2fcf27 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_internet_gateway_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteInternetGatewayRequest wrapper for the DeleteInternetGateway operation +type DeleteInternetGatewayRequest struct { + + // The OCID 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"` +} + +func (request DeleteInternetGatewayRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_local_peering_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_local_peering_gateway_request_response.go new file mode 100644 index 000000000..312cd7485 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_local_peering_gateway_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteLocalPeeringGatewayRequest wrapper for the DeleteLocalPeeringGateway operation +type DeleteLocalPeeringGatewayRequest struct { + + // The OCID 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"` +} + +func (request DeleteLocalPeeringGatewayRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_private_ip_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_private_ip_request_response.go new file mode 100644 index 000000000..6994c1320 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_private_ip_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeletePrivateIpRequest wrapper for the DeletePrivateIp operation +type DeletePrivateIpRequest struct { + + // The private IP's OCID. + 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"` +} + +func (request DeletePrivateIpRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_route_table_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_route_table_request_response.go new file mode 100644 index 000000000..79cf5fee0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_route_table_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteRouteTableRequest wrapper for the DeleteRouteTable operation +type DeleteRouteTableRequest struct { + + // The OCID 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"` +} + +func (request DeleteRouteTableRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_security_list_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_security_list_request_response.go new file mode 100644 index 000000000..6fccea27e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_security_list_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteSecurityListRequest wrapper for the DeleteSecurityList operation +type DeleteSecurityListRequest struct { + + // The OCID 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"` +} + +func (request DeleteSecurityListRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_subnet_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_subnet_request_response.go new file mode 100644 index 000000000..cd198d893 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_subnet_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteSubnetRequest wrapper for the DeleteSubnet operation +type DeleteSubnetRequest struct { + + // The OCID 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"` +} + +func (request DeleteSubnetRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_vcn_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_vcn_request_response.go new file mode 100644 index 000000000..9e30cccc4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_vcn_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteVcnRequest wrapper for the DeleteVcn operation +type DeleteVcnRequest struct { + + // The OCID 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"` +} + +func (request DeleteVcnRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_virtual_circuit_public_prefix_details.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_virtual_circuit_public_prefix_details.go new file mode 100644 index 000000000..cea9aca23 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_virtual_circuit_public_prefix_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_virtual_circuit_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_virtual_circuit_request_response.go new file mode 100644 index 000000000..55caa0d27 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_virtual_circuit_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteVirtualCircuitRequest wrapper for the DeleteVirtualCircuit operation +type DeleteVirtualCircuitRequest struct { + + // The OCID 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"` +} + +func (request DeleteVirtualCircuitRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_volume_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_volume_backup_request_response.go new file mode 100644 index 000000000..4c1e30354 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_volume_backup_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteVolumeBackupRequest wrapper for the DeleteVolumeBackup operation +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"` +} + +func (request DeleteVolumeBackupRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/delete_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/delete_volume_request_response.go new file mode 100644 index 000000000..e9bfd8a60 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/delete_volume_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteVolumeRequest wrapper for the DeleteVolume operation +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"` +} + +func (request DeleteVolumeRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/detach_boot_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/detach_boot_volume_request_response.go new file mode 100644 index 000000000..5820949e9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/detach_boot_volume_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DetachBootVolumeRequest wrapper for the DetachBootVolume operation +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"` +} + +func (request DetachBootVolumeRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/detach_vnic_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/detach_vnic_request_response.go new file mode 100644 index 000000000..7f4bf5e93 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/detach_vnic_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DetachVnicRequest wrapper for the DetachVnic operation +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"` +} + +func (request DetachVnicRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/detach_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/detach_volume_request_response.go new file mode 100644 index 000000000..59188b434 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/detach_volume_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DetachVolumeRequest wrapper for the DetachVolume operation +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"` +} + +func (request DetachVolumeRequest) String() string { + return common.PointerString(request) +} + +// 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"` +} + +func (response DetachVolumeResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/dhcp_dns_option.go b/vendor/github.com/oracle/oci-go-sdk/core/dhcp_dns_option.go new file mode 100644 index 000000000..51237ca28 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/dhcp_dns_option.go @@ -0,0 +1,81 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// 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.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/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) +} + +// 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 DhcpDnsOptionServerType +const ( + DhcpDnsOptionServerTypeVcnlocal DhcpDnsOptionServerTypeEnum = "VcnLocal" + DhcpDnsOptionServerTypeVcnlocalplusinternet DhcpDnsOptionServerTypeEnum = "VcnLocalPlusInternet" + DhcpDnsOptionServerTypeCustomdnsserver DhcpDnsOptionServerTypeEnum = "CustomDnsServer" +) + +var mappingDhcpDnsOptionServerType = map[string]DhcpDnsOptionServerTypeEnum{ + "VcnLocal": DhcpDnsOptionServerTypeVcnlocal, + "VcnLocalPlusInternet": DhcpDnsOptionServerTypeVcnlocalplusinternet, + "CustomDnsServer": DhcpDnsOptionServerTypeCustomdnsserver, +} + +// GetDhcpDnsOptionServerTypeEnumValues Enumerates the set of values for DhcpDnsOptionServerType +func GetDhcpDnsOptionServerTypeEnumValues() []DhcpDnsOptionServerTypeEnum { + values := make([]DhcpDnsOptionServerTypeEnum, 0) + for _, v := range mappingDhcpDnsOptionServerType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/dhcp_option.go b/vendor/github.com/oracle/oci-go-sdk/core/dhcp_option.go new file mode 100644 index 000000000..742f3411b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/dhcp_option.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// 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.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm) +// and DHCP Options (https://docs.us-phoenix-1.oraclecloud.com/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) { + 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: + return m, nil + } +} + +func (m dhcpoption) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/dhcp_options.go b/vendor/github.com/oracle/oci-go-sdk/core/dhcp_options.go new file mode 100644 index 000000000..f96edd995 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/dhcp_options.go @@ -0,0 +1,115 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// 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.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm) +// and DHCP Options (https://docs.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type DhcpOptions struct { + + // The OCID of the compartment containing the set of DHCP options. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Oracle ID (OCID) 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. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID of the VCN the set of DHCP options belongs to. + VcnId *string `mandatory:"true" json:"vcnId"` + + // 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 DhcpOptions) String() string { + return common.PointerString(m) +} + +// UnmarshalJSON unmarshals from json +func (m *DhcpOptions) UnmarshalJSON(data []byte) (e error) { + model := struct { + DisplayName *string `json:"displayName"` + 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 + } + m.DisplayName = model.DisplayName + 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, err := n.UnmarshalPolymorphicJSON(n.JsonData) + if err != nil { + return err + } + m.Options[i] = nn + } + 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 DhcpOptionsLifecycleState +const ( + DhcpOptionsLifecycleStateProvisioning DhcpOptionsLifecycleStateEnum = "PROVISIONING" + DhcpOptionsLifecycleStateAvailable DhcpOptionsLifecycleStateEnum = "AVAILABLE" + DhcpOptionsLifecycleStateTerminating DhcpOptionsLifecycleStateEnum = "TERMINATING" + DhcpOptionsLifecycleStateTerminated DhcpOptionsLifecycleStateEnum = "TERMINATED" +) + +var mappingDhcpOptionsLifecycleState = map[string]DhcpOptionsLifecycleStateEnum{ + "PROVISIONING": DhcpOptionsLifecycleStateProvisioning, + "AVAILABLE": DhcpOptionsLifecycleStateAvailable, + "TERMINATING": DhcpOptionsLifecycleStateTerminating, + "TERMINATED": DhcpOptionsLifecycleStateTerminated, +} + +// GetDhcpOptionsLifecycleStateEnumValues Enumerates the set of values for DhcpOptionsLifecycleState +func GetDhcpOptionsLifecycleStateEnumValues() []DhcpOptionsLifecycleStateEnum { + values := make([]DhcpOptionsLifecycleStateEnum, 0) + for _, v := range mappingDhcpOptionsLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/dhcp_search_domain_option.go b/vendor/github.com/oracle/oci-go-sdk/core/dhcp_search_domain_option.go new file mode 100644 index 000000000..58968eb53 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/dhcp_search_domain_option.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// DhcpSearchDomainOption DHCP option for specifying a search domain name for DNS queries. For more information, see +// DNS in Your Virtual Cloud Network (https://docs.us-phoenix-1.oraclecloud.com/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) +} + +// 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/core/drg.go b/vendor/github.com/oracle/oci-go-sdk/core/drg.go new file mode 100644 index 000000000..b87673bba --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/drg.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Drg A Dynamic Routing Gateway (DRG), which is a virtual router that provides a path for private +// network traffic between your VCN and your existing network. You use it with other Networking +// Service components to create an IPSec VPN or a connection that uses +// Oracle Cloud Infrastructure FastConnect. For more information, see +// Overview of the Networking Service (https://docs.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type Drg struct { + + // The OCID of the compartment containing the DRG. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The DRG's Oracle ID (OCID). + Id *string `mandatory:"true" json:"id"` + + // The DRG's current state. + LifecycleState DrgLifecycleStateEnum `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 was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m Drg) String() string { + return common.PointerString(m) +} + +// DrgLifecycleStateEnum Enum with underlying type: string +type DrgLifecycleStateEnum string + +// Set of constants representing the allowable values for DrgLifecycleState +const ( + DrgLifecycleStateProvisioning DrgLifecycleStateEnum = "PROVISIONING" + DrgLifecycleStateAvailable DrgLifecycleStateEnum = "AVAILABLE" + DrgLifecycleStateTerminating DrgLifecycleStateEnum = "TERMINATING" + DrgLifecycleStateTerminated DrgLifecycleStateEnum = "TERMINATED" +) + +var mappingDrgLifecycleState = map[string]DrgLifecycleStateEnum{ + "PROVISIONING": DrgLifecycleStateProvisioning, + "AVAILABLE": DrgLifecycleStateAvailable, + "TERMINATING": DrgLifecycleStateTerminating, + "TERMINATED": DrgLifecycleStateTerminated, +} + +// GetDrgLifecycleStateEnumValues Enumerates the set of values for DrgLifecycleState +func GetDrgLifecycleStateEnumValues() []DrgLifecycleStateEnum { + values := make([]DrgLifecycleStateEnum, 0) + for _, v := range mappingDrgLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/drg_attachment.go b/vendor/github.com/oracle/oci-go-sdk/core/drg_attachment.go new file mode 100644 index 000000000..108763457 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/drg_attachment.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// DrgAttachment A link between a DRG and VCN. For more information, see +// Overview of the Networking Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/overview.htm). +type DrgAttachment struct { + + // The OCID of the compartment containing the DRG attachment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the DRG. + DrgId *string `mandatory:"true" json:"drgId"` + + // The DRG attachment's Oracle ID (OCID). + Id *string `mandatory:"true" json:"id"` + + // The DRG attachment's current state. + LifecycleState DrgAttachmentLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The OCID of the VCN. + VcnId *string `mandatory:"true" json:"vcnId"` + + // 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. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m DrgAttachment) String() string { + return common.PointerString(m) +} + +// DrgAttachmentLifecycleStateEnum Enum with underlying type: string +type DrgAttachmentLifecycleStateEnum string + +// Set of constants representing the allowable values for DrgAttachmentLifecycleState +const ( + DrgAttachmentLifecycleStateAttaching DrgAttachmentLifecycleStateEnum = "ATTACHING" + DrgAttachmentLifecycleStateAttached DrgAttachmentLifecycleStateEnum = "ATTACHED" + DrgAttachmentLifecycleStateDetaching DrgAttachmentLifecycleStateEnum = "DETACHING" + DrgAttachmentLifecycleStateDetached DrgAttachmentLifecycleStateEnum = "DETACHED" +) + +var mappingDrgAttachmentLifecycleState = map[string]DrgAttachmentLifecycleStateEnum{ + "ATTACHING": DrgAttachmentLifecycleStateAttaching, + "ATTACHED": DrgAttachmentLifecycleStateAttached, + "DETACHING": DrgAttachmentLifecycleStateDetaching, + "DETACHED": DrgAttachmentLifecycleStateDetached, +} + +// GetDrgAttachmentLifecycleStateEnumValues Enumerates the set of values for DrgAttachmentLifecycleState +func GetDrgAttachmentLifecycleStateEnumValues() []DrgAttachmentLifecycleStateEnum { + values := make([]DrgAttachmentLifecycleStateEnum, 0) + for _, v := range mappingDrgAttachmentLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/egress_security_rule.go b/vendor/github.com/oracle/oci-go-sdk/core/egress_security_rule.go new file mode 100644 index 000000000..313470a2f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/egress_security_rule.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// EgressSecurityRule A rule for allowing outbound IP packets. +type EgressSecurityRule struct { + + // The destination CIDR block for the egress rule. This is the range of IP addresses that a + // packet originating from the instance can go to. + 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"), and UDP ("17"). + Protocol *string `mandatory:"true" json:"protocol"` + + // Optional and valid only for ICMP. Use to specify a particular ICMP type and code + // as defined in + // ICMP Parameters (http://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml). + // If you specify ICMP 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, 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. + 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"` + + // 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. + TcpOptions *TcpOptions `mandatory:"false" json:"tcpOptions"` + + // 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. + UdpOptions *UdpOptions `mandatory:"false" json:"udpOptions"` +} + +func (m EgressSecurityRule) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/export_image_details.go b/vendor/github.com/oracle/oci-go-sdk/core/export_image_details.go new file mode 100644 index 000000000..f066a58a7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/export_image_details.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// 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 { +} + +type exportimagedetails struct { + JsonData []byte + 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.DestinationType = s.Model.DestinationType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *exportimagedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + 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: + return m, nil + } +} + +func (m exportimagedetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/export_image_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/export_image_request_response.go new file mode 100644 index 000000000..4ecb1a3ce --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/export_image_request_response.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ExportImageRequest wrapper for the ExportImage operation +type ExportImageRequest struct { + + // The OCID 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"` +} + +func (request ExportImageRequest) String() string { + return common.PointerString(request) +} + +// 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"` +} + +func (response ExportImageResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/export_image_via_object_storage_tuple_details.go b/vendor/github.com/oracle/oci-go-sdk/core/export_image_via_object_storage_tuple_details.go new file mode 100644 index 000000000..39d08873f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/export_image_via_object_storage_tuple_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// ExportImageViaObjectStorageTupleDetails The representation of ExportImageViaObjectStorageTupleDetails +type ExportImageViaObjectStorageTupleDetails struct { + + // The Object Storage bucket to export the image to. + BucketName *string `mandatory:"false" json:"bucketName"` + + // The Object Storage namespace to export the image to. + NamespaceName *string `mandatory:"false" json:"namespaceName"` + + // The Object Storage object name for the exported image. + ObjectName *string `mandatory:"false" json:"objectName"` +} + +func (m ExportImageViaObjectStorageTupleDetails) String() string { + return common.PointerString(m) +} + +// 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/core/export_image_via_object_storage_uri_details.go b/vendor/github.com/oracle/oci-go-sdk/core/export_image_via_object_storage_uri_details.go new file mode 100644 index 000000000..5a44a21a6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/export_image_via_object_storage_uri_details.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// ExportImageViaObjectStorageUriDetails The representation of ExportImageViaObjectStorageUriDetails +type ExportImageViaObjectStorageUriDetails struct { + + // The Object Storage URL to export the image to. See Object Storage URLs (https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm#URLs) + // and pre-authenticated requests (https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingaccess.htm#pre-auth) for constructing URLs for image import/export. + DestinationUri *string `mandatory:"true" json:"destinationUri"` +} + +func (m ExportImageViaObjectStorageUriDetails) String() string { + return common.PointerString(m) +} + +// 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/core/fast_connect_provider_service.go b/vendor/github.com/oracle/oci-go-sdk/core/fast_connect_provider_service.go new file mode 100644 index 000000000..1b8dcca1d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/fast_connect_provider_service.go @@ -0,0 +1,142 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// FastConnectProviderService A service offering from a supported provider. For more information, +// see FastConnect Overview (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm). +type FastConnectProviderService struct { + + // The OCID of the service offered by the provider. + Id *string `mandatory:"true" json:"id"` + + // Private peering BGP management. + 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"` + + // Public peering BGP management. + PublicPeeringBgpManagement FastConnectProviderServicePublicPeeringBgpManagementEnum `mandatory:"true" json:"publicPeeringBgpManagement"` + + // Provider service type. + Type FastConnectProviderServiceTypeEnum `mandatory:"true" json:"type"` + + // A description of the service offered by the provider. + 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) +} + +// FastConnectProviderServicePrivatePeeringBgpManagementEnum Enum with underlying type: string +type FastConnectProviderServicePrivatePeeringBgpManagementEnum string + +// Set of constants representing the allowable values for FastConnectProviderServicePrivatePeeringBgpManagement +const ( + FastConnectProviderServicePrivatePeeringBgpManagementCustomerManaged FastConnectProviderServicePrivatePeeringBgpManagementEnum = "CUSTOMER_MANAGED" + FastConnectProviderServicePrivatePeeringBgpManagementProviderManaged FastConnectProviderServicePrivatePeeringBgpManagementEnum = "PROVIDER_MANAGED" + FastConnectProviderServicePrivatePeeringBgpManagementOracleManaged FastConnectProviderServicePrivatePeeringBgpManagementEnum = "ORACLE_MANAGED" +) + +var mappingFastConnectProviderServicePrivatePeeringBgpManagement = map[string]FastConnectProviderServicePrivatePeeringBgpManagementEnum{ + "CUSTOMER_MANAGED": FastConnectProviderServicePrivatePeeringBgpManagementCustomerManaged, + "PROVIDER_MANAGED": FastConnectProviderServicePrivatePeeringBgpManagementProviderManaged, + "ORACLE_MANAGED": FastConnectProviderServicePrivatePeeringBgpManagementOracleManaged, +} + +// GetFastConnectProviderServicePrivatePeeringBgpManagementEnumValues Enumerates the set of values for FastConnectProviderServicePrivatePeeringBgpManagement +func GetFastConnectProviderServicePrivatePeeringBgpManagementEnumValues() []FastConnectProviderServicePrivatePeeringBgpManagementEnum { + values := make([]FastConnectProviderServicePrivatePeeringBgpManagementEnum, 0) + for _, v := range mappingFastConnectProviderServicePrivatePeeringBgpManagement { + values = append(values, v) + } + return values +} + +// FastConnectProviderServicePublicPeeringBgpManagementEnum Enum with underlying type: string +type FastConnectProviderServicePublicPeeringBgpManagementEnum string + +// Set of constants representing the allowable values for FastConnectProviderServicePublicPeeringBgpManagement +const ( + FastConnectProviderServicePublicPeeringBgpManagementCustomerManaged FastConnectProviderServicePublicPeeringBgpManagementEnum = "CUSTOMER_MANAGED" + FastConnectProviderServicePublicPeeringBgpManagementProviderManaged FastConnectProviderServicePublicPeeringBgpManagementEnum = "PROVIDER_MANAGED" + FastConnectProviderServicePublicPeeringBgpManagementOracleManaged FastConnectProviderServicePublicPeeringBgpManagementEnum = "ORACLE_MANAGED" +) + +var mappingFastConnectProviderServicePublicPeeringBgpManagement = map[string]FastConnectProviderServicePublicPeeringBgpManagementEnum{ + "CUSTOMER_MANAGED": FastConnectProviderServicePublicPeeringBgpManagementCustomerManaged, + "PROVIDER_MANAGED": FastConnectProviderServicePublicPeeringBgpManagementProviderManaged, + "ORACLE_MANAGED": FastConnectProviderServicePublicPeeringBgpManagementOracleManaged, +} + +// GetFastConnectProviderServicePublicPeeringBgpManagementEnumValues Enumerates the set of values for FastConnectProviderServicePublicPeeringBgpManagement +func GetFastConnectProviderServicePublicPeeringBgpManagementEnumValues() []FastConnectProviderServicePublicPeeringBgpManagementEnum { + values := make([]FastConnectProviderServicePublicPeeringBgpManagementEnum, 0) + for _, v := range mappingFastConnectProviderServicePublicPeeringBgpManagement { + values = append(values, v) + } + return values +} + +// FastConnectProviderServiceSupportedVirtualCircuitTypesEnum Enum with underlying type: string +type FastConnectProviderServiceSupportedVirtualCircuitTypesEnum string + +// Set of constants representing the allowable values for FastConnectProviderServiceSupportedVirtualCircuitTypes +const ( + FastConnectProviderServiceSupportedVirtualCircuitTypesPublic FastConnectProviderServiceSupportedVirtualCircuitTypesEnum = "PUBLIC" + FastConnectProviderServiceSupportedVirtualCircuitTypesPrivate FastConnectProviderServiceSupportedVirtualCircuitTypesEnum = "PRIVATE" +) + +var mappingFastConnectProviderServiceSupportedVirtualCircuitTypes = map[string]FastConnectProviderServiceSupportedVirtualCircuitTypesEnum{ + "PUBLIC": FastConnectProviderServiceSupportedVirtualCircuitTypesPublic, + "PRIVATE": FastConnectProviderServiceSupportedVirtualCircuitTypesPrivate, +} + +// GetFastConnectProviderServiceSupportedVirtualCircuitTypesEnumValues Enumerates the set of values for FastConnectProviderServiceSupportedVirtualCircuitTypes +func GetFastConnectProviderServiceSupportedVirtualCircuitTypesEnumValues() []FastConnectProviderServiceSupportedVirtualCircuitTypesEnum { + values := make([]FastConnectProviderServiceSupportedVirtualCircuitTypesEnum, 0) + for _, v := range mappingFastConnectProviderServiceSupportedVirtualCircuitTypes { + values = append(values, v) + } + return values +} + +// FastConnectProviderServiceTypeEnum Enum with underlying type: string +type FastConnectProviderServiceTypeEnum string + +// Set of constants representing the allowable values for FastConnectProviderServiceType +const ( + FastConnectProviderServiceTypeLayer2 FastConnectProviderServiceTypeEnum = "LAYER2" + FastConnectProviderServiceTypeLayer3 FastConnectProviderServiceTypeEnum = "LAYER3" +) + +var mappingFastConnectProviderServiceType = map[string]FastConnectProviderServiceTypeEnum{ + "LAYER2": FastConnectProviderServiceTypeLayer2, + "LAYER3": FastConnectProviderServiceTypeLayer3, +} + +// GetFastConnectProviderServiceTypeEnumValues Enumerates the set of values for FastConnectProviderServiceType +func GetFastConnectProviderServiceTypeEnumValues() []FastConnectProviderServiceTypeEnum { + values := make([]FastConnectProviderServiceTypeEnum, 0) + for _, v := range mappingFastConnectProviderServiceType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_boot_volume_attachment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_boot_volume_attachment_request_response.go new file mode 100644 index 000000000..e14e9201b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_boot_volume_attachment_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetBootVolumeAttachmentRequest wrapper for the GetBootVolumeAttachment operation +type GetBootVolumeAttachmentRequest struct { + + // The OCID of the boot volume attachment. + BootVolumeAttachmentId *string `mandatory:"true" contributesTo:"path" name:"bootVolumeAttachmentId"` +} + +func (request GetBootVolumeAttachmentRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_boot_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_boot_volume_request_response.go new file mode 100644 index 000000000..95c3d0909 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_boot_volume_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetBootVolumeRequest wrapper for the GetBootVolume operation +type GetBootVolumeRequest struct { + + // The OCID of the boot volume. + BootVolumeId *string `mandatory:"true" contributesTo:"path" name:"bootVolumeId"` +} + +func (request GetBootVolumeRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_console_history_content_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_console_history_content_request_response.go new file mode 100644 index 000000000..4fc8e50ba --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_console_history_content_request_response.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetConsoleHistoryContentRequest wrapper for the GetConsoleHistoryContent operation +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"` +} + +func (request GetConsoleHistoryContentRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_console_history_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_console_history_request_response.go new file mode 100644 index 000000000..b5aa9eb38 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_console_history_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetConsoleHistoryRequest wrapper for the GetConsoleHistory operation +type GetConsoleHistoryRequest struct { + + // The OCID of the console history. + InstanceConsoleHistoryId *string `mandatory:"true" contributesTo:"path" name:"instanceConsoleHistoryId"` +} + +func (request GetConsoleHistoryRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_cpe_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_cpe_request_response.go new file mode 100644 index 000000000..0ed76a7f9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_cpe_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetCpeRequest wrapper for the GetCpe operation +type GetCpeRequest struct { + + // The OCID of the CPE. + CpeId *string `mandatory:"true" contributesTo:"path" name:"cpeId"` +} + +func (request GetCpeRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_group_request_response.go new file mode 100644 index 000000000..fd3d8803e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_group_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetCrossConnectGroupRequest wrapper for the GetCrossConnectGroup operation +type GetCrossConnectGroupRequest struct { + + // The OCID of the cross-connect group. + CrossConnectGroupId *string `mandatory:"true" contributesTo:"path" name:"crossConnectGroupId"` +} + +func (request GetCrossConnectGroupRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_letter_of_authority_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_letter_of_authority_request_response.go new file mode 100644 index 000000000..674ea1f19 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_letter_of_authority_request_response.go @@ -0,0 +1,38 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetCrossConnectLetterOfAuthorityRequest wrapper for the GetCrossConnectLetterOfAuthority operation +type GetCrossConnectLetterOfAuthorityRequest struct { + + // The OCID of the cross-connect. + CrossConnectId *string `mandatory:"true" contributesTo:"path" name:"crossConnectId"` +} + +func (request GetCrossConnectLetterOfAuthorityRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_request_response.go new file mode 100644 index 000000000..b505c6ad5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetCrossConnectRequest wrapper for the GetCrossConnect operation +type GetCrossConnectRequest struct { + + // The OCID of the cross-connect. + CrossConnectId *string `mandatory:"true" contributesTo:"path" name:"crossConnectId"` +} + +func (request GetCrossConnectRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_status_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_status_request_response.go new file mode 100644 index 000000000..cf826242e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_cross_connect_status_request_response.go @@ -0,0 +1,38 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetCrossConnectStatusRequest wrapper for the GetCrossConnectStatus operation +type GetCrossConnectStatusRequest struct { + + // The OCID of the cross-connect. + CrossConnectId *string `mandatory:"true" contributesTo:"path" name:"crossConnectId"` +} + +func (request GetCrossConnectStatusRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_dhcp_options_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_dhcp_options_request_response.go new file mode 100644 index 000000000..72f46761c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_dhcp_options_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetDhcpOptionsRequest wrapper for the GetDhcpOptions operation +type GetDhcpOptionsRequest struct { + + // The OCID for the set of DHCP options. + DhcpId *string `mandatory:"true" contributesTo:"path" name:"dhcpId"` +} + +func (request GetDhcpOptionsRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_drg_attachment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_drg_attachment_request_response.go new file mode 100644 index 000000000..b485721ae --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_drg_attachment_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetDrgAttachmentRequest wrapper for the GetDrgAttachment operation +type GetDrgAttachmentRequest struct { + + // The OCID of the DRG attachment. + DrgAttachmentId *string `mandatory:"true" contributesTo:"path" name:"drgAttachmentId"` +} + +func (request GetDrgAttachmentRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_drg_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_drg_request_response.go new file mode 100644 index 000000000..4488accfc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_drg_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetDrgRequest wrapper for the GetDrg operation +type GetDrgRequest struct { + + // The OCID of the DRG. + DrgId *string `mandatory:"true" contributesTo:"path" name:"drgId"` +} + +func (request GetDrgRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_fast_connect_provider_service_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_fast_connect_provider_service_request_response.go new file mode 100644 index 000000000..28b352403 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_fast_connect_provider_service_request_response.go @@ -0,0 +1,38 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetFastConnectProviderServiceRequest wrapper for the GetFastConnectProviderService operation +type GetFastConnectProviderServiceRequest struct { + + // The OCID of the provider service. + ProviderServiceId *string `mandatory:"true" contributesTo:"path" name:"providerServiceId"` +} + +func (request GetFastConnectProviderServiceRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_i_p_sec_connection_device_config_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_i_p_sec_connection_device_config_request_response.go new file mode 100644 index 000000000..a41b69aed --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_i_p_sec_connection_device_config_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetIPSecConnectionDeviceConfigRequest wrapper for the GetIPSecConnectionDeviceConfig operation +type GetIPSecConnectionDeviceConfigRequest struct { + + // The OCID of the IPSec connection. + IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` +} + +func (request GetIPSecConnectionDeviceConfigRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_i_p_sec_connection_device_status_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_i_p_sec_connection_device_status_request_response.go new file mode 100644 index 000000000..c3fbde11d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_i_p_sec_connection_device_status_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetIPSecConnectionDeviceStatusRequest wrapper for the GetIPSecConnectionDeviceStatus operation +type GetIPSecConnectionDeviceStatusRequest struct { + + // The OCID of the IPSec connection. + IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` +} + +func (request GetIPSecConnectionDeviceStatusRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_i_p_sec_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_i_p_sec_connection_request_response.go new file mode 100644 index 000000000..1ba8d86d0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_i_p_sec_connection_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetIPSecConnectionRequest wrapper for the GetIPSecConnection operation +type GetIPSecConnectionRequest struct { + + // The OCID of the IPSec connection. + IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` +} + +func (request GetIPSecConnectionRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_image_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_image_request_response.go new file mode 100644 index 000000000..9c64a2429 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_image_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetImageRequest wrapper for the GetImage operation +type GetImageRequest struct { + + // The OCID of the image. + ImageId *string `mandatory:"true" contributesTo:"path" name:"imageId"` +} + +func (request GetImageRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_instance_console_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_instance_console_connection_request_response.go new file mode 100644 index 000000000..c90d9c464 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_instance_console_connection_request_response.go @@ -0,0 +1,38 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetInstanceConsoleConnectionRequest wrapper for the GetInstanceConsoleConnection operation +type GetInstanceConsoleConnectionRequest struct { + + // The OCID of the intance console connection + InstanceConsoleConnectionId *string `mandatory:"true" contributesTo:"path" name:"instanceConsoleConnectionId"` +} + +func (request GetInstanceConsoleConnectionRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_instance_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_instance_request_response.go new file mode 100644 index 000000000..8619c5ade --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_instance_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetInstanceRequest wrapper for the GetInstance operation +type GetInstanceRequest struct { + + // The OCID of the instance. + InstanceId *string `mandatory:"true" contributesTo:"path" name:"instanceId"` +} + +func (request GetInstanceRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_internet_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_internet_gateway_request_response.go new file mode 100644 index 000000000..61423dffb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_internet_gateway_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetInternetGatewayRequest wrapper for the GetInternetGateway operation +type GetInternetGatewayRequest struct { + + // The OCID of the Internet Gateway. + IgId *string `mandatory:"true" contributesTo:"path" name:"igId"` +} + +func (request GetInternetGatewayRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_local_peering_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_local_peering_gateway_request_response.go new file mode 100644 index 000000000..3a04a7c17 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_local_peering_gateway_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetLocalPeeringGatewayRequest wrapper for the GetLocalPeeringGateway operation +type GetLocalPeeringGatewayRequest struct { + + // The OCID of the local peering gateway. + LocalPeeringGatewayId *string `mandatory:"true" contributesTo:"path" name:"localPeeringGatewayId"` +} + +func (request GetLocalPeeringGatewayRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_private_ip_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_private_ip_request_response.go new file mode 100644 index 000000000..778c771bf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_private_ip_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetPrivateIpRequest wrapper for the GetPrivateIp operation +type GetPrivateIpRequest struct { + + // The private IP's OCID. + PrivateIpId *string `mandatory:"true" contributesTo:"path" name:"privateIpId"` +} + +func (request GetPrivateIpRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_route_table_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_route_table_request_response.go new file mode 100644 index 000000000..f74bee61b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_route_table_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetRouteTableRequest wrapper for the GetRouteTable operation +type GetRouteTableRequest struct { + + // The OCID of the route table. + RtId *string `mandatory:"true" contributesTo:"path" name:"rtId"` +} + +func (request GetRouteTableRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_security_list_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_security_list_request_response.go new file mode 100644 index 000000000..a62a52d89 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_security_list_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetSecurityListRequest wrapper for the GetSecurityList operation +type GetSecurityListRequest struct { + + // The OCID of the security list. + SecurityListId *string `mandatory:"true" contributesTo:"path" name:"securityListId"` +} + +func (request GetSecurityListRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_subnet_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_subnet_request_response.go new file mode 100644 index 000000000..a8ffa4c10 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_subnet_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetSubnetRequest wrapper for the GetSubnet operation +type GetSubnetRequest struct { + + // The OCID of the subnet. + SubnetId *string `mandatory:"true" contributesTo:"path" name:"subnetId"` +} + +func (request GetSubnetRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_vcn_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_vcn_request_response.go new file mode 100644 index 000000000..5696f7c3f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_vcn_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetVcnRequest wrapper for the GetVcn operation +type GetVcnRequest struct { + + // The OCID of the VCN. + VcnId *string `mandatory:"true" contributesTo:"path" name:"vcnId"` +} + +func (request GetVcnRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_virtual_circuit_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_virtual_circuit_request_response.go new file mode 100644 index 000000000..85ac11259 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_virtual_circuit_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetVirtualCircuitRequest wrapper for the GetVirtualCircuit operation +type GetVirtualCircuitRequest struct { + + // The OCID of the virtual circuit. + VirtualCircuitId *string `mandatory:"true" contributesTo:"path" name:"virtualCircuitId"` +} + +func (request GetVirtualCircuitRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_vnic_attachment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_vnic_attachment_request_response.go new file mode 100644 index 000000000..3c0e62d0e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_vnic_attachment_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetVnicAttachmentRequest wrapper for the GetVnicAttachment operation +type GetVnicAttachmentRequest struct { + + // The OCID of the VNIC attachment. + VnicAttachmentId *string `mandatory:"true" contributesTo:"path" name:"vnicAttachmentId"` +} + +func (request GetVnicAttachmentRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_vnic_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_vnic_request_response.go new file mode 100644 index 000000000..6f52d96c5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_vnic_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetVnicRequest wrapper for the GetVnic operation +type GetVnicRequest struct { + + // The OCID of the VNIC. + VnicId *string `mandatory:"true" contributesTo:"path" name:"vnicId"` +} + +func (request GetVnicRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_volume_attachment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_volume_attachment_request_response.go new file mode 100644 index 000000000..e9492439f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_volume_attachment_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetVolumeAttachmentRequest wrapper for the GetVolumeAttachment operation +type GetVolumeAttachmentRequest struct { + + // The OCID of the volume attachment. + VolumeAttachmentId *string `mandatory:"true" contributesTo:"path" name:"volumeAttachmentId"` +} + +func (request GetVolumeAttachmentRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_volume_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_volume_backup_request_response.go new file mode 100644 index 000000000..6ca44c977 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_volume_backup_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetVolumeBackupRequest wrapper for the GetVolumeBackup operation +type GetVolumeBackupRequest struct { + + // The OCID of the volume backup. + VolumeBackupId *string `mandatory:"true" contributesTo:"path" name:"volumeBackupId"` +} + +func (request GetVolumeBackupRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_volume_request_response.go new file mode 100644 index 000000000..57e71a0f2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_volume_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetVolumeRequest wrapper for the GetVolume operation +type GetVolumeRequest struct { + + // The OCID of the volume. + VolumeId *string `mandatory:"true" contributesTo:"path" name:"volumeId"` +} + +func (request GetVolumeRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/get_windows_instance_initial_credentials_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/get_windows_instance_initial_credentials_request_response.go new file mode 100644 index 000000000..98d138e2b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/get_windows_instance_initial_credentials_request_response.go @@ -0,0 +1,38 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetWindowsInstanceInitialCredentialsRequest wrapper for the GetWindowsInstanceInitialCredentials operation +type GetWindowsInstanceInitialCredentialsRequest struct { + + // The OCID of the instance. + InstanceId *string `mandatory:"true" contributesTo:"path" name:"instanceId"` +} + +func (request GetWindowsInstanceInitialCredentialsRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/i_scsi_volume_attachment.go b/vendor/github.com/oracle/oci-go-sdk/core/i_scsi_volume_attachment.go new file mode 100644 index 000000000..107ab34f3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/i_scsi_volume_attachment.go @@ -0,0 +1,125 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// 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. + // 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. + // Example: `iqn.2015-12.us.oracle.com:456b0391-17b8-4122-bbf1-f85fc0bb97d9` + Iqn *string `mandatory:"true" json:"iqn"` + + // The volume's iSCSI port. + // Example: `3260` + Port *int `mandatory:"true" json:"port"` + + // A user-friendly name. Does not have to be unique, and it cannot be changed. + // Avoid entering confidential information. + // Example: `My volume attachment` + DisplayName *string `mandatory:"false" json:"displayName"` + + // The Challenge-Handshake-Authentication-Protocol (CHAP) secret valid for the associated CHAP user name. + // (Also called the "CHAP password".) + // Example: `d6866c0d-298b-48ba-95af-309b4faux45e` + ChapSecret *string `mandatory:"false" json:"chapSecret"` + + // The volume's system-generated Challenge-Handshake-Authentication-Protocol (CHAP) user name. + // Example: `ocid1.volume.oc1.phx.abyhqljrgvttnlx73nmrwfaux7kcvzfs3s66izvxf2h4lgvyndsdsnoiwr5q` + ChapUsername *string `mandatory:"false" json:"chapUsername"` + + // The current state of the volume attachment. + LifecycleState VolumeAttachmentLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +//GetAvailabilityDomain returns AvailabilityDomain +func (m IScsiVolumeAttachment) GetAvailabilityDomain() *string { + return m.AvailabilityDomain +} + +//GetCompartmentId returns CompartmentId +func (m IScsiVolumeAttachment) GetCompartmentId() *string { + return m.CompartmentId +} + +//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 +} + +//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 +} + +func (m IScsiVolumeAttachment) String() string { + return common.PointerString(m) +} + +// 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/core/icmp_options.go b/vendor/github.com/oracle/oci-go-sdk/core/icmp_options.go new file mode 100644 index 000000000..79b841e78 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/icmp_options.go @@ -0,0 +1,33 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// IcmpOptions Optional object to specify a particular ICMP type and code. If you specify ICMP as the protocol +// but do not provide 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. +// See ICMP Parameters (http://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml) +// for allowed values. To enable MTU negotiation for ingress internet traffic, 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/image.go b/vendor/github.com/oracle/oci-go-sdk/core/image.go new file mode 100644 index 000000000..250a1af1c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/image.go @@ -0,0 +1,90 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Image A boot disk image for launching an instance. For more information, see +// Overview of the Compute Service (https://docs.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +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. + // 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"` + + // 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 an Oracle-provided image name as a custom image name. + // Example: `My custom Oracle Linux image` + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m Image) String() string { + return common.PointerString(m) +} + +// ImageLifecycleStateEnum Enum with underlying type: string +type ImageLifecycleStateEnum string + +// Set of constants representing the allowable values for ImageLifecycleState +const ( + ImageLifecycleStateProvisioning ImageLifecycleStateEnum = "PROVISIONING" + ImageLifecycleStateImporting ImageLifecycleStateEnum = "IMPORTING" + ImageLifecycleStateAvailable ImageLifecycleStateEnum = "AVAILABLE" + ImageLifecycleStateExporting ImageLifecycleStateEnum = "EXPORTING" + ImageLifecycleStateDisabled ImageLifecycleStateEnum = "DISABLED" + ImageLifecycleStateDeleted ImageLifecycleStateEnum = "DELETED" +) + +var mappingImageLifecycleState = map[string]ImageLifecycleStateEnum{ + "PROVISIONING": ImageLifecycleStateProvisioning, + "IMPORTING": ImageLifecycleStateImporting, + "AVAILABLE": ImageLifecycleStateAvailable, + "EXPORTING": ImageLifecycleStateExporting, + "DISABLED": ImageLifecycleStateDisabled, + "DELETED": ImageLifecycleStateDeleted, +} + +// GetImageLifecycleStateEnumValues Enumerates the set of values for ImageLifecycleState +func GetImageLifecycleStateEnumValues() []ImageLifecycleStateEnum { + values := make([]ImageLifecycleStateEnum, 0) + for _, v := range mappingImageLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/image_source_details.go b/vendor/github.com/oracle/oci-go-sdk/core/image_source_details.go new file mode 100644 index 000000000..ae8d32acb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/image_source_details.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// ImageSourceDetails The representation of ImageSourceDetails +type ImageSourceDetails interface { +} + +type imagesourcedetails struct { + JsonData []byte + 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.SourceType = s.Model.SourceType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *imagesourcedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + 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: + return m, nil + } +} + +func (m imagesourcedetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/image_source_via_object_storage_tuple_details.go b/vendor/github.com/oracle/oci-go-sdk/core/image_source_via_object_storage_tuple_details.go new file mode 100644 index 000000000..61eddb488 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/image_source_via_object_storage_tuple_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// 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"` +} + +func (m ImageSourceViaObjectStorageTupleDetails) String() string { + return common.PointerString(m) +} + +// 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/core/image_source_via_object_storage_uri_details.go b/vendor/github.com/oracle/oci-go-sdk/core/image_source_via_object_storage_uri_details.go new file mode 100644 index 000000000..e65376d4d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/image_source_via_object_storage_uri_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// ImageSourceViaObjectStorageUriDetails The representation of ImageSourceViaObjectStorageUriDetails +type ImageSourceViaObjectStorageUriDetails struct { + + // The Object Storage URL for the image. + SourceUri *string `mandatory:"true" json:"sourceUri"` +} + +func (m ImageSourceViaObjectStorageUriDetails) String() string { + return common.PointerString(m) +} + +// 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/core/ingress_security_rule.go b/vendor/github.com/oracle/oci-go-sdk/core/ingress_security_rule.go new file mode 100644 index 000000000..fbd7d7561 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/ingress_security_rule.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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"), and UDP ("17"). + Protocol *string `mandatory:"true" json:"protocol"` + + // The source CIDR block for the ingress rule. This is the range of IP addresses that a + // packet coming into the instance can come from. + Source *string `mandatory:"true" json:"source"` + + // Optional and valid only for ICMP. Use to specify a particular ICMP type and code + // as defined in + // ICMP Parameters (http://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml). + // If you specify ICMP 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, 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. + 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"` + + // 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. + TcpOptions *TcpOptions `mandatory:"false" json:"tcpOptions"` + + // 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. + UdpOptions *UdpOptions `mandatory:"false" json:"udpOptions"` +} + +func (m IngressSecurityRule) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/instance.go b/vendor/github.com/oracle/oci-go-sdk/core/instance.go new file mode 100644 index 000000000..afad7986f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/instance.go @@ -0,0 +1,170 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// 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. For more information, see +// Overview of the Compute Service (https://docs.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +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. + // Example: `phx` + 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. + // 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. + // Example: `My bare metal instance` + DisplayName *string `mandatory:"false" json:"displayName"` + + // Additional metadata key/value pairs that you provide. They serve a similar purpose and functionality from 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). + // If you don't need nested metadata values, it is strongly advised to avoid using this object and use the Metadata object instead. + ExtendedMetadata map[string]interface{} `mandatory:"false" json:"extendedMetadata"` + + // 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; + // 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.us-phoenix-1.oraclecloud.com/Content/Compute/References/bringyourownimage.htm). + // For more information about iPXE, see http://ipxe.org. + IpxeScript *string `mandatory:"false" json:"ipxeScript"` + + // Custom metadata that you provide. + Metadata map[string]string `mandatory:"false" json:"metadata"` + + // Details for creating an instance + SourceDetails InstanceSourceDetails `mandatory:"false" json:"sourceDetails"` +} + +func (m Instance) String() string { + return common.PointerString(m) +} + +// UnmarshalJSON unmarshals from json +func (m *Instance) UnmarshalJSON(data []byte) (e error) { + model := struct { + DisplayName *string `json:"displayName"` + ExtendedMetadata map[string]interface{} `json:"extendedMetadata"` + ImageId *string `json:"imageId"` + IpxeScript *string `json:"ipxeScript"` + Metadata map[string]string `json:"metadata"` + SourceDetails instancesourcedetails `json:"sourceDetails"` + 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 + } + m.DisplayName = model.DisplayName + m.ExtendedMetadata = model.ExtendedMetadata + m.ImageId = model.ImageId + m.IpxeScript = model.IpxeScript + m.Metadata = model.Metadata + nn, e := model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) + if e != nil { + return + } + m.SourceDetails = nn + 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 +} + +// InstanceLifecycleStateEnum Enum with underlying type: string +type InstanceLifecycleStateEnum string + +// Set of constants representing the allowable values for InstanceLifecycleState +const ( + 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 mappingInstanceLifecycleState = map[string]InstanceLifecycleStateEnum{ + "PROVISIONING": InstanceLifecycleStateProvisioning, + "RUNNING": InstanceLifecycleStateRunning, + "STARTING": InstanceLifecycleStateStarting, + "STOPPING": InstanceLifecycleStateStopping, + "STOPPED": InstanceLifecycleStateStopped, + "CREATING_IMAGE": InstanceLifecycleStateCreatingImage, + "TERMINATING": InstanceLifecycleStateTerminating, + "TERMINATED": InstanceLifecycleStateTerminated, +} + +// GetInstanceLifecycleStateEnumValues Enumerates the set of values for InstanceLifecycleState +func GetInstanceLifecycleStateEnumValues() []InstanceLifecycleStateEnum { + values := make([]InstanceLifecycleStateEnum, 0) + for _, v := range mappingInstanceLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/instance_action_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/instance_action_request_response.go new file mode 100644 index 000000000..37faf1966 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/instance_action_request_response.go @@ -0,0 +1,83 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// InstanceActionRequest wrapper for the InstanceAction operation +type InstanceActionRequest struct { + + // The OCID 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"` +} + +func (request InstanceActionRequest) String() string { + return common.PointerString(request) +} + +// 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) +} + +// InstanceActionActionEnum Enum with underlying type: string +type InstanceActionActionEnum string + +// Set of constants representing the allowable values for InstanceActionAction +const ( + InstanceActionActionStop InstanceActionActionEnum = "STOP" + InstanceActionActionStart InstanceActionActionEnum = "START" + InstanceActionActionSoftreset InstanceActionActionEnum = "SOFTRESET" + InstanceActionActionReset InstanceActionActionEnum = "RESET" +) + +var mappingInstanceActionAction = map[string]InstanceActionActionEnum{ + "STOP": InstanceActionActionStop, + "START": InstanceActionActionStart, + "SOFTRESET": InstanceActionActionSoftreset, + "RESET": InstanceActionActionReset, +} + +// GetInstanceActionActionEnumValues Enumerates the set of values for InstanceActionAction +func GetInstanceActionActionEnumValues() []InstanceActionActionEnum { + values := make([]InstanceActionActionEnum, 0) + for _, v := range mappingInstanceActionAction { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/instance_console_connection.go b/vendor/github.com/oracle/oci-go-sdk/core/instance_console_connection.go new file mode 100644 index 000000000..3dd2f61a4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/instance_console_connection.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// InstanceConsoleConnection The `InstanceConsoleConnection` API provides you with console access to virtual machine (VM) instances, +// enabling you to troubleshoot malfunctioning instances remotely. +// For more information about console access, see +// Accessing the Console (https://docs.us-phoenix-1.oraclecloud.com/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"` + + // The SSH public key fingerprint for the console connection. + Fingerprint *string `mandatory:"false" json:"fingerprint"` + + // 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"` +} + +func (m InstanceConsoleConnection) String() string { + return common.PointerString(m) +} + +// InstanceConsoleConnectionLifecycleStateEnum Enum with underlying type: string +type InstanceConsoleConnectionLifecycleStateEnum string + +// Set of constants representing the allowable values for InstanceConsoleConnectionLifecycleState +const ( + InstanceConsoleConnectionLifecycleStateActive InstanceConsoleConnectionLifecycleStateEnum = "ACTIVE" + InstanceConsoleConnectionLifecycleStateCreating InstanceConsoleConnectionLifecycleStateEnum = "CREATING" + InstanceConsoleConnectionLifecycleStateDeleted InstanceConsoleConnectionLifecycleStateEnum = "DELETED" + InstanceConsoleConnectionLifecycleStateDeleting InstanceConsoleConnectionLifecycleStateEnum = "DELETING" + InstanceConsoleConnectionLifecycleStateFailed InstanceConsoleConnectionLifecycleStateEnum = "FAILED" +) + +var mappingInstanceConsoleConnectionLifecycleState = map[string]InstanceConsoleConnectionLifecycleStateEnum{ + "ACTIVE": InstanceConsoleConnectionLifecycleStateActive, + "CREATING": InstanceConsoleConnectionLifecycleStateCreating, + "DELETED": InstanceConsoleConnectionLifecycleStateDeleted, + "DELETING": InstanceConsoleConnectionLifecycleStateDeleting, + "FAILED": InstanceConsoleConnectionLifecycleStateFailed, +} + +// GetInstanceConsoleConnectionLifecycleStateEnumValues Enumerates the set of values for InstanceConsoleConnectionLifecycleState +func GetInstanceConsoleConnectionLifecycleStateEnumValues() []InstanceConsoleConnectionLifecycleStateEnum { + values := make([]InstanceConsoleConnectionLifecycleStateEnum, 0) + for _, v := range mappingInstanceConsoleConnectionLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/instance_credentials.go b/vendor/github.com/oracle/oci-go-sdk/core/instance_credentials.go new file mode 100644 index 000000000..62f78e935 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/instance_credentials.go @@ -0,0 +1,27 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/instance_source_details.go b/vendor/github.com/oracle/oci-go-sdk/core/instance_source_details.go new file mode 100644 index 000000000..c9dffbd34 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/instance_source_details.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// 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) { + 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: + return m, nil + } +} + +func (m instancesourcedetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/instance_source_via_boot_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/core/instance_source_via_boot_volume_details.go new file mode 100644 index 000000000..9dc4b2326 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/instance_source_via_boot_volume_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// 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) +} + +// 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/core/instance_source_via_image_details.go b/vendor/github.com/oracle/oci-go-sdk/core/instance_source_via_image_details.go new file mode 100644 index 000000000..3327d9ecf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/instance_source_via_image_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// InstanceSourceViaImageDetails The representation of InstanceSourceViaImageDetails +type InstanceSourceViaImageDetails struct { + + // The OCID of the image used to boot the instance. + ImageId *string `mandatory:"true" json:"imageId"` +} + +func (m InstanceSourceViaImageDetails) String() string { + return common.PointerString(m) +} + +// 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/core/internet_gateway.go b/vendor/github.com/oracle/oci-go-sdk/core/internet_gateway.go new file mode 100644 index 000000000..a9b8f1c0b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/internet_gateway.go @@ -0,0 +1,77 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type InternetGateway struct { + + // The OCID of the compartment containing the Internet Gateway. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The Internet Gateway's Oracle ID (OCID). + Id *string `mandatory:"true" json:"id"` + + // The Internet Gateway's current state. + LifecycleState InternetGatewayLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The OCID of the VCN the Internet Gateway belongs to. + VcnId *string `mandatory:"true" json:"vcnId"` + + // 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 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. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m InternetGateway) String() string { + return common.PointerString(m) +} + +// InternetGatewayLifecycleStateEnum Enum with underlying type: string +type InternetGatewayLifecycleStateEnum string + +// Set of constants representing the allowable values for InternetGatewayLifecycleState +const ( + InternetGatewayLifecycleStateProvisioning InternetGatewayLifecycleStateEnum = "PROVISIONING" + InternetGatewayLifecycleStateAvailable InternetGatewayLifecycleStateEnum = "AVAILABLE" + InternetGatewayLifecycleStateTerminating InternetGatewayLifecycleStateEnum = "TERMINATING" + InternetGatewayLifecycleStateTerminated InternetGatewayLifecycleStateEnum = "TERMINATED" +) + +var mappingInternetGatewayLifecycleState = map[string]InternetGatewayLifecycleStateEnum{ + "PROVISIONING": InternetGatewayLifecycleStateProvisioning, + "AVAILABLE": InternetGatewayLifecycleStateAvailable, + "TERMINATING": InternetGatewayLifecycleStateTerminating, + "TERMINATED": InternetGatewayLifecycleStateTerminated, +} + +// GetInternetGatewayLifecycleStateEnumValues Enumerates the set of values for InternetGatewayLifecycleState +func GetInternetGatewayLifecycleStateEnumValues() []InternetGatewayLifecycleStateEnum { + values := make([]InternetGatewayLifecycleStateEnum, 0) + for _, v := range mappingInternetGatewayLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/ip_sec_connection.go b/vendor/github.com/oracle/oci-go-sdk/core/ip_sec_connection.go new file mode 100644 index 000000000..c57e74559 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/ip_sec_connection.go @@ -0,0 +1,82 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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 +// an IPSec VPN. For more information, see +// Overview of the Networking Service (https://docs.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type IpSecConnection struct { + + // The OCID of the compartment containing the IPSec connection. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the CPE. + CpeId *string `mandatory:"true" json:"cpeId"` + + // The OCID of the DRG. + DrgId *string `mandatory:"true" json:"drgId"` + + // The IPSec connection's Oracle ID (OCID). + Id *string `mandatory:"true" json:"id"` + + // The IPSec connection's current state. + LifecycleState IpSecConnectionLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Static routes to the CPE. At least one route must be included. The CIDR must not be a + // multicast address or class E address. + // Example: `10.0.1.0/24` + StaticRoutes []string `mandatory:"true" json:"staticRoutes"` + + // 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 IPSec connection was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m IpSecConnection) String() string { + return common.PointerString(m) +} + +// IpSecConnectionLifecycleStateEnum Enum with underlying type: string +type IpSecConnectionLifecycleStateEnum string + +// Set of constants representing the allowable values for IpSecConnectionLifecycleState +const ( + IpSecConnectionLifecycleStateProvisioning IpSecConnectionLifecycleStateEnum = "PROVISIONING" + IpSecConnectionLifecycleStateAvailable IpSecConnectionLifecycleStateEnum = "AVAILABLE" + IpSecConnectionLifecycleStateTerminating IpSecConnectionLifecycleStateEnum = "TERMINATING" + IpSecConnectionLifecycleStateTerminated IpSecConnectionLifecycleStateEnum = "TERMINATED" +) + +var mappingIpSecConnectionLifecycleState = map[string]IpSecConnectionLifecycleStateEnum{ + "PROVISIONING": IpSecConnectionLifecycleStateProvisioning, + "AVAILABLE": IpSecConnectionLifecycleStateAvailable, + "TERMINATING": IpSecConnectionLifecycleStateTerminating, + "TERMINATED": IpSecConnectionLifecycleStateTerminated, +} + +// GetIpSecConnectionLifecycleStateEnumValues Enumerates the set of values for IpSecConnectionLifecycleState +func GetIpSecConnectionLifecycleStateEnumValues() []IpSecConnectionLifecycleStateEnum { + values := make([]IpSecConnectionLifecycleStateEnum, 0) + for _, v := range mappingIpSecConnectionLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/ip_sec_connection_device_config.go b/vendor/github.com/oracle/oci-go-sdk/core/ip_sec_connection_device_config.go new file mode 100644 index 000000000..5572af637 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/ip_sec_connection_device_config.go @@ -0,0 +1,33 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// IpSecConnectionDeviceConfig Information about the IPSecConnection device configuration. +type IpSecConnectionDeviceConfig struct { + + // The OCID of the compartment containing the IPSec connection. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The IPSec connection's Oracle ID (OCID). + 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/ip_sec_connection_device_status.go b/vendor/github.com/oracle/oci-go-sdk/core/ip_sec_connection_device_status.go new file mode 100644 index 000000000..5f5a4d3c9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/ip_sec_connection_device_status.go @@ -0,0 +1,34 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// IpSecConnectionDeviceStatus Status of the IPSec connection. +type IpSecConnectionDeviceStatus struct { + + // The OCID of the compartment containing the IPSec connection. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The IPSec connection's Oracle ID (OCID). + Id *string `mandatory:"true" json:"id"` + + // The date and time the IPSec connection was created, in the format defined by 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/launch_instance_details.go b/vendor/github.com/oracle/oci-go-sdk/core/launch_instance_details.go new file mode 100644 index 000000000..c40c778ca --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/launch_instance_details.go @@ -0,0 +1,172 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// LaunchInstanceDetails Instance launch details. +// Use the sourceDetails parameter to specify whether a boot volume should be used for a new instance launch. +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 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:"true" json:"shape"` + + // Details for the primary VNIC, which is automatically created and attached when + // the instance is launched. + CreateVnicDetails *CreateVnicDetails `mandatory:"false" json:"createVnicDetails"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My bare metal instance` + DisplayName *string `mandatory:"false" json:"displayName"` + + // Additional metadata key/value pairs that you provide. They serve a similar purpose and functionality from 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). + // If you don't need nested metadata values, it is strongly advised to avoid using this object and use the Metadata object instead. + ExtendedMetadata map[string]interface{} `mandatory:"false" json:"extendedMetadata"` + + // 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; + // 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.us-phoenix-1.oraclecloud.com/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). + // **Note:** Cloud-Init does not pull this data from the `http://169.254.169.254/opc/v1/instance/metadata/` + // path. When the instance launches and either of these keys are provided, the key values are formatted as + // OpenStack metadata and copied to the following locations, which are recognized by Cloud-Init: + // `http://169.254.169.254/openstack/latest/meta_data.json` - This JSON blob + // contains, among other things, the SSH keys that you provided for + // **"ssh_authorized_keys"**. + // `http://169.254.169.254/openstack/latest/user_data` - Contains the + // base64-decoded data that you provided for **"user_data"**. + // **Metadata Example** + // "metadata" : { + // "quake_bot_level" : "Severe", + // "ssh_authorized_keys" : "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCZ06fccNTQfq+xubFlJ5ZR3kt+uzspdH9tXL+lAejSM1NXM+CFZev7MIxfEjas06y80ZBZ7DUTQO0GxJPeD8NCOb1VorF8M4xuLwrmzRtkoZzU16umt4y1W0Q4ifdp3IiiU0U8/WxczSXcUVZOLqkz5dc6oMHdMVpkimietWzGZ4LBBsH/LjEVY7E0V+a0sNchlVDIZcm7ErReBLcdTGDq0uLBiuChyl6RUkX1PNhusquTGwK7zc8OBXkRuubn5UKXhI3Ul9Nyk4XESkVWIGNKmw8mSpoJSjR8P9ZjRmcZVo8S+x4KVPMZKQEor== ryan.smith@company.com + // ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAzJSAtwEPoB3Jmr58IXrDGzLuDYkWAYg8AsLYlo6JZvKpjY1xednIcfEVQJm4T2DhVmdWhRrwQ8DmayVZvBkLt+zs2LdoAJEVimKwXcJFD/7wtH8Lnk17HiglbbbNXsemjDY0hea4JUE5CfvkIdZBITuMrfqSmA4n3VNoorXYdvtTMoGG8fxMub46RPtuxtqi9bG9Zqenordkg5FJt2mVNfQRqf83CWojcOkklUWq4CjyxaeLf5i9gv1fRoBo4QhiA8I6NCSppO8GnoV/6Ox6TNoh9BiifqGKC9VGYuC89RvUajRBTZSK2TK4DPfaT+2R+slPsFrwiT/oPEhhEK1S5Q== rsa-key-20160227", + // "user_data" : "SWYgeW91IGNhbiBzZWUgdGhpcywgdGhlbiBpdCB3b3JrZWQgbWF5YmUuCg==" + // } + // **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 http://169.254.169.254/opc/v1/instance/ + // curl http://169.254.169.254/opc/v1/instance/metadata/ + // curl http://169.254.169.254/opc/v1/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. + Metadata map[string]string `mandatory:"false" json:"metadata"` + + // Details for creating an instance. + 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"` +} + +func (m LaunchInstanceDetails) String() string { + return common.PointerString(m) +} + +// UnmarshalJSON unmarshals from json +func (m *LaunchInstanceDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + CreateVnicDetails *CreateVnicDetails `json:"createVnicDetails"` + DisplayName *string `json:"displayName"` + ExtendedMetadata map[string]interface{} `json:"extendedMetadata"` + HostnameLabel *string `json:"hostnameLabel"` + ImageId *string `json:"imageId"` + IpxeScript *string `json:"ipxeScript"` + Metadata map[string]string `json:"metadata"` + SourceDetails instancesourcedetails `json:"sourceDetails"` + SubnetId *string `json:"subnetId"` + AvailabilityDomain *string `json:"availabilityDomain"` + CompartmentId *string `json:"compartmentId"` + Shape *string `json:"shape"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + m.CreateVnicDetails = model.CreateVnicDetails + m.DisplayName = model.DisplayName + m.ExtendedMetadata = model.ExtendedMetadata + m.HostnameLabel = model.HostnameLabel + m.ImageId = model.ImageId + m.IpxeScript = model.IpxeScript + m.Metadata = model.Metadata + nn, e := model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) + if e != nil { + return + } + m.SourceDetails = nn + m.SubnetId = model.SubnetId + m.AvailabilityDomain = model.AvailabilityDomain + m.CompartmentId = model.CompartmentId + m.Shape = model.Shape + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/launch_instance_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/launch_instance_request_response.go new file mode 100644 index 000000000..dfccbc48b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/launch_instance_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// LaunchInstanceRequest wrapper for the LaunchInstance operation +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"` +} + +func (request LaunchInstanceRequest) String() string { + return common.PointerString(request) +} + +// 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"` +} + +func (response LaunchInstanceResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/letter_of_authority.go b/vendor/github.com/oracle/oci-go-sdk/core/letter_of_authority.go new file mode 100644 index 000000000..3b24abade --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/letter_of_authority.go @@ -0,0 +1,67 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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 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. + TimeExpires *common.SDKTime `mandatory:"false" json:"timeExpires"` + + // The date and time the Letter of Authority was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeIssued *common.SDKTime `mandatory:"false" json:"timeIssued"` +} + +func (m LetterOfAuthority) String() string { + return common.PointerString(m) +} + +// LetterOfAuthorityCircuitTypeEnum Enum with underlying type: string +type LetterOfAuthorityCircuitTypeEnum string + +// Set of constants representing the allowable values for LetterOfAuthorityCircuitType +const ( + LetterOfAuthorityCircuitTypeLc LetterOfAuthorityCircuitTypeEnum = "Single_mode_LC" + LetterOfAuthorityCircuitTypeSc LetterOfAuthorityCircuitTypeEnum = "Single_mode_SC" +) + +var mappingLetterOfAuthorityCircuitType = map[string]LetterOfAuthorityCircuitTypeEnum{ + "Single_mode_LC": LetterOfAuthorityCircuitTypeLc, + "Single_mode_SC": LetterOfAuthorityCircuitTypeSc, +} + +// GetLetterOfAuthorityCircuitTypeEnumValues Enumerates the set of values for LetterOfAuthorityCircuitType +func GetLetterOfAuthorityCircuitTypeEnumValues() []LetterOfAuthorityCircuitTypeEnum { + values := make([]LetterOfAuthorityCircuitTypeEnum, 0) + for _, v := range mappingLetterOfAuthorityCircuitType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_boot_volume_attachments_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_boot_volume_attachments_request_response.go new file mode 100644 index 000000000..51669f7e1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_boot_volume_attachments_request_response.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListBootVolumeAttachmentsRequest wrapper for the ListBootVolumeAttachments operation +type ListBootVolumeAttachmentsRequest struct { + + // The name of the Availability Domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" contributesTo:"query" name:"availabilityDomain"` + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + 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"` +} + +func (request ListBootVolumeAttachmentsRequest) String() string { + return common.PointerString(request) +} + +// ListBootVolumeAttachmentsResponse wrapper for the ListBootVolumeAttachments operation +type ListBootVolumeAttachmentsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []BootVolumeAttachment instance + Items []BootVolumeAttachment `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_boot_volumes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_boot_volumes_request_response.go new file mode 100644 index 000000000..20370d315 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_boot_volumes_request_response.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListBootVolumesRequest wrapper for the ListBootVolumes operation +type ListBootVolumesRequest struct { + + // The name of the Availability Domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" contributesTo:"query" name:"availabilityDomain"` + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListBootVolumesRequest) String() string { + return common.PointerString(request) +} + +// ListBootVolumesResponse wrapper for the ListBootVolumes operation +type ListBootVolumesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []BootVolume instance + Items []BootVolume `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_console_histories_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_console_histories_request_response.go new file mode 100644 index 000000000..e47d04333 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_console_histories_request_response.go @@ -0,0 +1,119 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListConsoleHistoriesRequest wrapper for the ListConsoleHistories operation +type ListConsoleHistoriesRequest struct { + + // The OCID 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 maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + 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"` +} + +func (request ListConsoleHistoriesRequest) String() string { + return common.PointerString(request) +} + +// ListConsoleHistoriesResponse wrapper for the ListConsoleHistories operation +type ListConsoleHistoriesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []ConsoleHistory instance + Items []ConsoleHistory `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} + +// ListConsoleHistoriesSortByEnum Enum with underlying type: string +type ListConsoleHistoriesSortByEnum string + +// Set of constants representing the allowable values for ListConsoleHistoriesSortBy +const ( + ListConsoleHistoriesSortByTimecreated ListConsoleHistoriesSortByEnum = "TIMECREATED" + ListConsoleHistoriesSortByDisplayname ListConsoleHistoriesSortByEnum = "DISPLAYNAME" +) + +var mappingListConsoleHistoriesSortBy = map[string]ListConsoleHistoriesSortByEnum{ + "TIMECREATED": ListConsoleHistoriesSortByTimecreated, + "DISPLAYNAME": ListConsoleHistoriesSortByDisplayname, +} + +// GetListConsoleHistoriesSortByEnumValues Enumerates the set of values for ListConsoleHistoriesSortBy +func GetListConsoleHistoriesSortByEnumValues() []ListConsoleHistoriesSortByEnum { + values := make([]ListConsoleHistoriesSortByEnum, 0) + for _, v := range mappingListConsoleHistoriesSortBy { + values = append(values, v) + } + return values +} + +// ListConsoleHistoriesSortOrderEnum Enum with underlying type: string +type ListConsoleHistoriesSortOrderEnum string + +// Set of constants representing the allowable values for ListConsoleHistoriesSortOrder +const ( + ListConsoleHistoriesSortOrderAsc ListConsoleHistoriesSortOrderEnum = "ASC" + ListConsoleHistoriesSortOrderDesc ListConsoleHistoriesSortOrderEnum = "DESC" +) + +var mappingListConsoleHistoriesSortOrder = map[string]ListConsoleHistoriesSortOrderEnum{ + "ASC": ListConsoleHistoriesSortOrderAsc, + "DESC": ListConsoleHistoriesSortOrderDesc, +} + +// GetListConsoleHistoriesSortOrderEnumValues Enumerates the set of values for ListConsoleHistoriesSortOrder +func GetListConsoleHistoriesSortOrderEnumValues() []ListConsoleHistoriesSortOrderEnum { + values := make([]ListConsoleHistoriesSortOrderEnum, 0) + for _, v := range mappingListConsoleHistoriesSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_cpes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_cpes_request_response.go new file mode 100644 index 000000000..5a0ce9fb3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_cpes_request_response.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListCpesRequest wrapper for the ListCpes operation +type ListCpesRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListCpesRequest) String() string { + return common.PointerString(request) +} + +// ListCpesResponse wrapper for the ListCpes operation +type ListCpesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []Cpe instance + Items []Cpe `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_cross_connect_groups_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_cross_connect_groups_request_response.go new file mode 100644 index 000000000..221747c68 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_cross_connect_groups_request_response.go @@ -0,0 +1,115 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListCrossConnectGroupsRequest wrapper for the ListCrossConnectGroups operation +type ListCrossConnectGroupsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + 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"` +} + +func (request ListCrossConnectGroupsRequest) String() string { + return common.PointerString(request) +} + +// ListCrossConnectGroupsResponse wrapper for the ListCrossConnectGroups operation +type ListCrossConnectGroupsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []CrossConnectGroup instance + Items []CrossConnectGroup `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} + +// ListCrossConnectGroupsSortByEnum Enum with underlying type: string +type ListCrossConnectGroupsSortByEnum string + +// Set of constants representing the allowable values for ListCrossConnectGroupsSortBy +const ( + ListCrossConnectGroupsSortByTimecreated ListCrossConnectGroupsSortByEnum = "TIMECREATED" + ListCrossConnectGroupsSortByDisplayname ListCrossConnectGroupsSortByEnum = "DISPLAYNAME" +) + +var mappingListCrossConnectGroupsSortBy = map[string]ListCrossConnectGroupsSortByEnum{ + "TIMECREATED": ListCrossConnectGroupsSortByTimecreated, + "DISPLAYNAME": ListCrossConnectGroupsSortByDisplayname, +} + +// GetListCrossConnectGroupsSortByEnumValues Enumerates the set of values for ListCrossConnectGroupsSortBy +func GetListCrossConnectGroupsSortByEnumValues() []ListCrossConnectGroupsSortByEnum { + values := make([]ListCrossConnectGroupsSortByEnum, 0) + for _, v := range mappingListCrossConnectGroupsSortBy { + values = append(values, v) + } + return values +} + +// ListCrossConnectGroupsSortOrderEnum Enum with underlying type: string +type ListCrossConnectGroupsSortOrderEnum string + +// Set of constants representing the allowable values for ListCrossConnectGroupsSortOrder +const ( + ListCrossConnectGroupsSortOrderAsc ListCrossConnectGroupsSortOrderEnum = "ASC" + ListCrossConnectGroupsSortOrderDesc ListCrossConnectGroupsSortOrderEnum = "DESC" +) + +var mappingListCrossConnectGroupsSortOrder = map[string]ListCrossConnectGroupsSortOrderEnum{ + "ASC": ListCrossConnectGroupsSortOrderAsc, + "DESC": ListCrossConnectGroupsSortOrderDesc, +} + +// GetListCrossConnectGroupsSortOrderEnumValues Enumerates the set of values for ListCrossConnectGroupsSortOrder +func GetListCrossConnectGroupsSortOrderEnumValues() []ListCrossConnectGroupsSortOrderEnum { + values := make([]ListCrossConnectGroupsSortOrderEnum, 0) + for _, v := range mappingListCrossConnectGroupsSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_cross_connect_locations_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_cross_connect_locations_request_response.go new file mode 100644 index 000000000..4200b32ac --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_cross_connect_locations_request_response.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListCrossConnectLocationsRequest wrapper for the ListCrossConnectLocations operation +type ListCrossConnectLocationsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListCrossConnectLocationsRequest) String() string { + return common.PointerString(request) +} + +// ListCrossConnectLocationsResponse wrapper for the ListCrossConnectLocations operation +type ListCrossConnectLocationsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []CrossConnectLocation instance + Items []CrossConnectLocation `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_cross_connects_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_cross_connects_request_response.go new file mode 100644 index 000000000..e10f72d55 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_cross_connects_request_response.go @@ -0,0 +1,118 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListCrossConnectsRequest wrapper for the ListCrossConnects operation +type ListCrossConnectsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the cross-connect group. + CrossConnectGroupId *string `mandatory:"false" contributesTo:"query" name:"crossConnectGroupId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + 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"` +} + +func (request ListCrossConnectsRequest) String() string { + return common.PointerString(request) +} + +// ListCrossConnectsResponse wrapper for the ListCrossConnects operation +type ListCrossConnectsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []CrossConnect instance + Items []CrossConnect `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} + +// ListCrossConnectsSortByEnum Enum with underlying type: string +type ListCrossConnectsSortByEnum string + +// Set of constants representing the allowable values for ListCrossConnectsSortBy +const ( + ListCrossConnectsSortByTimecreated ListCrossConnectsSortByEnum = "TIMECREATED" + ListCrossConnectsSortByDisplayname ListCrossConnectsSortByEnum = "DISPLAYNAME" +) + +var mappingListCrossConnectsSortBy = map[string]ListCrossConnectsSortByEnum{ + "TIMECREATED": ListCrossConnectsSortByTimecreated, + "DISPLAYNAME": ListCrossConnectsSortByDisplayname, +} + +// GetListCrossConnectsSortByEnumValues Enumerates the set of values for ListCrossConnectsSortBy +func GetListCrossConnectsSortByEnumValues() []ListCrossConnectsSortByEnum { + values := make([]ListCrossConnectsSortByEnum, 0) + for _, v := range mappingListCrossConnectsSortBy { + values = append(values, v) + } + return values +} + +// ListCrossConnectsSortOrderEnum Enum with underlying type: string +type ListCrossConnectsSortOrderEnum string + +// Set of constants representing the allowable values for ListCrossConnectsSortOrder +const ( + ListCrossConnectsSortOrderAsc ListCrossConnectsSortOrderEnum = "ASC" + ListCrossConnectsSortOrderDesc ListCrossConnectsSortOrderEnum = "DESC" +) + +var mappingListCrossConnectsSortOrder = map[string]ListCrossConnectsSortOrderEnum{ + "ASC": ListCrossConnectsSortOrderAsc, + "DESC": ListCrossConnectsSortOrderDesc, +} + +// GetListCrossConnectsSortOrderEnumValues Enumerates the set of values for ListCrossConnectsSortOrder +func GetListCrossConnectsSortOrderEnumValues() []ListCrossConnectsSortOrderEnum { + values := make([]ListCrossConnectsSortOrderEnum, 0) + for _, v := range mappingListCrossConnectsSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_crossconnect_port_speed_shapes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_crossconnect_port_speed_shapes_request_response.go new file mode 100644 index 000000000..b60655348 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_crossconnect_port_speed_shapes_request_response.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListCrossconnectPortSpeedShapesRequest wrapper for the ListCrossconnectPortSpeedShapes operation +type ListCrossconnectPortSpeedShapesRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListCrossconnectPortSpeedShapesRequest) String() string { + return common.PointerString(request) +} + +// ListCrossconnectPortSpeedShapesResponse wrapper for the ListCrossconnectPortSpeedShapes operation +type ListCrossconnectPortSpeedShapesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []CrossConnectPortSpeedShape instance + Items []CrossConnectPortSpeedShape `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_dhcp_options_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_dhcp_options_request_response.go new file mode 100644 index 000000000..f06466fc6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_dhcp_options_request_response.go @@ -0,0 +1,118 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListDhcpOptionsRequest wrapper for the ListDhcpOptions operation +type ListDhcpOptionsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the VCN. + VcnId *string `mandatory:"true" contributesTo:"query" name:"vcnId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + 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"` +} + +func (request ListDhcpOptionsRequest) String() string { + return common.PointerString(request) +} + +// ListDhcpOptionsResponse wrapper for the ListDhcpOptions operation +type ListDhcpOptionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []DhcpOptions instance + Items []DhcpOptions `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} + +// ListDhcpOptionsSortByEnum Enum with underlying type: string +type ListDhcpOptionsSortByEnum string + +// Set of constants representing the allowable values for ListDhcpOptionsSortBy +const ( + ListDhcpOptionsSortByTimecreated ListDhcpOptionsSortByEnum = "TIMECREATED" + ListDhcpOptionsSortByDisplayname ListDhcpOptionsSortByEnum = "DISPLAYNAME" +) + +var mappingListDhcpOptionsSortBy = map[string]ListDhcpOptionsSortByEnum{ + "TIMECREATED": ListDhcpOptionsSortByTimecreated, + "DISPLAYNAME": ListDhcpOptionsSortByDisplayname, +} + +// GetListDhcpOptionsSortByEnumValues Enumerates the set of values for ListDhcpOptionsSortBy +func GetListDhcpOptionsSortByEnumValues() []ListDhcpOptionsSortByEnum { + values := make([]ListDhcpOptionsSortByEnum, 0) + for _, v := range mappingListDhcpOptionsSortBy { + values = append(values, v) + } + return values +} + +// ListDhcpOptionsSortOrderEnum Enum with underlying type: string +type ListDhcpOptionsSortOrderEnum string + +// Set of constants representing the allowable values for ListDhcpOptionsSortOrder +const ( + ListDhcpOptionsSortOrderAsc ListDhcpOptionsSortOrderEnum = "ASC" + ListDhcpOptionsSortOrderDesc ListDhcpOptionsSortOrderEnum = "DESC" +) + +var mappingListDhcpOptionsSortOrder = map[string]ListDhcpOptionsSortOrderEnum{ + "ASC": ListDhcpOptionsSortOrderAsc, + "DESC": ListDhcpOptionsSortOrderDesc, +} + +// GetListDhcpOptionsSortOrderEnumValues Enumerates the set of values for ListDhcpOptionsSortOrder +func GetListDhcpOptionsSortOrderEnumValues() []ListDhcpOptionsSortOrderEnum { + values := make([]ListDhcpOptionsSortOrderEnum, 0) + for _, v := range mappingListDhcpOptionsSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_drg_attachments_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_drg_attachments_request_response.go new file mode 100644 index 000000000..d526209d5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_drg_attachments_request_response.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListDrgAttachmentsRequest wrapper for the ListDrgAttachments operation +type ListDrgAttachmentsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the VCN. + VcnId *string `mandatory:"false" contributesTo:"query" name:"vcnId"` + + // The OCID of the DRG. + DrgId *string `mandatory:"false" contributesTo:"query" name:"drgId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListDrgAttachmentsRequest) String() string { + return common.PointerString(request) +} + +// ListDrgAttachmentsResponse wrapper for the ListDrgAttachments operation +type ListDrgAttachmentsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []DrgAttachment instance + Items []DrgAttachment `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_drgs_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_drgs_request_response.go new file mode 100644 index 000000000..6577f9c2f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_drgs_request_response.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListDrgsRequest wrapper for the ListDrgs operation +type ListDrgsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListDrgsRequest) String() string { + return common.PointerString(request) +} + +// ListDrgsResponse wrapper for the ListDrgs operation +type ListDrgsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []Drg instance + Items []Drg `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_fast_connect_provider_services_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_fast_connect_provider_services_request_response.go new file mode 100644 index 000000000..27614fd85 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_fast_connect_provider_services_request_response.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListFastConnectProviderServicesRequest wrapper for the ListFastConnectProviderServices operation +type ListFastConnectProviderServicesRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListFastConnectProviderServicesRequest) String() string { + return common.PointerString(request) +} + +// ListFastConnectProviderServicesResponse wrapper for the ListFastConnectProviderServices operation +type ListFastConnectProviderServicesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []FastConnectProviderService instance + Items []FastConnectProviderService `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_fast_connect_provider_virtual_circuit_bandwidth_shapes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_fast_connect_provider_virtual_circuit_bandwidth_shapes_request_response.go new file mode 100644 index 000000000..6197b9b54 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_fast_connect_provider_virtual_circuit_bandwidth_shapes_request_response.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListFastConnectProviderVirtualCircuitBandwidthShapesRequest wrapper for the ListFastConnectProviderVirtualCircuitBandwidthShapes operation +type ListFastConnectProviderVirtualCircuitBandwidthShapesRequest struct { + + // The OCID of the provider service. + ProviderServiceId *string `mandatory:"true" contributesTo:"path" name:"providerServiceId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListFastConnectProviderVirtualCircuitBandwidthShapesRequest) String() string { + return common.PointerString(request) +} + +// ListFastConnectProviderVirtualCircuitBandwidthShapesResponse wrapper for the ListFastConnectProviderVirtualCircuitBandwidthShapes operation +type ListFastConnectProviderVirtualCircuitBandwidthShapesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []VirtualCircuitBandwidthShape instance + Items []VirtualCircuitBandwidthShape `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_i_p_sec_connections_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_i_p_sec_connections_request_response.go new file mode 100644 index 000000000..c1b346754 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_i_p_sec_connections_request_response.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListIPSecConnectionsRequest wrapper for the ListIPSecConnections operation +type ListIPSecConnectionsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the DRG. + DrgId *string `mandatory:"false" contributesTo:"query" name:"drgId"` + + // The OCID of the CPE. + CpeId *string `mandatory:"false" contributesTo:"query" name:"cpeId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListIPSecConnectionsRequest) String() string { + return common.PointerString(request) +} + +// ListIPSecConnectionsResponse wrapper for the ListIPSecConnections operation +type ListIPSecConnectionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []IpSecConnection instance + Items []IpSecConnection `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_images_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_images_request_response.go new file mode 100644 index 000000000..5ac886860 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_images_request_response.go @@ -0,0 +1,123 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListImagesRequest wrapper for the ListImages operation +type ListImagesRequest struct { + + // The OCID 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"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + 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"` +} + +func (request ListImagesRequest) String() string { + return common.PointerString(request) +} + +// ListImagesResponse wrapper for the ListImages operation +type ListImagesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []Image instance + Items []Image `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} + +// ListImagesSortByEnum Enum with underlying type: string +type ListImagesSortByEnum string + +// Set of constants representing the allowable values for ListImagesSortBy +const ( + ListImagesSortByTimecreated ListImagesSortByEnum = "TIMECREATED" + ListImagesSortByDisplayname ListImagesSortByEnum = "DISPLAYNAME" +) + +var mappingListImagesSortBy = map[string]ListImagesSortByEnum{ + "TIMECREATED": ListImagesSortByTimecreated, + "DISPLAYNAME": ListImagesSortByDisplayname, +} + +// GetListImagesSortByEnumValues Enumerates the set of values for ListImagesSortBy +func GetListImagesSortByEnumValues() []ListImagesSortByEnum { + values := make([]ListImagesSortByEnum, 0) + for _, v := range mappingListImagesSortBy { + values = append(values, v) + } + return values +} + +// ListImagesSortOrderEnum Enum with underlying type: string +type ListImagesSortOrderEnum string + +// Set of constants representing the allowable values for ListImagesSortOrder +const ( + ListImagesSortOrderAsc ListImagesSortOrderEnum = "ASC" + ListImagesSortOrderDesc ListImagesSortOrderEnum = "DESC" +) + +var mappingListImagesSortOrder = map[string]ListImagesSortOrderEnum{ + "ASC": ListImagesSortOrderAsc, + "DESC": ListImagesSortOrderDesc, +} + +// GetListImagesSortOrderEnumValues Enumerates the set of values for ListImagesSortOrder +func GetListImagesSortOrderEnumValues() []ListImagesSortOrderEnum { + values := make([]ListImagesSortOrderEnum, 0) + for _, v := range mappingListImagesSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_instance_console_connections_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_instance_console_connections_request_response.go new file mode 100644 index 000000000..012b2a77b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_instance_console_connections_request_response.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListInstanceConsoleConnectionsRequest wrapper for the ListInstanceConsoleConnections operation +type ListInstanceConsoleConnectionsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the instance. + InstanceId *string `mandatory:"false" contributesTo:"query" name:"instanceId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListInstanceConsoleConnectionsRequest) String() string { + return common.PointerString(request) +} + +// ListInstanceConsoleConnectionsResponse wrapper for the ListInstanceConsoleConnections operation +type ListInstanceConsoleConnectionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []InstanceConsoleConnection instance + Items []InstanceConsoleConnection `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_instances_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_instances_request_response.go new file mode 100644 index 000000000..f687890c4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_instances_request_response.go @@ -0,0 +1,119 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListInstancesRequest wrapper for the ListInstances operation +type ListInstancesRequest struct { + + // The OCID 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"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + 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"` +} + +func (request ListInstancesRequest) String() string { + return common.PointerString(request) +} + +// ListInstancesResponse wrapper for the ListInstances operation +type ListInstancesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []Instance instance + Items []Instance `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} + +// ListInstancesSortByEnum Enum with underlying type: string +type ListInstancesSortByEnum string + +// Set of constants representing the allowable values for ListInstancesSortBy +const ( + ListInstancesSortByTimecreated ListInstancesSortByEnum = "TIMECREATED" + ListInstancesSortByDisplayname ListInstancesSortByEnum = "DISPLAYNAME" +) + +var mappingListInstancesSortBy = map[string]ListInstancesSortByEnum{ + "TIMECREATED": ListInstancesSortByTimecreated, + "DISPLAYNAME": ListInstancesSortByDisplayname, +} + +// GetListInstancesSortByEnumValues Enumerates the set of values for ListInstancesSortBy +func GetListInstancesSortByEnumValues() []ListInstancesSortByEnum { + values := make([]ListInstancesSortByEnum, 0) + for _, v := range mappingListInstancesSortBy { + values = append(values, v) + } + return values +} + +// ListInstancesSortOrderEnum Enum with underlying type: string +type ListInstancesSortOrderEnum string + +// Set of constants representing the allowable values for ListInstancesSortOrder +const ( + ListInstancesSortOrderAsc ListInstancesSortOrderEnum = "ASC" + ListInstancesSortOrderDesc ListInstancesSortOrderEnum = "DESC" +) + +var mappingListInstancesSortOrder = map[string]ListInstancesSortOrderEnum{ + "ASC": ListInstancesSortOrderAsc, + "DESC": ListInstancesSortOrderDesc, +} + +// GetListInstancesSortOrderEnumValues Enumerates the set of values for ListInstancesSortOrder +func GetListInstancesSortOrderEnumValues() []ListInstancesSortOrderEnum { + values := make([]ListInstancesSortOrderEnum, 0) + for _, v := range mappingListInstancesSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_internet_gateways_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_internet_gateways_request_response.go new file mode 100644 index 000000000..b37985a4d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_internet_gateways_request_response.go @@ -0,0 +1,118 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListInternetGatewaysRequest wrapper for the ListInternetGateways operation +type ListInternetGatewaysRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the VCN. + VcnId *string `mandatory:"true" contributesTo:"query" name:"vcnId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + 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"` +} + +func (request ListInternetGatewaysRequest) String() string { + return common.PointerString(request) +} + +// ListInternetGatewaysResponse wrapper for the ListInternetGateways operation +type ListInternetGatewaysResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []InternetGateway instance + Items []InternetGateway `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} + +// ListInternetGatewaysSortByEnum Enum with underlying type: string +type ListInternetGatewaysSortByEnum string + +// Set of constants representing the allowable values for ListInternetGatewaysSortBy +const ( + ListInternetGatewaysSortByTimecreated ListInternetGatewaysSortByEnum = "TIMECREATED" + ListInternetGatewaysSortByDisplayname ListInternetGatewaysSortByEnum = "DISPLAYNAME" +) + +var mappingListInternetGatewaysSortBy = map[string]ListInternetGatewaysSortByEnum{ + "TIMECREATED": ListInternetGatewaysSortByTimecreated, + "DISPLAYNAME": ListInternetGatewaysSortByDisplayname, +} + +// GetListInternetGatewaysSortByEnumValues Enumerates the set of values for ListInternetGatewaysSortBy +func GetListInternetGatewaysSortByEnumValues() []ListInternetGatewaysSortByEnum { + values := make([]ListInternetGatewaysSortByEnum, 0) + for _, v := range mappingListInternetGatewaysSortBy { + values = append(values, v) + } + return values +} + +// ListInternetGatewaysSortOrderEnum Enum with underlying type: string +type ListInternetGatewaysSortOrderEnum string + +// Set of constants representing the allowable values for ListInternetGatewaysSortOrder +const ( + ListInternetGatewaysSortOrderAsc ListInternetGatewaysSortOrderEnum = "ASC" + ListInternetGatewaysSortOrderDesc ListInternetGatewaysSortOrderEnum = "DESC" +) + +var mappingListInternetGatewaysSortOrder = map[string]ListInternetGatewaysSortOrderEnum{ + "ASC": ListInternetGatewaysSortOrderAsc, + "DESC": ListInternetGatewaysSortOrderDesc, +} + +// GetListInternetGatewaysSortOrderEnumValues Enumerates the set of values for ListInternetGatewaysSortOrder +func GetListInternetGatewaysSortOrderEnumValues() []ListInternetGatewaysSortOrderEnum { + values := make([]ListInternetGatewaysSortOrderEnum, 0) + for _, v := range mappingListInternetGatewaysSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_local_peering_gateways_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_local_peering_gateways_request_response.go new file mode 100644 index 000000000..071ec59af --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_local_peering_gateways_request_response.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListLocalPeeringGatewaysRequest wrapper for the ListLocalPeeringGateways operation +type ListLocalPeeringGatewaysRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the VCN. + VcnId *string `mandatory:"true" contributesTo:"query" name:"vcnId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListLocalPeeringGatewaysRequest) String() string { + return common.PointerString(request) +} + +// ListLocalPeeringGatewaysResponse wrapper for the ListLocalPeeringGateways operation +type ListLocalPeeringGatewaysResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []LocalPeeringGateway instance + Items []LocalPeeringGateway `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_private_ips_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_private_ips_request_response.go new file mode 100644 index 000000000..7054edfc3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_private_ips_request_response.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListPrivateIpsRequest wrapper for the ListPrivateIps operation +type ListPrivateIpsRequest struct { + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The private IP address of the `privateIp` object. + // Example: `10.0.3.3` + IpAddress *string `mandatory:"false" contributesTo:"query" name:"ipAddress"` + + // The OCID of the subnet. + SubnetId *string `mandatory:"false" contributesTo:"query" name:"subnetId"` + + // The OCID of the VNIC. + VnicId *string `mandatory:"false" contributesTo:"query" name:"vnicId"` +} + +func (request ListPrivateIpsRequest) String() string { + return common.PointerString(request) +} + +// ListPrivateIpsResponse wrapper for the ListPrivateIps operation +type ListPrivateIpsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []PrivateIp instance + Items []PrivateIp `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_route_tables_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_route_tables_request_response.go new file mode 100644 index 000000000..88cc414c2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_route_tables_request_response.go @@ -0,0 +1,118 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListRouteTablesRequest wrapper for the ListRouteTables operation +type ListRouteTablesRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the VCN. + VcnId *string `mandatory:"true" contributesTo:"query" name:"vcnId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + 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 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"` +} + +func (request ListRouteTablesRequest) String() string { + return common.PointerString(request) +} + +// ListRouteTablesResponse wrapper for the ListRouteTables operation +type ListRouteTablesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []RouteTable instance + Items []RouteTable `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} + +// ListRouteTablesSortByEnum Enum with underlying type: string +type ListRouteTablesSortByEnum string + +// Set of constants representing the allowable values for ListRouteTablesSortBy +const ( + ListRouteTablesSortByTimecreated ListRouteTablesSortByEnum = "TIMECREATED" + ListRouteTablesSortByDisplayname ListRouteTablesSortByEnum = "DISPLAYNAME" +) + +var mappingListRouteTablesSortBy = map[string]ListRouteTablesSortByEnum{ + "TIMECREATED": ListRouteTablesSortByTimecreated, + "DISPLAYNAME": ListRouteTablesSortByDisplayname, +} + +// GetListRouteTablesSortByEnumValues Enumerates the set of values for ListRouteTablesSortBy +func GetListRouteTablesSortByEnumValues() []ListRouteTablesSortByEnum { + values := make([]ListRouteTablesSortByEnum, 0) + for _, v := range mappingListRouteTablesSortBy { + values = append(values, v) + } + return values +} + +// ListRouteTablesSortOrderEnum Enum with underlying type: string +type ListRouteTablesSortOrderEnum string + +// Set of constants representing the allowable values for ListRouteTablesSortOrder +const ( + ListRouteTablesSortOrderAsc ListRouteTablesSortOrderEnum = "ASC" + ListRouteTablesSortOrderDesc ListRouteTablesSortOrderEnum = "DESC" +) + +var mappingListRouteTablesSortOrder = map[string]ListRouteTablesSortOrderEnum{ + "ASC": ListRouteTablesSortOrderAsc, + "DESC": ListRouteTablesSortOrderDesc, +} + +// GetListRouteTablesSortOrderEnumValues Enumerates the set of values for ListRouteTablesSortOrder +func GetListRouteTablesSortOrderEnumValues() []ListRouteTablesSortOrderEnum { + values := make([]ListRouteTablesSortOrderEnum, 0) + for _, v := range mappingListRouteTablesSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_security_lists_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_security_lists_request_response.go new file mode 100644 index 000000000..883452ce7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_security_lists_request_response.go @@ -0,0 +1,118 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListSecurityListsRequest wrapper for the ListSecurityLists operation +type ListSecurityListsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the VCN. + VcnId *string `mandatory:"true" contributesTo:"query" name:"vcnId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + 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 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"` +} + +func (request ListSecurityListsRequest) String() string { + return common.PointerString(request) +} + +// ListSecurityListsResponse wrapper for the ListSecurityLists operation +type ListSecurityListsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []SecurityList instance + Items []SecurityList `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} + +// ListSecurityListsSortByEnum Enum with underlying type: string +type ListSecurityListsSortByEnum string + +// Set of constants representing the allowable values for ListSecurityListsSortBy +const ( + ListSecurityListsSortByTimecreated ListSecurityListsSortByEnum = "TIMECREATED" + ListSecurityListsSortByDisplayname ListSecurityListsSortByEnum = "DISPLAYNAME" +) + +var mappingListSecurityListsSortBy = map[string]ListSecurityListsSortByEnum{ + "TIMECREATED": ListSecurityListsSortByTimecreated, + "DISPLAYNAME": ListSecurityListsSortByDisplayname, +} + +// GetListSecurityListsSortByEnumValues Enumerates the set of values for ListSecurityListsSortBy +func GetListSecurityListsSortByEnumValues() []ListSecurityListsSortByEnum { + values := make([]ListSecurityListsSortByEnum, 0) + for _, v := range mappingListSecurityListsSortBy { + values = append(values, v) + } + return values +} + +// ListSecurityListsSortOrderEnum Enum with underlying type: string +type ListSecurityListsSortOrderEnum string + +// Set of constants representing the allowable values for ListSecurityListsSortOrder +const ( + ListSecurityListsSortOrderAsc ListSecurityListsSortOrderEnum = "ASC" + ListSecurityListsSortOrderDesc ListSecurityListsSortOrderEnum = "DESC" +) + +var mappingListSecurityListsSortOrder = map[string]ListSecurityListsSortOrderEnum{ + "ASC": ListSecurityListsSortOrderAsc, + "DESC": ListSecurityListsSortOrderDesc, +} + +// GetListSecurityListsSortOrderEnumValues Enumerates the set of values for ListSecurityListsSortOrder +func GetListSecurityListsSortOrderEnumValues() []ListSecurityListsSortOrderEnum { + values := make([]ListSecurityListsSortOrderEnum, 0) + for _, v := range mappingListSecurityListsSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_shapes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_shapes_request_response.go new file mode 100644 index 000000000..71c7a2dec --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_shapes_request_response.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListShapesRequest wrapper for the ListShapes operation +type ListShapesRequest struct { + + // The OCID 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 maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The OCID of an image. + ImageId *string `mandatory:"false" contributesTo:"query" name:"imageId"` +} + +func (request ListShapesRequest) String() string { + return common.PointerString(request) +} + +// ListShapesResponse wrapper for the ListShapes operation +type ListShapesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []Shape instance + Items []Shape `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_subnets_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_subnets_request_response.go new file mode 100644 index 000000000..a74e9e134 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_subnets_request_response.go @@ -0,0 +1,118 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListSubnetsRequest wrapper for the ListSubnets operation +type ListSubnetsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the VCN. + VcnId *string `mandatory:"true" contributesTo:"query" name:"vcnId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + 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 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"` +} + +func (request ListSubnetsRequest) String() string { + return common.PointerString(request) +} + +// ListSubnetsResponse wrapper for the ListSubnets operation +type ListSubnetsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []Subnet instance + Items []Subnet `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} + +// ListSubnetsSortByEnum Enum with underlying type: string +type ListSubnetsSortByEnum string + +// Set of constants representing the allowable values for ListSubnetsSortBy +const ( + ListSubnetsSortByTimecreated ListSubnetsSortByEnum = "TIMECREATED" + ListSubnetsSortByDisplayname ListSubnetsSortByEnum = "DISPLAYNAME" +) + +var mappingListSubnetsSortBy = map[string]ListSubnetsSortByEnum{ + "TIMECREATED": ListSubnetsSortByTimecreated, + "DISPLAYNAME": ListSubnetsSortByDisplayname, +} + +// GetListSubnetsSortByEnumValues Enumerates the set of values for ListSubnetsSortBy +func GetListSubnetsSortByEnumValues() []ListSubnetsSortByEnum { + values := make([]ListSubnetsSortByEnum, 0) + for _, v := range mappingListSubnetsSortBy { + values = append(values, v) + } + return values +} + +// ListSubnetsSortOrderEnum Enum with underlying type: string +type ListSubnetsSortOrderEnum string + +// Set of constants representing the allowable values for ListSubnetsSortOrder +const ( + ListSubnetsSortOrderAsc ListSubnetsSortOrderEnum = "ASC" + ListSubnetsSortOrderDesc ListSubnetsSortOrderEnum = "DESC" +) + +var mappingListSubnetsSortOrder = map[string]ListSubnetsSortOrderEnum{ + "ASC": ListSubnetsSortOrderAsc, + "DESC": ListSubnetsSortOrderDesc, +} + +// GetListSubnetsSortOrderEnumValues Enumerates the set of values for ListSubnetsSortOrder +func GetListSubnetsSortOrderEnumValues() []ListSubnetsSortOrderEnum { + values := make([]ListSubnetsSortOrderEnum, 0) + for _, v := range mappingListSubnetsSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_vcns_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_vcns_request_response.go new file mode 100644 index 000000000..b1e5b0edd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_vcns_request_response.go @@ -0,0 +1,115 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListVcnsRequest wrapper for the ListVcns operation +type ListVcnsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + 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"` +} + +func (request ListVcnsRequest) String() string { + return common.PointerString(request) +} + +// ListVcnsResponse wrapper for the ListVcns operation +type ListVcnsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []Vcn instance + Items []Vcn `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} + +// ListVcnsSortByEnum Enum with underlying type: string +type ListVcnsSortByEnum string + +// Set of constants representing the allowable values for ListVcnsSortBy +const ( + ListVcnsSortByTimecreated ListVcnsSortByEnum = "TIMECREATED" + ListVcnsSortByDisplayname ListVcnsSortByEnum = "DISPLAYNAME" +) + +var mappingListVcnsSortBy = map[string]ListVcnsSortByEnum{ + "TIMECREATED": ListVcnsSortByTimecreated, + "DISPLAYNAME": ListVcnsSortByDisplayname, +} + +// GetListVcnsSortByEnumValues Enumerates the set of values for ListVcnsSortBy +func GetListVcnsSortByEnumValues() []ListVcnsSortByEnum { + values := make([]ListVcnsSortByEnum, 0) + for _, v := range mappingListVcnsSortBy { + values = append(values, v) + } + return values +} + +// ListVcnsSortOrderEnum Enum with underlying type: string +type ListVcnsSortOrderEnum string + +// Set of constants representing the allowable values for ListVcnsSortOrder +const ( + ListVcnsSortOrderAsc ListVcnsSortOrderEnum = "ASC" + ListVcnsSortOrderDesc ListVcnsSortOrderEnum = "DESC" +) + +var mappingListVcnsSortOrder = map[string]ListVcnsSortOrderEnum{ + "ASC": ListVcnsSortOrderAsc, + "DESC": ListVcnsSortOrderDesc, +} + +// GetListVcnsSortOrderEnumValues Enumerates the set of values for ListVcnsSortOrder +func GetListVcnsSortOrderEnumValues() []ListVcnsSortOrderEnum { + values := make([]ListVcnsSortOrderEnum, 0) + for _, v := range mappingListVcnsSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_virtual_circuit_bandwidth_shapes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_virtual_circuit_bandwidth_shapes_request_response.go new file mode 100644 index 000000000..3d0ac6253 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_virtual_circuit_bandwidth_shapes_request_response.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListVirtualCircuitBandwidthShapesRequest wrapper for the ListVirtualCircuitBandwidthShapes operation +type ListVirtualCircuitBandwidthShapesRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListVirtualCircuitBandwidthShapesRequest) String() string { + return common.PointerString(request) +} + +// ListVirtualCircuitBandwidthShapesResponse wrapper for the ListVirtualCircuitBandwidthShapes operation +type ListVirtualCircuitBandwidthShapesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []VirtualCircuitBandwidthShape instance + Items []VirtualCircuitBandwidthShape `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_virtual_circuit_public_prefixes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_virtual_circuit_public_prefixes_request_response.go new file mode 100644 index 000000000..0e885eb36 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_virtual_circuit_public_prefixes_request_response.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListVirtualCircuitPublicPrefixesRequest wrapper for the ListVirtualCircuitPublicPrefixes operation +type ListVirtualCircuitPublicPrefixesRequest struct { + + // The OCID 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"` +} + +func (request ListVirtualCircuitPublicPrefixesRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_virtual_circuits_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_virtual_circuits_request_response.go new file mode 100644 index 000000000..65dc99414 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_virtual_circuits_request_response.go @@ -0,0 +1,115 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListVirtualCircuitsRequest wrapper for the ListVirtualCircuits operation +type ListVirtualCircuitsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + 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"` +} + +func (request ListVirtualCircuitsRequest) String() string { + return common.PointerString(request) +} + +// ListVirtualCircuitsResponse wrapper for the ListVirtualCircuits operation +type ListVirtualCircuitsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []VirtualCircuit instance + Items []VirtualCircuit `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} + +// ListVirtualCircuitsSortByEnum Enum with underlying type: string +type ListVirtualCircuitsSortByEnum string + +// Set of constants representing the allowable values for ListVirtualCircuitsSortBy +const ( + ListVirtualCircuitsSortByTimecreated ListVirtualCircuitsSortByEnum = "TIMECREATED" + ListVirtualCircuitsSortByDisplayname ListVirtualCircuitsSortByEnum = "DISPLAYNAME" +) + +var mappingListVirtualCircuitsSortBy = map[string]ListVirtualCircuitsSortByEnum{ + "TIMECREATED": ListVirtualCircuitsSortByTimecreated, + "DISPLAYNAME": ListVirtualCircuitsSortByDisplayname, +} + +// GetListVirtualCircuitsSortByEnumValues Enumerates the set of values for ListVirtualCircuitsSortBy +func GetListVirtualCircuitsSortByEnumValues() []ListVirtualCircuitsSortByEnum { + values := make([]ListVirtualCircuitsSortByEnum, 0) + for _, v := range mappingListVirtualCircuitsSortBy { + values = append(values, v) + } + return values +} + +// ListVirtualCircuitsSortOrderEnum Enum with underlying type: string +type ListVirtualCircuitsSortOrderEnum string + +// Set of constants representing the allowable values for ListVirtualCircuitsSortOrder +const ( + ListVirtualCircuitsSortOrderAsc ListVirtualCircuitsSortOrderEnum = "ASC" + ListVirtualCircuitsSortOrderDesc ListVirtualCircuitsSortOrderEnum = "DESC" +) + +var mappingListVirtualCircuitsSortOrder = map[string]ListVirtualCircuitsSortOrderEnum{ + "ASC": ListVirtualCircuitsSortOrderAsc, + "DESC": ListVirtualCircuitsSortOrderDesc, +} + +// GetListVirtualCircuitsSortOrderEnumValues Enumerates the set of values for ListVirtualCircuitsSortOrder +func GetListVirtualCircuitsSortOrderEnumValues() []ListVirtualCircuitsSortOrderEnum { + values := make([]ListVirtualCircuitsSortOrderEnum, 0) + for _, v := range mappingListVirtualCircuitsSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_vnic_attachments_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_vnic_attachments_request_response.go new file mode 100644 index 000000000..6746850b4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_vnic_attachments_request_response.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListVnicAttachmentsRequest wrapper for the ListVnicAttachments operation +type ListVnicAttachmentsRequest struct { + + // The OCID 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"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The OCID of the VNIC. + VnicId *string `mandatory:"false" contributesTo:"query" name:"vnicId"` +} + +func (request ListVnicAttachmentsRequest) String() string { + return common.PointerString(request) +} + +// ListVnicAttachmentsResponse wrapper for the ListVnicAttachments operation +type ListVnicAttachmentsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []VnicAttachment instance + Items []VnicAttachment `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_volume_attachments_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_volume_attachments_request_response.go new file mode 100644 index 000000000..5bc7ffdf4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_volume_attachments_request_response.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListVolumeAttachmentsRequest wrapper for the ListVolumeAttachments operation +type ListVolumeAttachmentsRequest struct { + + // The OCID 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 maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + 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"` +} + +func (request ListVolumeAttachmentsRequest) String() string { + return common.PointerString(request) +} + +// ListVolumeAttachmentsResponse wrapper for the ListVolumeAttachments operation +type ListVolumeAttachmentsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []VolumeAttachment instance + Items []VolumeAttachment `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_volume_backups_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_volume_backups_request_response.go new file mode 100644 index 000000000..19bdff08c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_volume_backups_request_response.go @@ -0,0 +1,118 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListVolumeBackupsRequest wrapper for the ListVolumeBackups operation +type ListVolumeBackupsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the volume. + VolumeId *string `mandatory:"false" contributesTo:"query" name:"volumeId"` + + // The maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + 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 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"` +} + +func (request ListVolumeBackupsRequest) String() string { + return common.PointerString(request) +} + +// ListVolumeBackupsResponse wrapper for the ListVolumeBackups operation +type ListVolumeBackupsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []VolumeBackup instance + Items []VolumeBackup `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} + +// ListVolumeBackupsSortByEnum Enum with underlying type: string +type ListVolumeBackupsSortByEnum string + +// Set of constants representing the allowable values for ListVolumeBackupsSortBy +const ( + ListVolumeBackupsSortByTimecreated ListVolumeBackupsSortByEnum = "TIMECREATED" + ListVolumeBackupsSortByDisplayname ListVolumeBackupsSortByEnum = "DISPLAYNAME" +) + +var mappingListVolumeBackupsSortBy = map[string]ListVolumeBackupsSortByEnum{ + "TIMECREATED": ListVolumeBackupsSortByTimecreated, + "DISPLAYNAME": ListVolumeBackupsSortByDisplayname, +} + +// GetListVolumeBackupsSortByEnumValues Enumerates the set of values for ListVolumeBackupsSortBy +func GetListVolumeBackupsSortByEnumValues() []ListVolumeBackupsSortByEnum { + values := make([]ListVolumeBackupsSortByEnum, 0) + for _, v := range mappingListVolumeBackupsSortBy { + values = append(values, v) + } + return values +} + +// ListVolumeBackupsSortOrderEnum Enum with underlying type: string +type ListVolumeBackupsSortOrderEnum string + +// Set of constants representing the allowable values for ListVolumeBackupsSortOrder +const ( + ListVolumeBackupsSortOrderAsc ListVolumeBackupsSortOrderEnum = "ASC" + ListVolumeBackupsSortOrderDesc ListVolumeBackupsSortOrderEnum = "DESC" +) + +var mappingListVolumeBackupsSortOrder = map[string]ListVolumeBackupsSortOrderEnum{ + "ASC": ListVolumeBackupsSortOrderAsc, + "DESC": ListVolumeBackupsSortOrderDesc, +} + +// GetListVolumeBackupsSortOrderEnumValues Enumerates the set of values for ListVolumeBackupsSortOrder +func GetListVolumeBackupsSortOrderEnumValues() []ListVolumeBackupsSortOrderEnum { + values := make([]ListVolumeBackupsSortOrderEnum, 0) + for _, v := range mappingListVolumeBackupsSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/list_volumes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/list_volumes_request_response.go new file mode 100644 index 000000000..20bb4c553 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/list_volumes_request_response.go @@ -0,0 +1,119 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListVolumesRequest wrapper for the ListVolumes operation +type ListVolumesRequest struct { + + // The OCID 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 maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + 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"` + + // 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"` +} + +func (request ListVolumesRequest) String() string { + return common.PointerString(request) +} + +// ListVolumesResponse wrapper for the ListVolumes operation +type ListVolumesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []Volume instance + Items []Volume `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} + +// ListVolumesSortByEnum Enum with underlying type: string +type ListVolumesSortByEnum string + +// Set of constants representing the allowable values for ListVolumesSortBy +const ( + ListVolumesSortByTimecreated ListVolumesSortByEnum = "TIMECREATED" + ListVolumesSortByDisplayname ListVolumesSortByEnum = "DISPLAYNAME" +) + +var mappingListVolumesSortBy = map[string]ListVolumesSortByEnum{ + "TIMECREATED": ListVolumesSortByTimecreated, + "DISPLAYNAME": ListVolumesSortByDisplayname, +} + +// GetListVolumesSortByEnumValues Enumerates the set of values for ListVolumesSortBy +func GetListVolumesSortByEnumValues() []ListVolumesSortByEnum { + values := make([]ListVolumesSortByEnum, 0) + for _, v := range mappingListVolumesSortBy { + values = append(values, v) + } + return values +} + +// ListVolumesSortOrderEnum Enum with underlying type: string +type ListVolumesSortOrderEnum string + +// Set of constants representing the allowable values for ListVolumesSortOrder +const ( + ListVolumesSortOrderAsc ListVolumesSortOrderEnum = "ASC" + ListVolumesSortOrderDesc ListVolumesSortOrderEnum = "DESC" +) + +var mappingListVolumesSortOrder = map[string]ListVolumesSortOrderEnum{ + "ASC": ListVolumesSortOrderAsc, + "DESC": ListVolumesSortOrderDesc, +} + +// GetListVolumesSortOrderEnumValues Enumerates the set of values for ListVolumesSortOrder +func GetListVolumesSortOrderEnumValues() []ListVolumesSortOrderEnum { + values := make([]ListVolumesSortOrderEnum, 0) + for _, v := range mappingListVolumesSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/local_peering_gateway.go b/vendor/github.com/oracle/oci-go-sdk/core/local_peering_gateway.go new file mode 100644 index 000000000..61242c667 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/local_peering_gateway.go @@ -0,0 +1,123 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type LocalPeeringGateway struct { + + // The OCID 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). + 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 date and time the LPG was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID of the VCN the LPG belongs to. + VcnId *string `mandatory:"true" json:"vcnId"` + + // The range of IP addresses available on 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 this as the destination CIDR for a route rule to route a subnet's + // traffic to this LPG. + // Example: `192.168.0.0/16` + PeerAdvertisedCidr *string `mandatory:"false" json:"peerAdvertisedCidr"` + + // Additional information regarding the peering status, if applicable. + PeeringStatusDetails *string `mandatory:"false" json:"peeringStatusDetails"` +} + +func (m LocalPeeringGateway) String() string { + return common.PointerString(m) +} + +// LocalPeeringGatewayLifecycleStateEnum Enum with underlying type: string +type LocalPeeringGatewayLifecycleStateEnum string + +// Set of constants representing the allowable values for LocalPeeringGatewayLifecycleState +const ( + LocalPeeringGatewayLifecycleStateProvisioning LocalPeeringGatewayLifecycleStateEnum = "PROVISIONING" + LocalPeeringGatewayLifecycleStateAvailable LocalPeeringGatewayLifecycleStateEnum = "AVAILABLE" + LocalPeeringGatewayLifecycleStateTerminating LocalPeeringGatewayLifecycleStateEnum = "TERMINATING" + LocalPeeringGatewayLifecycleStateTerminated LocalPeeringGatewayLifecycleStateEnum = "TERMINATED" +) + +var mappingLocalPeeringGatewayLifecycleState = map[string]LocalPeeringGatewayLifecycleStateEnum{ + "PROVISIONING": LocalPeeringGatewayLifecycleStateProvisioning, + "AVAILABLE": LocalPeeringGatewayLifecycleStateAvailable, + "TERMINATING": LocalPeeringGatewayLifecycleStateTerminating, + "TERMINATED": LocalPeeringGatewayLifecycleStateTerminated, +} + +// GetLocalPeeringGatewayLifecycleStateEnumValues Enumerates the set of values for LocalPeeringGatewayLifecycleState +func GetLocalPeeringGatewayLifecycleStateEnumValues() []LocalPeeringGatewayLifecycleStateEnum { + values := make([]LocalPeeringGatewayLifecycleStateEnum, 0) + for _, v := range mappingLocalPeeringGatewayLifecycleState { + values = append(values, v) + } + return values +} + +// LocalPeeringGatewayPeeringStatusEnum Enum with underlying type: string +type LocalPeeringGatewayPeeringStatusEnum string + +// Set of constants representing the allowable values for LocalPeeringGatewayPeeringStatus +const ( + LocalPeeringGatewayPeeringStatusInvalid LocalPeeringGatewayPeeringStatusEnum = "INVALID" + LocalPeeringGatewayPeeringStatusNew LocalPeeringGatewayPeeringStatusEnum = "NEW" + LocalPeeringGatewayPeeringStatusPeered LocalPeeringGatewayPeeringStatusEnum = "PEERED" + LocalPeeringGatewayPeeringStatusPending LocalPeeringGatewayPeeringStatusEnum = "PENDING" + LocalPeeringGatewayPeeringStatusRevoked LocalPeeringGatewayPeeringStatusEnum = "REVOKED" +) + +var mappingLocalPeeringGatewayPeeringStatus = map[string]LocalPeeringGatewayPeeringStatusEnum{ + "INVALID": LocalPeeringGatewayPeeringStatusInvalid, + "NEW": LocalPeeringGatewayPeeringStatusNew, + "PEERED": LocalPeeringGatewayPeeringStatusPeered, + "PENDING": LocalPeeringGatewayPeeringStatusPending, + "REVOKED": LocalPeeringGatewayPeeringStatusRevoked, +} + +// GetLocalPeeringGatewayPeeringStatusEnumValues Enumerates the set of values for LocalPeeringGatewayPeeringStatus +func GetLocalPeeringGatewayPeeringStatusEnumValues() []LocalPeeringGatewayPeeringStatusEnum { + values := make([]LocalPeeringGatewayPeeringStatusEnum, 0) + for _, v := range mappingLocalPeeringGatewayPeeringStatus { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/port_range.go b/vendor/github.com/oracle/oci-go-sdk/core/port_range.go new file mode 100644 index 000000000..f01332769 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/port_range.go @@ -0,0 +1,28 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// PortRange The representation of PortRange +type PortRange struct { + + // The maximum port number. Must not be lower 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. Must not be greater than the maximum port number. + Min *int `mandatory:"true" json:"min"` +} + +func (m PortRange) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/private_ip.go b/vendor/github.com/oracle/oci-go-sdk/core/private_ip.go new file mode 100644 index 000000000..7ae7b37a0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/private_ip.go @@ -0,0 +1,89 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// PrivateIp A *private IP* is a conceptual term that refers to a private IP address and related properties. +// The `privateIp` object is the API representation of a private IP. +// 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.us-phoenix-1.oraclecloud.com/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. +// 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type PrivateIp struct { + + // The private IP's Availability Domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // The OCID of the compartment containing the private IP. + 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 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, `bminstance-1` in FQDN `bminstance-1.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.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm). + // Example: `bminstance-1` + HostnameLabel *string `mandatory:"false" json:"hostnameLabel"` + + // The private IP's Oracle ID (OCID). + 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. + // Example: `10.0.3.3` + IpAddress *string `mandatory:"false" json:"ipAddress"` + + // 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"` + + // The OCID of the subnet the VNIC is in. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // The date and time the private IP was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The OCID of the VNIC the private IP is assigned to. The VNIC and private IP + // must be in the same subnet. + VnicId *string `mandatory:"false" json:"vnicId"` +} + +func (m PrivateIp) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/route_rule.go b/vendor/github.com/oracle/oci-go-sdk/core/route_rule.go new file mode 100644 index 000000000..11b0e1b2a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/route_rule.go @@ -0,0 +1,32 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// RouteRule A mapping between a destination IP address range and a virtual device to route matching +// packets to (a target). +type RouteRule struct { + + // A destination IP address range in CIDR notation. Matching packets will + // be routed to the indicated network entity (the target). + // Example: `0.0.0.0/0` + CidrBlock *string `mandatory:"true" json:"cidrBlock"` + + // The OCID for the route rule's target. For information about the type of + // targets you can specify, see + // Route Tables (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.htm). + NetworkEntityId *string `mandatory:"true" json:"networkEntityId"` +} + +func (m RouteRule) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/route_table.go b/vendor/github.com/oracle/oci-go-sdk/core/route_table.go new file mode 100644 index 000000000..f255d131c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/route_table.go @@ -0,0 +1,76 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type RouteTable struct { + + // The OCID of the compartment containing the route table. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The route table's Oracle ID (OCID). + 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 of the VCN the route table list belongs to. + VcnId *string `mandatory:"true" json:"vcnId"` + + // 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 route table was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m RouteTable) String() string { + return common.PointerString(m) +} + +// RouteTableLifecycleStateEnum Enum with underlying type: string +type RouteTableLifecycleStateEnum string + +// Set of constants representing the allowable values for RouteTableLifecycleState +const ( + RouteTableLifecycleStateProvisioning RouteTableLifecycleStateEnum = "PROVISIONING" + RouteTableLifecycleStateAvailable RouteTableLifecycleStateEnum = "AVAILABLE" + RouteTableLifecycleStateTerminating RouteTableLifecycleStateEnum = "TERMINATING" + RouteTableLifecycleStateTerminated RouteTableLifecycleStateEnum = "TERMINATED" +) + +var mappingRouteTableLifecycleState = map[string]RouteTableLifecycleStateEnum{ + "PROVISIONING": RouteTableLifecycleStateProvisioning, + "AVAILABLE": RouteTableLifecycleStateAvailable, + "TERMINATING": RouteTableLifecycleStateTerminating, + "TERMINATED": RouteTableLifecycleStateTerminated, +} + +// GetRouteTableLifecycleStateEnumValues Enumerates the set of values for RouteTableLifecycleState +func GetRouteTableLifecycleStateEnumValues() []RouteTableLifecycleStateEnum { + values := make([]RouteTableLifecycleStateEnum, 0) + for _, v := range mappingRouteTableLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/security_list.go b/vendor/github.com/oracle/oci-go-sdk/core/security_list.go new file mode 100644 index 000000000..d55bcd206 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/security_list.go @@ -0,0 +1,84 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/securitylists.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 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type SecurityList struct { + + // The OCID 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). + 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. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID of the VCN the security list belongs to. + VcnId *string `mandatory:"true" json:"vcnId"` +} + +func (m SecurityList) String() string { + return common.PointerString(m) +} + +// SecurityListLifecycleStateEnum Enum with underlying type: string +type SecurityListLifecycleStateEnum string + +// Set of constants representing the allowable values for SecurityListLifecycleState +const ( + SecurityListLifecycleStateProvisioning SecurityListLifecycleStateEnum = "PROVISIONING" + SecurityListLifecycleStateAvailable SecurityListLifecycleStateEnum = "AVAILABLE" + SecurityListLifecycleStateTerminating SecurityListLifecycleStateEnum = "TERMINATING" + SecurityListLifecycleStateTerminated SecurityListLifecycleStateEnum = "TERMINATED" +) + +var mappingSecurityListLifecycleState = map[string]SecurityListLifecycleStateEnum{ + "PROVISIONING": SecurityListLifecycleStateProvisioning, + "AVAILABLE": SecurityListLifecycleStateAvailable, + "TERMINATING": SecurityListLifecycleStateTerminating, + "TERMINATED": SecurityListLifecycleStateTerminated, +} + +// GetSecurityListLifecycleStateEnumValues Enumerates the set of values for SecurityListLifecycleState +func GetSecurityListLifecycleStateEnumValues() []SecurityListLifecycleStateEnum { + values := make([]SecurityListLifecycleStateEnum, 0) + for _, v := range mappingSecurityListLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/shape.go b/vendor/github.com/oracle/oci-go-sdk/core/shape.go new file mode 100644 index 000000000..7cb572cff --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/shape.go @@ -0,0 +1,26 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Shape A compute instance shape that can be used in LaunchInstance. +// For more information, see Overview of the Compute Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Concepts/computeoverview.htm). +type Shape struct { + + // The name of the shape. You can enumerate all available shapes by calling + // ListShapes. + Shape *string `mandatory:"true" json:"shape"` +} + +func (m Shape) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/subnet.go b/vendor/github.com/oracle/oci-go-sdk/core/subnet.go new file mode 100644 index 000000000..d765cefce --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/subnet.go @@ -0,0 +1,131 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Subnet A logical subdivision of a VCN. Each subnet exists in a single Availability Domain and +// 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.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/overview.htm) and +// VCNs and Subnets (https://docs.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type Subnet struct { + + // The subnet's Availability Domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The subnet's CIDR block. + // Example: `172.16.1.0/24` + CidrBlock *string `mandatory:"true" json:"cidrBlock"` + + // The OCID of the compartment containing the subnet. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The subnet's Oracle ID (OCID). + Id *string `mandatory:"true" json:"id"` + + // The subnet's current state. + LifecycleState SubnetLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The OCID of the route table the subnet is using. + RouteTableId *string `mandatory:"true" json:"routeTableId"` + + // The OCID of the VCN the subnet is in. + VcnId *string `mandatory:"true" json:"vcnId"` + + // The IP address of the virtual router. + // Example: `10.0.14.1` + VirtualRouterIp *string `mandatory:"true" json:"virtualRouterIp"` + + // The MAC address of the virtual router. + // Example: `00:00:17:B6:4D:DD` + VirtualRouterMac *string `mandatory:"true" json:"virtualRouterMac"` + + // The OCID of the set of DHCP options associated with the subnet. + 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, `bminstance-1.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.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm). + // Example: `subnet123` + DnsLabel *string `mandatory:"false" json:"dnsLabel"` + + // 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"` + + // OCIDs for the security lists to use for VNICs in this 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.us-phoenix-1.oraclecloud.com/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. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m Subnet) String() string { + return common.PointerString(m) +} + +// SubnetLifecycleStateEnum Enum with underlying type: string +type SubnetLifecycleStateEnum string + +// Set of constants representing the allowable values for SubnetLifecycleState +const ( + SubnetLifecycleStateProvisioning SubnetLifecycleStateEnum = "PROVISIONING" + SubnetLifecycleStateAvailable SubnetLifecycleStateEnum = "AVAILABLE" + SubnetLifecycleStateTerminating SubnetLifecycleStateEnum = "TERMINATING" + SubnetLifecycleStateTerminated SubnetLifecycleStateEnum = "TERMINATED" +) + +var mappingSubnetLifecycleState = map[string]SubnetLifecycleStateEnum{ + "PROVISIONING": SubnetLifecycleStateProvisioning, + "AVAILABLE": SubnetLifecycleStateAvailable, + "TERMINATING": SubnetLifecycleStateTerminating, + "TERMINATED": SubnetLifecycleStateTerminated, +} + +// GetSubnetLifecycleStateEnumValues Enumerates the set of values for SubnetLifecycleState +func GetSubnetLifecycleStateEnumValues() []SubnetLifecycleStateEnum { + values := make([]SubnetLifecycleStateEnum, 0) + for _, v := range mappingSubnetLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/tcp_options.go b/vendor/github.com/oracle/oci-go-sdk/core/tcp_options.go new file mode 100644 index 000000000..4037afbe8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/tcp_options.go @@ -0,0 +1,30 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// TcpOptions Optional object to specify ports for a TCP rule. If you specify TCP as the +// protocol but omit this object, then all ports are allowed. +type TcpOptions struct { + + // An inclusive range of allowed destination ports. Use the same number for the min and max + // to indicate a single port. Defaults to all ports if not specified. + DestinationPortRange *PortRange `mandatory:"false" json:"destinationPortRange"` + + // An inclusive range of allowed source ports. Use the same number for the min and max to + // indicate a single port. Defaults to all ports if not specified. + SourcePortRange *PortRange `mandatory:"false" json:"sourcePortRange"` +} + +func (m TcpOptions) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/terminate_instance_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/terminate_instance_request_response.go new file mode 100644 index 000000000..085b4c5d8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/terminate_instance_request_response.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// TerminateInstanceRequest wrapper for the TerminateInstance operation +type TerminateInstanceRequest struct { + + // The OCID 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. + // The default value is false. + PreserveBootVolume *bool `mandatory:"false" contributesTo:"query" name:"preserveBootVolume"` +} + +func (request TerminateInstanceRequest) String() string { + return common.PointerString(request) +} + +// 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"` +} + +func (response TerminateInstanceResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/tunnel_config.go b/vendor/github.com/oracle/oci-go-sdk/core/tunnel_config.go new file mode 100644 index 000000000..fe12d0997 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/tunnel_config.go @@ -0,0 +1,33 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// TunnelConfig Specific connection details for an IPSec tunnel. +type TunnelConfig struct { + + // The IP address of Oracle's VPN headend. + // Example: `129.146.17.50` + IpAddress *string `mandatory:"true" json:"ipAddress"` + + // The shared secret of the IPSec tunnel. + // Example: `vFG2IF6TWq4UToUiLSRDoJEUs6j1c.p8G.dVQxiMfMO0yXMLi.lZTbYIWhGu4V8o` + SharedSecret *string `mandatory:"true" json:"sharedSecret"` + + // The date and time the IPSec connection was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m TunnelConfig) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/tunnel_status.go b/vendor/github.com/oracle/oci-go-sdk/core/tunnel_status.go new file mode 100644 index 000000000..c2655abc8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/tunnel_status.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// TunnelStatus Specific connection details for an IPSec tunnel. +type TunnelStatus struct { + + // The IP address of Oracle's VPN headend. + // Example: `129.146.17.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. + // 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. + // Example: `2016-08-25T21:10:29.600Z` + TimeStateModified *common.SDKTime `mandatory:"false" json:"timeStateModified"` +} + +func (m TunnelStatus) String() string { + return common.PointerString(m) +} + +// TunnelStatusLifecycleStateEnum Enum with underlying type: string +type TunnelStatusLifecycleStateEnum string + +// Set of constants representing the allowable values for TunnelStatusLifecycleState +const ( + TunnelStatusLifecycleStateUp TunnelStatusLifecycleStateEnum = "UP" + TunnelStatusLifecycleStateDown TunnelStatusLifecycleStateEnum = "DOWN" + TunnelStatusLifecycleStateDownForMaintenance TunnelStatusLifecycleStateEnum = "DOWN_FOR_MAINTENANCE" +) + +var mappingTunnelStatusLifecycleState = map[string]TunnelStatusLifecycleStateEnum{ + "UP": TunnelStatusLifecycleStateUp, + "DOWN": TunnelStatusLifecycleStateDown, + "DOWN_FOR_MAINTENANCE": TunnelStatusLifecycleStateDownForMaintenance, +} + +// GetTunnelStatusLifecycleStateEnumValues Enumerates the set of values for TunnelStatusLifecycleState +func GetTunnelStatusLifecycleStateEnumValues() []TunnelStatusLifecycleStateEnum { + values := make([]TunnelStatusLifecycleStateEnum, 0) + for _, v := range mappingTunnelStatusLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/udp_options.go b/vendor/github.com/oracle/oci-go-sdk/core/udp_options.go new file mode 100644 index 000000000..c68886ee2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/udp_options.go @@ -0,0 +1,30 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UdpOptions Optional object to specify ports for a UDP rule. If you specify UDP as the +// protocol but omit this object, then all ports are allowed. +type UdpOptions struct { + + // An inclusive range of allowed destination ports. Use the same number for the min and max + // to indicate a single port. Defaults to all ports if not specified. + DestinationPortRange *PortRange `mandatory:"false" json:"destinationPortRange"` + + // An inclusive range of allowed source ports. Use the same number for the min and max to + // indicate a single port. Defaults to all ports if not specified. + SourcePortRange *PortRange `mandatory:"false" json:"sourcePortRange"` +} + +func (m UdpOptions) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_boot_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_boot_volume_details.go new file mode 100644 index 000000000..ead6727c7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_boot_volume_details.go @@ -0,0 +1,25 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateBootVolumeDetails The representation of UpdateBootVolumeDetails +type UpdateBootVolumeDetails 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"` +} + +func (m UpdateBootVolumeDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_boot_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_boot_volume_request_response.go new file mode 100644 index 000000000..08ea32ad4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_boot_volume_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateBootVolumeRequest wrapper for the UpdateBootVolume operation +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"` +} + +func (request UpdateBootVolumeRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_console_history_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_console_history_details.go new file mode 100644 index 000000000..cfecb4ead --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_console_history_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateConsoleHistoryDetails The representation of UpdateConsoleHistoryDetails +type UpdateConsoleHistoryDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m UpdateConsoleHistoryDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_console_history_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_console_history_request_response.go new file mode 100644 index 000000000..c9bc64732 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_console_history_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateConsoleHistoryRequest wrapper for the UpdateConsoleHistory operation +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"` +} + +func (request UpdateConsoleHistoryRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_cpe_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_cpe_details.go new file mode 100644 index 000000000..bd0daa6ef --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_cpe_details.go @@ -0,0 +1,25 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateCpeDetails The representation of UpdateCpeDetails +type UpdateCpeDetails 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"` +} + +func (m UpdateCpeDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_cpe_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_cpe_request_response.go new file mode 100644 index 000000000..a87170834 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_cpe_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateCpeRequest wrapper for the UpdateCpe operation +type UpdateCpeRequest struct { + + // The OCID 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"` +} + +func (request UpdateCpeRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_cross_connect_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_cross_connect_details.go new file mode 100644 index 000000000..4cfa19004 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_cross_connect_details.go @@ -0,0 +1,31 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateCrossConnectDetails Update a CrossConnect +type UpdateCrossConnectDetails 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"` + + // 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"` +} + +func (m UpdateCrossConnectDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_cross_connect_group_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_cross_connect_group_details.go new file mode 100644 index 000000000..97a424d29 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_cross_connect_group_details.go @@ -0,0 +1,25 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateCrossConnectGroupDetails The representation of UpdateCrossConnectGroupDetails +type UpdateCrossConnectGroupDetails 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"` +} + +func (m UpdateCrossConnectGroupDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_cross_connect_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_cross_connect_group_request_response.go new file mode 100644 index 000000000..23164788c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_cross_connect_group_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateCrossConnectGroupRequest wrapper for the UpdateCrossConnectGroup operation +type UpdateCrossConnectGroupRequest struct { + + // The OCID 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"` +} + +func (request UpdateCrossConnectGroupRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_cross_connect_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_cross_connect_request_response.go new file mode 100644 index 000000000..8af219a51 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_cross_connect_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateCrossConnectRequest wrapper for the UpdateCrossConnect operation +type UpdateCrossConnectRequest struct { + + // The OCID 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"` +} + +func (request UpdateCrossConnectRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_dhcp_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_dhcp_details.go new file mode 100644 index 000000000..b2e221a13 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_dhcp_details.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateDhcpDetails The representation of UpdateDhcpDetails +type UpdateDhcpDetails 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"` + + Options []DhcpOption `mandatory:"false" json:"options"` +} + +func (m UpdateDhcpDetails) String() string { + return common.PointerString(m) +} + +// UnmarshalJSON unmarshals from json +func (m *UpdateDhcpDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DisplayName *string `json:"displayName"` + Options []dhcpoption `json:"options"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + m.DisplayName = model.DisplayName + m.Options = make([]DhcpOption, len(model.Options)) + for i, n := range model.Options { + nn, err := n.UnmarshalPolymorphicJSON(n.JsonData) + if err != nil { + return err + } + m.Options[i] = nn + } + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_dhcp_options_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_dhcp_options_request_response.go new file mode 100644 index 000000000..c8b6e542d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_dhcp_options_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateDhcpOptionsRequest wrapper for the UpdateDhcpOptions operation +type UpdateDhcpOptionsRequest struct { + + // The OCID 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"` +} + +func (request UpdateDhcpOptionsRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_drg_attachment_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_drg_attachment_details.go new file mode 100644 index 000000000..876f22c9d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_drg_attachment_details.go @@ -0,0 +1,25 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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"` +} + +func (m UpdateDrgAttachmentDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_drg_attachment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_drg_attachment_request_response.go new file mode 100644 index 000000000..c0580c97c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_drg_attachment_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateDrgAttachmentRequest wrapper for the UpdateDrgAttachment operation +type UpdateDrgAttachmentRequest struct { + + // The OCID 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"` +} + +func (request UpdateDrgAttachmentRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_drg_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_drg_details.go new file mode 100644 index 000000000..2e64240b5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_drg_details.go @@ -0,0 +1,25 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateDrgDetails The representation of UpdateDrgDetails +type UpdateDrgDetails 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"` +} + +func (m UpdateDrgDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_drg_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_drg_request_response.go new file mode 100644 index 000000000..0aba53e12 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_drg_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateDrgRequest wrapper for the UpdateDrg operation +type UpdateDrgRequest struct { + + // The OCID 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"` +} + +func (request UpdateDrgRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_i_p_sec_connection_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_i_p_sec_connection_request_response.go new file mode 100644 index 000000000..ad809bea8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_i_p_sec_connection_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateIPSecConnectionRequest wrapper for the UpdateIPSecConnection operation +type UpdateIPSecConnectionRequest struct { + + // The OCID of the IPSec connection. + IpscId *string `mandatory:"true" contributesTo:"path" name:"ipscId"` + + // Details object for updating a 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"` +} + +func (request UpdateIPSecConnectionRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_image_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_image_details.go new file mode 100644 index 000000000..f3c35d5fa --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_image_details.go @@ -0,0 +1,26 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateImageDetails The representation of UpdateImageDetails +type UpdateImageDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My custom Oracle Linux image` + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m UpdateImageDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_image_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_image_request_response.go new file mode 100644 index 000000000..6757b1d1a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_image_request_response.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateImageRequest wrapper for the UpdateImage operation +type UpdateImageRequest struct { + + // The OCID 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"` +} + +func (request UpdateImageRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_instance_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_instance_details.go new file mode 100644 index 000000000..e18c8c402 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_instance_details.go @@ -0,0 +1,26 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateInstanceDetails The representation of UpdateInstanceDetails +type UpdateInstanceDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My bare metal instance` + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m UpdateInstanceDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_instance_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_instance_request_response.go new file mode 100644 index 000000000..3705804cd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_instance_request_response.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateInstanceRequest wrapper for the UpdateInstance operation +type UpdateInstanceRequest struct { + + // The OCID 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"` +} + +func (request UpdateInstanceRequest) String() string { + return common.PointerString(request) +} + +// 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"` +} + +func (response UpdateInstanceResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_internet_gateway_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_internet_gateway_details.go new file mode 100644 index 000000000..9410eeef1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_internet_gateway_details.go @@ -0,0 +1,28 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateInternetGatewayDetails The representation of UpdateInternetGatewayDetails +type UpdateInternetGatewayDetails 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 gateway is enabled. + IsEnabled *bool `mandatory:"false" json:"isEnabled"` +} + +func (m UpdateInternetGatewayDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_internet_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_internet_gateway_request_response.go new file mode 100644 index 000000000..a81ca3093 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_internet_gateway_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateInternetGatewayRequest wrapper for the UpdateInternetGateway operation +type UpdateInternetGatewayRequest struct { + + // The OCID 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"` +} + +func (request UpdateInternetGatewayRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_ip_sec_connection_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_ip_sec_connection_details.go new file mode 100644 index 000000000..b6834690b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_ip_sec_connection_details.go @@ -0,0 +1,25 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateIpSecConnectionDetails The representation of UpdateIpSecConnectionDetails +type UpdateIpSecConnectionDetails 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"` +} + +func (m UpdateIpSecConnectionDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_local_peering_gateway_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_local_peering_gateway_details.go new file mode 100644 index 000000000..7b9d10083 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_local_peering_gateway_details.go @@ -0,0 +1,25 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateLocalPeeringGatewayDetails The representation of UpdateLocalPeeringGatewayDetails +type UpdateLocalPeeringGatewayDetails 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"` +} + +func (m UpdateLocalPeeringGatewayDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_local_peering_gateway_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_local_peering_gateway_request_response.go new file mode 100644 index 000000000..093c48638 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_local_peering_gateway_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateLocalPeeringGatewayRequest wrapper for the UpdateLocalPeeringGateway operation +type UpdateLocalPeeringGatewayRequest struct { + + // The OCID 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"` +} + +func (request UpdateLocalPeeringGatewayRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_private_ip_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_private_ip_details.go new file mode 100644 index 000000000..96c7a2a74 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_private_ip_details.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdatePrivateIpDetails The representation of UpdatePrivateIpDetails +type UpdatePrivateIpDetails 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 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, `bminstance-1` in FQDN `bminstance-1.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.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm). + // Example: `bminstance-1` + HostnameLabel *string `mandatory:"false" json:"hostnameLabel"` + + // The OCID 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"` +} + +func (m UpdatePrivateIpDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_private_ip_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_private_ip_request_response.go new file mode 100644 index 000000000..ae74cf5c7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_private_ip_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdatePrivateIpRequest wrapper for the UpdatePrivateIp operation +type UpdatePrivateIpRequest struct { + + // The private IP's OCID. + 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"` +} + +func (request UpdatePrivateIpRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_route_table_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_route_table_details.go new file mode 100644 index 000000000..547a1b2b9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_route_table_details.go @@ -0,0 +1,28 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateRouteTableDetails The representation of UpdateRouteTableDetails +type UpdateRouteTableDetails 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 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_route_table_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_route_table_request_response.go new file mode 100644 index 000000000..5323576a9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_route_table_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateRouteTableRequest wrapper for the UpdateRouteTable operation +type UpdateRouteTableRequest struct { + + // The OCID 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"` +} + +func (request UpdateRouteTableRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_security_list_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_security_list_details.go new file mode 100644 index 000000000..d23a3f75c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_security_list_details.go @@ -0,0 +1,31 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateSecurityListDetails The representation of UpdateSecurityListDetails +type UpdateSecurityListDetails 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"` + + // Rules for allowing egress IP packets. + EgressSecurityRules []EgressSecurityRule `mandatory:"false" json:"egressSecurityRules"` + + // Rules for allowing ingress IP packets. + IngressSecurityRules []IngressSecurityRule `mandatory:"false" json:"ingressSecurityRules"` +} + +func (m UpdateSecurityListDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_security_list_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_security_list_request_response.go new file mode 100644 index 000000000..d9e7b468d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_security_list_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateSecurityListRequest wrapper for the UpdateSecurityList operation +type UpdateSecurityListRequest struct { + + // The OCID 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"` +} + +func (request UpdateSecurityListRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_subnet_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_subnet_details.go new file mode 100644 index 000000000..e15eaa013 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_subnet_details.go @@ -0,0 +1,25 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateSubnetDetails The representation of UpdateSubnetDetails +type UpdateSubnetDetails 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"` +} + +func (m UpdateSubnetDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_subnet_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_subnet_request_response.go new file mode 100644 index 000000000..1dec9a727 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_subnet_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateSubnetRequest wrapper for the UpdateSubnet operation +type UpdateSubnetRequest struct { + + // The OCID 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"` +} + +func (request UpdateSubnetRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_vcn_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_vcn_details.go new file mode 100644 index 000000000..e4dca15cd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_vcn_details.go @@ -0,0 +1,25 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateVcnDetails The representation of UpdateVcnDetails +type UpdateVcnDetails 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"` +} + +func (m UpdateVcnDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_vcn_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_vcn_request_response.go new file mode 100644 index 000000000..37e483eb0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_vcn_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateVcnRequest wrapper for the UpdateVcn operation +type UpdateVcnRequest struct { + + // The OCID 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"` +} + +func (request UpdateVcnRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_virtual_circuit_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_virtual_circuit_details.go new file mode 100644 index 000000000..cbfaf178f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_virtual_circuit_details.go @@ -0,0 +1,90 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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 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. + CustomerBgpAsn *int `mandatory:"false" json:"customerBgpAsn"` + + // A user-friendly name. Does not have to be unique. + // Avoid entering confidential information. + // To be updated only by the customer who owns the virtual circuit. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The OCID 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"` + + // 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"` +} + +func (m UpdateVirtualCircuitDetails) String() string { + return common.PointerString(m) +} + +// UpdateVirtualCircuitDetailsProviderStateEnum Enum with underlying type: string +type UpdateVirtualCircuitDetailsProviderStateEnum string + +// Set of constants representing the allowable values for UpdateVirtualCircuitDetailsProviderState +const ( + UpdateVirtualCircuitDetailsProviderStateActive UpdateVirtualCircuitDetailsProviderStateEnum = "ACTIVE" + UpdateVirtualCircuitDetailsProviderStateInactive UpdateVirtualCircuitDetailsProviderStateEnum = "INACTIVE" +) + +var mappingUpdateVirtualCircuitDetailsProviderState = map[string]UpdateVirtualCircuitDetailsProviderStateEnum{ + "ACTIVE": UpdateVirtualCircuitDetailsProviderStateActive, + "INACTIVE": UpdateVirtualCircuitDetailsProviderStateInactive, +} + +// GetUpdateVirtualCircuitDetailsProviderStateEnumValues Enumerates the set of values for UpdateVirtualCircuitDetailsProviderState +func GetUpdateVirtualCircuitDetailsProviderStateEnumValues() []UpdateVirtualCircuitDetailsProviderStateEnum { + values := make([]UpdateVirtualCircuitDetailsProviderStateEnum, 0) + for _, v := range mappingUpdateVirtualCircuitDetailsProviderState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_virtual_circuit_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_virtual_circuit_request_response.go new file mode 100644 index 000000000..7f2a8df15 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_virtual_circuit_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateVirtualCircuitRequest wrapper for the UpdateVirtualCircuit operation +type UpdateVirtualCircuitRequest struct { + + // The OCID 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"` +} + +func (request UpdateVirtualCircuitRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_vnic_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_vnic_details.go new file mode 100644 index 000000000..6eb74fde7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_vnic_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateVnicDetails The representation of UpdateVnicDetails +type UpdateVnicDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + DisplayName *string `mandatory:"false" json:"displayName"` + + // 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, `bminstance-1` in FQDN `bminstance-1.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.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm). + HostnameLabel *string `mandatory:"false" json:"hostnameLabel"` + + // 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.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.htm#privateip). + // Example: `true` + SkipSourceDestCheck *bool `mandatory:"false" json:"skipSourceDestCheck"` +} + +func (m UpdateVnicDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_vnic_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_vnic_request_response.go new file mode 100644 index 000000000..9bacd4eb5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_vnic_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateVnicRequest wrapper for the UpdateVnic operation +type UpdateVnicRequest struct { + + // The OCID 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"` +} + +func (request UpdateVnicRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_volume_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_volume_backup_details.go new file mode 100644 index 000000000..05be76e2b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_volume_backup_details.go @@ -0,0 +1,25 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateVolumeBackupDetails The representation of UpdateVolumeBackupDetails +type UpdateVolumeBackupDetails struct { + + // A friendly user-specified name for the volume backup. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m UpdateVolumeBackupDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_volume_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_volume_backup_request_response.go new file mode 100644 index 000000000..e98d05109 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_volume_backup_request_response.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateVolumeBackupRequest wrapper for the UpdateVolumeBackup operation +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"` +} + +func (request UpdateVolumeBackupRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/core/update_volume_details.go new file mode 100644 index 000000000..e0b642bd7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_volume_details.go @@ -0,0 +1,25 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateVolumeDetails The representation of UpdateVolumeDetails +type UpdateVolumeDetails 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"` +} + +func (m UpdateVolumeDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/update_volume_request_response.go b/vendor/github.com/oracle/oci-go-sdk/core/update_volume_request_response.go new file mode 100644 index 000000000..b8b044f97 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/update_volume_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateVolumeRequest wrapper for the UpdateVolume operation +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"` +} + +func (request UpdateVolumeRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/vcn.go b/vendor/github.com/oracle/oci-go-sdk/core/vcn.go new file mode 100644 index 000000000..8077a531d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/vcn.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Vcn A Virtual Cloud Network (VCN). For more information, see +// Overview of the Networking Service (https://docs.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type Vcn struct { + + // The CIDR IP address block of the VCN. + // Example: `172.16.0.0/16` + CidrBlock *string `mandatory:"true" json:"cidrBlock"` + + // The OCID of the compartment containing the VCN. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The VCN's Oracle ID (OCID). + Id *string `mandatory:"true" json:"id"` + + // The VCN's current state. + LifecycleState VcnLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The OCID for the VCN's default set of DHCP options. + DefaultDhcpOptionsId *string `mandatory:"false" json:"defaultDhcpOptionsId"` + + // The OCID for the VCN's default route table. + DefaultRouteTableId *string `mandatory:"false" json:"defaultRouteTableId"` + + // The OCID for the VCN's default security list. + DefaultSecurityListId *string `mandatory:"false" json:"defaultSecurityListId"` + + // 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, `bminstance-1.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.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm). + // Example: `vcn1` + DnsLabel *string `mandatory:"false" json:"dnsLabel"` + + // The date and time the VCN was created, in the format defined by 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.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm). + // Example: `vcn1.oraclevcn.com` + VcnDomainName *string `mandatory:"false" json:"vcnDomainName"` +} + +func (m Vcn) String() string { + return common.PointerString(m) +} + +// VcnLifecycleStateEnum Enum with underlying type: string +type VcnLifecycleStateEnum string + +// Set of constants representing the allowable values for VcnLifecycleState +const ( + VcnLifecycleStateProvisioning VcnLifecycleStateEnum = "PROVISIONING" + VcnLifecycleStateAvailable VcnLifecycleStateEnum = "AVAILABLE" + VcnLifecycleStateTerminating VcnLifecycleStateEnum = "TERMINATING" + VcnLifecycleStateTerminated VcnLifecycleStateEnum = "TERMINATED" +) + +var mappingVcnLifecycleState = map[string]VcnLifecycleStateEnum{ + "PROVISIONING": VcnLifecycleStateProvisioning, + "AVAILABLE": VcnLifecycleStateAvailable, + "TERMINATING": VcnLifecycleStateTerminating, + "TERMINATED": VcnLifecycleStateTerminated, +} + +// GetVcnLifecycleStateEnumValues Enumerates the set of values for VcnLifecycleState +func GetVcnLifecycleStateEnumValues() []VcnLifecycleStateEnum { + values := make([]VcnLifecycleStateEnum, 0) + for _, v := range mappingVcnLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/virtual_circuit.go b/vendor/github.com/oracle/oci-go-sdk/core/virtual_circuit.go new file mode 100644 index 000000000..492c84bf4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/virtual_circuit.go @@ -0,0 +1,273 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type VirtualCircuit struct { + + // The provisioned data rate of the connection. + BandwidthShapeName *string `mandatory:"false" json:"bandwidthShapeName"` + + // BGP management option. + BgpManagement VirtualCircuitBgpManagementEnum `mandatory:"false" json:"bgpManagement,omitempty"` + + // The state of the BGP session associated with the virtual circuit. + BgpSessionState VirtualCircuitBgpSessionStateEnum `mandatory:"false" json:"bgpSessionState,omitempty"` + + // The OCID 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 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. + CustomerBgpAsn *int `mandatory:"false" json:"customerBgpAsn"` + + // 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 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). + Id *string `mandatory:"false" json:"id"` + + // The virtual circuit's current state. For information about + // the different states, see + // FastConnect Overview (https://docs.us-phoenix-1.oraclecloud.com/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 of the service offered by the provider (if the customer is connecting via a provider). + ProviderServiceId *string `mandatory:"false" json:"providerServiceId"` + + // 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. Each prefix must be /24 or less specific. + 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. + // 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.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm). + Type VirtualCircuitTypeEnum `mandatory:"false" json:"type,omitempty"` +} + +func (m VirtualCircuit) String() string { + return common.PointerString(m) +} + +// VirtualCircuitBgpManagementEnum Enum with underlying type: string +type VirtualCircuitBgpManagementEnum string + +// Set of constants representing the allowable values for VirtualCircuitBgpManagement +const ( + VirtualCircuitBgpManagementCustomerManaged VirtualCircuitBgpManagementEnum = "CUSTOMER_MANAGED" + VirtualCircuitBgpManagementProviderManaged VirtualCircuitBgpManagementEnum = "PROVIDER_MANAGED" + VirtualCircuitBgpManagementOracleManaged VirtualCircuitBgpManagementEnum = "ORACLE_MANAGED" +) + +var mappingVirtualCircuitBgpManagement = map[string]VirtualCircuitBgpManagementEnum{ + "CUSTOMER_MANAGED": VirtualCircuitBgpManagementCustomerManaged, + "PROVIDER_MANAGED": VirtualCircuitBgpManagementProviderManaged, + "ORACLE_MANAGED": VirtualCircuitBgpManagementOracleManaged, +} + +// GetVirtualCircuitBgpManagementEnumValues Enumerates the set of values for VirtualCircuitBgpManagement +func GetVirtualCircuitBgpManagementEnumValues() []VirtualCircuitBgpManagementEnum { + values := make([]VirtualCircuitBgpManagementEnum, 0) + for _, v := range mappingVirtualCircuitBgpManagement { + values = append(values, v) + } + return values +} + +// VirtualCircuitBgpSessionStateEnum Enum with underlying type: string +type VirtualCircuitBgpSessionStateEnum string + +// Set of constants representing the allowable values for VirtualCircuitBgpSessionState +const ( + VirtualCircuitBgpSessionStateUp VirtualCircuitBgpSessionStateEnum = "UP" + VirtualCircuitBgpSessionStateDown VirtualCircuitBgpSessionStateEnum = "DOWN" +) + +var mappingVirtualCircuitBgpSessionState = map[string]VirtualCircuitBgpSessionStateEnum{ + "UP": VirtualCircuitBgpSessionStateUp, + "DOWN": VirtualCircuitBgpSessionStateDown, +} + +// GetVirtualCircuitBgpSessionStateEnumValues Enumerates the set of values for VirtualCircuitBgpSessionState +func GetVirtualCircuitBgpSessionStateEnumValues() []VirtualCircuitBgpSessionStateEnum { + values := make([]VirtualCircuitBgpSessionStateEnum, 0) + for _, v := range mappingVirtualCircuitBgpSessionState { + values = append(values, v) + } + return values +} + +// VirtualCircuitLifecycleStateEnum Enum with underlying type: string +type VirtualCircuitLifecycleStateEnum string + +// Set of constants representing the allowable values for VirtualCircuitLifecycleState +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 mappingVirtualCircuitLifecycleState = 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 VirtualCircuitLifecycleState +func GetVirtualCircuitLifecycleStateEnumValues() []VirtualCircuitLifecycleStateEnum { + values := make([]VirtualCircuitLifecycleStateEnum, 0) + for _, v := range mappingVirtualCircuitLifecycleState { + values = append(values, v) + } + return values +} + +// VirtualCircuitProviderStateEnum Enum with underlying type: string +type VirtualCircuitProviderStateEnum string + +// Set of constants representing the allowable values for VirtualCircuitProviderState +const ( + VirtualCircuitProviderStateActive VirtualCircuitProviderStateEnum = "ACTIVE" + VirtualCircuitProviderStateInactive VirtualCircuitProviderStateEnum = "INACTIVE" +) + +var mappingVirtualCircuitProviderState = map[string]VirtualCircuitProviderStateEnum{ + "ACTIVE": VirtualCircuitProviderStateActive, + "INACTIVE": VirtualCircuitProviderStateInactive, +} + +// GetVirtualCircuitProviderStateEnumValues Enumerates the set of values for VirtualCircuitProviderState +func GetVirtualCircuitProviderStateEnumValues() []VirtualCircuitProviderStateEnum { + values := make([]VirtualCircuitProviderStateEnum, 0) + for _, v := range mappingVirtualCircuitProviderState { + values = append(values, v) + } + return values +} + +// VirtualCircuitServiceTypeEnum Enum with underlying type: string +type VirtualCircuitServiceTypeEnum string + +// Set of constants representing the allowable values for VirtualCircuitServiceType +const ( + VirtualCircuitServiceTypeColocated VirtualCircuitServiceTypeEnum = "COLOCATED" + VirtualCircuitServiceTypeLayer2 VirtualCircuitServiceTypeEnum = "LAYER2" + VirtualCircuitServiceTypeLayer3 VirtualCircuitServiceTypeEnum = "LAYER3" +) + +var mappingVirtualCircuitServiceType = map[string]VirtualCircuitServiceTypeEnum{ + "COLOCATED": VirtualCircuitServiceTypeColocated, + "LAYER2": VirtualCircuitServiceTypeLayer2, + "LAYER3": VirtualCircuitServiceTypeLayer3, +} + +// GetVirtualCircuitServiceTypeEnumValues Enumerates the set of values for VirtualCircuitServiceType +func GetVirtualCircuitServiceTypeEnumValues() []VirtualCircuitServiceTypeEnum { + values := make([]VirtualCircuitServiceTypeEnum, 0) + for _, v := range mappingVirtualCircuitServiceType { + values = append(values, v) + } + return values +} + +// VirtualCircuitTypeEnum Enum with underlying type: string +type VirtualCircuitTypeEnum string + +// Set of constants representing the allowable values for VirtualCircuitType +const ( + VirtualCircuitTypePublic VirtualCircuitTypeEnum = "PUBLIC" + VirtualCircuitTypePrivate VirtualCircuitTypeEnum = "PRIVATE" +) + +var mappingVirtualCircuitType = map[string]VirtualCircuitTypeEnum{ + "PUBLIC": VirtualCircuitTypePublic, + "PRIVATE": VirtualCircuitTypePrivate, +} + +// GetVirtualCircuitTypeEnumValues Enumerates the set of values for VirtualCircuitType +func GetVirtualCircuitTypeEnumValues() []VirtualCircuitTypeEnum { + values := make([]VirtualCircuitTypeEnum, 0) + for _, v := range mappingVirtualCircuitType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/virtual_circuit_bandwidth_shape.go b/vendor/github.com/oracle/oci-go-sdk/core/virtual_circuit_bandwidth_shape.go new file mode 100644 index 000000000..e237448d5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/virtual_circuit_bandwidth_shape.go @@ -0,0 +1,29 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/virtual_circuit_public_prefix.go b/vendor/github.com/oracle/oci-go-sdk/core/virtual_circuit_public_prefix.go new file mode 100644 index 000000000..62c1f41f3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/virtual_circuit_public_prefix.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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.us-phoenix-1.oraclecloud.com/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) +} + +// VirtualCircuitPublicPrefixVerificationStateEnum Enum with underlying type: string +type VirtualCircuitPublicPrefixVerificationStateEnum string + +// Set of constants representing the allowable values for VirtualCircuitPublicPrefixVerificationState +const ( + VirtualCircuitPublicPrefixVerificationStateInProgress VirtualCircuitPublicPrefixVerificationStateEnum = "IN_PROGRESS" + VirtualCircuitPublicPrefixVerificationStateCompleted VirtualCircuitPublicPrefixVerificationStateEnum = "COMPLETED" + VirtualCircuitPublicPrefixVerificationStateFailed VirtualCircuitPublicPrefixVerificationStateEnum = "FAILED" +) + +var mappingVirtualCircuitPublicPrefixVerificationState = map[string]VirtualCircuitPublicPrefixVerificationStateEnum{ + "IN_PROGRESS": VirtualCircuitPublicPrefixVerificationStateInProgress, + "COMPLETED": VirtualCircuitPublicPrefixVerificationStateCompleted, + "FAILED": VirtualCircuitPublicPrefixVerificationStateFailed, +} + +// GetVirtualCircuitPublicPrefixVerificationStateEnumValues Enumerates the set of values for VirtualCircuitPublicPrefixVerificationState +func GetVirtualCircuitPublicPrefixVerificationStateEnumValues() []VirtualCircuitPublicPrefixVerificationStateEnum { + values := make([]VirtualCircuitPublicPrefixVerificationStateEnum, 0) + for _, v := range mappingVirtualCircuitPublicPrefixVerificationState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/vnic.go b/vendor/github.com/oracle/oci-go-sdk/core/vnic.go new file mode 100644 index 000000000..d7eb9d053 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/vnic.go @@ -0,0 +1,118 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPaddresses.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.us-phoenix-1.oraclecloud.com/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 of the compartment containing the VNIC. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the VNIC. + Id *string `mandatory:"true" json:"id"` + + // The current state of the VNIC. + LifecycleState VnicLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // 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:"true" json:"privateIp"` + + // The OCID of the subnet the VNIC is in. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // The date and time the VNIC was created, in the format defined by 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. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // 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, `bminstance-1` in FQDN `bminstance-1.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.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm). + // Example: `bminstance-1` + 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. + // Example: `00:00:17:B6:4D:DD` + MacAddress *string `mandatory:"false" json:"macAddress"` + + // 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.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.htm#privateip). + // Example: `true` + SkipSourceDestCheck *bool `mandatory:"false" json:"skipSourceDestCheck"` +} + +func (m Vnic) String() string { + return common.PointerString(m) +} + +// VnicLifecycleStateEnum Enum with underlying type: string +type VnicLifecycleStateEnum string + +// Set of constants representing the allowable values for VnicLifecycleState +const ( + VnicLifecycleStateProvisioning VnicLifecycleStateEnum = "PROVISIONING" + VnicLifecycleStateAvailable VnicLifecycleStateEnum = "AVAILABLE" + VnicLifecycleStateTerminating VnicLifecycleStateEnum = "TERMINATING" + VnicLifecycleStateTerminated VnicLifecycleStateEnum = "TERMINATED" +) + +var mappingVnicLifecycleState = map[string]VnicLifecycleStateEnum{ + "PROVISIONING": VnicLifecycleStateProvisioning, + "AVAILABLE": VnicLifecycleStateAvailable, + "TERMINATING": VnicLifecycleStateTerminating, + "TERMINATED": VnicLifecycleStateTerminated, +} + +// GetVnicLifecycleStateEnumValues Enumerates the set of values for VnicLifecycleState +func GetVnicLifecycleStateEnumValues() []VnicLifecycleStateEnum { + values := make([]VnicLifecycleStateEnum, 0) + for _, v := range mappingVnicLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/vnic_attachment.go b/vendor/github.com/oracle/oci-go-sdk/core/vnic_attachment.go new file mode 100644 index 000000000..f08db683f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/vnic_attachment.go @@ -0,0 +1,92 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// VnicAttachment Represents an attachment between a VNIC and an instance. For more information, see +// Virtual Network Interface Cards (VNICs) (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm). +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 OCID of the VNIC's subnet. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // The date and time the VNIC attachment was created, in the format defined by 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. + // 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.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm). + NicIndex *int `mandatory:"false" json:"nicIndex"` + + // The Oracle-assigned VLAN tag of the attached VNIC. Available after the + // attachment process is complete. + // 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) +} + +// VnicAttachmentLifecycleStateEnum Enum with underlying type: string +type VnicAttachmentLifecycleStateEnum string + +// Set of constants representing the allowable values for VnicAttachmentLifecycleState +const ( + VnicAttachmentLifecycleStateAttaching VnicAttachmentLifecycleStateEnum = "ATTACHING" + VnicAttachmentLifecycleStateAttached VnicAttachmentLifecycleStateEnum = "ATTACHED" + VnicAttachmentLifecycleStateDetaching VnicAttachmentLifecycleStateEnum = "DETACHING" + VnicAttachmentLifecycleStateDetached VnicAttachmentLifecycleStateEnum = "DETACHED" +) + +var mappingVnicAttachmentLifecycleState = map[string]VnicAttachmentLifecycleStateEnum{ + "ATTACHING": VnicAttachmentLifecycleStateAttaching, + "ATTACHED": VnicAttachmentLifecycleStateAttached, + "DETACHING": VnicAttachmentLifecycleStateDetaching, + "DETACHED": VnicAttachmentLifecycleStateDetached, +} + +// GetVnicAttachmentLifecycleStateEnumValues Enumerates the set of values for VnicAttachmentLifecycleState +func GetVnicAttachmentLifecycleStateEnumValues() []VnicAttachmentLifecycleStateEnum { + values := make([]VnicAttachmentLifecycleStateEnum, 0) + for _, v := range mappingVnicAttachmentLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/volume.go b/vendor/github.com/oracle/oci-go-sdk/core/volume.go new file mode 100644 index 000000000..85c7394c5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/volume.go @@ -0,0 +1,127 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// 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.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +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 *int `mandatory:"true" json:"sizeInMBs"` + + // The date and time the volume was created. Format defined by RFC3339. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Specifies whether the cloned volume's data has finished copying from the source volume or backup. + IsHydrated *bool `mandatory:"false" json:"isHydrated"` + + // The size of the volume in GBs. + SizeInGBs *int `mandatory:"false" json:"sizeInGBs"` + + // The volume source, either an existing volume in the same Availability Domain or a volume backup. + // If null, an empty volume is created. + SourceDetails VolumeSourceDetails `mandatory:"false" json:"sourceDetails"` +} + +func (m Volume) String() string { + return common.PointerString(m) +} + +// UnmarshalJSON unmarshals from json +func (m *Volume) UnmarshalJSON(data []byte) (e error) { + model := struct { + IsHydrated *bool `json:"isHydrated"` + SizeInGBs *int `json:"sizeInGBs"` + SourceDetails volumesourcedetails `json:"sourceDetails"` + AvailabilityDomain *string `json:"availabilityDomain"` + CompartmentId *string `json:"compartmentId"` + DisplayName *string `json:"displayName"` + Id *string `json:"id"` + LifecycleState VolumeLifecycleStateEnum `json:"lifecycleState"` + SizeInMBs *int `json:"sizeInMBs"` + TimeCreated *common.SDKTime `json:"timeCreated"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + m.IsHydrated = model.IsHydrated + m.SizeInGBs = model.SizeInGBs + nn, e := model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) + if e != nil { + return + } + m.SourceDetails = nn + 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 VolumeLifecycleState +const ( + VolumeLifecycleStateProvisioning VolumeLifecycleStateEnum = "PROVISIONING" + VolumeLifecycleStateRestoring VolumeLifecycleStateEnum = "RESTORING" + VolumeLifecycleStateAvailable VolumeLifecycleStateEnum = "AVAILABLE" + VolumeLifecycleStateTerminating VolumeLifecycleStateEnum = "TERMINATING" + VolumeLifecycleStateTerminated VolumeLifecycleStateEnum = "TERMINATED" + VolumeLifecycleStateFaulty VolumeLifecycleStateEnum = "FAULTY" +) + +var mappingVolumeLifecycleState = map[string]VolumeLifecycleStateEnum{ + "PROVISIONING": VolumeLifecycleStateProvisioning, + "RESTORING": VolumeLifecycleStateRestoring, + "AVAILABLE": VolumeLifecycleStateAvailable, + "TERMINATING": VolumeLifecycleStateTerminating, + "TERMINATED": VolumeLifecycleStateTerminated, + "FAULTY": VolumeLifecycleStateFaulty, +} + +// GetVolumeLifecycleStateEnumValues Enumerates the set of values for VolumeLifecycleState +func GetVolumeLifecycleStateEnumValues() []VolumeLifecycleStateEnum { + values := make([]VolumeLifecycleStateEnum, 0) + for _, v := range mappingVolumeLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/volume_attachment.go b/vendor/github.com/oracle/oci-go-sdk/core/volume_attachment.go new file mode 100644 index 000000000..d8942c4e9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/volume_attachment.go @@ -0,0 +1,171 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// 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.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/overview.htm). +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. + // Example: `2016-08-25T21:10:29.600Z` + GetTimeCreated() *common.SDKTime + + // The OCID of the volume. + GetVolumeId() *string + + // A user-friendly name. Does not have to be unique, and it cannot be changed. + // Avoid entering confidential information. + // Example: `My volume attachment` + GetDisplayName() *string +} + +type volumeattachment struct { + JsonData []byte + 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"` + DisplayName *string `mandatory:"false" json:"displayName"` + 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.DisplayName = s.Model.DisplayName + m.AttachmentType = s.Model.AttachmentType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *volumeattachment) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + var err error + switch m.AttachmentType { + case "iscsi": + mm := IScsiVolumeAttachment{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + return m, nil + } +} + +//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 +} + +//GetDisplayName returns DisplayName +func (m volumeattachment) GetDisplayName() *string { + return m.DisplayName +} + +func (m volumeattachment) String() string { + return common.PointerString(m) +} + +// VolumeAttachmentLifecycleStateEnum Enum with underlying type: string +type VolumeAttachmentLifecycleStateEnum string + +// Set of constants representing the allowable values for VolumeAttachmentLifecycleState +const ( + VolumeAttachmentLifecycleStateAttaching VolumeAttachmentLifecycleStateEnum = "ATTACHING" + VolumeAttachmentLifecycleStateAttached VolumeAttachmentLifecycleStateEnum = "ATTACHED" + VolumeAttachmentLifecycleStateDetaching VolumeAttachmentLifecycleStateEnum = "DETACHING" + VolumeAttachmentLifecycleStateDetached VolumeAttachmentLifecycleStateEnum = "DETACHED" +) + +var mappingVolumeAttachmentLifecycleState = map[string]VolumeAttachmentLifecycleStateEnum{ + "ATTACHING": VolumeAttachmentLifecycleStateAttaching, + "ATTACHED": VolumeAttachmentLifecycleStateAttached, + "DETACHING": VolumeAttachmentLifecycleStateDetaching, + "DETACHED": VolumeAttachmentLifecycleStateDetached, +} + +// GetVolumeAttachmentLifecycleStateEnumValues Enumerates the set of values for VolumeAttachmentLifecycleState +func GetVolumeAttachmentLifecycleStateEnumValues() []VolumeAttachmentLifecycleStateEnum { + values := make([]VolumeAttachmentLifecycleStateEnum, 0) + for _, v := range mappingVolumeAttachmentLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/volume_backup.go b/vendor/github.com/oracle/oci-go-sdk/core/volume_backup.go new file mode 100644 index 000000000..6fd52b878 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/volume_backup.go @@ -0,0 +1,96 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// 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.us-phoenix-1.oraclecloud.com/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type VolumeBackup struct { + + // The OCID of the compartment that contains the volume backup. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name for the volume backup. 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. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The size of the volume, in GBs. + SizeInGBs *int `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 *int `mandatory:"false" json:"sizeInMBs"` + + // The date and time the request to create the volume backup was received. Format defined by 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 *int `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 *int `mandatory:"false" json:"uniqueSizeInMbs"` + + // The OCID of the volume. + VolumeId *string `mandatory:"false" json:"volumeId"` +} + +func (m VolumeBackup) String() string { + return common.PointerString(m) +} + +// VolumeBackupLifecycleStateEnum Enum with underlying type: string +type VolumeBackupLifecycleStateEnum string + +// Set of constants representing the allowable values for VolumeBackupLifecycleState +const ( + VolumeBackupLifecycleStateCreating VolumeBackupLifecycleStateEnum = "CREATING" + VolumeBackupLifecycleStateAvailable VolumeBackupLifecycleStateEnum = "AVAILABLE" + VolumeBackupLifecycleStateTerminating VolumeBackupLifecycleStateEnum = "TERMINATING" + VolumeBackupLifecycleStateTerminated VolumeBackupLifecycleStateEnum = "TERMINATED" + VolumeBackupLifecycleStateFaulty VolumeBackupLifecycleStateEnum = "FAULTY" + VolumeBackupLifecycleStateRequestReceived VolumeBackupLifecycleStateEnum = "REQUEST_RECEIVED" +) + +var mappingVolumeBackupLifecycleState = map[string]VolumeBackupLifecycleStateEnum{ + "CREATING": VolumeBackupLifecycleStateCreating, + "AVAILABLE": VolumeBackupLifecycleStateAvailable, + "TERMINATING": VolumeBackupLifecycleStateTerminating, + "TERMINATED": VolumeBackupLifecycleStateTerminated, + "FAULTY": VolumeBackupLifecycleStateFaulty, + "REQUEST_RECEIVED": VolumeBackupLifecycleStateRequestReceived, +} + +// GetVolumeBackupLifecycleStateEnumValues Enumerates the set of values for VolumeBackupLifecycleState +func GetVolumeBackupLifecycleStateEnumValues() []VolumeBackupLifecycleStateEnum { + values := make([]VolumeBackupLifecycleStateEnum, 0) + for _, v := range mappingVolumeBackupLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/volume_source_details.go b/vendor/github.com/oracle/oci-go-sdk/core/volume_source_details.go new file mode 100644 index 000000000..336c21e8b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/volume_source_details.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// VolumeSourceDetails The representation of VolumeSourceDetails +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) { + var err error + switch m.Type { + case "volume": + mm := VolumeSourceFromVolumeDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "volumeBackup": + mm := VolumeSourceFromVolumeBackupDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + return m, nil + } +} + +func (m volumesourcedetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/core/volume_source_from_volume_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/core/volume_source_from_volume_backup_details.go new file mode 100644 index 000000000..5c6d57af3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/volume_source_from_volume_backup_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// 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) +} + +// 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/core/volume_source_from_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/core/volume_source_from_volume_details.go new file mode 100644 index 000000000..bb1ed162a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/core/volume_source_from_volume_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// APIs for Networking Service, Compute Service, and Block Volume Service. +// + +package core + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// 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) +} + +// 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/database/backup.go b/vendor/github.com/oracle/oci-go-sdk/database/backup.go new file mode 100644 index 000000000..f898387ef --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/backup.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Backup A database backup +// 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type Backup struct { + + // The name of the Availability Domain that the backup is located in. + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // The OCID of the compartment. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The OCID of the database. + DatabaseId *string `mandatory:"false" json:"databaseId"` + + // The user-friendly name for the backup. It does not have to be unique. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The OCID of the backup. + Id *string `mandatory:"false" json:"id"` + + // Additional information about the current lifecycleState. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The current state of the backup. + LifecycleState BackupLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // The date and time the backup was completed. + TimeEnded *common.SDKTime `mandatory:"false" json:"timeEnded"` + + // The date and time the backup starts. + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The type of backup. + Type BackupTypeEnum `mandatory:"false" json:"type,omitempty"` +} + +func (m Backup) String() string { + return common.PointerString(m) +} + +// BackupLifecycleStateEnum Enum with underlying type: string +type BackupLifecycleStateEnum string + +// Set of constants representing the allowable values for BackupLifecycleState +const ( + BackupLifecycleStateCreating BackupLifecycleStateEnum = "CREATING" + BackupLifecycleStateActive BackupLifecycleStateEnum = "ACTIVE" + BackupLifecycleStateDeleting BackupLifecycleStateEnum = "DELETING" + BackupLifecycleStateDeleted BackupLifecycleStateEnum = "DELETED" + BackupLifecycleStateFailed BackupLifecycleStateEnum = "FAILED" + BackupLifecycleStateRestoring BackupLifecycleStateEnum = "RESTORING" +) + +var mappingBackupLifecycleState = map[string]BackupLifecycleStateEnum{ + "CREATING": BackupLifecycleStateCreating, + "ACTIVE": BackupLifecycleStateActive, + "DELETING": BackupLifecycleStateDeleting, + "DELETED": BackupLifecycleStateDeleted, + "FAILED": BackupLifecycleStateFailed, + "RESTORING": BackupLifecycleStateRestoring, +} + +// GetBackupLifecycleStateEnumValues Enumerates the set of values for BackupLifecycleState +func GetBackupLifecycleStateEnumValues() []BackupLifecycleStateEnum { + values := make([]BackupLifecycleStateEnum, 0) + for _, v := range mappingBackupLifecycleState { + values = append(values, v) + } + return values +} + +// BackupTypeEnum Enum with underlying type: string +type BackupTypeEnum string + +// Set of constants representing the allowable values for BackupType +const ( + BackupTypeIncremental BackupTypeEnum = "INCREMENTAL" + BackupTypeFull BackupTypeEnum = "FULL" +) + +var mappingBackupType = map[string]BackupTypeEnum{ + "INCREMENTAL": BackupTypeIncremental, + "FULL": BackupTypeFull, +} + +// GetBackupTypeEnumValues Enumerates the set of values for BackupType +func GetBackupTypeEnumValues() []BackupTypeEnum { + values := make([]BackupTypeEnum, 0) + for _, v := range mappingBackupType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/backup_summary.go b/vendor/github.com/oracle/oci-go-sdk/database/backup_summary.go new file mode 100644 index 000000000..5e12d1c60 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/backup_summary.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// BackupSummary A database backup +// 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type BackupSummary struct { + + // The name of the Availability Domain that the backup is located in. + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // The OCID of the compartment. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The OCID of the database. + DatabaseId *string `mandatory:"false" json:"databaseId"` + + // The user-friendly name for the backup. It does not have to be unique. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The OCID of the backup. + Id *string `mandatory:"false" json:"id"` + + // Additional information about the current lifecycleState. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The current state of the backup. + LifecycleState BackupSummaryLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // The date and time the backup was completed. + TimeEnded *common.SDKTime `mandatory:"false" json:"timeEnded"` + + // The date and time the backup starts. + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The type of backup. + Type BackupSummaryTypeEnum `mandatory:"false" json:"type,omitempty"` +} + +func (m BackupSummary) String() string { + return common.PointerString(m) +} + +// BackupSummaryLifecycleStateEnum Enum with underlying type: string +type BackupSummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for BackupSummaryLifecycleState +const ( + BackupSummaryLifecycleStateCreating BackupSummaryLifecycleStateEnum = "CREATING" + BackupSummaryLifecycleStateActive BackupSummaryLifecycleStateEnum = "ACTIVE" + BackupSummaryLifecycleStateDeleting BackupSummaryLifecycleStateEnum = "DELETING" + BackupSummaryLifecycleStateDeleted BackupSummaryLifecycleStateEnum = "DELETED" + BackupSummaryLifecycleStateFailed BackupSummaryLifecycleStateEnum = "FAILED" + BackupSummaryLifecycleStateRestoring BackupSummaryLifecycleStateEnum = "RESTORING" +) + +var mappingBackupSummaryLifecycleState = map[string]BackupSummaryLifecycleStateEnum{ + "CREATING": BackupSummaryLifecycleStateCreating, + "ACTIVE": BackupSummaryLifecycleStateActive, + "DELETING": BackupSummaryLifecycleStateDeleting, + "DELETED": BackupSummaryLifecycleStateDeleted, + "FAILED": BackupSummaryLifecycleStateFailed, + "RESTORING": BackupSummaryLifecycleStateRestoring, +} + +// GetBackupSummaryLifecycleStateEnumValues Enumerates the set of values for BackupSummaryLifecycleState +func GetBackupSummaryLifecycleStateEnumValues() []BackupSummaryLifecycleStateEnum { + values := make([]BackupSummaryLifecycleStateEnum, 0) + for _, v := range mappingBackupSummaryLifecycleState { + values = append(values, v) + } + return values +} + +// BackupSummaryTypeEnum Enum with underlying type: string +type BackupSummaryTypeEnum string + +// Set of constants representing the allowable values for BackupSummaryType +const ( + BackupSummaryTypeIncremental BackupSummaryTypeEnum = "INCREMENTAL" + BackupSummaryTypeFull BackupSummaryTypeEnum = "FULL" +) + +var mappingBackupSummaryType = map[string]BackupSummaryTypeEnum{ + "INCREMENTAL": BackupSummaryTypeIncremental, + "FULL": BackupSummaryTypeFull, +} + +// GetBackupSummaryTypeEnumValues Enumerates the set of values for BackupSummaryType +func GetBackupSummaryTypeEnumValues() []BackupSummaryTypeEnum { + values := make([]BackupSummaryTypeEnum, 0) + for _, v := range mappingBackupSummaryType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/database/create_backup_details.go new file mode 100644 index 000000000..6faa74c49 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/create_backup_details.go @@ -0,0 +1,27 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateBackupDetails The representation of CreateBackupDetails +type CreateBackupDetails struct { + + // The OCID of the database. + DatabaseId *string `mandatory:"true" json:"databaseId"` + + // The user-friendly name for the backup. It does not have to be unique. + DisplayName *string `mandatory:"true" json:"displayName"` +} + +func (m CreateBackupDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/create_backup_request_response.go new file mode 100644 index 000000000..9cd01036e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/create_backup_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateBackupRequest wrapper for the CreateBackup operation +type CreateBackupRequest struct { + + // Request to create a new database backup. + CreateBackupDetails `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"` +} + +func (request CreateBackupRequest) String() string { + return common.PointerString(request) +} + +// CreateBackupResponse wrapper for the CreateBackup operation +type CreateBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Backup instance + Backup `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 CreateBackupResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_details.go b/vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_details.go new file mode 100644 index 000000000..dc92eb654 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_details.go @@ -0,0 +1,158 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// CreateDataGuardAssociationDetails The configuration details for creating a Data Guard association between databases. +// **NOTE:** +// "ExistingDbSystem" is the only supported `creationType` value. Therefore, all +// CreateDataGuardAssociation +// requests must include the `peerDbSystemId` parameter found in the +// CreateDataGuardAssociationToExistingDbSystemDetails +// object. +type CreateDataGuardAssociationDetails interface { + + // A strong password for the `SYS`, `SYSTEM`, and `PDB Admin` users to apply during standby creation. + // The password must contain no fewer than nine characters and include: + // * At least two uppercase characters. + // * At least two lowercase characters. + // * At least two numeric characters. + // * At least two special characters. Valid special characters include "_", "#", and "-" only. + // **The password MUST be the same as the primary admin password.** + GetDatabaseAdminPassword() *string + + // The protection mode to set up between the primary and standby databases. For more information, see + // Oracle Data Guard Protection Modes (http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-protection-modes.htm#SBYDB02000) + // in the Oracle Data Guard documentation. + // **IMPORTANT** - The only protection mode currently supported by the Database Service is MAXIMUM_PERFORMANCE. + GetProtectionMode() CreateDataGuardAssociationDetailsProtectionModeEnum + + // The redo transport type to use for this Data Guard association. Valid values depend on the specified `protectionMode`: + // * MAXIMUM_AVAILABILITY - SYNC or FASTSYNC + // * MAXIMUM_PERFORMANCE - ASYNC + // * MAXIMUM_PROTECTION - SYNC + // For more information, see + // Redo Transport Services (http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-redo-transport-services.htm#SBYDB00400) + // in the Oracle Data Guard documentation. + // **IMPORTANT** - The only transport type currently supported by the Database Service is ASYNC. + GetTransportType() CreateDataGuardAssociationDetailsTransportTypeEnum +} + +type createdataguardassociationdetails struct { + JsonData []byte + DatabaseAdminPassword *string `mandatory:"true" json:"databaseAdminPassword"` + ProtectionMode CreateDataGuardAssociationDetailsProtectionModeEnum `mandatory:"true" json:"protectionMode"` + TransportType CreateDataGuardAssociationDetailsTransportTypeEnum `mandatory:"true" json:"transportType"` + CreationType string `json:"creationType"` +} + +// UnmarshalJSON unmarshals json +func (m *createdataguardassociationdetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalercreatedataguardassociationdetails createdataguardassociationdetails + s := struct { + Model Unmarshalercreatedataguardassociationdetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.DatabaseAdminPassword = s.Model.DatabaseAdminPassword + m.ProtectionMode = s.Model.ProtectionMode + m.TransportType = s.Model.TransportType + m.CreationType = s.Model.CreationType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *createdataguardassociationdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + var err error + switch m.CreationType { + case "ExistingDbSystem": + mm := CreateDataGuardAssociationToExistingDbSystemDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + return m, nil + } +} + +//GetDatabaseAdminPassword returns DatabaseAdminPassword +func (m createdataguardassociationdetails) GetDatabaseAdminPassword() *string { + return m.DatabaseAdminPassword +} + +//GetProtectionMode returns ProtectionMode +func (m createdataguardassociationdetails) GetProtectionMode() CreateDataGuardAssociationDetailsProtectionModeEnum { + return m.ProtectionMode +} + +//GetTransportType returns TransportType +func (m createdataguardassociationdetails) GetTransportType() CreateDataGuardAssociationDetailsTransportTypeEnum { + return m.TransportType +} + +func (m createdataguardassociationdetails) String() string { + return common.PointerString(m) +} + +// CreateDataGuardAssociationDetailsProtectionModeEnum Enum with underlying type: string +type CreateDataGuardAssociationDetailsProtectionModeEnum string + +// Set of constants representing the allowable values for CreateDataGuardAssociationDetailsProtectionMode +const ( + CreateDataGuardAssociationDetailsProtectionModeAvailability CreateDataGuardAssociationDetailsProtectionModeEnum = "MAXIMUM_AVAILABILITY" + CreateDataGuardAssociationDetailsProtectionModePerformance CreateDataGuardAssociationDetailsProtectionModeEnum = "MAXIMUM_PERFORMANCE" + CreateDataGuardAssociationDetailsProtectionModeProtection CreateDataGuardAssociationDetailsProtectionModeEnum = "MAXIMUM_PROTECTION" +) + +var mappingCreateDataGuardAssociationDetailsProtectionMode = map[string]CreateDataGuardAssociationDetailsProtectionModeEnum{ + "MAXIMUM_AVAILABILITY": CreateDataGuardAssociationDetailsProtectionModeAvailability, + "MAXIMUM_PERFORMANCE": CreateDataGuardAssociationDetailsProtectionModePerformance, + "MAXIMUM_PROTECTION": CreateDataGuardAssociationDetailsProtectionModeProtection, +} + +// GetCreateDataGuardAssociationDetailsProtectionModeEnumValues Enumerates the set of values for CreateDataGuardAssociationDetailsProtectionMode +func GetCreateDataGuardAssociationDetailsProtectionModeEnumValues() []CreateDataGuardAssociationDetailsProtectionModeEnum { + values := make([]CreateDataGuardAssociationDetailsProtectionModeEnum, 0) + for _, v := range mappingCreateDataGuardAssociationDetailsProtectionMode { + values = append(values, v) + } + return values +} + +// CreateDataGuardAssociationDetailsTransportTypeEnum Enum with underlying type: string +type CreateDataGuardAssociationDetailsTransportTypeEnum string + +// Set of constants representing the allowable values for CreateDataGuardAssociationDetailsTransportType +const ( + CreateDataGuardAssociationDetailsTransportTypeSync CreateDataGuardAssociationDetailsTransportTypeEnum = "SYNC" + CreateDataGuardAssociationDetailsTransportTypeAsync CreateDataGuardAssociationDetailsTransportTypeEnum = "ASYNC" + CreateDataGuardAssociationDetailsTransportTypeFastsync CreateDataGuardAssociationDetailsTransportTypeEnum = "FASTSYNC" +) + +var mappingCreateDataGuardAssociationDetailsTransportType = map[string]CreateDataGuardAssociationDetailsTransportTypeEnum{ + "SYNC": CreateDataGuardAssociationDetailsTransportTypeSync, + "ASYNC": CreateDataGuardAssociationDetailsTransportTypeAsync, + "FASTSYNC": CreateDataGuardAssociationDetailsTransportTypeFastsync, +} + +// GetCreateDataGuardAssociationDetailsTransportTypeEnumValues Enumerates the set of values for CreateDataGuardAssociationDetailsTransportType +func GetCreateDataGuardAssociationDetailsTransportTypeEnumValues() []CreateDataGuardAssociationDetailsTransportTypeEnum { + values := make([]CreateDataGuardAssociationDetailsTransportTypeEnum, 0) + for _, v := range mappingCreateDataGuardAssociationDetailsTransportType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_request_response.go new file mode 100644 index 000000000..b65888e01 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_request_response.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateDataGuardAssociationRequest wrapper for the CreateDataGuardAssociation operation +type CreateDataGuardAssociationRequest struct { + + // The database OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DatabaseId *string `mandatory:"true" contributesTo:"path" name:"databaseId"` + + // A request to create a Data Guard association. + CreateDataGuardAssociationDetails `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"` +} + +func (request CreateDataGuardAssociationRequest) String() string { + return common.PointerString(request) +} + +// CreateDataGuardAssociationResponse wrapper for the CreateDataGuardAssociation operation +type CreateDataGuardAssociationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DataGuardAssociation instance + DataGuardAssociation `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 CreateDataGuardAssociationResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_to_existing_db_system_details.go b/vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_to_existing_db_system_details.go new file mode 100644 index 000000000..0badd6d50 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/create_data_guard_association_to_existing_db_system_details.go @@ -0,0 +1,79 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// CreateDataGuardAssociationToExistingDbSystemDetails The configuration details for creating a Data Guard association to an existing database. +type CreateDataGuardAssociationToExistingDbSystemDetails struct { + + // A strong password for the `SYS`, `SYSTEM`, and `PDB Admin` users to apply during standby creation. + // The password must contain no fewer than nine characters and include: + // * At least two uppercase characters. + // * At least two lowercase characters. + // * At least two numeric characters. + // * At least two special characters. Valid special characters include "_", "#", and "-" only. + // **The password MUST be the same as the primary admin password.** + DatabaseAdminPassword *string `mandatory:"true" json:"databaseAdminPassword"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the DB System to create the standby database on. + PeerDbSystemId *string `mandatory:"false" json:"peerDbSystemId"` + + // The protection mode to set up between the primary and standby databases. For more information, see + // Oracle Data Guard Protection Modes (http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-protection-modes.htm#SBYDB02000) + // in the Oracle Data Guard documentation. + // **IMPORTANT** - The only protection mode currently supported by the Database Service is MAXIMUM_PERFORMANCE. + ProtectionMode CreateDataGuardAssociationDetailsProtectionModeEnum `mandatory:"true" json:"protectionMode"` + + // The redo transport type to use for this Data Guard association. Valid values depend on the specified `protectionMode`: + // * MAXIMUM_AVAILABILITY - SYNC or FASTSYNC + // * MAXIMUM_PERFORMANCE - ASYNC + // * MAXIMUM_PROTECTION - SYNC + // For more information, see + // Redo Transport Services (http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-redo-transport-services.htm#SBYDB00400) + // in the Oracle Data Guard documentation. + // **IMPORTANT** - The only transport type currently supported by the Database Service is ASYNC. + TransportType CreateDataGuardAssociationDetailsTransportTypeEnum `mandatory:"true" json:"transportType"` +} + +//GetDatabaseAdminPassword returns DatabaseAdminPassword +func (m CreateDataGuardAssociationToExistingDbSystemDetails) GetDatabaseAdminPassword() *string { + return m.DatabaseAdminPassword +} + +//GetProtectionMode returns ProtectionMode +func (m CreateDataGuardAssociationToExistingDbSystemDetails) GetProtectionMode() CreateDataGuardAssociationDetailsProtectionModeEnum { + return m.ProtectionMode +} + +//GetTransportType returns TransportType +func (m CreateDataGuardAssociationToExistingDbSystemDetails) GetTransportType() CreateDataGuardAssociationDetailsTransportTypeEnum { + return m.TransportType +} + +func (m CreateDataGuardAssociationToExistingDbSystemDetails) String() string { + return common.PointerString(m) +} + +// MarshalJSON marshals to json representation +func (m CreateDataGuardAssociationToExistingDbSystemDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateDataGuardAssociationToExistingDbSystemDetails CreateDataGuardAssociationToExistingDbSystemDetails + s := struct { + DiscriminatorParam string `json:"creationType"` + MarshalTypeCreateDataGuardAssociationToExistingDbSystemDetails + }{ + "ExistingDbSystem", + (MarshalTypeCreateDataGuardAssociationToExistingDbSystemDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_database_details.go b/vendor/github.com/oracle/oci-go-sdk/database/create_database_details.go new file mode 100644 index 000000000..0565459d5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/create_database_details.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateDatabaseDetails The representation of CreateDatabaseDetails +type CreateDatabaseDetails struct { + + // A strong password for SYS, SYSTEM, and PDB Admin. The password must be at least nine characters and contain at least two uppercase, two lowercase, two numbers, and two special characters. The special characters must be _, \#, or -. + AdminPassword *string `mandatory:"true" json:"adminPassword"` + + // The database name. It must begin with an alphabetic character and can contain a maximum of eight alphanumeric characters. Special characters are not permitted. + DbName *string `mandatory:"true" json:"dbName"` + + // The character set for the database. The default is AL32UTF8. Allowed values are: + // AL32UTF8, AR8ADOS710, AR8ADOS720, AR8APTEC715, AR8ARABICMACS, AR8ASMO8X, AR8ISO8859P6, AR8MSWIN1256, AR8MUSSAD768, AR8NAFITHA711, AR8NAFITHA721, AR8SAKHR706, AR8SAKHR707, AZ8ISO8859P9E, BG8MSWIN, BG8PC437S, BLT8CP921, BLT8ISO8859P13, BLT8MSWIN1257, BLT8PC775, BN8BSCII, CDN8PC863, CEL8ISO8859P14, CL8ISO8859P5, CL8ISOIR111, CL8KOI8R, CL8KOI8U, CL8MACCYRILLICS, CL8MSWIN1251, EE8ISO8859P2, EE8MACCES, EE8MACCROATIANS, EE8MSWIN1250, EE8PC852, EL8DEC, EL8ISO8859P7, EL8MACGREEKS, EL8MSWIN1253, EL8PC437S, EL8PC851, EL8PC869, ET8MSWIN923, HU8ABMOD, HU8CWI2, IN8ISCII, IS8PC861, IW8ISO8859P8, IW8MACHEBREWS, IW8MSWIN1255, IW8PC1507, JA16EUC, JA16EUCTILDE, JA16SJIS, JA16SJISTILDE, JA16VMS, KO16KSCCS, KO16MSWIN949, LA8ISO6937, LA8PASSPORT, LT8MSWIN921, LT8PC772, LT8PC774, LV8PC1117, LV8PC8LR, LV8RST104090, N8PC865, NE8ISO8859P10, NEE8ISO8859P4, RU8BESTA, RU8PC855, RU8PC866, SE8ISO8859P3, TH8MACTHAIS, TH8TISASCII, TR8DEC, TR8MACTURKISHS, TR8MSWIN1254, TR8PC857, US7ASCII, US8PC437, UTF8, VN8MSWIN1258, VN8VN3, WE8DEC, WE8DG, WE8ISO8859P15, WE8ISO8859P9, WE8MACROMAN8S, WE8MSWIN1252, WE8NCR4970, WE8NEXTSTEP, WE8PC850, WE8PC858, WE8PC860, WE8ROMAN8, ZHS16CGB231280, ZHS16GBK, ZHT16BIG5, ZHT16CCDC, ZHT16DBT, ZHT16HKSCS, ZHT16MSWIN950, ZHT32EUC, ZHT32SOPS, ZHT32TRIS + CharacterSet *string `mandatory:"false" json:"characterSet"` + + DbBackupConfig *DbBackupConfig `mandatory:"false" json:"dbBackupConfig"` + + // Database workload type. + DbWorkload CreateDatabaseDetailsDbWorkloadEnum `mandatory:"false" json:"dbWorkload,omitempty"` + + // National character set for the database. The default is AL16UTF16. Allowed values are: + // AL16UTF16 or UTF8. + NcharacterSet *string `mandatory:"false" json:"ncharacterSet"` + + // Pluggable database name. It must begin with an alphabetic character and can contain a maximum of eight alphanumeric characters. Special characters are not permitted. Pluggable database should not be same as database name. + PdbName *string `mandatory:"false" json:"pdbName"` +} + +func (m CreateDatabaseDetails) String() string { + return common.PointerString(m) +} + +// CreateDatabaseDetailsDbWorkloadEnum Enum with underlying type: string +type CreateDatabaseDetailsDbWorkloadEnum string + +// Set of constants representing the allowable values for CreateDatabaseDetailsDbWorkload +const ( + CreateDatabaseDetailsDbWorkloadOltp CreateDatabaseDetailsDbWorkloadEnum = "OLTP" + CreateDatabaseDetailsDbWorkloadDss CreateDatabaseDetailsDbWorkloadEnum = "DSS" +) + +var mappingCreateDatabaseDetailsDbWorkload = map[string]CreateDatabaseDetailsDbWorkloadEnum{ + "OLTP": CreateDatabaseDetailsDbWorkloadOltp, + "DSS": CreateDatabaseDetailsDbWorkloadDss, +} + +// GetCreateDatabaseDetailsDbWorkloadEnumValues Enumerates the set of values for CreateDatabaseDetailsDbWorkload +func GetCreateDatabaseDetailsDbWorkloadEnumValues() []CreateDatabaseDetailsDbWorkloadEnum { + values := make([]CreateDatabaseDetailsDbWorkloadEnum, 0) + for _, v := range mappingCreateDatabaseDetailsDbWorkload { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_database_from_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/database/create_database_from_backup_details.go new file mode 100644 index 000000000..9c25aadc4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/create_database_from_backup_details.go @@ -0,0 +1,30 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateDatabaseFromBackupDetails The representation of CreateDatabaseFromBackupDetails +type CreateDatabaseFromBackupDetails struct { + + // A strong password for SYS, SYSTEM, PDB Admin and TDE Wallet. The password must be at least nine characters and contain at least two uppercase, two lowercase, two numbers, and two special characters. The special characters must be _, \#, or -. + AdminPassword *string `mandatory:"true" json:"adminPassword"` + + // The backup OCID. + BackupId *string `mandatory:"true" json:"backupId"` + + // The password to open the TDE wallet. + BackupTDEPassword *string `mandatory:"true" json:"backupTDEPassword"` +} + +func (m CreateDatabaseFromBackupDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_details.go b/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_details.go new file mode 100644 index 000000000..93eb4c928 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_details.go @@ -0,0 +1,28 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateDbHomeDetails The representation of CreateDbHomeDetails +type CreateDbHomeDetails struct { + Database *CreateDatabaseDetails `mandatory:"true" json:"database"` + + // A valid Oracle database version. To get a list of supported versions, use the ListDbVersions operation. + DbVersion *string `mandatory:"true" json:"dbVersion"` + + // The user-provided name of the database home. + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m CreateDbHomeDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_request_response.go new file mode 100644 index 000000000..6df0ab66c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateDbHomeRequest wrapper for the CreateDbHome operation +type CreateDbHomeRequest struct { + + // Request to create a new DB Home. + CreateDbHomeWithDbSystemIdBase `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"` +} + +func (request CreateDbHomeRequest) String() string { + return common.PointerString(request) +} + +// CreateDbHomeResponse wrapper for the CreateDbHome operation +type CreateDbHomeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DbHome instance + DbHome `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 CreateDbHomeResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_with_db_system_id_base.go b/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_with_db_system_id_base.go new file mode 100644 index 000000000..670c00026 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_with_db_system_id_base.go @@ -0,0 +1,80 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// CreateDbHomeWithDbSystemIdBase The representation of CreateDbHomeWithDbSystemIdBase +type CreateDbHomeWithDbSystemIdBase interface { + + // The OCID of the DB System. + GetDbSystemId() *string + + // The user-provided name of the database home. + GetDisplayName() *string +} + +type createdbhomewithdbsystemidbase struct { + JsonData []byte + DbSystemId *string `mandatory:"true" json:"dbSystemId"` + DisplayName *string `mandatory:"false" json:"displayName"` + Source string `json:"source"` +} + +// UnmarshalJSON unmarshals json +func (m *createdbhomewithdbsystemidbase) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalercreatedbhomewithdbsystemidbase createdbhomewithdbsystemidbase + s := struct { + Model Unmarshalercreatedbhomewithdbsystemidbase + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.DbSystemId = s.Model.DbSystemId + m.DisplayName = s.Model.DisplayName + m.Source = s.Model.Source + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *createdbhomewithdbsystemidbase) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + var err error + switch m.Source { + case "DB_BACKUP": + mm := CreateDbHomeWithDbSystemIdFromBackupDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "NONE": + mm := CreateDbHomeWithDbSystemIdDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + return m, nil + } +} + +//GetDbSystemId returns DbSystemId +func (m createdbhomewithdbsystemidbase) GetDbSystemId() *string { + return m.DbSystemId +} + +//GetDisplayName returns DisplayName +func (m createdbhomewithdbsystemidbase) GetDisplayName() *string { + return m.DisplayName +} + +func (m createdbhomewithdbsystemidbase) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_with_db_system_id_details.go b/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_with_db_system_id_details.go new file mode 100644 index 000000000..92795f765 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_with_db_system_id_details.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// CreateDbHomeWithDbSystemIdDetails The representation of CreateDbHomeWithDbSystemIdDetails +type CreateDbHomeWithDbSystemIdDetails struct { + + // The OCID of the DB System. + DbSystemId *string `mandatory:"true" json:"dbSystemId"` + + Database *CreateDatabaseDetails `mandatory:"true" json:"database"` + + // A valid Oracle database version. To get a list of supported versions, use the ListDbVersions operation. + DbVersion *string `mandatory:"true" json:"dbVersion"` + + // The user-provided name of the database home. + DisplayName *string `mandatory:"false" json:"displayName"` +} + +//GetDbSystemId returns DbSystemId +func (m CreateDbHomeWithDbSystemIdDetails) GetDbSystemId() *string { + return m.DbSystemId +} + +//GetDisplayName returns DisplayName +func (m CreateDbHomeWithDbSystemIdDetails) GetDisplayName() *string { + return m.DisplayName +} + +func (m CreateDbHomeWithDbSystemIdDetails) String() string { + return common.PointerString(m) +} + +// MarshalJSON marshals to json representation +func (m CreateDbHomeWithDbSystemIdDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateDbHomeWithDbSystemIdDetails CreateDbHomeWithDbSystemIdDetails + s := struct { + DiscriminatorParam string `json:"source"` + MarshalTypeCreateDbHomeWithDbSystemIdDetails + }{ + "NONE", + (MarshalTypeCreateDbHomeWithDbSystemIdDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_with_db_system_id_from_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_with_db_system_id_from_backup_details.go new file mode 100644 index 000000000..98f9fc305 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/create_db_home_with_db_system_id_from_backup_details.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// CreateDbHomeWithDbSystemIdFromBackupDetails The representation of CreateDbHomeWithDbSystemIdFromBackupDetails +type CreateDbHomeWithDbSystemIdFromBackupDetails struct { + + // The OCID of the DB System. + DbSystemId *string `mandatory:"true" json:"dbSystemId"` + + Database *CreateDatabaseFromBackupDetails `mandatory:"true" json:"database"` + + // The user-provided name of the database home. + DisplayName *string `mandatory:"false" json:"displayName"` +} + +//GetDbSystemId returns DbSystemId +func (m CreateDbHomeWithDbSystemIdFromBackupDetails) GetDbSystemId() *string { + return m.DbSystemId +} + +//GetDisplayName returns DisplayName +func (m CreateDbHomeWithDbSystemIdFromBackupDetails) GetDisplayName() *string { + return m.DisplayName +} + +func (m CreateDbHomeWithDbSystemIdFromBackupDetails) String() string { + return common.PointerString(m) +} + +// MarshalJSON marshals to json representation +func (m CreateDbHomeWithDbSystemIdFromBackupDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateDbHomeWithDbSystemIdFromBackupDetails CreateDbHomeWithDbSystemIdFromBackupDetails + s := struct { + DiscriminatorParam string `json:"source"` + MarshalTypeCreateDbHomeWithDbSystemIdFromBackupDetails + }{ + "DB_BACKUP", + (MarshalTypeCreateDbHomeWithDbSystemIdFromBackupDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/data_guard_association.go b/vendor/github.com/oracle/oci-go-sdk/database/data_guard_association.go new file mode 100644 index 000000000..d572feb42 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/data_guard_association.go @@ -0,0 +1,211 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// DataGuardAssociation The properties that define a Data Guard association. +// 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +// For information about endpoints and signing API requests, see +// About the API (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm). For information about available SDKs and tools, see +// SDKS and Other Tools (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdks.htm). +type DataGuardAssociation struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the reporting database. + DatabaseId *string `mandatory:"true" json:"databaseId"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the Data Guard association. + Id *string `mandatory:"true" json:"id"` + + // The current state of the Data Guard association. + LifecycleState DataGuardAssociationLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the DB System containing the associated + // peer database. + PeerDbSystemId *string `mandatory:"true" json:"peerDbSystemId"` + + // The role of the peer database in this Data Guard association. + PeerRole DataGuardAssociationPeerRoleEnum `mandatory:"true" json:"peerRole"` + + // The protection mode of this Data Guard association. For more information, see + // Oracle Data Guard Protection Modes (http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-protection-modes.htm#SBYDB02000) + // in the Oracle Data Guard documentation. + ProtectionMode DataGuardAssociationProtectionModeEnum `mandatory:"true" json:"protectionMode"` + + // The role of the reporting database in this Data Guard association. + Role DataGuardAssociationRoleEnum `mandatory:"true" json:"role"` + + // The lag time between updates to the primary database and application of the redo data on the standby database, + // as computed by the reporting database. + // Example: `9 seconds` + ApplyLag *string `mandatory:"false" json:"applyLag"` + + // The rate at which redo logs are synced between the associated databases. + // Example: `180 Mb per second` + ApplyRate *string `mandatory:"false" json:"applyRate"` + + // Additional information about the current lifecycleState, if available. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the peer database's Data Guard association. + PeerDataGuardAssociationId *string `mandatory:"false" json:"peerDataGuardAssociationId"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the associated peer database. + PeerDatabaseId *string `mandatory:"false" json:"peerDatabaseId"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the database home containing the associated peer database. + PeerDbHomeId *string `mandatory:"false" json:"peerDbHomeId"` + + // The date and time the Data Guard Association was created. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The redo transport type used by this Data Guard association. For more information, see + // Redo Transport Services (http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-redo-transport-services.htm#SBYDB00400) + // in the Oracle Data Guard documentation. + TransportType DataGuardAssociationTransportTypeEnum `mandatory:"false" json:"transportType,omitempty"` +} + +func (m DataGuardAssociation) String() string { + return common.PointerString(m) +} + +// DataGuardAssociationLifecycleStateEnum Enum with underlying type: string +type DataGuardAssociationLifecycleStateEnum string + +// Set of constants representing the allowable values for DataGuardAssociationLifecycleState +const ( + DataGuardAssociationLifecycleStateProvisioning DataGuardAssociationLifecycleStateEnum = "PROVISIONING" + DataGuardAssociationLifecycleStateAvailable DataGuardAssociationLifecycleStateEnum = "AVAILABLE" + DataGuardAssociationLifecycleStateUpdating DataGuardAssociationLifecycleStateEnum = "UPDATING" + DataGuardAssociationLifecycleStateTerminating DataGuardAssociationLifecycleStateEnum = "TERMINATING" + DataGuardAssociationLifecycleStateTerminated DataGuardAssociationLifecycleStateEnum = "TERMINATED" + DataGuardAssociationLifecycleStateFailed DataGuardAssociationLifecycleStateEnum = "FAILED" +) + +var mappingDataGuardAssociationLifecycleState = map[string]DataGuardAssociationLifecycleStateEnum{ + "PROVISIONING": DataGuardAssociationLifecycleStateProvisioning, + "AVAILABLE": DataGuardAssociationLifecycleStateAvailable, + "UPDATING": DataGuardAssociationLifecycleStateUpdating, + "TERMINATING": DataGuardAssociationLifecycleStateTerminating, + "TERMINATED": DataGuardAssociationLifecycleStateTerminated, + "FAILED": DataGuardAssociationLifecycleStateFailed, +} + +// GetDataGuardAssociationLifecycleStateEnumValues Enumerates the set of values for DataGuardAssociationLifecycleState +func GetDataGuardAssociationLifecycleStateEnumValues() []DataGuardAssociationLifecycleStateEnum { + values := make([]DataGuardAssociationLifecycleStateEnum, 0) + for _, v := range mappingDataGuardAssociationLifecycleState { + values = append(values, v) + } + return values +} + +// DataGuardAssociationPeerRoleEnum Enum with underlying type: string +type DataGuardAssociationPeerRoleEnum string + +// Set of constants representing the allowable values for DataGuardAssociationPeerRole +const ( + DataGuardAssociationPeerRolePrimary DataGuardAssociationPeerRoleEnum = "PRIMARY" + DataGuardAssociationPeerRoleStandby DataGuardAssociationPeerRoleEnum = "STANDBY" + DataGuardAssociationPeerRoleDisabledStandby DataGuardAssociationPeerRoleEnum = "DISABLED_STANDBY" +) + +var mappingDataGuardAssociationPeerRole = map[string]DataGuardAssociationPeerRoleEnum{ + "PRIMARY": DataGuardAssociationPeerRolePrimary, + "STANDBY": DataGuardAssociationPeerRoleStandby, + "DISABLED_STANDBY": DataGuardAssociationPeerRoleDisabledStandby, +} + +// GetDataGuardAssociationPeerRoleEnumValues Enumerates the set of values for DataGuardAssociationPeerRole +func GetDataGuardAssociationPeerRoleEnumValues() []DataGuardAssociationPeerRoleEnum { + values := make([]DataGuardAssociationPeerRoleEnum, 0) + for _, v := range mappingDataGuardAssociationPeerRole { + values = append(values, v) + } + return values +} + +// DataGuardAssociationProtectionModeEnum Enum with underlying type: string +type DataGuardAssociationProtectionModeEnum string + +// Set of constants representing the allowable values for DataGuardAssociationProtectionMode +const ( + DataGuardAssociationProtectionModeAvailability DataGuardAssociationProtectionModeEnum = "MAXIMUM_AVAILABILITY" + DataGuardAssociationProtectionModePerformance DataGuardAssociationProtectionModeEnum = "MAXIMUM_PERFORMANCE" + DataGuardAssociationProtectionModeProtection DataGuardAssociationProtectionModeEnum = "MAXIMUM_PROTECTION" +) + +var mappingDataGuardAssociationProtectionMode = map[string]DataGuardAssociationProtectionModeEnum{ + "MAXIMUM_AVAILABILITY": DataGuardAssociationProtectionModeAvailability, + "MAXIMUM_PERFORMANCE": DataGuardAssociationProtectionModePerformance, + "MAXIMUM_PROTECTION": DataGuardAssociationProtectionModeProtection, +} + +// GetDataGuardAssociationProtectionModeEnumValues Enumerates the set of values for DataGuardAssociationProtectionMode +func GetDataGuardAssociationProtectionModeEnumValues() []DataGuardAssociationProtectionModeEnum { + values := make([]DataGuardAssociationProtectionModeEnum, 0) + for _, v := range mappingDataGuardAssociationProtectionMode { + values = append(values, v) + } + return values +} + +// DataGuardAssociationRoleEnum Enum with underlying type: string +type DataGuardAssociationRoleEnum string + +// Set of constants representing the allowable values for DataGuardAssociationRole +const ( + DataGuardAssociationRolePrimary DataGuardAssociationRoleEnum = "PRIMARY" + DataGuardAssociationRoleStandby DataGuardAssociationRoleEnum = "STANDBY" + DataGuardAssociationRoleDisabledStandby DataGuardAssociationRoleEnum = "DISABLED_STANDBY" +) + +var mappingDataGuardAssociationRole = map[string]DataGuardAssociationRoleEnum{ + "PRIMARY": DataGuardAssociationRolePrimary, + "STANDBY": DataGuardAssociationRoleStandby, + "DISABLED_STANDBY": DataGuardAssociationRoleDisabledStandby, +} + +// GetDataGuardAssociationRoleEnumValues Enumerates the set of values for DataGuardAssociationRole +func GetDataGuardAssociationRoleEnumValues() []DataGuardAssociationRoleEnum { + values := make([]DataGuardAssociationRoleEnum, 0) + for _, v := range mappingDataGuardAssociationRole { + values = append(values, v) + } + return values +} + +// DataGuardAssociationTransportTypeEnum Enum with underlying type: string +type DataGuardAssociationTransportTypeEnum string + +// Set of constants representing the allowable values for DataGuardAssociationTransportType +const ( + DataGuardAssociationTransportTypeSync DataGuardAssociationTransportTypeEnum = "SYNC" + DataGuardAssociationTransportTypeAsync DataGuardAssociationTransportTypeEnum = "ASYNC" + DataGuardAssociationTransportTypeFastsync DataGuardAssociationTransportTypeEnum = "FASTSYNC" +) + +var mappingDataGuardAssociationTransportType = map[string]DataGuardAssociationTransportTypeEnum{ + "SYNC": DataGuardAssociationTransportTypeSync, + "ASYNC": DataGuardAssociationTransportTypeAsync, + "FASTSYNC": DataGuardAssociationTransportTypeFastsync, +} + +// GetDataGuardAssociationTransportTypeEnumValues Enumerates the set of values for DataGuardAssociationTransportType +func GetDataGuardAssociationTransportTypeEnumValues() []DataGuardAssociationTransportTypeEnum { + values := make([]DataGuardAssociationTransportTypeEnum, 0) + for _, v := range mappingDataGuardAssociationTransportType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/data_guard_association_summary.go b/vendor/github.com/oracle/oci-go-sdk/database/data_guard_association_summary.go new file mode 100644 index 000000000..ebfc69c62 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/data_guard_association_summary.go @@ -0,0 +1,211 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// DataGuardAssociationSummary The properties that define a Data Guard association. +// 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +// For information about endpoints and signing API requests, see +// About the API (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm). For information about available SDKs and tools, see +// SDKS and Other Tools (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdks.htm). +type DataGuardAssociationSummary struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the reporting database. + DatabaseId *string `mandatory:"true" json:"databaseId"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the Data Guard association. + Id *string `mandatory:"true" json:"id"` + + // The current state of the Data Guard association. + LifecycleState DataGuardAssociationSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the DB System containing the associated + // peer database. + PeerDbSystemId *string `mandatory:"true" json:"peerDbSystemId"` + + // The role of the peer database in this Data Guard association. + PeerRole DataGuardAssociationSummaryPeerRoleEnum `mandatory:"true" json:"peerRole"` + + // The protection mode of this Data Guard association. For more information, see + // Oracle Data Guard Protection Modes (http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-protection-modes.htm#SBYDB02000) + // in the Oracle Data Guard documentation. + ProtectionMode DataGuardAssociationSummaryProtectionModeEnum `mandatory:"true" json:"protectionMode"` + + // The role of the reporting database in this Data Guard association. + Role DataGuardAssociationSummaryRoleEnum `mandatory:"true" json:"role"` + + // The lag time between updates to the primary database and application of the redo data on the standby database, + // as computed by the reporting database. + // Example: `9 seconds` + ApplyLag *string `mandatory:"false" json:"applyLag"` + + // The rate at which redo logs are synced between the associated databases. + // Example: `180 Mb per second` + ApplyRate *string `mandatory:"false" json:"applyRate"` + + // Additional information about the current lifecycleState, if available. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the peer database's Data Guard association. + PeerDataGuardAssociationId *string `mandatory:"false" json:"peerDataGuardAssociationId"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the associated peer database. + PeerDatabaseId *string `mandatory:"false" json:"peerDatabaseId"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the database home containing the associated peer database. + PeerDbHomeId *string `mandatory:"false" json:"peerDbHomeId"` + + // The date and time the Data Guard Association was created. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The redo transport type used by this Data Guard association. For more information, see + // Redo Transport Services (http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-redo-transport-services.htm#SBYDB00400) + // in the Oracle Data Guard documentation. + TransportType DataGuardAssociationSummaryTransportTypeEnum `mandatory:"false" json:"transportType,omitempty"` +} + +func (m DataGuardAssociationSummary) String() string { + return common.PointerString(m) +} + +// DataGuardAssociationSummaryLifecycleStateEnum Enum with underlying type: string +type DataGuardAssociationSummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for DataGuardAssociationSummaryLifecycleState +const ( + DataGuardAssociationSummaryLifecycleStateProvisioning DataGuardAssociationSummaryLifecycleStateEnum = "PROVISIONING" + DataGuardAssociationSummaryLifecycleStateAvailable DataGuardAssociationSummaryLifecycleStateEnum = "AVAILABLE" + DataGuardAssociationSummaryLifecycleStateUpdating DataGuardAssociationSummaryLifecycleStateEnum = "UPDATING" + DataGuardAssociationSummaryLifecycleStateTerminating DataGuardAssociationSummaryLifecycleStateEnum = "TERMINATING" + DataGuardAssociationSummaryLifecycleStateTerminated DataGuardAssociationSummaryLifecycleStateEnum = "TERMINATED" + DataGuardAssociationSummaryLifecycleStateFailed DataGuardAssociationSummaryLifecycleStateEnum = "FAILED" +) + +var mappingDataGuardAssociationSummaryLifecycleState = map[string]DataGuardAssociationSummaryLifecycleStateEnum{ + "PROVISIONING": DataGuardAssociationSummaryLifecycleStateProvisioning, + "AVAILABLE": DataGuardAssociationSummaryLifecycleStateAvailable, + "UPDATING": DataGuardAssociationSummaryLifecycleStateUpdating, + "TERMINATING": DataGuardAssociationSummaryLifecycleStateTerminating, + "TERMINATED": DataGuardAssociationSummaryLifecycleStateTerminated, + "FAILED": DataGuardAssociationSummaryLifecycleStateFailed, +} + +// GetDataGuardAssociationSummaryLifecycleStateEnumValues Enumerates the set of values for DataGuardAssociationSummaryLifecycleState +func GetDataGuardAssociationSummaryLifecycleStateEnumValues() []DataGuardAssociationSummaryLifecycleStateEnum { + values := make([]DataGuardAssociationSummaryLifecycleStateEnum, 0) + for _, v := range mappingDataGuardAssociationSummaryLifecycleState { + values = append(values, v) + } + return values +} + +// DataGuardAssociationSummaryPeerRoleEnum Enum with underlying type: string +type DataGuardAssociationSummaryPeerRoleEnum string + +// Set of constants representing the allowable values for DataGuardAssociationSummaryPeerRole +const ( + DataGuardAssociationSummaryPeerRolePrimary DataGuardAssociationSummaryPeerRoleEnum = "PRIMARY" + DataGuardAssociationSummaryPeerRoleStandby DataGuardAssociationSummaryPeerRoleEnum = "STANDBY" + DataGuardAssociationSummaryPeerRoleDisabledStandby DataGuardAssociationSummaryPeerRoleEnum = "DISABLED_STANDBY" +) + +var mappingDataGuardAssociationSummaryPeerRole = map[string]DataGuardAssociationSummaryPeerRoleEnum{ + "PRIMARY": DataGuardAssociationSummaryPeerRolePrimary, + "STANDBY": DataGuardAssociationSummaryPeerRoleStandby, + "DISABLED_STANDBY": DataGuardAssociationSummaryPeerRoleDisabledStandby, +} + +// GetDataGuardAssociationSummaryPeerRoleEnumValues Enumerates the set of values for DataGuardAssociationSummaryPeerRole +func GetDataGuardAssociationSummaryPeerRoleEnumValues() []DataGuardAssociationSummaryPeerRoleEnum { + values := make([]DataGuardAssociationSummaryPeerRoleEnum, 0) + for _, v := range mappingDataGuardAssociationSummaryPeerRole { + values = append(values, v) + } + return values +} + +// DataGuardAssociationSummaryProtectionModeEnum Enum with underlying type: string +type DataGuardAssociationSummaryProtectionModeEnum string + +// Set of constants representing the allowable values for DataGuardAssociationSummaryProtectionMode +const ( + DataGuardAssociationSummaryProtectionModeAvailability DataGuardAssociationSummaryProtectionModeEnum = "MAXIMUM_AVAILABILITY" + DataGuardAssociationSummaryProtectionModePerformance DataGuardAssociationSummaryProtectionModeEnum = "MAXIMUM_PERFORMANCE" + DataGuardAssociationSummaryProtectionModeProtection DataGuardAssociationSummaryProtectionModeEnum = "MAXIMUM_PROTECTION" +) + +var mappingDataGuardAssociationSummaryProtectionMode = map[string]DataGuardAssociationSummaryProtectionModeEnum{ + "MAXIMUM_AVAILABILITY": DataGuardAssociationSummaryProtectionModeAvailability, + "MAXIMUM_PERFORMANCE": DataGuardAssociationSummaryProtectionModePerformance, + "MAXIMUM_PROTECTION": DataGuardAssociationSummaryProtectionModeProtection, +} + +// GetDataGuardAssociationSummaryProtectionModeEnumValues Enumerates the set of values for DataGuardAssociationSummaryProtectionMode +func GetDataGuardAssociationSummaryProtectionModeEnumValues() []DataGuardAssociationSummaryProtectionModeEnum { + values := make([]DataGuardAssociationSummaryProtectionModeEnum, 0) + for _, v := range mappingDataGuardAssociationSummaryProtectionMode { + values = append(values, v) + } + return values +} + +// DataGuardAssociationSummaryRoleEnum Enum with underlying type: string +type DataGuardAssociationSummaryRoleEnum string + +// Set of constants representing the allowable values for DataGuardAssociationSummaryRole +const ( + DataGuardAssociationSummaryRolePrimary DataGuardAssociationSummaryRoleEnum = "PRIMARY" + DataGuardAssociationSummaryRoleStandby DataGuardAssociationSummaryRoleEnum = "STANDBY" + DataGuardAssociationSummaryRoleDisabledStandby DataGuardAssociationSummaryRoleEnum = "DISABLED_STANDBY" +) + +var mappingDataGuardAssociationSummaryRole = map[string]DataGuardAssociationSummaryRoleEnum{ + "PRIMARY": DataGuardAssociationSummaryRolePrimary, + "STANDBY": DataGuardAssociationSummaryRoleStandby, + "DISABLED_STANDBY": DataGuardAssociationSummaryRoleDisabledStandby, +} + +// GetDataGuardAssociationSummaryRoleEnumValues Enumerates the set of values for DataGuardAssociationSummaryRole +func GetDataGuardAssociationSummaryRoleEnumValues() []DataGuardAssociationSummaryRoleEnum { + values := make([]DataGuardAssociationSummaryRoleEnum, 0) + for _, v := range mappingDataGuardAssociationSummaryRole { + values = append(values, v) + } + return values +} + +// DataGuardAssociationSummaryTransportTypeEnum Enum with underlying type: string +type DataGuardAssociationSummaryTransportTypeEnum string + +// Set of constants representing the allowable values for DataGuardAssociationSummaryTransportType +const ( + DataGuardAssociationSummaryTransportTypeSync DataGuardAssociationSummaryTransportTypeEnum = "SYNC" + DataGuardAssociationSummaryTransportTypeAsync DataGuardAssociationSummaryTransportTypeEnum = "ASYNC" + DataGuardAssociationSummaryTransportTypeFastsync DataGuardAssociationSummaryTransportTypeEnum = "FASTSYNC" +) + +var mappingDataGuardAssociationSummaryTransportType = map[string]DataGuardAssociationSummaryTransportTypeEnum{ + "SYNC": DataGuardAssociationSummaryTransportTypeSync, + "ASYNC": DataGuardAssociationSummaryTransportTypeAsync, + "FASTSYNC": DataGuardAssociationSummaryTransportTypeFastsync, +} + +// GetDataGuardAssociationSummaryTransportTypeEnumValues Enumerates the set of values for DataGuardAssociationSummaryTransportType +func GetDataGuardAssociationSummaryTransportTypeEnumValues() []DataGuardAssociationSummaryTransportTypeEnum { + values := make([]DataGuardAssociationSummaryTransportTypeEnum, 0) + for _, v := range mappingDataGuardAssociationSummaryTransportType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/database.go b/vendor/github.com/oracle/oci-go-sdk/database/database.go new file mode 100644 index 000000000..be33ef1a8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/database.go @@ -0,0 +1,95 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Database An Oracle database on a DB System. For more information, see Managing Oracle Databases (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type Database struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The database name. + DbName *string `mandatory:"true" json:"dbName"` + + // A system-generated name for the database to ensure uniqueness within an Oracle Data Guard group (a primary database and its standby databases). The unique name cannot be changed. + DbUniqueName *string `mandatory:"true" json:"dbUniqueName"` + + // The OCID of the database. + Id *string `mandatory:"true" json:"id"` + + // The current state of the database. + LifecycleState DatabaseLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The character set for the database. + CharacterSet *string `mandatory:"false" json:"characterSet"` + + DbBackupConfig *DbBackupConfig `mandatory:"false" json:"dbBackupConfig"` + + // The OCID of the database home. + DbHomeId *string `mandatory:"false" json:"dbHomeId"` + + // Database workload type. + DbWorkload *string `mandatory:"false" json:"dbWorkload"` + + // Additional information about the current lifecycleState. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The national character set for the database. + NcharacterSet *string `mandatory:"false" json:"ncharacterSet"` + + // Pluggable database name. It must begin with an alphabetic character and can contain a maximum of eight alphanumeric characters. Special characters are not permitted. Pluggable database should not be same as database name. + PdbName *string `mandatory:"false" json:"pdbName"` + + // The date and time the database was created. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m Database) String() string { + return common.PointerString(m) +} + +// DatabaseLifecycleStateEnum Enum with underlying type: string +type DatabaseLifecycleStateEnum string + +// Set of constants representing the allowable values for DatabaseLifecycleState +const ( + DatabaseLifecycleStateProvisioning DatabaseLifecycleStateEnum = "PROVISIONING" + DatabaseLifecycleStateAvailable DatabaseLifecycleStateEnum = "AVAILABLE" + DatabaseLifecycleStateUpdating DatabaseLifecycleStateEnum = "UPDATING" + DatabaseLifecycleStateBackupInProgress DatabaseLifecycleStateEnum = "BACKUP_IN_PROGRESS" + DatabaseLifecycleStateTerminating DatabaseLifecycleStateEnum = "TERMINATING" + DatabaseLifecycleStateTerminated DatabaseLifecycleStateEnum = "TERMINATED" + DatabaseLifecycleStateRestoreFailed DatabaseLifecycleStateEnum = "RESTORE_FAILED" + DatabaseLifecycleStateFailed DatabaseLifecycleStateEnum = "FAILED" +) + +var mappingDatabaseLifecycleState = map[string]DatabaseLifecycleStateEnum{ + "PROVISIONING": DatabaseLifecycleStateProvisioning, + "AVAILABLE": DatabaseLifecycleStateAvailable, + "UPDATING": DatabaseLifecycleStateUpdating, + "BACKUP_IN_PROGRESS": DatabaseLifecycleStateBackupInProgress, + "TERMINATING": DatabaseLifecycleStateTerminating, + "TERMINATED": DatabaseLifecycleStateTerminated, + "RESTORE_FAILED": DatabaseLifecycleStateRestoreFailed, + "FAILED": DatabaseLifecycleStateFailed, +} + +// GetDatabaseLifecycleStateEnumValues Enumerates the set of values for DatabaseLifecycleState +func GetDatabaseLifecycleStateEnumValues() []DatabaseLifecycleStateEnum { + values := make([]DatabaseLifecycleStateEnum, 0) + for _, v := range mappingDatabaseLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/database_client.go b/vendor/github.com/oracle/oci-go-sdk/database/database_client.go new file mode 100644 index 000000000..d666cc5f0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/database_client.go @@ -0,0 +1,753 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +//DatabaseClient a client for Database +type DatabaseClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewDatabaseClientWithConfigurationProvider Creates a new default Database client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewDatabaseClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client DatabaseClient, err error) { + baseClient, err := common.NewClientWithConfig(configProvider) + if err != nil { + return + } + + client = DatabaseClient{BaseClient: baseClient} + client.BasePath = "20160918" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *DatabaseClient) SetRegion(region string) { + client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "database", region) +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *DatabaseClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { + if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { + return err + } + + // Error has been checked already + region, _ := configProvider.Region() + client.config = &configProvider + client.SetRegion(region) + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *DatabaseClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// CreateBackup Creates a new backup in the specified database based on the request parameters you provide. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work. +func (client DatabaseClient) CreateBackup(ctx context.Context, request CreateBackupRequest) (response CreateBackupResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/backups", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateDataGuardAssociation Creates a new Data Guard association. A Data Guard association represents the replication relationship between the +// specified database and a peer database. For more information, see Using Oracle Data Guard (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Tasks/usingdataguard.htm). +// All Oracle Cloud Infrastructure resources, including Data Guard associations, 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. Fore more information, see +// Resource Identifiers (http://localhost:8000/Content/General/Concepts/identifiers.htm). +func (client DatabaseClient) CreateDataGuardAssociation(ctx context.Context, request CreateDataGuardAssociationRequest) (response CreateDataGuardAssociationResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/databases/{databaseId}/dataGuardAssociations", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateDbHome Creates a new DB Home in the specified DB System based on the request parameters you provide. +func (client DatabaseClient) CreateDbHome(ctx context.Context, request CreateDbHomeRequest) (response CreateDbHomeResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/dbHomes", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DbNodeAction Performs an action, such as one of the power actions (start, stop, softreset, or reset), on the specified DB Node. +// **start** - power on +// **stop** - power off +// **softreset** - ACPI shutdown and power on +// **reset** - power off and power on +// Note that the **stop** state has no effect on the resources you consume. +// Billing continues for DB Nodes that you stop, and related resources continue +// to apply against any relevant quotas. You must terminate the DB System +// (TerminateDbSystem) +// to remove its resources from billing and quotas. +func (client DatabaseClient) DbNodeAction(ctx context.Context, request DbNodeActionRequest) (response DbNodeActionResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/dbNodes/{dbNodeId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteBackup Deletes a full backup. You cannot delete automatic backups using this API. +func (client DatabaseClient) DeleteBackup(ctx context.Context, request DeleteBackupRequest) (response DeleteBackupResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/backups/{backupId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteDbHome Deletes a DB Home. The DB Home and its database data are local to the DB System and will be lost when it is deleted. Oracle recommends that you back up any data in the DB System prior to deleting it. +func (client DatabaseClient) DeleteDbHome(ctx context.Context, request DeleteDbHomeRequest) (response DeleteDbHomeResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/dbHomes/{dbHomeId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// FailoverDataGuardAssociation Performs a failover to transition the standby database identified by the `databaseId` parameter into the +// specified Data Guard association's primary role after the existing primary database fails or becomes unreachable. +// A failover might result in data loss depending on the protection mode in effect at the time of the primary +// database failure. +func (client DatabaseClient) FailoverDataGuardAssociation(ctx context.Context, request FailoverDataGuardAssociationRequest) (response FailoverDataGuardAssociationResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/databases/{databaseId}/dataGuardAssociations/{dataGuardAssociationId}/actions/failover", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetBackup Gets information about the specified backup. +func (client DatabaseClient) GetBackup(ctx context.Context, request GetBackupRequest) (response GetBackupResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/backups/{backupId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetDataGuardAssociation Gets the specified Data Guard association's configuration information. +func (client DatabaseClient) GetDataGuardAssociation(ctx context.Context, request GetDataGuardAssociationRequest) (response GetDataGuardAssociationResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/databases/{databaseId}/dataGuardAssociations/{dataGuardAssociationId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetDatabase Gets information about a specific database. +func (client DatabaseClient) GetDatabase(ctx context.Context, request GetDatabaseRequest) (response GetDatabaseResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/databases/{databaseId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetDbHome Gets information about the specified database home. +func (client DatabaseClient) GetDbHome(ctx context.Context, request GetDbHomeRequest) (response GetDbHomeResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbHomes/{dbHomeId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetDbHomePatch Gets information about a specified patch package. +func (client DatabaseClient) GetDbHomePatch(ctx context.Context, request GetDbHomePatchRequest) (response GetDbHomePatchResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbHomes/{dbHomeId}/patches/{patchId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetDbHomePatchHistoryEntry Gets the patch history details for the specified patchHistoryEntryId +func (client DatabaseClient) GetDbHomePatchHistoryEntry(ctx context.Context, request GetDbHomePatchHistoryEntryRequest) (response GetDbHomePatchHistoryEntryResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbHomes/{dbHomeId}/patchHistoryEntries/{patchHistoryEntryId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetDbNode Gets information about the specified database node. +func (client DatabaseClient) GetDbNode(ctx context.Context, request GetDbNodeRequest) (response GetDbNodeResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbNodes/{dbNodeId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetDbSystem Gets information about the specified DB System. +func (client DatabaseClient) GetDbSystem(ctx context.Context, request GetDbSystemRequest) (response GetDbSystemResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbSystems/{dbSystemId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetDbSystemPatch Gets information about a specified patch package. +func (client DatabaseClient) GetDbSystemPatch(ctx context.Context, request GetDbSystemPatchRequest) (response GetDbSystemPatchResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbSystems/{dbSystemId}/patches/{patchId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetDbSystemPatchHistoryEntry Gets the patch history details for the specified patchHistoryEntryId. +func (client DatabaseClient) GetDbSystemPatchHistoryEntry(ctx context.Context, request GetDbSystemPatchHistoryEntryRequest) (response GetDbSystemPatchHistoryEntryResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbSystems/{dbSystemId}/patchHistoryEntries/{patchHistoryEntryId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// LaunchDbSystem Launches a new DB System in the specified compartment and Availability Domain. You'll specify a single Oracle +// Database Edition that applies to all the databases on that DB System. The selected edition cannot be changed. +// An initial database is created on the DB System based on the request parameters you provide and some default +// options. For more information, +// see Default Options for the Initial Database (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Tasks/launchingDB.htm#Default_Options_for_the_Initial_Database). +// The DB System will include a command line interface (CLI) that you can use to create additional databases and +// manage existing databases. For more information, see the +// Oracle Database CLI Reference (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/References/odacli.htm#Oracle_Database_CLI_Reference). +func (client DatabaseClient) LaunchDbSystem(ctx context.Context, request LaunchDbSystemRequest) (response LaunchDbSystemResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/dbSystems", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListBackups Gets a list of backups based on the databaseId or compartmentId specified. Either one of the query parameters must be provided. +func (client DatabaseClient) ListBackups(ctx context.Context, request ListBackupsRequest) (response ListBackupsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/backups", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListDataGuardAssociations Lists all Data Guard associations for the specified database. +func (client DatabaseClient) ListDataGuardAssociations(ctx context.Context, request ListDataGuardAssociationsRequest) (response ListDataGuardAssociationsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/databases/{databaseId}/dataGuardAssociations", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListDatabases Gets a list of the databases in the specified database home. +func (client DatabaseClient) ListDatabases(ctx context.Context, request ListDatabasesRequest) (response ListDatabasesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/databases", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListDbHomePatchHistoryEntries Gets history of the actions taken for patches for the specified database home. +func (client DatabaseClient) ListDbHomePatchHistoryEntries(ctx context.Context, request ListDbHomePatchHistoryEntriesRequest) (response ListDbHomePatchHistoryEntriesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbHomes/{dbHomeId}/patchHistoryEntries", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListDbHomePatches Lists patches applicable to the requested database home. +func (client DatabaseClient) ListDbHomePatches(ctx context.Context, request ListDbHomePatchesRequest) (response ListDbHomePatchesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbHomes/{dbHomeId}/patches", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListDbHomes Gets a list of database homes in the specified DB System and compartment. A database home is a directory where Oracle database software is installed. +func (client DatabaseClient) ListDbHomes(ctx context.Context, request ListDbHomesRequest) (response ListDbHomesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbHomes", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListDbNodes Gets a list of database nodes in the specified DB System and compartment. A database node is a server running database software. +func (client DatabaseClient) ListDbNodes(ctx context.Context, request ListDbNodesRequest) (response ListDbNodesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbNodes", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListDbSystemPatchHistoryEntries Gets the history of the patch actions performed on the specified DB System. +func (client DatabaseClient) ListDbSystemPatchHistoryEntries(ctx context.Context, request ListDbSystemPatchHistoryEntriesRequest) (response ListDbSystemPatchHistoryEntriesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbSystems/{dbSystemId}/patchHistoryEntries", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListDbSystemPatches Lists the patches applicable to the requested DB System. +func (client DatabaseClient) ListDbSystemPatches(ctx context.Context, request ListDbSystemPatchesRequest) (response ListDbSystemPatchesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbSystems/{dbSystemId}/patches", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListDbSystemShapes Gets a list of the shapes that can be used to launch a new DB System. The shape determines resources to allocate to the DB system - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. +func (client DatabaseClient) ListDbSystemShapes(ctx context.Context, request ListDbSystemShapesRequest) (response ListDbSystemShapesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbSystemShapes", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListDbSystems Gets a list of the DB Systems in the specified compartment. +// +func (client DatabaseClient) ListDbSystems(ctx context.Context, request ListDbSystemsRequest) (response ListDbSystemsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbSystems", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListDbVersions Gets a list of supported Oracle database versions. +func (client DatabaseClient) ListDbVersions(ctx context.Context, request ListDbVersionsRequest) (response ListDbVersionsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/dbVersions", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ReinstateDataGuardAssociation Reinstates the database identified by the `databaseId` parameter into the standby role in a Data Guard association. +func (client DatabaseClient) ReinstateDataGuardAssociation(ctx context.Context, request ReinstateDataGuardAssociationRequest) (response ReinstateDataGuardAssociationResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/databases/{databaseId}/dataGuardAssociations/{dataGuardAssociationId}/actions/reinstate", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// RestoreDatabase Restore a Database based on the request parameters you provide. +func (client DatabaseClient) RestoreDatabase(ctx context.Context, request RestoreDatabaseRequest) (response RestoreDatabaseResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/databases/{databaseId}/actions/restore", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// SwitchoverDataGuardAssociation Performs a switchover to transition the primary database of a Data Guard association into a standby role. The +// standby database associated with the `dataGuardAssociationId` assumes the primary database role. +// A switchover guarantees no data loss. +func (client DatabaseClient) SwitchoverDataGuardAssociation(ctx context.Context, request SwitchoverDataGuardAssociationRequest) (response SwitchoverDataGuardAssociationResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/databases/{databaseId}/dataGuardAssociations/{dataGuardAssociationId}/actions/switchover", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// TerminateDbSystem Terminates a DB System and permanently deletes it and any databases running on it, and any storage volumes attached to it. The database data is local to the DB System and will be lost when the system is terminated. Oracle recommends that you back up any data in the DB System prior to terminating it. +func (client DatabaseClient) TerminateDbSystem(ctx context.Context, request TerminateDbSystemRequest) (response TerminateDbSystemResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/dbSystems/{dbSystemId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateDatabase Update a Database based on the request parameters you provide. +func (client DatabaseClient) UpdateDatabase(ctx context.Context, request UpdateDatabaseRequest) (response UpdateDatabaseResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/databases/{databaseId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateDbHome Patches the specified dbHome. +func (client DatabaseClient) UpdateDbHome(ctx context.Context, request UpdateDbHomeRequest) (response UpdateDbHomeResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/dbHomes/{dbHomeId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateDbSystem Updates the properties of a DB System, such as the CPU core count. +func (client DatabaseClient) UpdateDbSystem(ctx context.Context, request UpdateDbSystemRequest) (response UpdateDbSystemResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/dbSystems/{dbSystemId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/database_summary.go b/vendor/github.com/oracle/oci-go-sdk/database/database_summary.go new file mode 100644 index 000000000..6191d850f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/database_summary.go @@ -0,0 +1,95 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// DatabaseSummary An Oracle database on a DB System. For more information, see Managing Oracle Databases (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type DatabaseSummary struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The database name. + DbName *string `mandatory:"true" json:"dbName"` + + // A system-generated name for the database to ensure uniqueness within an Oracle Data Guard group (a primary database and its standby databases). The unique name cannot be changed. + DbUniqueName *string `mandatory:"true" json:"dbUniqueName"` + + // The OCID of the database. + Id *string `mandatory:"true" json:"id"` + + // The current state of the database. + LifecycleState DatabaseSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The character set for the database. + CharacterSet *string `mandatory:"false" json:"characterSet"` + + DbBackupConfig *DbBackupConfig `mandatory:"false" json:"dbBackupConfig"` + + // The OCID of the database home. + DbHomeId *string `mandatory:"false" json:"dbHomeId"` + + // Database workload type. + DbWorkload *string `mandatory:"false" json:"dbWorkload"` + + // Additional information about the current lifecycleState. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The national character set for the database. + NcharacterSet *string `mandatory:"false" json:"ncharacterSet"` + + // Pluggable database name. It must begin with an alphabetic character and can contain a maximum of eight alphanumeric characters. Special characters are not permitted. Pluggable database should not be same as database name. + PdbName *string `mandatory:"false" json:"pdbName"` + + // The date and time the database was created. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m DatabaseSummary) String() string { + return common.PointerString(m) +} + +// DatabaseSummaryLifecycleStateEnum Enum with underlying type: string +type DatabaseSummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for DatabaseSummaryLifecycleState +const ( + DatabaseSummaryLifecycleStateProvisioning DatabaseSummaryLifecycleStateEnum = "PROVISIONING" + DatabaseSummaryLifecycleStateAvailable DatabaseSummaryLifecycleStateEnum = "AVAILABLE" + DatabaseSummaryLifecycleStateUpdating DatabaseSummaryLifecycleStateEnum = "UPDATING" + DatabaseSummaryLifecycleStateBackupInProgress DatabaseSummaryLifecycleStateEnum = "BACKUP_IN_PROGRESS" + DatabaseSummaryLifecycleStateTerminating DatabaseSummaryLifecycleStateEnum = "TERMINATING" + DatabaseSummaryLifecycleStateTerminated DatabaseSummaryLifecycleStateEnum = "TERMINATED" + DatabaseSummaryLifecycleStateRestoreFailed DatabaseSummaryLifecycleStateEnum = "RESTORE_FAILED" + DatabaseSummaryLifecycleStateFailed DatabaseSummaryLifecycleStateEnum = "FAILED" +) + +var mappingDatabaseSummaryLifecycleState = map[string]DatabaseSummaryLifecycleStateEnum{ + "PROVISIONING": DatabaseSummaryLifecycleStateProvisioning, + "AVAILABLE": DatabaseSummaryLifecycleStateAvailable, + "UPDATING": DatabaseSummaryLifecycleStateUpdating, + "BACKUP_IN_PROGRESS": DatabaseSummaryLifecycleStateBackupInProgress, + "TERMINATING": DatabaseSummaryLifecycleStateTerminating, + "TERMINATED": DatabaseSummaryLifecycleStateTerminated, + "RESTORE_FAILED": DatabaseSummaryLifecycleStateRestoreFailed, + "FAILED": DatabaseSummaryLifecycleStateFailed, +} + +// GetDatabaseSummaryLifecycleStateEnumValues Enumerates the set of values for DatabaseSummaryLifecycleState +func GetDatabaseSummaryLifecycleStateEnumValues() []DatabaseSummaryLifecycleStateEnum { + values := make([]DatabaseSummaryLifecycleStateEnum, 0) + for _, v := range mappingDatabaseSummaryLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/db_backup_config.go b/vendor/github.com/oracle/oci-go-sdk/database/db_backup_config.go new file mode 100644 index 000000000..193a4a81c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/db_backup_config.go @@ -0,0 +1,25 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// DbBackupConfig Backup Options +// 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type DbBackupConfig struct { + + // If set to true, configures automatic backups. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work. + AutoBackupEnabled *bool `mandatory:"false" json:"autoBackupEnabled"` +} + +func (m DbBackupConfig) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/db_home.go b/vendor/github.com/oracle/oci-go-sdk/database/db_home.go new file mode 100644 index 000000000..dc768b7cc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/db_home.go @@ -0,0 +1,82 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// DbHome A directory where Oracle database software is installed. Each DB System can have multiple database homes, +// and each database home can have multiple databases within it. All the databases within a single database home +// must be the same database version, but different database homes can run different versions. For more information, +// see Managing Oracle Databases (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type DbHome struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The Oracle database version. + DbVersion *string `mandatory:"true" json:"dbVersion"` + + // The user-provided name for the database home. It does not need to be unique. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID of the database home. + Id *string `mandatory:"true" json:"id"` + + // The current state of the database home. + LifecycleState DbHomeLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The OCID of the DB System. + DbSystemId *string `mandatory:"false" json:"dbSystemId"` + + // The OCID of the last patch history. This is updated as soon as a patch operation is started. + LastPatchHistoryEntryId *string `mandatory:"false" json:"lastPatchHistoryEntryId"` + + // The date and time the database home was created. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m DbHome) String() string { + return common.PointerString(m) +} + +// DbHomeLifecycleStateEnum Enum with underlying type: string +type DbHomeLifecycleStateEnum string + +// Set of constants representing the allowable values for DbHomeLifecycleState +const ( + DbHomeLifecycleStateProvisioning DbHomeLifecycleStateEnum = "PROVISIONING" + DbHomeLifecycleStateAvailable DbHomeLifecycleStateEnum = "AVAILABLE" + DbHomeLifecycleStateUpdating DbHomeLifecycleStateEnum = "UPDATING" + DbHomeLifecycleStateTerminating DbHomeLifecycleStateEnum = "TERMINATING" + DbHomeLifecycleStateTerminated DbHomeLifecycleStateEnum = "TERMINATED" + DbHomeLifecycleStateFailed DbHomeLifecycleStateEnum = "FAILED" +) + +var mappingDbHomeLifecycleState = map[string]DbHomeLifecycleStateEnum{ + "PROVISIONING": DbHomeLifecycleStateProvisioning, + "AVAILABLE": DbHomeLifecycleStateAvailable, + "UPDATING": DbHomeLifecycleStateUpdating, + "TERMINATING": DbHomeLifecycleStateTerminating, + "TERMINATED": DbHomeLifecycleStateTerminated, + "FAILED": DbHomeLifecycleStateFailed, +} + +// GetDbHomeLifecycleStateEnumValues Enumerates the set of values for DbHomeLifecycleState +func GetDbHomeLifecycleStateEnumValues() []DbHomeLifecycleStateEnum { + values := make([]DbHomeLifecycleStateEnum, 0) + for _, v := range mappingDbHomeLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/db_home_summary.go b/vendor/github.com/oracle/oci-go-sdk/database/db_home_summary.go new file mode 100644 index 000000000..b71dec836 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/db_home_summary.go @@ -0,0 +1,82 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// DbHomeSummary A directory where Oracle database software is installed. Each DB System can have multiple database homes, +// and each database home can have multiple databases within it. All the databases within a single database home +// must be the same database version, but different database homes can run different versions. For more information, +// see Managing Oracle Databases (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type DbHomeSummary struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The Oracle database version. + DbVersion *string `mandatory:"true" json:"dbVersion"` + + // The user-provided name for the database home. It does not need to be unique. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID of the database home. + Id *string `mandatory:"true" json:"id"` + + // The current state of the database home. + LifecycleState DbHomeSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The OCID of the DB System. + DbSystemId *string `mandatory:"false" json:"dbSystemId"` + + // The OCID of the last patch history. This is updated as soon as a patch operation is started. + LastPatchHistoryEntryId *string `mandatory:"false" json:"lastPatchHistoryEntryId"` + + // The date and time the database home was created. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m DbHomeSummary) String() string { + return common.PointerString(m) +} + +// DbHomeSummaryLifecycleStateEnum Enum with underlying type: string +type DbHomeSummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for DbHomeSummaryLifecycleState +const ( + DbHomeSummaryLifecycleStateProvisioning DbHomeSummaryLifecycleStateEnum = "PROVISIONING" + DbHomeSummaryLifecycleStateAvailable DbHomeSummaryLifecycleStateEnum = "AVAILABLE" + DbHomeSummaryLifecycleStateUpdating DbHomeSummaryLifecycleStateEnum = "UPDATING" + DbHomeSummaryLifecycleStateTerminating DbHomeSummaryLifecycleStateEnum = "TERMINATING" + DbHomeSummaryLifecycleStateTerminated DbHomeSummaryLifecycleStateEnum = "TERMINATED" + DbHomeSummaryLifecycleStateFailed DbHomeSummaryLifecycleStateEnum = "FAILED" +) + +var mappingDbHomeSummaryLifecycleState = map[string]DbHomeSummaryLifecycleStateEnum{ + "PROVISIONING": DbHomeSummaryLifecycleStateProvisioning, + "AVAILABLE": DbHomeSummaryLifecycleStateAvailable, + "UPDATING": DbHomeSummaryLifecycleStateUpdating, + "TERMINATING": DbHomeSummaryLifecycleStateTerminating, + "TERMINATED": DbHomeSummaryLifecycleStateTerminated, + "FAILED": DbHomeSummaryLifecycleStateFailed, +} + +// GetDbHomeSummaryLifecycleStateEnumValues Enumerates the set of values for DbHomeSummaryLifecycleState +func GetDbHomeSummaryLifecycleStateEnumValues() []DbHomeSummaryLifecycleStateEnum { + values := make([]DbHomeSummaryLifecycleStateEnum, 0) + for _, v := range mappingDbHomeSummaryLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/db_node.go b/vendor/github.com/oracle/oci-go-sdk/database/db_node.go new file mode 100644 index 000000000..3e052d092 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/db_node.go @@ -0,0 +1,83 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// DbNode A server where Oracle database software is running. +// 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type DbNode struct { + + // The OCID of the DB System. + DbSystemId *string `mandatory:"true" json:"dbSystemId"` + + // The OCID of the DB Node. + Id *string `mandatory:"true" json:"id"` + + // The current state of the database node. + LifecycleState DbNodeLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time that the DB Node was created. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID of the VNIC. + VnicId *string `mandatory:"true" json:"vnicId"` + + // The OCID of the backup VNIC. + BackupVnicId *string `mandatory:"false" json:"backupVnicId"` + + // The host name for the DB Node. + Hostname *string `mandatory:"false" json:"hostname"` + + // Storage size, in GBs, of the software volume that is allocated to the DB system. This is applicable only for VM-based DBs. + SoftwareStorageSizeInGB *int `mandatory:"false" json:"softwareStorageSizeInGB"` +} + +func (m DbNode) String() string { + return common.PointerString(m) +} + +// DbNodeLifecycleStateEnum Enum with underlying type: string +type DbNodeLifecycleStateEnum string + +// Set of constants representing the allowable values for DbNodeLifecycleState +const ( + DbNodeLifecycleStateProvisioning DbNodeLifecycleStateEnum = "PROVISIONING" + DbNodeLifecycleStateAvailable DbNodeLifecycleStateEnum = "AVAILABLE" + DbNodeLifecycleStateUpdating DbNodeLifecycleStateEnum = "UPDATING" + DbNodeLifecycleStateStopping DbNodeLifecycleStateEnum = "STOPPING" + DbNodeLifecycleStateStopped DbNodeLifecycleStateEnum = "STOPPED" + DbNodeLifecycleStateStarting DbNodeLifecycleStateEnum = "STARTING" + DbNodeLifecycleStateTerminating DbNodeLifecycleStateEnum = "TERMINATING" + DbNodeLifecycleStateTerminated DbNodeLifecycleStateEnum = "TERMINATED" + DbNodeLifecycleStateFailed DbNodeLifecycleStateEnum = "FAILED" +) + +var mappingDbNodeLifecycleState = map[string]DbNodeLifecycleStateEnum{ + "PROVISIONING": DbNodeLifecycleStateProvisioning, + "AVAILABLE": DbNodeLifecycleStateAvailable, + "UPDATING": DbNodeLifecycleStateUpdating, + "STOPPING": DbNodeLifecycleStateStopping, + "STOPPED": DbNodeLifecycleStateStopped, + "STARTING": DbNodeLifecycleStateStarting, + "TERMINATING": DbNodeLifecycleStateTerminating, + "TERMINATED": DbNodeLifecycleStateTerminated, + "FAILED": DbNodeLifecycleStateFailed, +} + +// GetDbNodeLifecycleStateEnumValues Enumerates the set of values for DbNodeLifecycleState +func GetDbNodeLifecycleStateEnumValues() []DbNodeLifecycleStateEnum { + values := make([]DbNodeLifecycleStateEnum, 0) + for _, v := range mappingDbNodeLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/db_node_action_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/db_node_action_request_response.go new file mode 100644 index 000000000..208e50489 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/db_node_action_request_response.go @@ -0,0 +1,83 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DbNodeActionRequest wrapper for the DbNodeAction operation +type DbNodeActionRequest struct { + + // The database node OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DbNodeId *string `mandatory:"true" contributesTo:"path" name:"dbNodeId"` + + // The action to perform on the DB Node. + Action DbNodeActionActionEnum `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"` +} + +func (request DbNodeActionRequest) String() string { + return common.PointerString(request) +} + +// DbNodeActionResponse wrapper for the DbNodeAction operation +type DbNodeActionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DbNode instance + DbNode `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 DbNodeActionResponse) String() string { + return common.PointerString(response) +} + +// DbNodeActionActionEnum Enum with underlying type: string +type DbNodeActionActionEnum string + +// Set of constants representing the allowable values for DbNodeActionAction +const ( + DbNodeActionActionStop DbNodeActionActionEnum = "STOP" + DbNodeActionActionStart DbNodeActionActionEnum = "START" + DbNodeActionActionSoftreset DbNodeActionActionEnum = "SOFTRESET" + DbNodeActionActionReset DbNodeActionActionEnum = "RESET" +) + +var mappingDbNodeActionAction = map[string]DbNodeActionActionEnum{ + "STOP": DbNodeActionActionStop, + "START": DbNodeActionActionStart, + "SOFTRESET": DbNodeActionActionSoftreset, + "RESET": DbNodeActionActionReset, +} + +// GetDbNodeActionActionEnumValues Enumerates the set of values for DbNodeActionAction +func GetDbNodeActionActionEnumValues() []DbNodeActionActionEnum { + values := make([]DbNodeActionActionEnum, 0) + for _, v := range mappingDbNodeActionAction { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/db_node_summary.go b/vendor/github.com/oracle/oci-go-sdk/database/db_node_summary.go new file mode 100644 index 000000000..47e4ea0dc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/db_node_summary.go @@ -0,0 +1,83 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// DbNodeSummary A server where Oracle database software is running. +// 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type DbNodeSummary struct { + + // The OCID of the DB System. + DbSystemId *string `mandatory:"true" json:"dbSystemId"` + + // The OCID of the DB Node. + Id *string `mandatory:"true" json:"id"` + + // The current state of the database node. + LifecycleState DbNodeSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time that the DB Node was created. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The OCID of the VNIC. + VnicId *string `mandatory:"true" json:"vnicId"` + + // The OCID of the backup VNIC. + BackupVnicId *string `mandatory:"false" json:"backupVnicId"` + + // The host name for the DB Node. + Hostname *string `mandatory:"false" json:"hostname"` + + // Storage size, in GBs, of the software volume that is allocated to the DB system. This is applicable only for VM-based DBs. + SoftwareStorageSizeInGB *int `mandatory:"false" json:"softwareStorageSizeInGB"` +} + +func (m DbNodeSummary) String() string { + return common.PointerString(m) +} + +// DbNodeSummaryLifecycleStateEnum Enum with underlying type: string +type DbNodeSummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for DbNodeSummaryLifecycleState +const ( + DbNodeSummaryLifecycleStateProvisioning DbNodeSummaryLifecycleStateEnum = "PROVISIONING" + DbNodeSummaryLifecycleStateAvailable DbNodeSummaryLifecycleStateEnum = "AVAILABLE" + DbNodeSummaryLifecycleStateUpdating DbNodeSummaryLifecycleStateEnum = "UPDATING" + DbNodeSummaryLifecycleStateStopping DbNodeSummaryLifecycleStateEnum = "STOPPING" + DbNodeSummaryLifecycleStateStopped DbNodeSummaryLifecycleStateEnum = "STOPPED" + DbNodeSummaryLifecycleStateStarting DbNodeSummaryLifecycleStateEnum = "STARTING" + DbNodeSummaryLifecycleStateTerminating DbNodeSummaryLifecycleStateEnum = "TERMINATING" + DbNodeSummaryLifecycleStateTerminated DbNodeSummaryLifecycleStateEnum = "TERMINATED" + DbNodeSummaryLifecycleStateFailed DbNodeSummaryLifecycleStateEnum = "FAILED" +) + +var mappingDbNodeSummaryLifecycleState = map[string]DbNodeSummaryLifecycleStateEnum{ + "PROVISIONING": DbNodeSummaryLifecycleStateProvisioning, + "AVAILABLE": DbNodeSummaryLifecycleStateAvailable, + "UPDATING": DbNodeSummaryLifecycleStateUpdating, + "STOPPING": DbNodeSummaryLifecycleStateStopping, + "STOPPED": DbNodeSummaryLifecycleStateStopped, + "STARTING": DbNodeSummaryLifecycleStateStarting, + "TERMINATING": DbNodeSummaryLifecycleStateTerminating, + "TERMINATED": DbNodeSummaryLifecycleStateTerminated, + "FAILED": DbNodeSummaryLifecycleStateFailed, +} + +// GetDbNodeSummaryLifecycleStateEnumValues Enumerates the set of values for DbNodeSummaryLifecycleState +func GetDbNodeSummaryLifecycleStateEnumValues() []DbNodeSummaryLifecycleStateEnum { + values := make([]DbNodeSummaryLifecycleStateEnum, 0) + for _, v := range mappingDbNodeSummaryLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/db_system.go b/vendor/github.com/oracle/oci-go-sdk/database/db_system.go new file mode 100644 index 000000000..04085ad17 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/db_system.go @@ -0,0 +1,236 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// DbSystem The Database Service supports several types of DB Systems, ranging in size, price, and performance. For details about each type of system, see: +// - Exadata DB Systems (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Concepts/exaoverview.htm) +// - Bare Metal or VM DB Systems (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +// +// For information about access control and compartments, see +// Overview of the Identity Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). +// For information about Availability Domains, see +// Regions and Availability Domains (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm). +// To get a list of Availability Domains, use the `ListAvailabilityDomains` operation +// in the Identity Service API. +type DbSystem struct { + + // The name of the Availability Domain that the DB System is located in. + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The number of CPU cores enabled on the DB System. + CpuCoreCount *int `mandatory:"true" json:"cpuCoreCount"` + + // The Oracle Database Edition that applies to all the databases on the DB System. + DatabaseEdition DbSystemDatabaseEditionEnum `mandatory:"true" json:"databaseEdition"` + + // The user-friendly name for the DB System. It does not have to be unique. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The domain name for the DB System. + Domain *string `mandatory:"true" json:"domain"` + + // The host name for the DB Node. + Hostname *string `mandatory:"true" json:"hostname"` + + // The OCID of the DB System. + Id *string `mandatory:"true" json:"id"` + + // The current state of the DB System. + LifecycleState DbSystemLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The shape of the DB System. The shape determines resources to allocate to the DB system - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. + Shape *string `mandatory:"true" json:"shape"` + + // The public key portion of one or more key pairs used for SSH access to the DB System. + SshPublicKeys []string `mandatory:"true" json:"sshPublicKeys"` + + // The OCID of the subnet the DB System is associated with. + // **Subnet Restrictions:** + // - For single node and 2-node (RAC) DB Systems, do not use a subnet that overlaps with 192.168.16.16/28 + // - For Exadata and VM-based RAC DB Systems, do not use a subnet that overlaps with 192.168.128.0/20 + // These subnets are used by the Oracle Clusterware private interconnect on the database instance. + // Specifying an overlapping subnet will cause the private interconnect to malfunction. + // This restriction applies to both the client subnet and backup subnet. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // The OCID of the backup network subnet the DB System is associated with. Applicable only to Exadata. + // **Subnet Restriction:** See above subnetId's 'Subnet Restriction'. + // to malfunction. + BackupSubnetId *string `mandatory:"false" json:"backupSubnetId"` + + // Cluster name for Exadata and 2-node RAC DB Systems. The cluster name must begin with an an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + ClusterName *string `mandatory:"false" json:"clusterName"` + + // The percentage assigned to DATA storage (user data and database files). + // The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). Accepted values are 40 and 80. + DataStoragePercentage *int `mandatory:"false" json:"dataStoragePercentage"` + + // Data storage size, in GBs, that is currently available to the DB system. This is applicable only for VM-based DBs. + DataStorageSizeInGBs *int `mandatory:"false" json:"dataStorageSizeInGBs"` + + // The type of redundancy configured for the DB System. + // Normal is 2-way redundancy. + // High is 3-way redundancy. + DiskRedundancy DbSystemDiskRedundancyEnum `mandatory:"false" json:"diskRedundancy,omitempty"` + + // The OCID of the last patch history. This is updated as soon as a patch operation is started. + LastPatchHistoryEntryId *string `mandatory:"false" json:"lastPatchHistoryEntryId"` + + // The Oracle license model that applies to all the databases on the DB System. The default is LICENSE_INCLUDED. + LicenseModel DbSystemLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` + + // Additional information about the current lifecycleState. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The port number configured for the listener on the DB System. + ListenerPort *int `mandatory:"false" json:"listenerPort"` + + // Number of nodes in this DB system. For RAC DBs, this will be greater than 1. + NodeCount *int `mandatory:"false" json:"nodeCount"` + + // RECO/REDO storage size, in GBs, that is currently allocated to the DB system. This is applicable only for VM-based DBs. + RecoStorageSizeInGB *int `mandatory:"false" json:"recoStorageSizeInGB"` + + // The OCID of the DNS record for the SCAN IP addresses that are associated with the DB System. + ScanDnsRecordId *string `mandatory:"false" json:"scanDnsRecordId"` + + // The OCID of the Single Client Access Name (SCAN) IP addresses associated with the DB System. + // SCAN IP addresses are typically used for load balancing and are not assigned to any interface. + // Clusterware directs the requests to the appropriate nodes in the cluster. + // - For a single-node DB System, this list is empty. + ScanIpIds []string `mandatory:"false" json:"scanIpIds"` + + // The date and time the DB System was created. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The version of the DB System. + Version *string `mandatory:"false" json:"version"` + + // The OCID of the virtual IP (VIP) addresses associated with the DB System. + // The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the DB System to + // enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. + // - For a single-node DB System, this list is empty. + VipIds []string `mandatory:"false" json:"vipIds"` +} + +func (m DbSystem) String() string { + return common.PointerString(m) +} + +// DbSystemDatabaseEditionEnum Enum with underlying type: string +type DbSystemDatabaseEditionEnum string + +// Set of constants representing the allowable values for DbSystemDatabaseEdition +const ( + DbSystemDatabaseEditionStandardEdition DbSystemDatabaseEditionEnum = "STANDARD_EDITION" + DbSystemDatabaseEditionEnterpriseEdition DbSystemDatabaseEditionEnum = "ENTERPRISE_EDITION" + DbSystemDatabaseEditionEnterpriseEditionExtremePerformance DbSystemDatabaseEditionEnum = "ENTERPRISE_EDITION_EXTREME_PERFORMANCE" + DbSystemDatabaseEditionEnterpriseEditionHighPerformance DbSystemDatabaseEditionEnum = "ENTERPRISE_EDITION_HIGH_PERFORMANCE" +) + +var mappingDbSystemDatabaseEdition = map[string]DbSystemDatabaseEditionEnum{ + "STANDARD_EDITION": DbSystemDatabaseEditionStandardEdition, + "ENTERPRISE_EDITION": DbSystemDatabaseEditionEnterpriseEdition, + "ENTERPRISE_EDITION_EXTREME_PERFORMANCE": DbSystemDatabaseEditionEnterpriseEditionExtremePerformance, + "ENTERPRISE_EDITION_HIGH_PERFORMANCE": DbSystemDatabaseEditionEnterpriseEditionHighPerformance, +} + +// GetDbSystemDatabaseEditionEnumValues Enumerates the set of values for DbSystemDatabaseEdition +func GetDbSystemDatabaseEditionEnumValues() []DbSystemDatabaseEditionEnum { + values := make([]DbSystemDatabaseEditionEnum, 0) + for _, v := range mappingDbSystemDatabaseEdition { + values = append(values, v) + } + return values +} + +// DbSystemDiskRedundancyEnum Enum with underlying type: string +type DbSystemDiskRedundancyEnum string + +// Set of constants representing the allowable values for DbSystemDiskRedundancy +const ( + DbSystemDiskRedundancyHigh DbSystemDiskRedundancyEnum = "HIGH" + DbSystemDiskRedundancyNormal DbSystemDiskRedundancyEnum = "NORMAL" +) + +var mappingDbSystemDiskRedundancy = map[string]DbSystemDiskRedundancyEnum{ + "HIGH": DbSystemDiskRedundancyHigh, + "NORMAL": DbSystemDiskRedundancyNormal, +} + +// GetDbSystemDiskRedundancyEnumValues Enumerates the set of values for DbSystemDiskRedundancy +func GetDbSystemDiskRedundancyEnumValues() []DbSystemDiskRedundancyEnum { + values := make([]DbSystemDiskRedundancyEnum, 0) + for _, v := range mappingDbSystemDiskRedundancy { + values = append(values, v) + } + return values +} + +// DbSystemLicenseModelEnum Enum with underlying type: string +type DbSystemLicenseModelEnum string + +// Set of constants representing the allowable values for DbSystemLicenseModel +const ( + DbSystemLicenseModelLicenseIncluded DbSystemLicenseModelEnum = "LICENSE_INCLUDED" + DbSystemLicenseModelBringYourOwnLicense DbSystemLicenseModelEnum = "BRING_YOUR_OWN_LICENSE" +) + +var mappingDbSystemLicenseModel = map[string]DbSystemLicenseModelEnum{ + "LICENSE_INCLUDED": DbSystemLicenseModelLicenseIncluded, + "BRING_YOUR_OWN_LICENSE": DbSystemLicenseModelBringYourOwnLicense, +} + +// GetDbSystemLicenseModelEnumValues Enumerates the set of values for DbSystemLicenseModel +func GetDbSystemLicenseModelEnumValues() []DbSystemLicenseModelEnum { + values := make([]DbSystemLicenseModelEnum, 0) + for _, v := range mappingDbSystemLicenseModel { + values = append(values, v) + } + return values +} + +// DbSystemLifecycleStateEnum Enum with underlying type: string +type DbSystemLifecycleStateEnum string + +// Set of constants representing the allowable values for DbSystemLifecycleState +const ( + DbSystemLifecycleStateProvisioning DbSystemLifecycleStateEnum = "PROVISIONING" + DbSystemLifecycleStateAvailable DbSystemLifecycleStateEnum = "AVAILABLE" + DbSystemLifecycleStateUpdating DbSystemLifecycleStateEnum = "UPDATING" + DbSystemLifecycleStateTerminating DbSystemLifecycleStateEnum = "TERMINATING" + DbSystemLifecycleStateTerminated DbSystemLifecycleStateEnum = "TERMINATED" + DbSystemLifecycleStateFailed DbSystemLifecycleStateEnum = "FAILED" +) + +var mappingDbSystemLifecycleState = map[string]DbSystemLifecycleStateEnum{ + "PROVISIONING": DbSystemLifecycleStateProvisioning, + "AVAILABLE": DbSystemLifecycleStateAvailable, + "UPDATING": DbSystemLifecycleStateUpdating, + "TERMINATING": DbSystemLifecycleStateTerminating, + "TERMINATED": DbSystemLifecycleStateTerminated, + "FAILED": DbSystemLifecycleStateFailed, +} + +// GetDbSystemLifecycleStateEnumValues Enumerates the set of values for DbSystemLifecycleState +func GetDbSystemLifecycleStateEnumValues() []DbSystemLifecycleStateEnum { + values := make([]DbSystemLifecycleStateEnum, 0) + for _, v := range mappingDbSystemLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/db_system_shape_summary.go b/vendor/github.com/oracle/oci-go-sdk/database/db_system_shape_summary.go new file mode 100644 index 000000000..831411c16 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/db_system_shape_summary.go @@ -0,0 +1,34 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// DbSystemShapeSummary The shape of the DB System. The shape determines resources to allocate to the DB system - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. +// For a description of shapes, see DB System Launch Options (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/References/launchoptions.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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type DbSystemShapeSummary struct { + + // The maximum number of CPU cores that can be enabled on the DB System. + AvailableCoreCount *int `mandatory:"true" json:"availableCoreCount"` + + // The name of the shape used for the DB System. + Name *string `mandatory:"true" json:"name"` + + // Deprecated. Use `name` instead of `shape`. + Shape *string `mandatory:"false" json:"shape"` +} + +func (m DbSystemShapeSummary) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/db_system_summary.go b/vendor/github.com/oracle/oci-go-sdk/database/db_system_summary.go new file mode 100644 index 000000000..7f8ba31a3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/db_system_summary.go @@ -0,0 +1,236 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// DbSystemSummary The Database Service supports several types of DB Systems, ranging in size, price, and performance. For details about each type of system, see: +// - Exadata DB Systems (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/Concepts/exaoverview.htm) +// - Bare Metal or VM DB Systems (https://docs.us-phoenix-1.oraclecloud.com/Content/Database/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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +// +// For information about access control and compartments, see +// Overview of the Identity Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). +// For information about Availability Domains, see +// Regions and Availability Domains (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm). +// To get a list of Availability Domains, use the `ListAvailabilityDomains` operation +// in the Identity Service API. +type DbSystemSummary struct { + + // The name of the Availability Domain that the DB System is located in. + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The number of CPU cores enabled on the DB System. + CpuCoreCount *int `mandatory:"true" json:"cpuCoreCount"` + + // The Oracle Database Edition that applies to all the databases on the DB System. + DatabaseEdition DbSystemSummaryDatabaseEditionEnum `mandatory:"true" json:"databaseEdition"` + + // The user-friendly name for the DB System. It does not have to be unique. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The domain name for the DB System. + Domain *string `mandatory:"true" json:"domain"` + + // The host name for the DB Node. + Hostname *string `mandatory:"true" json:"hostname"` + + // The OCID of the DB System. + Id *string `mandatory:"true" json:"id"` + + // The current state of the DB System. + LifecycleState DbSystemSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The shape of the DB System. The shape determines resources to allocate to the DB system - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. + Shape *string `mandatory:"true" json:"shape"` + + // The public key portion of one or more key pairs used for SSH access to the DB System. + SshPublicKeys []string `mandatory:"true" json:"sshPublicKeys"` + + // The OCID of the subnet the DB System is associated with. + // **Subnet Restrictions:** + // - For single node and 2-node (RAC) DB Systems, do not use a subnet that overlaps with 192.168.16.16/28 + // - For Exadata and VM-based RAC DB Systems, do not use a subnet that overlaps with 192.168.128.0/20 + // These subnets are used by the Oracle Clusterware private interconnect on the database instance. + // Specifying an overlapping subnet will cause the private interconnect to malfunction. + // This restriction applies to both the client subnet and backup subnet. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // The OCID of the backup network subnet the DB System is associated with. Applicable only to Exadata. + // **Subnet Restriction:** See above subnetId's 'Subnet Restriction'. + // to malfunction. + BackupSubnetId *string `mandatory:"false" json:"backupSubnetId"` + + // Cluster name for Exadata and 2-node RAC DB Systems. The cluster name must begin with an an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + ClusterName *string `mandatory:"false" json:"clusterName"` + + // The percentage assigned to DATA storage (user data and database files). + // The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). Accepted values are 40 and 80. + DataStoragePercentage *int `mandatory:"false" json:"dataStoragePercentage"` + + // Data storage size, in GBs, that is currently available to the DB system. This is applicable only for VM-based DBs. + DataStorageSizeInGBs *int `mandatory:"false" json:"dataStorageSizeInGBs"` + + // The type of redundancy configured for the DB System. + // Normal is 2-way redundancy. + // High is 3-way redundancy. + DiskRedundancy DbSystemSummaryDiskRedundancyEnum `mandatory:"false" json:"diskRedundancy,omitempty"` + + // The OCID of the last patch history. This is updated as soon as a patch operation is started. + LastPatchHistoryEntryId *string `mandatory:"false" json:"lastPatchHistoryEntryId"` + + // The Oracle license model that applies to all the databases on the DB System. The default is LICENSE_INCLUDED. + LicenseModel DbSystemSummaryLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` + + // Additional information about the current lifecycleState. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The port number configured for the listener on the DB System. + ListenerPort *int `mandatory:"false" json:"listenerPort"` + + // Number of nodes in this DB system. For RAC DBs, this will be greater than 1. + NodeCount *int `mandatory:"false" json:"nodeCount"` + + // RECO/REDO storage size, in GBs, that is currently allocated to the DB system. This is applicable only for VM-based DBs. + RecoStorageSizeInGB *int `mandatory:"false" json:"recoStorageSizeInGB"` + + // The OCID of the DNS record for the SCAN IP addresses that are associated with the DB System. + ScanDnsRecordId *string `mandatory:"false" json:"scanDnsRecordId"` + + // The OCID of the Single Client Access Name (SCAN) IP addresses associated with the DB System. + // SCAN IP addresses are typically used for load balancing and are not assigned to any interface. + // Clusterware directs the requests to the appropriate nodes in the cluster. + // - For a single-node DB System, this list is empty. + ScanIpIds []string `mandatory:"false" json:"scanIpIds"` + + // The date and time the DB System was created. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The version of the DB System. + Version *string `mandatory:"false" json:"version"` + + // The OCID of the virtual IP (VIP) addresses associated with the DB System. + // The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the DB System to + // enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. + // - For a single-node DB System, this list is empty. + VipIds []string `mandatory:"false" json:"vipIds"` +} + +func (m DbSystemSummary) String() string { + return common.PointerString(m) +} + +// DbSystemSummaryDatabaseEditionEnum Enum with underlying type: string +type DbSystemSummaryDatabaseEditionEnum string + +// Set of constants representing the allowable values for DbSystemSummaryDatabaseEdition +const ( + DbSystemSummaryDatabaseEditionStandardEdition DbSystemSummaryDatabaseEditionEnum = "STANDARD_EDITION" + DbSystemSummaryDatabaseEditionEnterpriseEdition DbSystemSummaryDatabaseEditionEnum = "ENTERPRISE_EDITION" + DbSystemSummaryDatabaseEditionEnterpriseEditionExtremePerformance DbSystemSummaryDatabaseEditionEnum = "ENTERPRISE_EDITION_EXTREME_PERFORMANCE" + DbSystemSummaryDatabaseEditionEnterpriseEditionHighPerformance DbSystemSummaryDatabaseEditionEnum = "ENTERPRISE_EDITION_HIGH_PERFORMANCE" +) + +var mappingDbSystemSummaryDatabaseEdition = map[string]DbSystemSummaryDatabaseEditionEnum{ + "STANDARD_EDITION": DbSystemSummaryDatabaseEditionStandardEdition, + "ENTERPRISE_EDITION": DbSystemSummaryDatabaseEditionEnterpriseEdition, + "ENTERPRISE_EDITION_EXTREME_PERFORMANCE": DbSystemSummaryDatabaseEditionEnterpriseEditionExtremePerformance, + "ENTERPRISE_EDITION_HIGH_PERFORMANCE": DbSystemSummaryDatabaseEditionEnterpriseEditionHighPerformance, +} + +// GetDbSystemSummaryDatabaseEditionEnumValues Enumerates the set of values for DbSystemSummaryDatabaseEdition +func GetDbSystemSummaryDatabaseEditionEnumValues() []DbSystemSummaryDatabaseEditionEnum { + values := make([]DbSystemSummaryDatabaseEditionEnum, 0) + for _, v := range mappingDbSystemSummaryDatabaseEdition { + values = append(values, v) + } + return values +} + +// DbSystemSummaryDiskRedundancyEnum Enum with underlying type: string +type DbSystemSummaryDiskRedundancyEnum string + +// Set of constants representing the allowable values for DbSystemSummaryDiskRedundancy +const ( + DbSystemSummaryDiskRedundancyHigh DbSystemSummaryDiskRedundancyEnum = "HIGH" + DbSystemSummaryDiskRedundancyNormal DbSystemSummaryDiskRedundancyEnum = "NORMAL" +) + +var mappingDbSystemSummaryDiskRedundancy = map[string]DbSystemSummaryDiskRedundancyEnum{ + "HIGH": DbSystemSummaryDiskRedundancyHigh, + "NORMAL": DbSystemSummaryDiskRedundancyNormal, +} + +// GetDbSystemSummaryDiskRedundancyEnumValues Enumerates the set of values for DbSystemSummaryDiskRedundancy +func GetDbSystemSummaryDiskRedundancyEnumValues() []DbSystemSummaryDiskRedundancyEnum { + values := make([]DbSystemSummaryDiskRedundancyEnum, 0) + for _, v := range mappingDbSystemSummaryDiskRedundancy { + values = append(values, v) + } + return values +} + +// DbSystemSummaryLicenseModelEnum Enum with underlying type: string +type DbSystemSummaryLicenseModelEnum string + +// Set of constants representing the allowable values for DbSystemSummaryLicenseModel +const ( + DbSystemSummaryLicenseModelLicenseIncluded DbSystemSummaryLicenseModelEnum = "LICENSE_INCLUDED" + DbSystemSummaryLicenseModelBringYourOwnLicense DbSystemSummaryLicenseModelEnum = "BRING_YOUR_OWN_LICENSE" +) + +var mappingDbSystemSummaryLicenseModel = map[string]DbSystemSummaryLicenseModelEnum{ + "LICENSE_INCLUDED": DbSystemSummaryLicenseModelLicenseIncluded, + "BRING_YOUR_OWN_LICENSE": DbSystemSummaryLicenseModelBringYourOwnLicense, +} + +// GetDbSystemSummaryLicenseModelEnumValues Enumerates the set of values for DbSystemSummaryLicenseModel +func GetDbSystemSummaryLicenseModelEnumValues() []DbSystemSummaryLicenseModelEnum { + values := make([]DbSystemSummaryLicenseModelEnum, 0) + for _, v := range mappingDbSystemSummaryLicenseModel { + values = append(values, v) + } + return values +} + +// DbSystemSummaryLifecycleStateEnum Enum with underlying type: string +type DbSystemSummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for DbSystemSummaryLifecycleState +const ( + DbSystemSummaryLifecycleStateProvisioning DbSystemSummaryLifecycleStateEnum = "PROVISIONING" + DbSystemSummaryLifecycleStateAvailable DbSystemSummaryLifecycleStateEnum = "AVAILABLE" + DbSystemSummaryLifecycleStateUpdating DbSystemSummaryLifecycleStateEnum = "UPDATING" + DbSystemSummaryLifecycleStateTerminating DbSystemSummaryLifecycleStateEnum = "TERMINATING" + DbSystemSummaryLifecycleStateTerminated DbSystemSummaryLifecycleStateEnum = "TERMINATED" + DbSystemSummaryLifecycleStateFailed DbSystemSummaryLifecycleStateEnum = "FAILED" +) + +var mappingDbSystemSummaryLifecycleState = map[string]DbSystemSummaryLifecycleStateEnum{ + "PROVISIONING": DbSystemSummaryLifecycleStateProvisioning, + "AVAILABLE": DbSystemSummaryLifecycleStateAvailable, + "UPDATING": DbSystemSummaryLifecycleStateUpdating, + "TERMINATING": DbSystemSummaryLifecycleStateTerminating, + "TERMINATED": DbSystemSummaryLifecycleStateTerminated, + "FAILED": DbSystemSummaryLifecycleStateFailed, +} + +// GetDbSystemSummaryLifecycleStateEnumValues Enumerates the set of values for DbSystemSummaryLifecycleState +func GetDbSystemSummaryLifecycleStateEnumValues() []DbSystemSummaryLifecycleStateEnum { + values := make([]DbSystemSummaryLifecycleStateEnum, 0) + for _, v := range mappingDbSystemSummaryLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/db_version_summary.go b/vendor/github.com/oracle/oci-go-sdk/database/db_version_summary.go new file mode 100644 index 000000000..5920cb4b9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/db_version_summary.go @@ -0,0 +1,28 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// DbVersionSummary The Oracle database software version. +// 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type DbVersionSummary struct { + + // A valid Oracle database version. + Version *string `mandatory:"true" json:"version"` + + // True if this version of the Oracle database software supports pluggable dbs. + SupportsPdb *bool `mandatory:"false" json:"supportsPdb"` +} + +func (m DbVersionSummary) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/delete_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/delete_backup_request_response.go new file mode 100644 index 000000000..ff0446bbb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/delete_backup_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteBackupRequest wrapper for the DeleteBackup operation +type DeleteBackupRequest struct { + + // The backup OCID. + BackupId *string `mandatory:"true" contributesTo:"path" name:"backupId"` + + // 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"` +} + +func (request DeleteBackupRequest) String() string { + return common.PointerString(request) +} + +// DeleteBackupResponse wrapper for the DeleteBackup operation +type DeleteBackupResponse 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 DeleteBackupResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/delete_db_home_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/delete_db_home_request_response.go new file mode 100644 index 000000000..d50d313f0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/delete_db_home_request_response.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteDbHomeRequest wrapper for the DeleteDbHome operation +type DeleteDbHomeRequest struct { + + // The database home OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DbHomeId *string `mandatory:"true" contributesTo:"path" name:"dbHomeId"` + + // 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"` + + // Whether to perform a final backup of the database or not. Default is false. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work. + PerformFinalBackup *bool `mandatory:"false" contributesTo:"query" name:"performFinalBackup"` +} + +func (request DeleteDbHomeRequest) String() string { + return common.PointerString(request) +} + +// DeleteDbHomeResponse wrapper for the DeleteDbHome operation +type DeleteDbHomeResponse 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 DeleteDbHomeResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/failover_data_guard_association_details.go b/vendor/github.com/oracle/oci-go-sdk/database/failover_data_guard_association_details.go new file mode 100644 index 000000000..40e8bc76b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/failover_data_guard_association_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// FailoverDataGuardAssociationDetails The Data Guard association failover parameters. +type FailoverDataGuardAssociationDetails struct { + + // The DB System administrator password. + DatabaseAdminPassword *string `mandatory:"true" json:"databaseAdminPassword"` +} + +func (m FailoverDataGuardAssociationDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/failover_data_guard_association_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/failover_data_guard_association_request_response.go new file mode 100644 index 000000000..265c73f00 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/failover_data_guard_association_request_response.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// FailoverDataGuardAssociationRequest wrapper for the FailoverDataGuardAssociation operation +type FailoverDataGuardAssociationRequest struct { + + // The database OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DatabaseId *string `mandatory:"true" contributesTo:"path" name:"databaseId"` + + // The Data Guard association's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DataGuardAssociationId *string `mandatory:"true" contributesTo:"path" name:"dataGuardAssociationId"` + + // A request to perform a failover, transitioning a standby database into a primary database. + FailoverDataGuardAssociationDetails `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"` +} + +func (request FailoverDataGuardAssociationRequest) String() string { + return common.PointerString(request) +} + +// FailoverDataGuardAssociationResponse wrapper for the FailoverDataGuardAssociation operation +type FailoverDataGuardAssociationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DataGuardAssociation instance + DataGuardAssociation `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 FailoverDataGuardAssociationResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_backup_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_backup_request_response.go new file mode 100644 index 000000000..8a7ce1835 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/get_backup_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetBackupRequest wrapper for the GetBackup operation +type GetBackupRequest struct { + + // The backup OCID. + BackupId *string `mandatory:"true" contributesTo:"path" name:"backupId"` +} + +func (request GetBackupRequest) String() string { + return common.PointerString(request) +} + +// GetBackupResponse wrapper for the GetBackup operation +type GetBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Backup instance + Backup `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 GetBackupResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_data_guard_association_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_data_guard_association_request_response.go new file mode 100644 index 000000000..2b2f55456 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/get_data_guard_association_request_response.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetDataGuardAssociationRequest wrapper for the GetDataGuardAssociation operation +type GetDataGuardAssociationRequest struct { + + // The database OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DatabaseId *string `mandatory:"true" contributesTo:"path" name:"databaseId"` + + // The Data Guard association's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DataGuardAssociationId *string `mandatory:"true" contributesTo:"path" name:"dataGuardAssociationId"` +} + +func (request GetDataGuardAssociationRequest) String() string { + return common.PointerString(request) +} + +// GetDataGuardAssociationResponse wrapper for the GetDataGuardAssociation operation +type GetDataGuardAssociationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DataGuardAssociation instance + DataGuardAssociation `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 GetDataGuardAssociationResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_database_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_database_request_response.go new file mode 100644 index 000000000..8b3a5701b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/get_database_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetDatabaseRequest wrapper for the GetDatabase operation +type GetDatabaseRequest struct { + + // The database OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DatabaseId *string `mandatory:"true" contributesTo:"path" name:"databaseId"` +} + +func (request GetDatabaseRequest) String() string { + return common.PointerString(request) +} + +// GetDatabaseResponse wrapper for the GetDatabase operation +type GetDatabaseResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Database instance + Database `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 GetDatabaseResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_patch_history_entry_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_patch_history_entry_request_response.go new file mode 100644 index 000000000..c129a3119 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_patch_history_entry_request_response.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetDbHomePatchHistoryEntryRequest wrapper for the GetDbHomePatchHistoryEntry operation +type GetDbHomePatchHistoryEntryRequest struct { + + // The database home OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DbHomeId *string `mandatory:"true" contributesTo:"path" name:"dbHomeId"` + + // The OCID of the patch history entry. + PatchHistoryEntryId *string `mandatory:"true" contributesTo:"path" name:"patchHistoryEntryId"` +} + +func (request GetDbHomePatchHistoryEntryRequest) String() string { + return common.PointerString(request) +} + +// GetDbHomePatchHistoryEntryResponse wrapper for the GetDbHomePatchHistoryEntry operation +type GetDbHomePatchHistoryEntryResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PatchHistoryEntry instance + PatchHistoryEntry `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 GetDbHomePatchHistoryEntryResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_patch_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_patch_request_response.go new file mode 100644 index 000000000..74b389688 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_patch_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetDbHomePatchRequest wrapper for the GetDbHomePatch operation +type GetDbHomePatchRequest struct { + + // The database home OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DbHomeId *string `mandatory:"true" contributesTo:"path" name:"dbHomeId"` + + // The OCID of the patch. + PatchId *string `mandatory:"true" contributesTo:"path" name:"patchId"` +} + +func (request GetDbHomePatchRequest) String() string { + return common.PointerString(request) +} + +// GetDbHomePatchResponse wrapper for the GetDbHomePatch operation +type GetDbHomePatchResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Patch instance + Patch `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 GetDbHomePatchResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_request_response.go new file mode 100644 index 000000000..795c4f4bc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/get_db_home_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetDbHomeRequest wrapper for the GetDbHome operation +type GetDbHomeRequest struct { + + // The database home OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DbHomeId *string `mandatory:"true" contributesTo:"path" name:"dbHomeId"` +} + +func (request GetDbHomeRequest) String() string { + return common.PointerString(request) +} + +// GetDbHomeResponse wrapper for the GetDbHome operation +type GetDbHomeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DbHome instance + DbHome `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 GetDbHomeResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_db_node_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_db_node_request_response.go new file mode 100644 index 000000000..3f5e1fc2a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/get_db_node_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetDbNodeRequest wrapper for the GetDbNode operation +type GetDbNodeRequest struct { + + // The database node OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DbNodeId *string `mandatory:"true" contributesTo:"path" name:"dbNodeId"` +} + +func (request GetDbNodeRequest) String() string { + return common.PointerString(request) +} + +// GetDbNodeResponse wrapper for the GetDbNode operation +type GetDbNodeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DbNode instance + DbNode `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 GetDbNodeResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_patch_history_entry_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_patch_history_entry_request_response.go new file mode 100644 index 000000000..4891a2df8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_patch_history_entry_request_response.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetDbSystemPatchHistoryEntryRequest wrapper for the GetDbSystemPatchHistoryEntry operation +type GetDbSystemPatchHistoryEntryRequest struct { + + // The DB System OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` + + // The OCID of the patch history entry. + PatchHistoryEntryId *string `mandatory:"true" contributesTo:"path" name:"patchHistoryEntryId"` +} + +func (request GetDbSystemPatchHistoryEntryRequest) String() string { + return common.PointerString(request) +} + +// GetDbSystemPatchHistoryEntryResponse wrapper for the GetDbSystemPatchHistoryEntry operation +type GetDbSystemPatchHistoryEntryResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PatchHistoryEntry instance + PatchHistoryEntry `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 GetDbSystemPatchHistoryEntryResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_patch_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_patch_request_response.go new file mode 100644 index 000000000..916b6aafc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_patch_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetDbSystemPatchRequest wrapper for the GetDbSystemPatch operation +type GetDbSystemPatchRequest struct { + + // The DB System OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` + + // The OCID of the patch. + PatchId *string `mandatory:"true" contributesTo:"path" name:"patchId"` +} + +func (request GetDbSystemPatchRequest) String() string { + return common.PointerString(request) +} + +// GetDbSystemPatchResponse wrapper for the GetDbSystemPatch operation +type GetDbSystemPatchResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Patch instance + Patch `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 GetDbSystemPatchResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_request_response.go new file mode 100644 index 000000000..9a1dc670f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/get_db_system_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetDbSystemRequest wrapper for the GetDbSystem operation +type GetDbSystemRequest struct { + + // The DB System OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` +} + +func (request GetDbSystemRequest) String() string { + return common.PointerString(request) +} + +// GetDbSystemResponse wrapper for the GetDbSystem operation +type GetDbSystemResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DbSystem instance + DbSystem `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 GetDbSystemResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_details.go b/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_details.go new file mode 100644 index 000000000..2ba66b6f7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_details.go @@ -0,0 +1,171 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// LaunchDbSystemDetails The representation of LaunchDbSystemDetails +type LaunchDbSystemDetails struct { + + // The Availability Domain where the DB System is located. + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The Oracle Cloud ID (OCID) of the compartment the DB System belongs in. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The number of CPU cores to enable. The valid values depend on the specified shape: + // - BM.DenseIO1.36 and BM.HighIO1.36 - Specify a multiple of 2, from 2 to 36. + // - BM.RACLocalStorage1.72 - Specify a multiple of 4, from 4 to 72. + // - Exadata.Quarter1.84 - Specify a multiple of 2, from 22 to 84. + // - Exadata.Half1.168 - Specify a multiple of 4, from 44 to 168. + // - Exadata.Full1.336 - Specify a multiple of 8, from 88 to 336. + // For VM DB systems, the core count is inferred from the specific VM shape chosen, so this parameter is not used. + CpuCoreCount *int `mandatory:"true" json:"cpuCoreCount"` + + // The Oracle Database Edition that applies to all the databases on the DB System. + // Exadata DB Systems and 2-node RAC DB Systems require ENTERPRISE_EDITION_EXTREME_PERFORMANCE. + DatabaseEdition LaunchDbSystemDetailsDatabaseEditionEnum `mandatory:"true" json:"databaseEdition"` + + DbHome *CreateDbHomeDetails `mandatory:"true" json:"dbHome"` + + // The host name for the DB System. The host name must begin with an alphabetic character and + // can contain a maximum of 30 alphanumeric characters, including hyphens (-). + // The maximum length of the combined hostname and domain is 63 characters. + // **Note:** The hostname must be unique within the subnet. If it is not unique, + // the DB System will fail to provision. + Hostname *string `mandatory:"true" json:"hostname"` + + // The shape of the DB System. The shape determines resources allocated to the DB System - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. To get a list of shapes, use the ListDbSystemShapes operation. + Shape *string `mandatory:"true" json:"shape"` + + // The public key portion of the key pair to use for SSH access to the DB System. Multiple public keys can be provided. The length of the combined keys cannot exceed 10,000 characters. + SshPublicKeys []string `mandatory:"true" json:"sshPublicKeys"` + + // The OCID of the subnet the DB System is associated with. + // **Subnet Restrictions:** + // - For single node and 2-node (RAC) DB Systems, do not use a subnet that overlaps with 192.168.16.16/28 + // - For Exadata and VM-based RAC DB Systems, do not use a subnet that overlaps with 192.168.128.0/20 + // These subnets are used by the Oracle Clusterware private interconnect on the database instance. + // Specifying an overlapping subnet will cause the private interconnect to malfunction. + // This restriction applies to both the client subnet and backup subnet. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // The OCID of the backup network subnet the DB System is associated with. Applicable only to Exadata. + // **Subnet Restrictions:** See above subnetId's **Subnet Restriction**. + BackupSubnetId *string `mandatory:"false" json:"backupSubnetId"` + + // Cluster name for Exadata and 2-node RAC DB Systems. The cluster name must begin with an an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + ClusterName *string `mandatory:"false" json:"clusterName"` + + // The percentage assigned to DATA storage (user data and database files). + // The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). + // Specify 80 or 40. The default is 80 percent assigned to DATA storage. This is not applicable for VM based DB systems. + DataStoragePercentage *int `mandatory:"false" json:"dataStoragePercentage"` + + // The type of redundancy configured for the DB System. + // Normal is 2-way redundancy, recommended for test and development systems. + // High is 3-way redundancy, recommended for production systems. + DiskRedundancy LaunchDbSystemDetailsDiskRedundancyEnum `mandatory:"false" json:"diskRedundancy,omitempty"` + + // The user-friendly name for the DB System. It does not have to be unique. + DisplayName *string `mandatory:"false" json:"displayName"` + + // A domain name used for the DB System. If the Oracle-provided Internet and VCN + // Resolver is enabled for the specified subnet, the domain name for the subnet is used + // (don't provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted. + Domain *string `mandatory:"false" json:"domain"` + + // Size, in GBs, of the initial data volume that will be created and attached to VM-shape based DB system. This storage can later be scaled up if needed. Note that the total storage size attached will be more than what is requested, to account for REDO/RECO space and software volume. + InitialDataStorageSizeInGB *int `mandatory:"false" json:"initialDataStorageSizeInGB"` + + // The Oracle license model that applies to all the databases on the DB System. The default is LICENSE_INCLUDED. + LicenseModel LaunchDbSystemDetailsLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` + + // Number of nodes to launch for a VM-shape based RAC DB system. + NodeCount *int `mandatory:"false" json:"nodeCount"` +} + +func (m LaunchDbSystemDetails) String() string { + return common.PointerString(m) +} + +// LaunchDbSystemDetailsDatabaseEditionEnum Enum with underlying type: string +type LaunchDbSystemDetailsDatabaseEditionEnum string + +// Set of constants representing the allowable values for LaunchDbSystemDetailsDatabaseEdition +const ( + LaunchDbSystemDetailsDatabaseEditionStandardEdition LaunchDbSystemDetailsDatabaseEditionEnum = "STANDARD_EDITION" + LaunchDbSystemDetailsDatabaseEditionEnterpriseEdition LaunchDbSystemDetailsDatabaseEditionEnum = "ENTERPRISE_EDITION" + LaunchDbSystemDetailsDatabaseEditionEnterpriseEditionExtremePerformance LaunchDbSystemDetailsDatabaseEditionEnum = "ENTERPRISE_EDITION_EXTREME_PERFORMANCE" + LaunchDbSystemDetailsDatabaseEditionEnterpriseEditionHighPerformance LaunchDbSystemDetailsDatabaseEditionEnum = "ENTERPRISE_EDITION_HIGH_PERFORMANCE" +) + +var mappingLaunchDbSystemDetailsDatabaseEdition = map[string]LaunchDbSystemDetailsDatabaseEditionEnum{ + "STANDARD_EDITION": LaunchDbSystemDetailsDatabaseEditionStandardEdition, + "ENTERPRISE_EDITION": LaunchDbSystemDetailsDatabaseEditionEnterpriseEdition, + "ENTERPRISE_EDITION_EXTREME_PERFORMANCE": LaunchDbSystemDetailsDatabaseEditionEnterpriseEditionExtremePerformance, + "ENTERPRISE_EDITION_HIGH_PERFORMANCE": LaunchDbSystemDetailsDatabaseEditionEnterpriseEditionHighPerformance, +} + +// GetLaunchDbSystemDetailsDatabaseEditionEnumValues Enumerates the set of values for LaunchDbSystemDetailsDatabaseEdition +func GetLaunchDbSystemDetailsDatabaseEditionEnumValues() []LaunchDbSystemDetailsDatabaseEditionEnum { + values := make([]LaunchDbSystemDetailsDatabaseEditionEnum, 0) + for _, v := range mappingLaunchDbSystemDetailsDatabaseEdition { + values = append(values, v) + } + return values +} + +// LaunchDbSystemDetailsDiskRedundancyEnum Enum with underlying type: string +type LaunchDbSystemDetailsDiskRedundancyEnum string + +// Set of constants representing the allowable values for LaunchDbSystemDetailsDiskRedundancy +const ( + LaunchDbSystemDetailsDiskRedundancyHigh LaunchDbSystemDetailsDiskRedundancyEnum = "HIGH" + LaunchDbSystemDetailsDiskRedundancyNormal LaunchDbSystemDetailsDiskRedundancyEnum = "NORMAL" +) + +var mappingLaunchDbSystemDetailsDiskRedundancy = map[string]LaunchDbSystemDetailsDiskRedundancyEnum{ + "HIGH": LaunchDbSystemDetailsDiskRedundancyHigh, + "NORMAL": LaunchDbSystemDetailsDiskRedundancyNormal, +} + +// GetLaunchDbSystemDetailsDiskRedundancyEnumValues Enumerates the set of values for LaunchDbSystemDetailsDiskRedundancy +func GetLaunchDbSystemDetailsDiskRedundancyEnumValues() []LaunchDbSystemDetailsDiskRedundancyEnum { + values := make([]LaunchDbSystemDetailsDiskRedundancyEnum, 0) + for _, v := range mappingLaunchDbSystemDetailsDiskRedundancy { + values = append(values, v) + } + return values +} + +// LaunchDbSystemDetailsLicenseModelEnum Enum with underlying type: string +type LaunchDbSystemDetailsLicenseModelEnum string + +// Set of constants representing the allowable values for LaunchDbSystemDetailsLicenseModel +const ( + LaunchDbSystemDetailsLicenseModelLicenseIncluded LaunchDbSystemDetailsLicenseModelEnum = "LICENSE_INCLUDED" + LaunchDbSystemDetailsLicenseModelBringYourOwnLicense LaunchDbSystemDetailsLicenseModelEnum = "BRING_YOUR_OWN_LICENSE" +) + +var mappingLaunchDbSystemDetailsLicenseModel = map[string]LaunchDbSystemDetailsLicenseModelEnum{ + "LICENSE_INCLUDED": LaunchDbSystemDetailsLicenseModelLicenseIncluded, + "BRING_YOUR_OWN_LICENSE": LaunchDbSystemDetailsLicenseModelBringYourOwnLicense, +} + +// GetLaunchDbSystemDetailsLicenseModelEnumValues Enumerates the set of values for LaunchDbSystemDetailsLicenseModel +func GetLaunchDbSystemDetailsLicenseModelEnumValues() []LaunchDbSystemDetailsLicenseModelEnum { + values := make([]LaunchDbSystemDetailsLicenseModelEnum, 0) + for _, v := range mappingLaunchDbSystemDetailsLicenseModel { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_request_response.go new file mode 100644 index 000000000..d1d6b45e6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/launch_db_system_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// LaunchDbSystemRequest wrapper for the LaunchDbSystem operation +type LaunchDbSystemRequest struct { + + // Request to launch a DB System. + LaunchDbSystemDetails `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"` +} + +func (request LaunchDbSystemRequest) String() string { + return common.PointerString(request) +} + +// LaunchDbSystemResponse wrapper for the LaunchDbSystem operation +type LaunchDbSystemResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DbSystem instance + DbSystem `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 LaunchDbSystemResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_backups_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_backups_request_response.go new file mode 100644 index 000000000..6bb089016 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/list_backups_request_response.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListBackupsRequest wrapper for the ListBackups operation +type ListBackupsRequest struct { + + // The OCID of the database. + DatabaseId *string `mandatory:"false" contributesTo:"query" name:"databaseId"` + + // The compartment OCID. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The pagination token to continue listing from. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListBackupsRequest) String() string { + return common.PointerString(request) +} + +// ListBackupsResponse wrapper for the ListBackups operation +type ListBackupsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []BackupSummary instance + Items []BackupSummary `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then there are additional items still to get. Include this value as the `page` parameter for the + // subsequent GET request. For information about pagination, see + // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). + 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 ListBackupsResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_data_guard_associations_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_data_guard_associations_request_response.go new file mode 100644 index 000000000..7f2f123d7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/list_data_guard_associations_request_response.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListDataGuardAssociationsRequest wrapper for the ListDataGuardAssociations operation +type ListDataGuardAssociationsRequest struct { + + // The database OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DatabaseId *string `mandatory:"true" contributesTo:"path" name:"databaseId"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The pagination token to continue listing from. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListDataGuardAssociationsRequest) String() string { + return common.PointerString(request) +} + +// ListDataGuardAssociationsResponse wrapper for the ListDataGuardAssociations operation +type ListDataGuardAssociationsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []DataGuardAssociationSummary instance + Items []DataGuardAssociationSummary `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then there are additional items still to get. Include this value as the `page` parameter for the + // subsequent GET request. For information about pagination, see + // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). + 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 ListDataGuardAssociationsResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_databases_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_databases_request_response.go new file mode 100644 index 000000000..73e357018 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/list_databases_request_response.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListDatabasesRequest wrapper for the ListDatabases operation +type ListDatabasesRequest struct { + + // The compartment OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // A database home OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DbHomeId *string `mandatory:"true" contributesTo:"query" name:"dbHomeId"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The pagination token to continue listing from. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListDatabasesRequest) String() string { + return common.PointerString(request) +} + +// ListDatabasesResponse wrapper for the ListDatabases operation +type ListDatabasesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []DatabaseSummary instance + Items []DatabaseSummary `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then there are additional items still to get. Include this value as the `page` parameter for the + // subsequent GET request. For information about pagination, see + // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). + 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 ListDatabasesResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_home_patch_history_entries_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_home_patch_history_entries_request_response.go new file mode 100644 index 000000000..841a4a809 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/list_db_home_patch_history_entries_request_response.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListDbHomePatchHistoryEntriesRequest wrapper for the ListDbHomePatchHistoryEntries operation +type ListDbHomePatchHistoryEntriesRequest struct { + + // The database home OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DbHomeId *string `mandatory:"true" contributesTo:"path" name:"dbHomeId"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The pagination token to continue listing from. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListDbHomePatchHistoryEntriesRequest) String() string { + return common.PointerString(request) +} + +// ListDbHomePatchHistoryEntriesResponse wrapper for the ListDbHomePatchHistoryEntries operation +type ListDbHomePatchHistoryEntriesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []PatchHistoryEntrySummary instance + Items []PatchHistoryEntrySummary `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then there are additional items still to get. Include this value as the `page` parameter for the + // subsequent GET request. For information about pagination, see + // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). + 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 ListDbHomePatchHistoryEntriesResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_home_patches_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_home_patches_request_response.go new file mode 100644 index 000000000..5dd89d1a6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/list_db_home_patches_request_response.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListDbHomePatchesRequest wrapper for the ListDbHomePatches operation +type ListDbHomePatchesRequest struct { + + // The database home OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DbHomeId *string `mandatory:"true" contributesTo:"path" name:"dbHomeId"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The pagination token to continue listing from. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListDbHomePatchesRequest) String() string { + return common.PointerString(request) +} + +// ListDbHomePatchesResponse wrapper for the ListDbHomePatches operation +type ListDbHomePatchesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []PatchSummary instance + Items []PatchSummary `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then there are additional items still to get. Include this value as the `page` parameter for the + // subsequent GET request. For information about pagination, see + // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). + 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 ListDbHomePatchesResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_homes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_homes_request_response.go new file mode 100644 index 000000000..363b60972 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/list_db_homes_request_response.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListDbHomesRequest wrapper for the ListDbHomes operation +type ListDbHomesRequest struct { + + // The compartment OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the DB System. + DbSystemId *string `mandatory:"true" contributesTo:"query" name:"dbSystemId"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The pagination token to continue listing from. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListDbHomesRequest) String() string { + return common.PointerString(request) +} + +// ListDbHomesResponse wrapper for the ListDbHomes operation +type ListDbHomesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []DbHomeSummary instance + Items []DbHomeSummary `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then there are additional items still to get. Include this value as the `page` parameter for the + // subsequent GET request. For information about pagination, see + // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). + 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 ListDbHomesResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_nodes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_nodes_request_response.go new file mode 100644 index 000000000..ae02ae583 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/list_db_nodes_request_response.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListDbNodesRequest wrapper for the ListDbNodes operation +type ListDbNodesRequest struct { + + // The compartment OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the DB System. + DbSystemId *string `mandatory:"true" contributesTo:"query" name:"dbSystemId"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The pagination token to continue listing from. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListDbNodesRequest) String() string { + return common.PointerString(request) +} + +// ListDbNodesResponse wrapper for the ListDbNodes operation +type ListDbNodesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []DbNodeSummary instance + Items []DbNodeSummary `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then there are additional items still to get. Include this value as the `page` parameter for the + // subsequent GET request. For information about pagination, see + // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). + 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 ListDbNodesResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_patch_history_entries_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_patch_history_entries_request_response.go new file mode 100644 index 000000000..2a4c1aba1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_patch_history_entries_request_response.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListDbSystemPatchHistoryEntriesRequest wrapper for the ListDbSystemPatchHistoryEntries operation +type ListDbSystemPatchHistoryEntriesRequest struct { + + // The DB System OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The pagination token to continue listing from. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListDbSystemPatchHistoryEntriesRequest) String() string { + return common.PointerString(request) +} + +// ListDbSystemPatchHistoryEntriesResponse wrapper for the ListDbSystemPatchHistoryEntries operation +type ListDbSystemPatchHistoryEntriesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []PatchHistoryEntrySummary instance + Items []PatchHistoryEntrySummary `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then there are additional items still to get. Include this value as the `page` parameter for the + // subsequent GET request. For information about pagination, see + // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). + 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 ListDbSystemPatchHistoryEntriesResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_patches_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_patches_request_response.go new file mode 100644 index 000000000..46ae8fc10 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_patches_request_response.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListDbSystemPatchesRequest wrapper for the ListDbSystemPatches operation +type ListDbSystemPatchesRequest struct { + + // The DB System OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The pagination token to continue listing from. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListDbSystemPatchesRequest) String() string { + return common.PointerString(request) +} + +// ListDbSystemPatchesResponse wrapper for the ListDbSystemPatches operation +type ListDbSystemPatchesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []PatchSummary instance + Items []PatchSummary `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then there are additional items still to get. Include this value as the `page` parameter for the + // subsequent GET request. For information about pagination, see + // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). + 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 ListDbSystemPatchesResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_shapes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_shapes_request_response.go new file mode 100644 index 000000000..8f3d8b470 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/list_db_system_shapes_request_response.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListDbSystemShapesRequest wrapper for the ListDbSystemShapes operation +type ListDbSystemShapesRequest struct { + + // The name of the Availability Domain. + AvailabilityDomain *string `mandatory:"true" contributesTo:"query" name:"availabilityDomain"` + + // The compartment OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The pagination token to continue listing from. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListDbSystemShapesRequest) String() string { + return common.PointerString(request) +} + +// ListDbSystemShapesResponse wrapper for the ListDbSystemShapes operation +type ListDbSystemShapesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []DbSystemShapeSummary instance + Items []DbSystemShapeSummary `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then there are additional items still to get. Include this value as the `page` parameter for the + // subsequent GET request. For information about pagination, see + // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). + 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 ListDbSystemShapesResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_systems_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_systems_request_response.go new file mode 100644 index 000000000..96a4693e5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/list_db_systems_request_response.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListDbSystemsRequest wrapper for the ListDbSystems operation +type ListDbSystemsRequest struct { + + // The compartment OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The pagination token to continue listing from. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListDbSystemsRequest) String() string { + return common.PointerString(request) +} + +// ListDbSystemsResponse wrapper for the ListDbSystems operation +type ListDbSystemsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []DbSystemSummary instance + Items []DbSystemSummary `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then there are additional items still to get. Include this value as the `page` parameter for the + // subsequent GET request. For information about pagination, see + // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). + 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 ListDbSystemsResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/list_db_versions_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/list_db_versions_request_response.go new file mode 100644 index 000000000..e6a77b7bb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/list_db_versions_request_response.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListDbVersionsRequest wrapper for the ListDbVersions operation +type ListDbVersionsRequest struct { + + // The compartment OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The pagination token to continue listing from. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // If provided, filters the results to the set of database versions which are supported for the given shape. + DbSystemShape *string `mandatory:"false" contributesTo:"query" name:"dbSystemShape"` +} + +func (request ListDbVersionsRequest) String() string { + return common.PointerString(request) +} + +// ListDbVersionsResponse wrapper for the ListDbVersions operation +type ListDbVersionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []DbVersionSummary instance + Items []DbVersionSummary `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then there are additional items still to get. Include this value as the `page` parameter for the + // subsequent GET request. For information about pagination, see + // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#List_Pagination). + 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 ListDbVersionsResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/patch.go b/vendor/github.com/oracle/oci-go-sdk/database/patch.go new file mode 100644 index 000000000..7ed8a3398 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/patch.go @@ -0,0 +1,122 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Patch A Patch for a DB System or DB Home. +// 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type Patch struct { + + // The text describing this patch package. + Description *string `mandatory:"true" json:"description"` + + // The OCID of the patch. + Id *string `mandatory:"true" json:"id"` + + // The date and time that the patch was released. + TimeReleased *common.SDKTime `mandatory:"true" json:"timeReleased"` + + // The version of this patch package. + Version *string `mandatory:"true" json:"version"` + + // Actions that can possibly be performed using this patch. + AvailableActions []PatchAvailableActionsEnum `mandatory:"false" json:"availableActions,omitempty"` + + // Action that is currently being performed or was completed last. + LastAction PatchLastActionEnum `mandatory:"false" json:"lastAction,omitempty"` + + // A descriptive text associated with the lifecycleState. + // Typically can contain additional displayable text. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The current state of the patch as a result of lastAction. + LifecycleState PatchLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` +} + +func (m Patch) String() string { + return common.PointerString(m) +} + +// PatchAvailableActionsEnum Enum with underlying type: string +type PatchAvailableActionsEnum string + +// Set of constants representing the allowable values for PatchAvailableActions +const ( + PatchAvailableActionsApply PatchAvailableActionsEnum = "APPLY" + PatchAvailableActionsPrecheck PatchAvailableActionsEnum = "PRECHECK" +) + +var mappingPatchAvailableActions = map[string]PatchAvailableActionsEnum{ + "APPLY": PatchAvailableActionsApply, + "PRECHECK": PatchAvailableActionsPrecheck, +} + +// GetPatchAvailableActionsEnumValues Enumerates the set of values for PatchAvailableActions +func GetPatchAvailableActionsEnumValues() []PatchAvailableActionsEnum { + values := make([]PatchAvailableActionsEnum, 0) + for _, v := range mappingPatchAvailableActions { + values = append(values, v) + } + return values +} + +// PatchLastActionEnum Enum with underlying type: string +type PatchLastActionEnum string + +// Set of constants representing the allowable values for PatchLastAction +const ( + PatchLastActionApply PatchLastActionEnum = "APPLY" + PatchLastActionPrecheck PatchLastActionEnum = "PRECHECK" +) + +var mappingPatchLastAction = map[string]PatchLastActionEnum{ + "APPLY": PatchLastActionApply, + "PRECHECK": PatchLastActionPrecheck, +} + +// GetPatchLastActionEnumValues Enumerates the set of values for PatchLastAction +func GetPatchLastActionEnumValues() []PatchLastActionEnum { + values := make([]PatchLastActionEnum, 0) + for _, v := range mappingPatchLastAction { + values = append(values, v) + } + return values +} + +// PatchLifecycleStateEnum Enum with underlying type: string +type PatchLifecycleStateEnum string + +// Set of constants representing the allowable values for PatchLifecycleState +const ( + PatchLifecycleStateAvailable PatchLifecycleStateEnum = "AVAILABLE" + PatchLifecycleStateSuccess PatchLifecycleStateEnum = "SUCCESS" + PatchLifecycleStateInProgress PatchLifecycleStateEnum = "IN_PROGRESS" + PatchLifecycleStateFailed PatchLifecycleStateEnum = "FAILED" +) + +var mappingPatchLifecycleState = map[string]PatchLifecycleStateEnum{ + "AVAILABLE": PatchLifecycleStateAvailable, + "SUCCESS": PatchLifecycleStateSuccess, + "IN_PROGRESS": PatchLifecycleStateInProgress, + "FAILED": PatchLifecycleStateFailed, +} + +// GetPatchLifecycleStateEnumValues Enumerates the set of values for PatchLifecycleState +func GetPatchLifecycleStateEnumValues() []PatchLifecycleStateEnum { + values := make([]PatchLifecycleStateEnum, 0) + for _, v := range mappingPatchLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/patch_details.go b/vendor/github.com/oracle/oci-go-sdk/database/patch_details.go new file mode 100644 index 000000000..1dab6a67a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/patch_details.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// PatchDetails The details about what actions to perform and using what patch to the specified target. +// This is part of an update request that is applied to a version field on the target such +// as DB System, database home, etc. +type PatchDetails struct { + + // The action to perform on the patch. + Action PatchDetailsActionEnum `mandatory:"false" json:"action,omitempty"` + + // The OCID of the patch. + PatchId *string `mandatory:"false" json:"patchId"` +} + +func (m PatchDetails) String() string { + return common.PointerString(m) +} + +// PatchDetailsActionEnum Enum with underlying type: string +type PatchDetailsActionEnum string + +// Set of constants representing the allowable values for PatchDetailsAction +const ( + PatchDetailsActionApply PatchDetailsActionEnum = "APPLY" + PatchDetailsActionPrecheck PatchDetailsActionEnum = "PRECHECK" +) + +var mappingPatchDetailsAction = map[string]PatchDetailsActionEnum{ + "APPLY": PatchDetailsActionApply, + "PRECHECK": PatchDetailsActionPrecheck, +} + +// GetPatchDetailsActionEnumValues Enumerates the set of values for PatchDetailsAction +func GetPatchDetailsActionEnumValues() []PatchDetailsActionEnum { + values := make([]PatchDetailsActionEnum, 0) + for _, v := range mappingPatchDetailsAction { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/patch_history_entry.go b/vendor/github.com/oracle/oci-go-sdk/database/patch_history_entry.go new file mode 100644 index 000000000..21fa02767 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/patch_history_entry.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// PatchHistoryEntry The record of a patch action on a specified target. +type PatchHistoryEntry struct { + + // The OCID of the patch history entry. + Id *string `mandatory:"true" json:"id"` + + // The current state of the action. + LifecycleState PatchHistoryEntryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The OCID of the patch. + PatchId *string `mandatory:"true" json:"patchId"` + + // The date and time when the patch action started. + TimeStarted *common.SDKTime `mandatory:"true" json:"timeStarted"` + + // The action being performed or was completed. + Action PatchHistoryEntryActionEnum `mandatory:"false" json:"action,omitempty"` + + // A descriptive text associated with the lifecycleState. + // Typically contains additional displayable text. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The date and time when the patch action completed. + TimeEnded *common.SDKTime `mandatory:"false" json:"timeEnded"` +} + +func (m PatchHistoryEntry) String() string { + return common.PointerString(m) +} + +// PatchHistoryEntryActionEnum Enum with underlying type: string +type PatchHistoryEntryActionEnum string + +// Set of constants representing the allowable values for PatchHistoryEntryAction +const ( + PatchHistoryEntryActionApply PatchHistoryEntryActionEnum = "APPLY" + PatchHistoryEntryActionPrecheck PatchHistoryEntryActionEnum = "PRECHECK" +) + +var mappingPatchHistoryEntryAction = map[string]PatchHistoryEntryActionEnum{ + "APPLY": PatchHistoryEntryActionApply, + "PRECHECK": PatchHistoryEntryActionPrecheck, +} + +// GetPatchHistoryEntryActionEnumValues Enumerates the set of values for PatchHistoryEntryAction +func GetPatchHistoryEntryActionEnumValues() []PatchHistoryEntryActionEnum { + values := make([]PatchHistoryEntryActionEnum, 0) + for _, v := range mappingPatchHistoryEntryAction { + values = append(values, v) + } + return values +} + +// PatchHistoryEntryLifecycleStateEnum Enum with underlying type: string +type PatchHistoryEntryLifecycleStateEnum string + +// Set of constants representing the allowable values for PatchHistoryEntryLifecycleState +const ( + PatchHistoryEntryLifecycleStateInProgress PatchHistoryEntryLifecycleStateEnum = "IN_PROGRESS" + PatchHistoryEntryLifecycleStateSucceeded PatchHistoryEntryLifecycleStateEnum = "SUCCEEDED" + PatchHistoryEntryLifecycleStateFailed PatchHistoryEntryLifecycleStateEnum = "FAILED" +) + +var mappingPatchHistoryEntryLifecycleState = map[string]PatchHistoryEntryLifecycleStateEnum{ + "IN_PROGRESS": PatchHistoryEntryLifecycleStateInProgress, + "SUCCEEDED": PatchHistoryEntryLifecycleStateSucceeded, + "FAILED": PatchHistoryEntryLifecycleStateFailed, +} + +// GetPatchHistoryEntryLifecycleStateEnumValues Enumerates the set of values for PatchHistoryEntryLifecycleState +func GetPatchHistoryEntryLifecycleStateEnumValues() []PatchHistoryEntryLifecycleStateEnum { + values := make([]PatchHistoryEntryLifecycleStateEnum, 0) + for _, v := range mappingPatchHistoryEntryLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/patch_history_entry_summary.go b/vendor/github.com/oracle/oci-go-sdk/database/patch_history_entry_summary.go new file mode 100644 index 000000000..ddb964f93 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/patch_history_entry_summary.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// PatchHistoryEntrySummary The record of a patch action on a specified target. +type PatchHistoryEntrySummary struct { + + // The OCID of the patch history entry. + Id *string `mandatory:"true" json:"id"` + + // The current state of the action. + LifecycleState PatchHistoryEntrySummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The OCID of the patch. + PatchId *string `mandatory:"true" json:"patchId"` + + // The date and time when the patch action started. + TimeStarted *common.SDKTime `mandatory:"true" json:"timeStarted"` + + // The action being performed or was completed. + Action PatchHistoryEntrySummaryActionEnum `mandatory:"false" json:"action,omitempty"` + + // A descriptive text associated with the lifecycleState. + // Typically contains additional displayable text. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The date and time when the patch action completed. + TimeEnded *common.SDKTime `mandatory:"false" json:"timeEnded"` +} + +func (m PatchHistoryEntrySummary) String() string { + return common.PointerString(m) +} + +// PatchHistoryEntrySummaryActionEnum Enum with underlying type: string +type PatchHistoryEntrySummaryActionEnum string + +// Set of constants representing the allowable values for PatchHistoryEntrySummaryAction +const ( + PatchHistoryEntrySummaryActionApply PatchHistoryEntrySummaryActionEnum = "APPLY" + PatchHistoryEntrySummaryActionPrecheck PatchHistoryEntrySummaryActionEnum = "PRECHECK" +) + +var mappingPatchHistoryEntrySummaryAction = map[string]PatchHistoryEntrySummaryActionEnum{ + "APPLY": PatchHistoryEntrySummaryActionApply, + "PRECHECK": PatchHistoryEntrySummaryActionPrecheck, +} + +// GetPatchHistoryEntrySummaryActionEnumValues Enumerates the set of values for PatchHistoryEntrySummaryAction +func GetPatchHistoryEntrySummaryActionEnumValues() []PatchHistoryEntrySummaryActionEnum { + values := make([]PatchHistoryEntrySummaryActionEnum, 0) + for _, v := range mappingPatchHistoryEntrySummaryAction { + values = append(values, v) + } + return values +} + +// PatchHistoryEntrySummaryLifecycleStateEnum Enum with underlying type: string +type PatchHistoryEntrySummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for PatchHistoryEntrySummaryLifecycleState +const ( + PatchHistoryEntrySummaryLifecycleStateInProgress PatchHistoryEntrySummaryLifecycleStateEnum = "IN_PROGRESS" + PatchHistoryEntrySummaryLifecycleStateSucceeded PatchHistoryEntrySummaryLifecycleStateEnum = "SUCCEEDED" + PatchHistoryEntrySummaryLifecycleStateFailed PatchHistoryEntrySummaryLifecycleStateEnum = "FAILED" +) + +var mappingPatchHistoryEntrySummaryLifecycleState = map[string]PatchHistoryEntrySummaryLifecycleStateEnum{ + "IN_PROGRESS": PatchHistoryEntrySummaryLifecycleStateInProgress, + "SUCCEEDED": PatchHistoryEntrySummaryLifecycleStateSucceeded, + "FAILED": PatchHistoryEntrySummaryLifecycleStateFailed, +} + +// GetPatchHistoryEntrySummaryLifecycleStateEnumValues Enumerates the set of values for PatchHistoryEntrySummaryLifecycleState +func GetPatchHistoryEntrySummaryLifecycleStateEnumValues() []PatchHistoryEntrySummaryLifecycleStateEnum { + values := make([]PatchHistoryEntrySummaryLifecycleStateEnum, 0) + for _, v := range mappingPatchHistoryEntrySummaryLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/patch_summary.go b/vendor/github.com/oracle/oci-go-sdk/database/patch_summary.go new file mode 100644 index 000000000..e803c53fb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/patch_summary.go @@ -0,0 +1,122 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// PatchSummary A Patch for a DB System or DB Home. +// 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type PatchSummary struct { + + // The text describing this patch package. + Description *string `mandatory:"true" json:"description"` + + // The OCID of the patch. + Id *string `mandatory:"true" json:"id"` + + // The date and time that the patch was released. + TimeReleased *common.SDKTime `mandatory:"true" json:"timeReleased"` + + // The version of this patch package. + Version *string `mandatory:"true" json:"version"` + + // Actions that can possibly be performed using this patch. + AvailableActions []PatchSummaryAvailableActionsEnum `mandatory:"false" json:"availableActions,omitempty"` + + // Action that is currently being performed or was completed last. + LastAction PatchSummaryLastActionEnum `mandatory:"false" json:"lastAction,omitempty"` + + // A descriptive text associated with the lifecycleState. + // Typically can contain additional displayable text. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The current state of the patch as a result of lastAction. + LifecycleState PatchSummaryLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` +} + +func (m PatchSummary) String() string { + return common.PointerString(m) +} + +// PatchSummaryAvailableActionsEnum Enum with underlying type: string +type PatchSummaryAvailableActionsEnum string + +// Set of constants representing the allowable values for PatchSummaryAvailableActions +const ( + PatchSummaryAvailableActionsApply PatchSummaryAvailableActionsEnum = "APPLY" + PatchSummaryAvailableActionsPrecheck PatchSummaryAvailableActionsEnum = "PRECHECK" +) + +var mappingPatchSummaryAvailableActions = map[string]PatchSummaryAvailableActionsEnum{ + "APPLY": PatchSummaryAvailableActionsApply, + "PRECHECK": PatchSummaryAvailableActionsPrecheck, +} + +// GetPatchSummaryAvailableActionsEnumValues Enumerates the set of values for PatchSummaryAvailableActions +func GetPatchSummaryAvailableActionsEnumValues() []PatchSummaryAvailableActionsEnum { + values := make([]PatchSummaryAvailableActionsEnum, 0) + for _, v := range mappingPatchSummaryAvailableActions { + values = append(values, v) + } + return values +} + +// PatchSummaryLastActionEnum Enum with underlying type: string +type PatchSummaryLastActionEnum string + +// Set of constants representing the allowable values for PatchSummaryLastAction +const ( + PatchSummaryLastActionApply PatchSummaryLastActionEnum = "APPLY" + PatchSummaryLastActionPrecheck PatchSummaryLastActionEnum = "PRECHECK" +) + +var mappingPatchSummaryLastAction = map[string]PatchSummaryLastActionEnum{ + "APPLY": PatchSummaryLastActionApply, + "PRECHECK": PatchSummaryLastActionPrecheck, +} + +// GetPatchSummaryLastActionEnumValues Enumerates the set of values for PatchSummaryLastAction +func GetPatchSummaryLastActionEnumValues() []PatchSummaryLastActionEnum { + values := make([]PatchSummaryLastActionEnum, 0) + for _, v := range mappingPatchSummaryLastAction { + values = append(values, v) + } + return values +} + +// PatchSummaryLifecycleStateEnum Enum with underlying type: string +type PatchSummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for PatchSummaryLifecycleState +const ( + PatchSummaryLifecycleStateAvailable PatchSummaryLifecycleStateEnum = "AVAILABLE" + PatchSummaryLifecycleStateSuccess PatchSummaryLifecycleStateEnum = "SUCCESS" + PatchSummaryLifecycleStateInProgress PatchSummaryLifecycleStateEnum = "IN_PROGRESS" + PatchSummaryLifecycleStateFailed PatchSummaryLifecycleStateEnum = "FAILED" +) + +var mappingPatchSummaryLifecycleState = map[string]PatchSummaryLifecycleStateEnum{ + "AVAILABLE": PatchSummaryLifecycleStateAvailable, + "SUCCESS": PatchSummaryLifecycleStateSuccess, + "IN_PROGRESS": PatchSummaryLifecycleStateInProgress, + "FAILED": PatchSummaryLifecycleStateFailed, +} + +// GetPatchSummaryLifecycleStateEnumValues Enumerates the set of values for PatchSummaryLifecycleState +func GetPatchSummaryLifecycleStateEnumValues() []PatchSummaryLifecycleStateEnum { + values := make([]PatchSummaryLifecycleStateEnum, 0) + for _, v := range mappingPatchSummaryLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/reinstate_data_guard_association_details.go b/vendor/github.com/oracle/oci-go-sdk/database/reinstate_data_guard_association_details.go new file mode 100644 index 000000000..b348fafb9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/reinstate_data_guard_association_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// ReinstateDataGuardAssociationDetails The Data Guard association reinstate parameters. +type ReinstateDataGuardAssociationDetails struct { + + // The DB System administrator password. + DatabaseAdminPassword *string `mandatory:"true" json:"databaseAdminPassword"` +} + +func (m ReinstateDataGuardAssociationDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/reinstate_data_guard_association_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/reinstate_data_guard_association_request_response.go new file mode 100644 index 000000000..994fdb3c2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/reinstate_data_guard_association_request_response.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ReinstateDataGuardAssociationRequest wrapper for the ReinstateDataGuardAssociation operation +type ReinstateDataGuardAssociationRequest struct { + + // The database OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DatabaseId *string `mandatory:"true" contributesTo:"path" name:"databaseId"` + + // The Data Guard association's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DataGuardAssociationId *string `mandatory:"true" contributesTo:"path" name:"dataGuardAssociationId"` + + // A request to reinstate a database in a standby role. + ReinstateDataGuardAssociationDetails `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"` +} + +func (request ReinstateDataGuardAssociationRequest) String() string { + return common.PointerString(request) +} + +// ReinstateDataGuardAssociationResponse wrapper for the ReinstateDataGuardAssociation operation +type ReinstateDataGuardAssociationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DataGuardAssociation instance + DataGuardAssociation `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 ReinstateDataGuardAssociationResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/restore_database_details.go b/vendor/github.com/oracle/oci-go-sdk/database/restore_database_details.go new file mode 100644 index 000000000..4322a35ad --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/restore_database_details.go @@ -0,0 +1,30 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// RestoreDatabaseDetails The representation of RestoreDatabaseDetails +type RestoreDatabaseDetails struct { + + // Restores using the backup with the System Change Number (SCN) specified. + DatabaseSCN *string `mandatory:"false" json:"databaseSCN"` + + // Restores to the last known good state with the least possible data loss. + Latest *bool `mandatory:"false" json:"latest"` + + // Restores to the timestamp specified. + Timestamp *common.SDKTime `mandatory:"false" json:"timestamp"` +} + +func (m RestoreDatabaseDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/restore_database_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/restore_database_request_response.go new file mode 100644 index 000000000..19873c923 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/restore_database_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// RestoreDatabaseRequest wrapper for the RestoreDatabase operation +type RestoreDatabaseRequest struct { + + // The database OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DatabaseId *string `mandatory:"true" contributesTo:"path" name:"databaseId"` + + // Request to perform database restore. + RestoreDatabaseDetails `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"` +} + +func (request RestoreDatabaseRequest) String() string { + return common.PointerString(request) +} + +// RestoreDatabaseResponse wrapper for the RestoreDatabase operation +type RestoreDatabaseResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Database instance + Database `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 RestoreDatabaseResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/switchover_data_guard_association_details.go b/vendor/github.com/oracle/oci-go-sdk/database/switchover_data_guard_association_details.go new file mode 100644 index 000000000..087705923 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/switchover_data_guard_association_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// SwitchoverDataGuardAssociationDetails The Data Guard association switchover parameters. +type SwitchoverDataGuardAssociationDetails struct { + + // The DB System administrator password. + DatabaseAdminPassword *string `mandatory:"true" json:"databaseAdminPassword"` +} + +func (m SwitchoverDataGuardAssociationDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/switchover_data_guard_association_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/switchover_data_guard_association_request_response.go new file mode 100644 index 000000000..0e3024715 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/switchover_data_guard_association_request_response.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// SwitchoverDataGuardAssociationRequest wrapper for the SwitchoverDataGuardAssociation operation +type SwitchoverDataGuardAssociationRequest struct { + + // The database OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DatabaseId *string `mandatory:"true" contributesTo:"path" name:"databaseId"` + + // The Data Guard association's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DataGuardAssociationId *string `mandatory:"true" contributesTo:"path" name:"dataGuardAssociationId"` + + // Request to swtichover a primary to a standby. + SwitchoverDataGuardAssociationDetails `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"` +} + +func (request SwitchoverDataGuardAssociationRequest) String() string { + return common.PointerString(request) +} + +// SwitchoverDataGuardAssociationResponse wrapper for the SwitchoverDataGuardAssociation operation +type SwitchoverDataGuardAssociationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DataGuardAssociation instance + DataGuardAssociation `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 SwitchoverDataGuardAssociationResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/terminate_db_system_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/terminate_db_system_request_response.go new file mode 100644 index 000000000..991b68b0f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/terminate_db_system_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// TerminateDbSystemRequest wrapper for the TerminateDbSystem operation +type TerminateDbSystemRequest struct { + + // The DB System OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` + + // 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"` +} + +func (request TerminateDbSystemRequest) String() string { + return common.PointerString(request) +} + +// TerminateDbSystemResponse wrapper for the TerminateDbSystem operation +type TerminateDbSystemResponse 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 TerminateDbSystemResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/update_database_details.go b/vendor/github.com/oracle/oci-go-sdk/database/update_database_details.go new file mode 100644 index 000000000..2d436d6d6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/update_database_details.go @@ -0,0 +1,22 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateDatabaseDetails The representation of UpdateDatabaseDetails +type UpdateDatabaseDetails struct { + DbBackupConfig *DbBackupConfig `mandatory:"false" json:"dbBackupConfig"` +} + +func (m UpdateDatabaseDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/update_database_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/update_database_request_response.go new file mode 100644 index 000000000..c43867603 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/update_database_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateDatabaseRequest wrapper for the UpdateDatabase operation +type UpdateDatabaseRequest struct { + + // The database OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DatabaseId *string `mandatory:"true" contributesTo:"path" name:"databaseId"` + + // Request to perform database update. + UpdateDatabaseDetails `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"` +} + +func (request UpdateDatabaseRequest) String() string { + return common.PointerString(request) +} + +// UpdateDatabaseResponse wrapper for the UpdateDatabase operation +type UpdateDatabaseResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Database instance + Database `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 UpdateDatabaseResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/update_db_home_details.go b/vendor/github.com/oracle/oci-go-sdk/database/update_db_home_details.go new file mode 100644 index 000000000..741a7e36f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/update_db_home_details.go @@ -0,0 +1,22 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateDbHomeDetails Describes the modification parameters for the DB Home. +type UpdateDbHomeDetails struct { + DbVersion *PatchDetails `mandatory:"false" json:"dbVersion"` +} + +func (m UpdateDbHomeDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/update_db_home_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/update_db_home_request_response.go new file mode 100644 index 000000000..b02cd0fb8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/update_db_home_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateDbHomeRequest wrapper for the UpdateDbHome operation +type UpdateDbHomeRequest struct { + + // The database home OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DbHomeId *string `mandatory:"true" contributesTo:"path" name:"dbHomeId"` + + // Request to update the properties of a DB Home. + UpdateDbHomeDetails `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"` +} + +func (request UpdateDbHomeRequest) String() string { + return common.PointerString(request) +} + +// UpdateDbHomeResponse wrapper for the UpdateDbHome operation +type UpdateDbHomeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DbHome instance + DbHome `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 UpdateDbHomeResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/update_db_system_details.go b/vendor/github.com/oracle/oci-go-sdk/database/update_db_system_details.go new file mode 100644 index 000000000..eb03d5d10 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/update_db_system_details.go @@ -0,0 +1,32 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. +// + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateDbSystemDetails Describes the modification parameters for the DB System. +type UpdateDbSystemDetails struct { + + // The number of CPU Cores to be set on the DB System. Applicable only for non-VM based DB systems. + CpuCoreCount *int `mandatory:"false" json:"cpuCoreCount"` + + // Size, in GBs, to which the currently attached storage needs to be scaled up to for VM based DB system. This must be greater than current storage size. Note that the total storage size attached will be more than what is requested, to account for REDO/RECO space and software volume. + DataStorageSizeInGBs *int `mandatory:"false" json:"dataStorageSizeInGBs"` + + // The public key portion of the key pair to use for SSH access to the DB System. Multiple public keys can be provided. The length of the combined keys cannot exceed 10,000 characters. + SshPublicKeys []string `mandatory:"false" json:"sshPublicKeys"` + + Version *PatchDetails `mandatory:"false" json:"version"` +} + +func (m UpdateDbSystemDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/database/update_db_system_request_response.go b/vendor/github.com/oracle/oci-go-sdk/database/update_db_system_request_response.go new file mode 100644 index 000000000..d9cd0493e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/database/update_db_system_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package database + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateDbSystemRequest wrapper for the UpdateDbSystem operation +type UpdateDbSystemRequest struct { + + // The DB System OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` + + // Request to update the properties of a DB System. + UpdateDbSystemDetails `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"` +} + +func (request UpdateDbSystemRequest) String() string { + return common.PointerString(request) +} + +// UpdateDbSystemResponse wrapper for the UpdateDbSystem operation +type UpdateDbSystemResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DbSystem instance + DbSystem `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 UpdateDbSystemResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/example/helpers/args.go b/vendor/github.com/oracle/oci-go-sdk/example/helpers/args.go new file mode 100644 index 000000000..4f8b123f0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/example/helpers/args.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// +// Helper methods for OCI GOSDK Samples +// + +package helpers + +import ( + "os" + + "github.com/oracle/oci-go-sdk/common" + + "github.com/subosito/gotenv" +) + +var ( + availabilityDomain string + compartmentID string + rootCompartmentID string +) + +// ParseAgrs parse shared variables from environment variables, other samples should define their own +// viariables and call this function to initialize shared variables +func ParseAgrs() { + err := gotenv.Load(".env.sample") + LogIfError(err) + + availabilityDomain = os.Getenv("OCI_AVAILABILITY_DOMAIN") + compartmentID = os.Getenv("OCI_COMPARTMENT_ID") + rootCompartmentID = os.Getenv("OCI_ROOT_COMPARTMENT_ID") +} + +// AvailabilityDomain return the aviailability domain defined in .env.sample file +func AvailabilityDomain() *string { + return common.String(availabilityDomain) +} + +// CompartmentID return the compartment ID defined in .env.sample file +func CompartmentID() *string { + return common.String(compartmentID) +} + +// RootCompartmentID return the root compartment ID defined in .env.sample file +func RootCompartmentID() *string { + return common.String(rootCompartmentID) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/example/helpers/helper.go b/vendor/github.com/oracle/oci-go-sdk/example/helpers/helper.go new file mode 100644 index 000000000..71317387d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/example/helpers/helper.go @@ -0,0 +1,111 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// +// Helper methods for OCI GOSDK Samples +// + +package helpers + +import ( + "fmt" + "log" + "math/rand" + "reflect" + "strings" + "time" +) + +// LogIfError is equivalent to Println() followed by a call to os.Exit(1) if error is not nil +func LogIfError(err error) { + if err != nil { + log.Fatalln(err.Error()) + } +} + +// RetryUntilTrueOrError retries a function until the predicate is true or it reaches a timeout. +// The operation is retried at the give frequency +func RetryUntilTrueOrError(operation func() (interface{}, error), predicate func(interface{}) (bool, error), frequency, timeout <-chan time.Time) error { + for { + select { + case <-timeout: + return fmt.Errorf("timeout reached") + case <-frequency: + result, err := operation() + if err != nil { + return err + } + + isTrue, err := predicate(result) + if err != nil { + return err + } + + if isTrue { + return nil + } + } + } +} + +// FindLifecycleFieldValue finds lifecycle value inside the struct based on reflection +func FindLifecycleFieldValue(request interface{}) (string, error) { + val := reflect.ValueOf(request) + if val.Kind() == reflect.Ptr { + if val.IsNil() { + return "", fmt.Errorf("can not unmarshal to response a pointer to nil structure") + } + val = val.Elem() + } + + var err error + typ := val.Type() + for i := 0; i < typ.NumField(); i++ { + if err != nil { + return "", err + } + + sf := typ.Field(i) + + //unexported + if sf.PkgPath != "" { + continue + } + + sv := val.Field(i) + + if sv.Kind() == reflect.Struct { + lif, err := FindLifecycleFieldValue(sv.Interface()) + if err == nil { + return lif, nil + } + } + if !strings.Contains(strings.ToLower(sf.Name), "lifecyclestate") { + continue + } + return sv.String(), nil + } + return "", fmt.Errorf("request does not have a lifecycle field") +} + +// CheckLifecycleState returns a function that checks for that a struct has the given lifecycle +func CheckLifecycleState(lifecycleState string) func(interface{}) (bool, error) { + return func(request interface{}) (bool, error) { + fieldLifecycle, err := FindLifecycleFieldValue(request) + if err != nil { + return false, err + } + isEqual := fieldLifecycle == lifecycleState + log.Printf("Current lifecycle state is: %s, waiting for it becomes to: %s", fieldLifecycle, lifecycleState) + return isEqual, nil + } +} + +// GetRandomString returns a random string with length equals to n +func GetRandomString(n int) string { + letters := []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") + + b := make([]rune, n) + for i := range b { + b[i] = letters[rand.Intn(len(letters))] + } + return string(b) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/add_user_to_group_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/add_user_to_group_details.go new file mode 100644 index 000000000..03b811f24 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/add_user_to_group_details.go @@ -0,0 +1,27 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// AddUserToGroupDetails The representation of AddUserToGroupDetails +type AddUserToGroupDetails struct { + + // The OCID of the user. + UserId *string `mandatory:"true" json:"userId"` + + // The OCID of the group. + GroupId *string `mandatory:"true" json:"groupId"` +} + +func (m AddUserToGroupDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/add_user_to_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/add_user_to_group_request_response.go new file mode 100644 index 000000000..34b121dd0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/add_user_to_group_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// AddUserToGroupRequest wrapper for the AddUserToGroup operation +type AddUserToGroupRequest struct { + + // Request object for adding a user to a group. + AddUserToGroupDetails `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 (e.g., 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"` +} + +func (request AddUserToGroupRequest) String() string { + return common.PointerString(request) +} + +// AddUserToGroupResponse wrapper for the AddUserToGroup operation +type AddUserToGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The UserGroupMembership instance + UserGroupMembership `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"` +} + +func (response AddUserToGroupResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/api_key.go b/vendor/github.com/oracle/oci-go-sdk/identity/api_key.go new file mode 100644 index 000000000..d5b9eed1d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/api_key.go @@ -0,0 +1,80 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// ApiKey A PEM-format RSA credential for securing requests to the Oracle Cloud Infrastructure REST API. Also known +// as an *API signing key*. Specifically, this is the public key from the key pair. The private key remains with +// the user calling the API. For information about generating a key pair +// in the required PEM format, see Required Keys and OCIDs (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm). +// **Important:** This is **not** the SSH key for accessing compute instances. +// Each user can have a maximum of three API signing keys. +// For more information about user credentials, see User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/usercredentials.htm). +type ApiKey struct { + + // An Oracle-assigned identifier for the key, in this format: + // TENANCY_OCID/USER_OCID/KEY_FINGERPRINT. + KeyId *string `mandatory:"false" json:"keyId"` + + // The key's value. + KeyValue *string `mandatory:"false" json:"keyValue"` + + // The key's fingerprint (e.g., 12:34:56:78:90:ab:cd:ef:12:34:56:78:90:ab:cd:ef). + Fingerprint *string `mandatory:"false" json:"fingerprint"` + + // The OCID of the user the key belongs to. + UserId *string `mandatory:"false" json:"userId"` + + // Date and time the `ApiKey` object was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The API key's current state. After creating an `ApiKey` object, make sure its `lifecycleState` changes from + // CREATING to ACTIVE before using it. + LifecycleState ApiKeyLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // The detailed status of INACTIVE lifecycleState. + InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` +} + +func (m ApiKey) String() string { + return common.PointerString(m) +} + +// ApiKeyLifecycleStateEnum Enum with underlying type: string +type ApiKeyLifecycleStateEnum string + +// Set of constants representing the allowable values for ApiKeyLifecycleState +const ( + ApiKeyLifecycleStateCreating ApiKeyLifecycleStateEnum = "CREATING" + ApiKeyLifecycleStateActive ApiKeyLifecycleStateEnum = "ACTIVE" + ApiKeyLifecycleStateInactive ApiKeyLifecycleStateEnum = "INACTIVE" + ApiKeyLifecycleStateDeleting ApiKeyLifecycleStateEnum = "DELETING" + ApiKeyLifecycleStateDeleted ApiKeyLifecycleStateEnum = "DELETED" +) + +var mappingApiKeyLifecycleState = map[string]ApiKeyLifecycleStateEnum{ + "CREATING": ApiKeyLifecycleStateCreating, + "ACTIVE": ApiKeyLifecycleStateActive, + "INACTIVE": ApiKeyLifecycleStateInactive, + "DELETING": ApiKeyLifecycleStateDeleting, + "DELETED": ApiKeyLifecycleStateDeleted, +} + +// GetApiKeyLifecycleStateEnumValues Enumerates the set of values for ApiKeyLifecycleState +func GetApiKeyLifecycleStateEnumValues() []ApiKeyLifecycleStateEnum { + values := make([]ApiKeyLifecycleStateEnum, 0) + for _, v := range mappingApiKeyLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/availability_domain.go b/vendor/github.com/oracle/oci-go-sdk/identity/availability_domain.go new file mode 100644 index 000000000..7d5d03b95 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/availability_domain.go @@ -0,0 +1,29 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// AvailabilityDomain One or more isolated, fault-tolerant Oracle data centers that host cloud resources such as instances, volumes, +// and subnets. A region contains several Availability Domains. For more information, see +// Regions and Availability Domains (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm). +type AvailabilityDomain struct { + + // The name of the Availability Domain. + Name *string `mandatory:"false" json:"name"` + + // The OCID of the tenancy. + CompartmentId *string `mandatory:"false" json:"compartmentId"` +} + +func (m AvailabilityDomain) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/compartment.go b/vendor/github.com/oracle/oci-go-sdk/identity/compartment.go new file mode 100644 index 000000000..941523d22 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/compartment.go @@ -0,0 +1,88 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Compartment A collection of related resources. Compartments are a fundamental component of Oracle Cloud Infrastructure +// for organizing and isolating your cloud resources. You use them to clearly separate resources for the purposes +// of measuring usage and billing, access (through the use of IAM Service policies), and isolation (separating the +// resources for one project or business unit from another). A common approach is to create a compartment for each +// major part of your organization. For more information, see +// Overview of the IAM Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm) and also +// Setting Up Your Tenancy (https://docs.us-phoenix-1.oraclecloud.com/Content/GSG/Concepts/settinguptenancy.htm). +// +// To place a resource in a compartment, simply specify the compartment ID in the "Create" request object when +// initially creating the resource. For example, to launch an instance into a particular compartment, specify +// that compartment's OCID in the `LaunchInstance` request. You can't move an existing resource from one +// compartment to another. +// 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type Compartment struct { + + // The OCID of the compartment. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the tenancy containing the compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The name you assign to the compartment during creation. The name must be unique across all + // compartments in the tenancy. + Name *string `mandatory:"true" json:"name"` + + // The description you assign to the compartment. Does not have to be unique, and it's changeable. + Description *string `mandatory:"true" json:"description"` + + // Date and time the compartment was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The compartment's current state. After creating a compartment, make sure its `lifecycleState` changes from + // CREATING to ACTIVE before using it. + LifecycleState CompartmentLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The detailed status of INACTIVE lifecycleState. + InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` +} + +func (m Compartment) String() string { + return common.PointerString(m) +} + +// CompartmentLifecycleStateEnum Enum with underlying type: string +type CompartmentLifecycleStateEnum string + +// Set of constants representing the allowable values for CompartmentLifecycleState +const ( + CompartmentLifecycleStateCreating CompartmentLifecycleStateEnum = "CREATING" + CompartmentLifecycleStateActive CompartmentLifecycleStateEnum = "ACTIVE" + CompartmentLifecycleStateInactive CompartmentLifecycleStateEnum = "INACTIVE" + CompartmentLifecycleStateDeleting CompartmentLifecycleStateEnum = "DELETING" + CompartmentLifecycleStateDeleted CompartmentLifecycleStateEnum = "DELETED" +) + +var mappingCompartmentLifecycleState = map[string]CompartmentLifecycleStateEnum{ + "CREATING": CompartmentLifecycleStateCreating, + "ACTIVE": CompartmentLifecycleStateActive, + "INACTIVE": CompartmentLifecycleStateInactive, + "DELETING": CompartmentLifecycleStateDeleting, + "DELETED": CompartmentLifecycleStateDeleted, +} + +// GetCompartmentLifecycleStateEnumValues Enumerates the set of values for CompartmentLifecycleState +func GetCompartmentLifecycleStateEnumValues() []CompartmentLifecycleStateEnum { + values := make([]CompartmentLifecycleStateEnum, 0) + for _, v := range mappingCompartmentLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_api_key_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_api_key_details.go new file mode 100644 index 000000000..b9d6157ab --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_api_key_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateApiKeyDetails The representation of CreateApiKeyDetails +type CreateApiKeyDetails struct { + + // The public key. Must be an RSA key in PEM format. + Key *string `mandatory:"true" json:"key"` +} + +func (m CreateApiKeyDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_compartment_details.go new file mode 100644 index 000000000..fb4813a61 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_compartment_details.go @@ -0,0 +1,31 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateCompartmentDetails The representation of CreateCompartmentDetails +type CreateCompartmentDetails struct { + + // The OCID of the tenancy containing the compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The name you assign to the compartment during creation. The name must be unique across all compartments + // in the tenancy. + Name *string `mandatory:"true" json:"name"` + + // The description you assign to the compartment during creation. Does not have to be unique, and it's changeable. + Description *string `mandatory:"true" json:"description"` +} + +func (m CreateCompartmentDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_compartment_request_response.go new file mode 100644 index 000000000..5ae960ed6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_compartment_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateCompartmentRequest wrapper for the CreateCompartment operation +type CreateCompartmentRequest struct { + + // Request object for creating a new compartment. + CreateCompartmentDetails `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 (e.g., 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"` +} + +func (request CreateCompartmentRequest) String() string { + return common.PointerString(request) +} + +// CreateCompartmentResponse wrapper for the CreateCompartment operation +type CreateCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Compartment instance + Compartment `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"` +} + +func (response CreateCompartmentResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_customer_secret_key_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_customer_secret_key_details.go new file mode 100644 index 000000000..f61527dc9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_customer_secret_key_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateCustomerSecretKeyDetails The representation of CreateCustomerSecretKeyDetails +type CreateCustomerSecretKeyDetails struct { + + // The name you assign to the secret key during creation. Does not have to be unique, and it's changeable. + DisplayName *string `mandatory:"true" json:"displayName"` +} + +func (m CreateCustomerSecretKeyDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_customer_secret_key_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_customer_secret_key_request_response.go new file mode 100644 index 000000000..db24ca7a8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_customer_secret_key_request_response.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateCustomerSecretKeyRequest wrapper for the CreateCustomerSecretKey operation +type CreateCustomerSecretKeyRequest struct { + + // Request object for creating a new secret key. + CreateCustomerSecretKeyDetails `contributesTo:"body"` + + // The OCID of the user. + UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` + + // 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 (e.g., 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"` +} + +func (request CreateCustomerSecretKeyRequest) String() string { + return common.PointerString(request) +} + +// CreateCustomerSecretKeyResponse wrapper for the CreateCustomerSecretKey operation +type CreateCustomerSecretKeyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CustomerSecretKey instance + CustomerSecretKey `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"` +} + +func (response CreateCustomerSecretKeyResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_group_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_group_details.go new file mode 100644 index 000000000..98a265dc9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_group_details.go @@ -0,0 +1,31 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateGroupDetails The representation of CreateGroupDetails +type CreateGroupDetails struct { + + // The OCID of the tenancy containing the group. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The name you assign to the group during creation. The name must be unique across all groups + // in the tenancy and cannot be changed. + Name *string `mandatory:"true" json:"name"` + + // The description you assign to the group during creation. Does not have to be unique, and it's changeable. + Description *string `mandatory:"true" json:"description"` +} + +func (m CreateGroupDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_group_request_response.go new file mode 100644 index 000000000..882880cb9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_group_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateGroupRequest wrapper for the CreateGroup operation +type CreateGroupRequest struct { + + // Request object for creating a new group. + CreateGroupDetails `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 (e.g., 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"` +} + +func (request CreateGroupRequest) String() string { + return common.PointerString(request) +} + +// CreateGroupResponse wrapper for the CreateGroup operation +type CreateGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Group instance + Group `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"` +} + +func (response CreateGroupResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_identity_provider_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_identity_provider_details.go new file mode 100644 index 000000000..35d7f594a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_identity_provider_details.go @@ -0,0 +1,125 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// CreateIdentityProviderDetails The representation of CreateIdentityProviderDetails +type CreateIdentityProviderDetails interface { + + // The OCID of your tenancy. + GetCompartmentId() *string + + // The name you assign to the `IdentityProvider` during creation. + // The name must be unique across all `IdentityProvider` objects in the + // tenancy and cannot be changed. + GetName() *string + + // The description you assign to the `IdentityProvider` during creation. + // Does not have to be unique, and it's changeable. + GetDescription() *string + + // The identity provider service or product. + // Supported identity providers are Oracle Identity Cloud Service (IDCS) and Microsoft + // Active Directory Federation Services (ADFS). + // Example: `IDCS` + GetProductType() CreateIdentityProviderDetailsProductTypeEnum +} + +type createidentityproviderdetails struct { + JsonData []byte + CompartmentId *string `mandatory:"true" json:"compartmentId"` + Name *string `mandatory:"true" json:"name"` + Description *string `mandatory:"true" json:"description"` + ProductType CreateIdentityProviderDetailsProductTypeEnum `mandatory:"true" json:"productType"` + Protocol string `json:"protocol"` +} + +// UnmarshalJSON unmarshals json +func (m *createidentityproviderdetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalercreateidentityproviderdetails createidentityproviderdetails + s := struct { + Model Unmarshalercreateidentityproviderdetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.CompartmentId = s.Model.CompartmentId + m.Name = s.Model.Name + m.Description = s.Model.Description + m.ProductType = s.Model.ProductType + m.Protocol = s.Model.Protocol + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *createidentityproviderdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + var err error + switch m.Protocol { + case "SAML2": + mm := CreateSaml2IdentityProviderDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + return m, nil + } +} + +//GetCompartmentId returns CompartmentId +func (m createidentityproviderdetails) GetCompartmentId() *string { + return m.CompartmentId +} + +//GetName returns Name +func (m createidentityproviderdetails) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m createidentityproviderdetails) GetDescription() *string { + return m.Description +} + +//GetProductType returns ProductType +func (m createidentityproviderdetails) GetProductType() CreateIdentityProviderDetailsProductTypeEnum { + return m.ProductType +} + +func (m createidentityproviderdetails) String() string { + return common.PointerString(m) +} + +// CreateIdentityProviderDetailsProductTypeEnum Enum with underlying type: string +type CreateIdentityProviderDetailsProductTypeEnum string + +// Set of constants representing the allowable values for CreateIdentityProviderDetailsProductType +const ( + CreateIdentityProviderDetailsProductTypeIdcs CreateIdentityProviderDetailsProductTypeEnum = "IDCS" + CreateIdentityProviderDetailsProductTypeAdfs CreateIdentityProviderDetailsProductTypeEnum = "ADFS" +) + +var mappingCreateIdentityProviderDetailsProductType = map[string]CreateIdentityProviderDetailsProductTypeEnum{ + "IDCS": CreateIdentityProviderDetailsProductTypeIdcs, + "ADFS": CreateIdentityProviderDetailsProductTypeAdfs, +} + +// GetCreateIdentityProviderDetailsProductTypeEnumValues Enumerates the set of values for CreateIdentityProviderDetailsProductType +func GetCreateIdentityProviderDetailsProductTypeEnumValues() []CreateIdentityProviderDetailsProductTypeEnum { + values := make([]CreateIdentityProviderDetailsProductTypeEnum, 0) + for _, v := range mappingCreateIdentityProviderDetailsProductType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_identity_provider_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_identity_provider_request_response.go new file mode 100644 index 000000000..a3ac552dd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_identity_provider_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateIdentityProviderRequest wrapper for the CreateIdentityProvider operation +type CreateIdentityProviderRequest struct { + + // Request object for creating a new SAML2 identity provider. + CreateIdentityProviderDetails `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 (e.g., 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"` +} + +func (request CreateIdentityProviderRequest) String() string { + return common.PointerString(request) +} + +// CreateIdentityProviderResponse wrapper for the CreateIdentityProvider operation +type CreateIdentityProviderResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IdentityProvider instance + IdentityProvider `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"` +} + +func (response CreateIdentityProviderResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_idp_group_mapping_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_idp_group_mapping_details.go new file mode 100644 index 000000000..a6cb91192 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_idp_group_mapping_details.go @@ -0,0 +1,28 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateIdpGroupMappingDetails The representation of CreateIdpGroupMappingDetails +type CreateIdpGroupMappingDetails struct { + + // The name of the IdP group you want to map. + IdpGroupName *string `mandatory:"true" json:"idpGroupName"` + + // The OCID of the IAM Service Group + // you want to map to the IdP group. + GroupId *string `mandatory:"true" json:"groupId"` +} + +func (m CreateIdpGroupMappingDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_idp_group_mapping_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_idp_group_mapping_request_response.go new file mode 100644 index 000000000..376d07bc3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_idp_group_mapping_request_response.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateIdpGroupMappingRequest wrapper for the CreateIdpGroupMapping operation +type CreateIdpGroupMappingRequest struct { + + // Add a mapping from an SAML2.0 identity provider group to a BMC group. + CreateIdpGroupMappingDetails `contributesTo:"body"` + + // The OCID of the identity provider. + IdentityProviderId *string `mandatory:"true" contributesTo:"path" name:"identityProviderId"` + + // 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 (e.g., 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"` +} + +func (request CreateIdpGroupMappingRequest) String() string { + return common.PointerString(request) +} + +// CreateIdpGroupMappingResponse wrapper for the CreateIdpGroupMapping operation +type CreateIdpGroupMappingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IdpGroupMapping instance + IdpGroupMapping `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"` +} + +func (response CreateIdpGroupMappingResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_or_reset_u_i_password_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_or_reset_u_i_password_request_response.go new file mode 100644 index 000000000..8d6de9aa8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_or_reset_u_i_password_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateOrResetUIPasswordRequest wrapper for the CreateOrResetUIPassword operation +type CreateOrResetUIPasswordRequest struct { + + // The OCID of the user. + UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` + + // 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 (e.g., 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"` +} + +func (request CreateOrResetUIPasswordRequest) String() string { + return common.PointerString(request) +} + +// CreateOrResetUIPasswordResponse wrapper for the CreateOrResetUIPassword operation +type CreateOrResetUIPasswordResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The UiPassword instance + UiPassword `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"` +} + +func (response CreateOrResetUIPasswordResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_policy_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_policy_details.go new file mode 100644 index 000000000..b25f8b649 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_policy_details.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreatePolicyDetails The representation of CreatePolicyDetails +type CreatePolicyDetails struct { + + // The OCID of the compartment containing the policy (either the tenancy or another compartment). + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The name you assign to the policy during creation. The name must be unique across all policies + // in the tenancy and cannot be changed. + Name *string `mandatory:"true" json:"name"` + + // An array of policy statements written in the policy language. See + // How Policies Work (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm) and + // Common Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/commonpolicies.htm). + Statements []string `mandatory:"true" json:"statements"` + + // The description you assign to the policy during creation. Does not have to be unique, and it's changeable. + Description *string `mandatory:"true" json:"description"` + + // The version of the policy. If null or set to an empty string, when a request comes in for authorization, the + // policy will be evaluated according to the current behavior of the services at that moment. If set to a particular + // date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date. + VersionDate *common.SDKTime `mandatory:"false" json:"versionDate"` +} + +func (m CreatePolicyDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_policy_request_response.go new file mode 100644 index 000000000..b6d7e0028 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_policy_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreatePolicyRequest wrapper for the CreatePolicy operation +type CreatePolicyRequest struct { + + // Request object for creating a new policy. + CreatePolicyDetails `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 (e.g., 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"` +} + +func (request CreatePolicyRequest) String() string { + return common.PointerString(request) +} + +// CreatePolicyResponse wrapper for the CreatePolicy operation +type CreatePolicyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Policy instance + Policy `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"` +} + +func (response CreatePolicyResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_region_subscription_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_region_subscription_details.go new file mode 100644 index 000000000..78e866f7c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_region_subscription_details.go @@ -0,0 +1,29 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateRegionSubscriptionDetails The representation of CreateRegionSubscriptionDetails +type CreateRegionSubscriptionDetails struct { + + // The regions's key. + // Allowed values are: + // - `PHX` + // - `IAD` + // - `FRA` + // Example: `PHX` + RegionKey *string `mandatory:"true" json:"regionKey"` +} + +func (m CreateRegionSubscriptionDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_region_subscription_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_region_subscription_request_response.go new file mode 100644 index 000000000..66dc199d1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_region_subscription_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateRegionSubscriptionRequest wrapper for the CreateRegionSubscription operation +type CreateRegionSubscriptionRequest struct { + + // Request object for activate a new region. + CreateRegionSubscriptionDetails `contributesTo:"body"` + + // The OCID of the tenancy. + TenancyId *string `mandatory:"true" contributesTo:"path" name:"tenancyId"` + + // 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 (e.g., 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"` +} + +func (request CreateRegionSubscriptionRequest) String() string { + return common.PointerString(request) +} + +// CreateRegionSubscriptionResponse wrapper for the CreateRegionSubscription operation +type CreateRegionSubscriptionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RegionSubscription instance + RegionSubscription `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 CreateRegionSubscriptionResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_saml2_identity_provider_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_saml2_identity_provider_details.go new file mode 100644 index 000000000..f4eba6eee --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_saml2_identity_provider_details.go @@ -0,0 +1,81 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// CreateSaml2IdentityProviderDetails The representation of CreateSaml2IdentityProviderDetails +type CreateSaml2IdentityProviderDetails struct { + + // The OCID of your tenancy. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The name you assign to the `IdentityProvider` during creation. + // The name must be unique across all `IdentityProvider` objects in the + // tenancy and cannot be changed. + Name *string `mandatory:"true" json:"name"` + + // The description you assign to the `IdentityProvider` during creation. + // Does not have to be unique, and it's changeable. + Description *string `mandatory:"true" json:"description"` + + // The URL for retrieving the identity provider's metadata, + // which contains information required for federating. + MetadataUrl *string `mandatory:"true" json:"metadataUrl"` + + // The XML that contains the information required for federating. + Metadata *string `mandatory:"true" json:"metadata"` + + // The identity provider service or product. + // Supported identity providers are Oracle Identity Cloud Service (IDCS) and Microsoft + // Active Directory Federation Services (ADFS). + // Example: `IDCS` + ProductType CreateIdentityProviderDetailsProductTypeEnum `mandatory:"true" json:"productType"` +} + +//GetCompartmentId returns CompartmentId +func (m CreateSaml2IdentityProviderDetails) GetCompartmentId() *string { + return m.CompartmentId +} + +//GetName returns Name +func (m CreateSaml2IdentityProviderDetails) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m CreateSaml2IdentityProviderDetails) GetDescription() *string { + return m.Description +} + +//GetProductType returns ProductType +func (m CreateSaml2IdentityProviderDetails) GetProductType() CreateIdentityProviderDetailsProductTypeEnum { + return m.ProductType +} + +func (m CreateSaml2IdentityProviderDetails) String() string { + return common.PointerString(m) +} + +// MarshalJSON marshals to json representation +func (m CreateSaml2IdentityProviderDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateSaml2IdentityProviderDetails CreateSaml2IdentityProviderDetails + s := struct { + DiscriminatorParam string `json:"protocol"` + MarshalTypeCreateSaml2IdentityProviderDetails + }{ + "SAML2", + (MarshalTypeCreateSaml2IdentityProviderDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_swift_password_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_swift_password_details.go new file mode 100644 index 000000000..0182d9dc5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_swift_password_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateSwiftPasswordDetails The representation of CreateSwiftPasswordDetails +type CreateSwiftPasswordDetails struct { + + // The description you assign to the Swift password during creation. Does not have to be unique, and it's changeable. + Description *string `mandatory:"true" json:"description"` +} + +func (m CreateSwiftPasswordDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_swift_password_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_swift_password_request_response.go new file mode 100644 index 000000000..696261df5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_swift_password_request_response.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateSwiftPasswordRequest wrapper for the CreateSwiftPassword operation +type CreateSwiftPasswordRequest struct { + + // Request object for creating a new swift password. + CreateSwiftPasswordDetails `contributesTo:"body"` + + // The OCID of the user. + UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` + + // 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 (e.g., 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"` +} + +func (request CreateSwiftPasswordRequest) String() string { + return common.PointerString(request) +} + +// CreateSwiftPasswordResponse wrapper for the CreateSwiftPassword operation +type CreateSwiftPasswordResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The SwiftPassword instance + SwiftPassword `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"` +} + +func (response CreateSwiftPasswordResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_user_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_user_details.go new file mode 100644 index 000000000..37ddd5857 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_user_details.go @@ -0,0 +1,31 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateUserDetails The representation of CreateUserDetails +type CreateUserDetails struct { + + // The OCID of the tenancy containing the user. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The name you assign to the user during creation. This is the user's login for the Console. + // The name must be unique across all users in the tenancy and cannot be changed. + Name *string `mandatory:"true" json:"name"` + + // The description you assign to the user during creation. Does not have to be unique, and it's changeable. + Description *string `mandatory:"true" json:"description"` +} + +func (m CreateUserDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/create_user_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/create_user_request_response.go new file mode 100644 index 000000000..137de9446 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/create_user_request_response.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateUserRequest wrapper for the CreateUser operation +type CreateUserRequest struct { + + // Request object for creating a new user. + CreateUserDetails `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 (e.g., 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"` +} + +func (request CreateUserRequest) String() string { + return common.PointerString(request) +} + +// CreateUserResponse wrapper for the CreateUser operation +type CreateUserResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The User instance + User `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"` +} + +func (response CreateUserResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/customer_secret_key.go b/vendor/github.com/oracle/oci-go-sdk/identity/customer_secret_key.go new file mode 100644 index 000000000..f3137bf6e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/customer_secret_key.go @@ -0,0 +1,82 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CustomerSecretKey A `CustomerSecretKey` is an Oracle-provided key for using the Object Storage Service's +// Amazon S3 compatible API (https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/s3compatibleapi.htm). +// A user can have up to two secret keys at a time. +// **Note:** The secret key is always an Oracle-generated string; you can't change it to a string of your choice. +// For more information, see Managing User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm). +type CustomerSecretKey struct { + + // The secret key. + Key *string `mandatory:"false" json:"key"` + + // The OCID of the secret key. + Id *string `mandatory:"false" json:"id"` + + // The OCID of the user the password belongs to. + UserId *string `mandatory:"false" json:"userId"` + + // The display name you assign to the secret key. Does not have to be unique, and it's changeable. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Date and time the `CustomerSecretKey` object was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Date and time when this password will expire, in the format defined by RFC3339. + // Null if it never expires. + // Example: `2016-08-25T21:10:29.600Z` + TimeExpires *common.SDKTime `mandatory:"false" json:"timeExpires"` + + // The secret key's current state. After creating a secret key, make sure its `lifecycleState` changes from + // CREATING to ACTIVE before using it. + LifecycleState CustomerSecretKeyLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // The detailed status of INACTIVE lifecycleState. + InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` +} + +func (m CustomerSecretKey) String() string { + return common.PointerString(m) +} + +// CustomerSecretKeyLifecycleStateEnum Enum with underlying type: string +type CustomerSecretKeyLifecycleStateEnum string + +// Set of constants representing the allowable values for CustomerSecretKeyLifecycleState +const ( + CustomerSecretKeyLifecycleStateCreating CustomerSecretKeyLifecycleStateEnum = "CREATING" + CustomerSecretKeyLifecycleStateActive CustomerSecretKeyLifecycleStateEnum = "ACTIVE" + CustomerSecretKeyLifecycleStateInactive CustomerSecretKeyLifecycleStateEnum = "INACTIVE" + CustomerSecretKeyLifecycleStateDeleting CustomerSecretKeyLifecycleStateEnum = "DELETING" + CustomerSecretKeyLifecycleStateDeleted CustomerSecretKeyLifecycleStateEnum = "DELETED" +) + +var mappingCustomerSecretKeyLifecycleState = map[string]CustomerSecretKeyLifecycleStateEnum{ + "CREATING": CustomerSecretKeyLifecycleStateCreating, + "ACTIVE": CustomerSecretKeyLifecycleStateActive, + "INACTIVE": CustomerSecretKeyLifecycleStateInactive, + "DELETING": CustomerSecretKeyLifecycleStateDeleting, + "DELETED": CustomerSecretKeyLifecycleStateDeleted, +} + +// GetCustomerSecretKeyLifecycleStateEnumValues Enumerates the set of values for CustomerSecretKeyLifecycleState +func GetCustomerSecretKeyLifecycleStateEnumValues() []CustomerSecretKeyLifecycleStateEnum { + values := make([]CustomerSecretKeyLifecycleStateEnum, 0) + for _, v := range mappingCustomerSecretKeyLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/customer_secret_key_summary.go b/vendor/github.com/oracle/oci-go-sdk/identity/customer_secret_key_summary.go new file mode 100644 index 000000000..bc59eed42 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/customer_secret_key_summary.go @@ -0,0 +1,76 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CustomerSecretKeySummary As the name suggests, a `CustomerSecretKeySummary` object contains information about a `CustomerSecretKey`. +// A `CustomerSecretKey` is an Oracle-provided key for using the Object Storage Service's Amazon S3 compatible API. +type CustomerSecretKeySummary struct { + + // The OCID of the secret key. + Id *string `mandatory:"false" json:"id"` + + // The OCID of the user the password belongs to. + UserId *string `mandatory:"false" json:"userId"` + + // The displayName you assign to the secret key. Does not have to be unique, and it's changeable. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Date and time the `CustomerSecretKey` object was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Date and time when this password will expire, in the format defined by RFC3339. + // Null if it never expires. + // Example: `2016-08-25T21:10:29.600Z` + TimeExpires *common.SDKTime `mandatory:"false" json:"timeExpires"` + + // The secret key's current state. After creating a secret key, make sure its `lifecycleState` changes from + // CREATING to ACTIVE before using it. + LifecycleState CustomerSecretKeySummaryLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // The detailed status of INACTIVE lifecycleState. + InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` +} + +func (m CustomerSecretKeySummary) String() string { + return common.PointerString(m) +} + +// CustomerSecretKeySummaryLifecycleStateEnum Enum with underlying type: string +type CustomerSecretKeySummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for CustomerSecretKeySummaryLifecycleState +const ( + CustomerSecretKeySummaryLifecycleStateCreating CustomerSecretKeySummaryLifecycleStateEnum = "CREATING" + CustomerSecretKeySummaryLifecycleStateActive CustomerSecretKeySummaryLifecycleStateEnum = "ACTIVE" + CustomerSecretKeySummaryLifecycleStateInactive CustomerSecretKeySummaryLifecycleStateEnum = "INACTIVE" + CustomerSecretKeySummaryLifecycleStateDeleting CustomerSecretKeySummaryLifecycleStateEnum = "DELETING" + CustomerSecretKeySummaryLifecycleStateDeleted CustomerSecretKeySummaryLifecycleStateEnum = "DELETED" +) + +var mappingCustomerSecretKeySummaryLifecycleState = map[string]CustomerSecretKeySummaryLifecycleStateEnum{ + "CREATING": CustomerSecretKeySummaryLifecycleStateCreating, + "ACTIVE": CustomerSecretKeySummaryLifecycleStateActive, + "INACTIVE": CustomerSecretKeySummaryLifecycleStateInactive, + "DELETING": CustomerSecretKeySummaryLifecycleStateDeleting, + "DELETED": CustomerSecretKeySummaryLifecycleStateDeleted, +} + +// GetCustomerSecretKeySummaryLifecycleStateEnumValues Enumerates the set of values for CustomerSecretKeySummaryLifecycleState +func GetCustomerSecretKeySummaryLifecycleStateEnumValues() []CustomerSecretKeySummaryLifecycleStateEnum { + values := make([]CustomerSecretKeySummaryLifecycleStateEnum, 0) + for _, v := range mappingCustomerSecretKeySummaryLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_api_key_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_api_key_request_response.go new file mode 100644 index 000000000..e2beffe0a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/delete_api_key_request_response.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteApiKeyRequest wrapper for the DeleteApiKey operation +type DeleteApiKeyRequest struct { + + // The OCID of the user. + UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` + + // The key's fingerprint. + Fingerprint *string `mandatory:"true" contributesTo:"path" name:"fingerprint"` + + // 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"` +} + +func (request DeleteApiKeyRequest) String() string { + return common.PointerString(request) +} + +// DeleteApiKeyResponse wrapper for the DeleteApiKey operation +type DeleteApiKeyResponse 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 DeleteApiKeyResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_customer_secret_key_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_customer_secret_key_request_response.go new file mode 100644 index 000000000..02855f42b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/delete_customer_secret_key_request_response.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteCustomerSecretKeyRequest wrapper for the DeleteCustomerSecretKey operation +type DeleteCustomerSecretKeyRequest struct { + + // The OCID of the user. + UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` + + // The OCID of the secret key. + CustomerSecretKeyId *string `mandatory:"true" contributesTo:"path" name:"customerSecretKeyId"` + + // 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"` +} + +func (request DeleteCustomerSecretKeyRequest) String() string { + return common.PointerString(request) +} + +// DeleteCustomerSecretKeyResponse wrapper for the DeleteCustomerSecretKey operation +type DeleteCustomerSecretKeyResponse 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 DeleteCustomerSecretKeyResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_group_request_response.go new file mode 100644 index 000000000..9b63b8bf4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/delete_group_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteGroupRequest wrapper for the DeleteGroup operation +type DeleteGroupRequest struct { + + // The OCID of the group. + GroupId *string `mandatory:"true" contributesTo:"path" name:"groupId"` + + // 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"` +} + +func (request DeleteGroupRequest) String() string { + return common.PointerString(request) +} + +// DeleteGroupResponse wrapper for the DeleteGroup operation +type DeleteGroupResponse 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 DeleteGroupResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_identity_provider_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_identity_provider_request_response.go new file mode 100644 index 000000000..e0d82c0fa --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/delete_identity_provider_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteIdentityProviderRequest wrapper for the DeleteIdentityProvider operation +type DeleteIdentityProviderRequest struct { + + // The OCID of the identity provider. + IdentityProviderId *string `mandatory:"true" contributesTo:"path" name:"identityProviderId"` + + // 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"` +} + +func (request DeleteIdentityProviderRequest) String() string { + return common.PointerString(request) +} + +// DeleteIdentityProviderResponse wrapper for the DeleteIdentityProvider operation +type DeleteIdentityProviderResponse 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 DeleteIdentityProviderResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_idp_group_mapping_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_idp_group_mapping_request_response.go new file mode 100644 index 000000000..02d2b8c50 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/delete_idp_group_mapping_request_response.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteIdpGroupMappingRequest wrapper for the DeleteIdpGroupMapping operation +type DeleteIdpGroupMappingRequest struct { + + // The OCID of the identity provider. + IdentityProviderId *string `mandatory:"true" contributesTo:"path" name:"identityProviderId"` + + // The OCID of the group mapping. + MappingId *string `mandatory:"true" contributesTo:"path" name:"mappingId"` + + // 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"` +} + +func (request DeleteIdpGroupMappingRequest) String() string { + return common.PointerString(request) +} + +// DeleteIdpGroupMappingResponse wrapper for the DeleteIdpGroupMapping operation +type DeleteIdpGroupMappingResponse 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 DeleteIdpGroupMappingResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_policy_request_response.go new file mode 100644 index 000000000..905f97563 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/delete_policy_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeletePolicyRequest wrapper for the DeletePolicy operation +type DeletePolicyRequest struct { + + // The OCID of the policy. + PolicyId *string `mandatory:"true" contributesTo:"path" name:"policyId"` + + // 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"` +} + +func (request DeletePolicyRequest) String() string { + return common.PointerString(request) +} + +// DeletePolicyResponse wrapper for the DeletePolicy operation +type DeletePolicyResponse 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 DeletePolicyResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_swift_password_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_swift_password_request_response.go new file mode 100644 index 000000000..fac41a4f3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/delete_swift_password_request_response.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteSwiftPasswordRequest wrapper for the DeleteSwiftPassword operation +type DeleteSwiftPasswordRequest struct { + + // The OCID of the user. + UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` + + // The OCID of the Swift password. + SwiftPasswordId *string `mandatory:"true" contributesTo:"path" name:"swiftPasswordId"` + + // 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"` +} + +func (request DeleteSwiftPasswordRequest) String() string { + return common.PointerString(request) +} + +// DeleteSwiftPasswordResponse wrapper for the DeleteSwiftPassword operation +type DeleteSwiftPasswordResponse 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 DeleteSwiftPasswordResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/delete_user_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/delete_user_request_response.go new file mode 100644 index 000000000..5dffac8f5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/delete_user_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteUserRequest wrapper for the DeleteUser operation +type DeleteUserRequest struct { + + // The OCID of the user. + UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` + + // 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"` +} + +func (request DeleteUserRequest) String() string { + return common.PointerString(request) +} + +// DeleteUserResponse wrapper for the DeleteUser operation +type DeleteUserResponse 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 DeleteUserResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/fault_domain.go b/vendor/github.com/oracle/oci-go-sdk/identity/fault_domain.go new file mode 100644 index 000000000..4f596c95b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/fault_domain.go @@ -0,0 +1,32 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// FaultDomain A Fault Domain is a logical grouping of hardware and infrastructure within an Availability Domain that can become +// unavailable in its entirety either due to hardware failure such as Top-of-rack (TOR) switch failure or due to +// planned software maintenance such as security updates that reboot your instances. +type FaultDomain struct { + + // The name of the Fault Domain. + Name *string `mandatory:"false" json:"name"` + + // The OCID of the of the compartment. Currently only tenancy (root) compartment can be provided. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The name of the availabilityDomain where the Fault Domain belongs. + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` +} + +func (m FaultDomain) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_compartment_request_response.go new file mode 100644 index 000000000..f85794587 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/get_compartment_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetCompartmentRequest wrapper for the GetCompartment operation +type GetCompartmentRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"path" name:"compartmentId"` +} + +func (request GetCompartmentRequest) String() string { + return common.PointerString(request) +} + +// GetCompartmentResponse wrapper for the GetCompartment operation +type GetCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Compartment instance + Compartment `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"` +} + +func (response GetCompartmentResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_group_request_response.go new file mode 100644 index 000000000..90d97badc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/get_group_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetGroupRequest wrapper for the GetGroup operation +type GetGroupRequest struct { + + // The OCID of the group. + GroupId *string `mandatory:"true" contributesTo:"path" name:"groupId"` +} + +func (request GetGroupRequest) String() string { + return common.PointerString(request) +} + +// GetGroupResponse wrapper for the GetGroup operation +type GetGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Group instance + Group `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"` +} + +func (response GetGroupResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_identity_provider_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_identity_provider_request_response.go new file mode 100644 index 000000000..503c1687a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/get_identity_provider_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetIdentityProviderRequest wrapper for the GetIdentityProvider operation +type GetIdentityProviderRequest struct { + + // The OCID of the identity provider. + IdentityProviderId *string `mandatory:"true" contributesTo:"path" name:"identityProviderId"` +} + +func (request GetIdentityProviderRequest) String() string { + return common.PointerString(request) +} + +// GetIdentityProviderResponse wrapper for the GetIdentityProvider operation +type GetIdentityProviderResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IdentityProvider instance + IdentityProvider `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"` +} + +func (response GetIdentityProviderResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_idp_group_mapping_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_idp_group_mapping_request_response.go new file mode 100644 index 000000000..b589e1e9f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/get_idp_group_mapping_request_response.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetIdpGroupMappingRequest wrapper for the GetIdpGroupMapping operation +type GetIdpGroupMappingRequest struct { + + // The OCID of the identity provider. + IdentityProviderId *string `mandatory:"true" contributesTo:"path" name:"identityProviderId"` + + // The OCID of the group mapping. + MappingId *string `mandatory:"true" contributesTo:"path" name:"mappingId"` +} + +func (request GetIdpGroupMappingRequest) String() string { + return common.PointerString(request) +} + +// GetIdpGroupMappingResponse wrapper for the GetIdpGroupMapping operation +type GetIdpGroupMappingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IdpGroupMapping instance + IdpGroupMapping `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"` +} + +func (response GetIdpGroupMappingResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_policy_request_response.go new file mode 100644 index 000000000..3bff5478c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/get_policy_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetPolicyRequest wrapper for the GetPolicy operation +type GetPolicyRequest struct { + + // The OCID of the policy. + PolicyId *string `mandatory:"true" contributesTo:"path" name:"policyId"` +} + +func (request GetPolicyRequest) String() string { + return common.PointerString(request) +} + +// GetPolicyResponse wrapper for the GetPolicy operation +type GetPolicyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Policy instance + Policy `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"` +} + +func (response GetPolicyResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_tenancy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_tenancy_request_response.go new file mode 100644 index 000000000..8ad0f641d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/get_tenancy_request_response.go @@ -0,0 +1,38 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetTenancyRequest wrapper for the GetTenancy operation +type GetTenancyRequest struct { + + // The OCID of the tenancy. + TenancyId *string `mandatory:"true" contributesTo:"path" name:"tenancyId"` +} + +func (request GetTenancyRequest) String() string { + return common.PointerString(request) +} + +// GetTenancyResponse wrapper for the GetTenancy operation +type GetTenancyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Tenancy instance + Tenancy `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 GetTenancyResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_user_group_membership_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_user_group_membership_request_response.go new file mode 100644 index 000000000..492240dbf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/get_user_group_membership_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetUserGroupMembershipRequest wrapper for the GetUserGroupMembership operation +type GetUserGroupMembershipRequest struct { + + // The OCID of the userGroupMembership. + UserGroupMembershipId *string `mandatory:"true" contributesTo:"path" name:"userGroupMembershipId"` +} + +func (request GetUserGroupMembershipRequest) String() string { + return common.PointerString(request) +} + +// GetUserGroupMembershipResponse wrapper for the GetUserGroupMembership operation +type GetUserGroupMembershipResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The UserGroupMembership instance + UserGroupMembership `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"` +} + +func (response GetUserGroupMembershipResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/get_user_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/get_user_request_response.go new file mode 100644 index 000000000..980955dad --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/get_user_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetUserRequest wrapper for the GetUser operation +type GetUserRequest struct { + + // The OCID of the user. + UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` +} + +func (request GetUserRequest) String() string { + return common.PointerString(request) +} + +// GetUserResponse wrapper for the GetUser operation +type GetUserResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The User instance + User `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"` +} + +func (response GetUserResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/group.go b/vendor/github.com/oracle/oci-go-sdk/identity/group.go new file mode 100644 index 000000000..8029ba950 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/group.go @@ -0,0 +1,84 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Group A collection of users who all need the same type of access to a particular set of resources or compartment. +// For conceptual information about groups and other IAM Service components, see +// Overview of the IAM Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). +// If you're federating with an identity provider (IdP), you need to create mappings between the groups +// defined in the IdP and groups you define in the IAM service. For more information, see +// Identity Providers and Federation (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/federation.htm). Also see +// IdentityProvider and +// IdpGroupMapping. +// 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type Group struct { + + // The OCID of the group. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the tenancy containing the group. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The name you assign to the group during creation. The name must be unique across all groups in + // the tenancy and cannot be changed. + Name *string `mandatory:"true" json:"name"` + + // The description you assign to the group. Does not have to be unique, and it's changeable. + Description *string `mandatory:"true" json:"description"` + + // Date and time the group was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The group's current state. After creating a group, make sure its `lifecycleState` changes from CREATING to + // ACTIVE before using it. + LifecycleState GroupLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The detailed status of INACTIVE lifecycleState. + InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` +} + +func (m Group) String() string { + return common.PointerString(m) +} + +// GroupLifecycleStateEnum Enum with underlying type: string +type GroupLifecycleStateEnum string + +// Set of constants representing the allowable values for GroupLifecycleState +const ( + GroupLifecycleStateCreating GroupLifecycleStateEnum = "CREATING" + GroupLifecycleStateActive GroupLifecycleStateEnum = "ACTIVE" + GroupLifecycleStateInactive GroupLifecycleStateEnum = "INACTIVE" + GroupLifecycleStateDeleting GroupLifecycleStateEnum = "DELETING" + GroupLifecycleStateDeleted GroupLifecycleStateEnum = "DELETED" +) + +var mappingGroupLifecycleState = map[string]GroupLifecycleStateEnum{ + "CREATING": GroupLifecycleStateCreating, + "ACTIVE": GroupLifecycleStateActive, + "INACTIVE": GroupLifecycleStateInactive, + "DELETING": GroupLifecycleStateDeleting, + "DELETED": GroupLifecycleStateDeleted, +} + +// GetGroupLifecycleStateEnumValues Enumerates the set of values for GroupLifecycleState +func GetGroupLifecycleStateEnumValues() []GroupLifecycleStateEnum { + values := make([]GroupLifecycleStateEnum, 0) + for _, v := range mappingGroupLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/identity_client.go b/vendor/github.com/oracle/oci-go-sdk/identity/identity_client.go new file mode 100644 index 000000000..8bf0c90c5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/identity_client.go @@ -0,0 +1,1167 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +//IdentityClient a client for Identity +type IdentityClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewIdentityClientWithConfigurationProvider Creates a new default Identity client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewIdentityClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client IdentityClient, err error) { + baseClient, err := common.NewClientWithConfig(configProvider) + if err != nil { + return + } + + client = IdentityClient{BaseClient: baseClient} + client.BasePath = "20160918" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *IdentityClient) SetRegion(region string) { + client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "identity", region) +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *IdentityClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { + if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { + return err + } + + // Error has been checked already + region, _ := configProvider.Region() + client.config = &configProvider + client.SetRegion(region) + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *IdentityClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// AddUserToGroup Adds the specified user to the specified group and returns a `UserGroupMembership` object with its own OCID. +// After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the +// object, first make sure its `lifecycleState` has changed to ACTIVE. +func (client IdentityClient) AddUserToGroup(ctx context.Context, request AddUserToGroupRequest) (response AddUserToGroupResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/userGroupMemberships/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateCompartment Creates a new compartment in your tenancy. +// **Important:** Compartments cannot be deleted. +// You must specify your tenancy's OCID as the compartment ID in the request object. Remember that the tenancy +// is simply the root compartment. For information about OCIDs, see +// Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). +// You must also specify a *name* for the compartment, which must be unique across all compartments in +// your tenancy. You can use this name or the OCID when writing policies that apply +// to the compartment. For more information about policies, see +// How Policies Work (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm). +// You must also specify a *description* for the compartment (although it can be an empty string). It does +// not have to be unique, and you can change it anytime with +// UpdateCompartment. +// After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the +// object, first make sure its `lifecycleState` has changed to ACTIVE. +func (client IdentityClient) CreateCompartment(ctx context.Context, request CreateCompartmentRequest) (response CreateCompartmentResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/compartments/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateCustomerSecretKey Creates a new secret key for the specified user. Secret keys are used for authentication with the Object Storage Service's Amazon S3 +// compatible API. For information, see +// Managing User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm). +// You must specify a *description* for the secret key (although it can be an empty string). It does not +// have to be unique, and you can change it anytime with +// UpdateCustomerSecretKey. +// Every user has permission to create a secret key for *their own user ID*. An administrator in your organization +// does not need to write a policy to give users this ability. To compare, administrators who have permission to the +// tenancy can use this operation to create a secret key for any user, including themselves. +func (client IdentityClient) CreateCustomerSecretKey(ctx context.Context, request CreateCustomerSecretKeyRequest) (response CreateCustomerSecretKeyResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/users/{userId}/customerSecretKeys/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateGroup Creates a new group in your tenancy. +// You must specify your tenancy's OCID as the compartment ID in the request object (remember that the tenancy +// is simply the root compartment). Notice that IAM resources (users, groups, compartments, and some policies) +// reside within the tenancy itself, unlike cloud resources such as compute instances, which typically +// reside within compartments inside the tenancy. For information about OCIDs, see +// Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). +// You must also specify a *name* for the group, which must be unique across all groups in your tenancy and +// cannot be changed. You can use this name or the OCID when writing policies that apply to the group. For more +// information about policies, see How Policies Work (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm). +// You must also specify a *description* for the group (although it can be an empty string). It does not +// have to be unique, and you can change it anytime with UpdateGroup. +// After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the +// object, first make sure its `lifecycleState` has changed to ACTIVE. +// After creating the group, you need to put users in it and write policies for it. +// See AddUserToGroup and +// CreatePolicy. +func (client IdentityClient) CreateGroup(ctx context.Context, request CreateGroupRequest) (response CreateGroupResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/groups/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateIdentityProvider Creates a new identity provider in your tenancy. For more information, see +// Identity Providers and Federation (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/federation.htm). +// You must specify your tenancy's OCID as the compartment ID in the request object. +// Remember that the tenancy is simply the root compartment. For information about +// OCIDs, see Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). +// You must also specify a *name* for the `IdentityProvider`, which must be unique +// across all `IdentityProvider` objects in your tenancy and cannot be changed. +// You must also specify a *description* for the `IdentityProvider` (although +// it can be an empty string). It does not have to be unique, and you can change +// it anytime with +// UpdateIdentityProvider. +// After you send your request, the new object's `lifecycleState` will temporarily +// be CREATING. Before using the object, first make sure its `lifecycleState` has +// changed to ACTIVE. +func (client IdentityClient) CreateIdentityProvider(ctx context.Context, request CreateIdentityProviderRequest) (response CreateIdentityProviderResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/identityProviders/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &identityprovider{}) + return +} + +// CreateIdpGroupMapping Creates a single mapping between an IdP group and an IAM Service +// Group. +func (client IdentityClient) CreateIdpGroupMapping(ctx context.Context, request CreateIdpGroupMappingRequest) (response CreateIdpGroupMappingResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/identityProviders/{identityProviderId}/groupMappings/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateOrResetUIPassword Creates a new Console one-time password for the specified user. For more information about user +// credentials, see User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/usercredentials.htm). +// Use this operation after creating a new user, or if a user forgets their password. The new one-time +// password is returned to you in the response, and you must securely deliver it to the user. They'll +// be prompted to change this password the next time they sign in to the Console. If they don't change +// it within 7 days, the password will expire and you'll need to create a new one-time password for the +// user. +// **Note:** The user's Console login is the unique name you specified when you created the user +// (see CreateUser). +func (client IdentityClient) CreateOrResetUIPassword(ctx context.Context, request CreateOrResetUIPasswordRequest) (response CreateOrResetUIPasswordResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/users/{userId}/uiPassword", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreatePolicy Creates a new policy in the specified compartment (either the tenancy or another of your compartments). +// If you're new to policies, see Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +// You must specify a *name* for the policy, which must be unique across all policies in your tenancy +// and cannot be changed. +// You must also specify a *description* for the policy (although it can be an empty string). It does not +// have to be unique, and you can change it anytime with UpdatePolicy. +// You must specify one or more policy statements in the statements array. For information about writing +// policies, see How Policies Work (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm) and +// Common Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/commonpolicies.htm). +// After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the +// object, first make sure its `lifecycleState` has changed to ACTIVE. +// New policies take effect typically within 10 seconds. +func (client IdentityClient) CreatePolicy(ctx context.Context, request CreatePolicyRequest) (response CreatePolicyResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/policies/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateRegionSubscription Creates a subscription to a region for a tenancy. +func (client IdentityClient) CreateRegionSubscription(ctx context.Context, request CreateRegionSubscriptionRequest) (response CreateRegionSubscriptionResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/tenancies/{tenancyId}/regionSubscriptions", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateSwiftPassword Creates a new Swift password for the specified user. For information about what Swift passwords are for, see +// Managing User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm). +// You must specify a *description* for the Swift password (although it can be an empty string). It does not +// have to be unique, and you can change it anytime with +// UpdateSwiftPassword. +// Every user has permission to create a Swift password for *their own user ID*. An administrator in your organization +// does not need to write a policy to give users this ability. To compare, administrators who have permission to the +// tenancy can use this operation to create a Swift password for any user, including themselves. +func (client IdentityClient) CreateSwiftPassword(ctx context.Context, request CreateSwiftPasswordRequest) (response CreateSwiftPasswordResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/users/{userId}/swiftPasswords/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateUser Creates a new user in your tenancy. For conceptual information about users, your tenancy, and other +// IAM Service components, see Overview of the IAM Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). +// You must specify your tenancy's OCID as the compartment ID in the request object (remember that the +// tenancy is simply the root compartment). Notice that IAM resources (users, groups, compartments, and +// some policies) reside within the tenancy itself, unlike cloud resources such as compute instances, +// which typically reside within compartments inside the tenancy. For information about OCIDs, see +// Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). +// You must also specify a *name* for the user, which must be unique across all users in your tenancy +// and cannot be changed. Allowed characters: No spaces. Only letters, numerals, hyphens, periods, +// underscores, +, and @. If you specify a name that's already in use, you'll get a 409 error. +// This name will be the user's login to the Console. You might want to pick a +// name that your company's own identity system (e.g., Active Directory, LDAP, etc.) already uses. +// If you delete a user and then create a new user with the same name, they'll be considered different +// users because they have different OCIDs. +// You must also specify a *description* for the user (although it can be an empty string). +// It does not have to be unique, and you can change it anytime with +// UpdateUser. You can use the field to provide the user's +// full name, a description, a nickname, or other information to generally identify the user. +// After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before +// using the object, first make sure its `lifecycleState` has changed to ACTIVE. +// A new user has no permissions until you place the user in one or more groups (see +// AddUserToGroup). If the user needs to +// access the Console, you need to provide the user a password (see +// CreateOrResetUIPassword). +// If the user needs to access the Oracle Cloud Infrastructure REST API, you need to upload a +// public API signing key for that user (see +// Required Keys and OCIDs (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm) and also +// UploadApiKey). +// **Important:** Make sure to inform the new user which compartment(s) they have access to. +func (client IdentityClient) CreateUser(ctx context.Context, request CreateUserRequest) (response CreateUserResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/users/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteApiKey Deletes the specified API signing key for the specified user. +// Every user has permission to use this operation to delete a key for *their own user ID*. An +// administrator in your organization does not need to write a policy to give users this ability. +// To compare, administrators who have permission to the tenancy can use this operation to delete +// a key for any user, including themselves. +func (client IdentityClient) DeleteApiKey(ctx context.Context, request DeleteApiKeyRequest) (response DeleteApiKeyResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/users/{userId}/apiKeys/{fingerprint}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteCustomerSecretKey Deletes the specified secret key for the specified user. +func (client IdentityClient) DeleteCustomerSecretKey(ctx context.Context, request DeleteCustomerSecretKeyRequest) (response DeleteCustomerSecretKeyResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/users/{userId}/customerSecretKeys/{customerSecretKeyId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteGroup Deletes the specified group. The group must be empty. +func (client IdentityClient) DeleteGroup(ctx context.Context, request DeleteGroupRequest) (response DeleteGroupResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/groups/{groupId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteIdentityProvider Deletes the specified identity provider. The identity provider must not have +// any group mappings (see IdpGroupMapping). +func (client IdentityClient) DeleteIdentityProvider(ctx context.Context, request DeleteIdentityProviderRequest) (response DeleteIdentityProviderResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/identityProviders/{identityProviderId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteIdpGroupMapping Deletes the specified group mapping. +func (client IdentityClient) DeleteIdpGroupMapping(ctx context.Context, request DeleteIdpGroupMappingRequest) (response DeleteIdpGroupMappingResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/identityProviders/{identityProviderId}/groupMappings/{mappingId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeletePolicy Deletes the specified policy. The deletion takes effect typically within 10 seconds. +func (client IdentityClient) DeletePolicy(ctx context.Context, request DeletePolicyRequest) (response DeletePolicyResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/policies/{policyId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteSwiftPassword Deletes the specified Swift password for the specified user. +func (client IdentityClient) DeleteSwiftPassword(ctx context.Context, request DeleteSwiftPasswordRequest) (response DeleteSwiftPasswordResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/users/{userId}/swiftPasswords/{swiftPasswordId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteUser Deletes the specified user. The user must not be in any groups. +func (client IdentityClient) DeleteUser(ctx context.Context, request DeleteUserRequest) (response DeleteUserResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/users/{userId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetCompartment Gets the specified compartment's information. +// This operation does not return a list of all the resources inside the compartment. There is no single +// API operation that does that. Compartments can contain multiple types of resources (instances, block +// storage volumes, etc.). To find out what's in a compartment, you must call the "List" operation for +// each resource type and specify the compartment's OCID as a query parameter in the request. For example, +// call the ListInstances operation in the Cloud Compute +// Service or the ListVolumes operation in Cloud Block Storage. +func (client IdentityClient) GetCompartment(ctx context.Context, request GetCompartmentRequest) (response GetCompartmentResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/compartments/{compartmentId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetGroup Gets the specified group's information. +// This operation does not return a list of all the users in the group. To do that, use +// ListUserGroupMemberships and +// provide the group's OCID as a query parameter in the request. +func (client IdentityClient) GetGroup(ctx context.Context, request GetGroupRequest) (response GetGroupResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/groups/{groupId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetIdentityProvider Gets the specified identity provider's information. +func (client IdentityClient) GetIdentityProvider(ctx context.Context, request GetIdentityProviderRequest) (response GetIdentityProviderResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/identityProviders/{identityProviderId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &identityprovider{}) + return +} + +// GetIdpGroupMapping Gets the specified group mapping. +func (client IdentityClient) GetIdpGroupMapping(ctx context.Context, request GetIdpGroupMappingRequest) (response GetIdpGroupMappingResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/identityProviders/{identityProviderId}/groupMappings/{mappingId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetPolicy Gets the specified policy's information. +func (client IdentityClient) GetPolicy(ctx context.Context, request GetPolicyRequest) (response GetPolicyResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/policies/{policyId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetTenancy Get the specified tenancy's information. +func (client IdentityClient) GetTenancy(ctx context.Context, request GetTenancyRequest) (response GetTenancyResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/tenancies/{tenancyId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetUser Gets the specified user's information. +func (client IdentityClient) GetUser(ctx context.Context, request GetUserRequest) (response GetUserResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/users/{userId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetUserGroupMembership Gets the specified UserGroupMembership's information. +func (client IdentityClient) GetUserGroupMembership(ctx context.Context, request GetUserGroupMembershipRequest) (response GetUserGroupMembershipResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/userGroupMemberships/{userGroupMembershipId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListApiKeys Lists the API signing keys for the specified user. A user can have a maximum of three keys. +// Every user has permission to use this API call for *their own user ID*. An administrator in your +// organization does not need to write a policy to give users this ability. +func (client IdentityClient) ListApiKeys(ctx context.Context, request ListApiKeysRequest) (response ListApiKeysResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/users/{userId}/apiKeys/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListAvailabilityDomains Lists the Availability Domains in your tenancy. Specify the OCID of either the tenancy or another +// of your compartments as the value for the compartment ID (remember that the tenancy is simply the root compartment). +// See Where to Get the Tenancy's OCID and User's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). +func (client IdentityClient) ListAvailabilityDomains(ctx context.Context, request ListAvailabilityDomainsRequest) (response ListAvailabilityDomainsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/availabilityDomains/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListCompartments Lists the compartments in your tenancy. You must specify your tenancy's OCID as the value +// for the compartment ID (remember that the tenancy is simply the root compartment). +// See Where to Get the Tenancy's OCID and User's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). +func (client IdentityClient) ListCompartments(ctx context.Context, request ListCompartmentsRequest) (response ListCompartmentsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/compartments/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListCustomerSecretKeys Lists the secret keys for the specified user. The returned object contains the secret key's OCID, but not +// the secret key itself. The actual secret key is returned only upon creation. +func (client IdentityClient) ListCustomerSecretKeys(ctx context.Context, request ListCustomerSecretKeysRequest) (response ListCustomerSecretKeysResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/users/{userId}/customerSecretKeys/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListFaultDomains Lists the Fault Domains in your tenancy. Specify the OCID of either the tenancy or another +// of your compartments as the value for the compartment ID (remember that the tenancy is simply the root compartment). +// See Where to Get the Tenancy's OCID and User's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). +func (client IdentityClient) ListFaultDomains(ctx context.Context, request ListFaultDomainsRequest) (response ListFaultDomainsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/faultDomains/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListGroups Lists the groups in your tenancy. You must specify your tenancy's OCID as the value for +// the compartment ID (remember that the tenancy is simply the root compartment). +// See Where to Get the Tenancy's OCID and User's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). +func (client IdentityClient) ListGroups(ctx context.Context, request ListGroupsRequest) (response ListGroupsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/groups/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +//listidentityprovider allows to unmarshal list of polymorphic IdentityProvider +type listidentityprovider []identityprovider + +//UnmarshalPolymorphicJSON unmarshals polymorphic json list of items +func (m *listidentityprovider) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + res := make([]IdentityProvider, len(*m)) + for i, v := range *m { + nn, err := v.UnmarshalPolymorphicJSON(v.JsonData) + if err != nil { + return nil, err + } + res[i] = nn.(IdentityProvider) + } + return res, nil +} + +// ListIdentityProviders Lists all the identity providers in your tenancy. You must specify the identity provider type (e.g., `SAML2` for +// identity providers using the SAML2.0 protocol). You must specify your tenancy's OCID as the value for the +// compartment ID (remember that the tenancy is simply the root compartment). +// See Where to Get the Tenancy's OCID and User's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). +func (client IdentityClient) ListIdentityProviders(ctx context.Context, request ListIdentityProvidersRequest) (response ListIdentityProvidersResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/identityProviders/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &listidentityprovider{}) + return +} + +// ListIdpGroupMappings Lists the group mappings for the specified identity provider. +func (client IdentityClient) ListIdpGroupMappings(ctx context.Context, request ListIdpGroupMappingsRequest) (response ListIdpGroupMappingsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/identityProviders/{identityProviderId}/groupMappings/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListPolicies Lists the policies in the specified compartment (either the tenancy or another of your compartments). +// See Where to Get the Tenancy's OCID and User's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). +// To determine which policies apply to a particular group or compartment, you must view the individual +// statements inside all your policies. There isn't a way to automatically obtain that information via the API. +func (client IdentityClient) ListPolicies(ctx context.Context, request ListPoliciesRequest) (response ListPoliciesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/policies/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListRegionSubscriptions Lists the region subscriptions for the specified tenancy. +func (client IdentityClient) ListRegionSubscriptions(ctx context.Context, request ListRegionSubscriptionsRequest) (response ListRegionSubscriptionsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/tenancies/{tenancyId}/regionSubscriptions", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListRegions Lists all the regions offered by Oracle Cloud Infrastructure. +func (client IdentityClient) ListRegions(ctx context.Context) (response ListRegionsResponse, err error) { + httpRequest := common.MakeDefaultHTTPRequest(http.MethodGet, "/regions") + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListSwiftPasswords Lists the Swift passwords for the specified user. The returned object contains the password's OCID, but not +// the password itself. The actual password is returned only upon creation. +func (client IdentityClient) ListSwiftPasswords(ctx context.Context, request ListSwiftPasswordsRequest) (response ListSwiftPasswordsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/users/{userId}/swiftPasswords/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListUserGroupMemberships Lists the `UserGroupMembership` objects in your tenancy. You must specify your tenancy's OCID +// as the value for the compartment ID +// (see Where to Get the Tenancy's OCID and User's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five)). +// You must also then filter the list in one of these ways: +// - You can limit the results to just the memberships for a given user by specifying a `userId`. +// - Similarly, you can limit the results to just the memberships for a given group by specifying a `groupId`. +// - You can set both the `userId` and `groupId` to determine if the specified user is in the specified group. +// If the answer is no, the response is an empty list. +func (client IdentityClient) ListUserGroupMemberships(ctx context.Context, request ListUserGroupMembershipsRequest) (response ListUserGroupMembershipsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/userGroupMemberships/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListUsers Lists the users in your tenancy. You must specify your tenancy's OCID as the value for the +// compartment ID (remember that the tenancy is simply the root compartment). +// See Where to Get the Tenancy's OCID and User's OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five). +func (client IdentityClient) ListUsers(ctx context.Context, request ListUsersRequest) (response ListUsersResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/users/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// RemoveUserFromGroup Removes a user from a group by deleting the corresponding `UserGroupMembership`. +func (client IdentityClient) RemoveUserFromGroup(ctx context.Context, request RemoveUserFromGroupRequest) (response RemoveUserFromGroupResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/userGroupMemberships/{userGroupMembershipId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateCompartment Updates the specified compartment's description or name. You can't update the root compartment. +func (client IdentityClient) UpdateCompartment(ctx context.Context, request UpdateCompartmentRequest) (response UpdateCompartmentResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/compartments/{compartmentId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateCustomerSecretKey Updates the specified secret key's description. +func (client IdentityClient) UpdateCustomerSecretKey(ctx context.Context, request UpdateCustomerSecretKeyRequest) (response UpdateCustomerSecretKeyResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/users/{userId}/customerSecretKeys/{customerSecretKeyId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateGroup Updates the specified group. +func (client IdentityClient) UpdateGroup(ctx context.Context, request UpdateGroupRequest) (response UpdateGroupResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/groups/{groupId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateIdentityProvider Updates the specified identity provider. +func (client IdentityClient) UpdateIdentityProvider(ctx context.Context, request UpdateIdentityProviderRequest) (response UpdateIdentityProviderResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/identityProviders/{identityProviderId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &identityprovider{}) + return +} + +// UpdateIdpGroupMapping Updates the specified group mapping. +func (client IdentityClient) UpdateIdpGroupMapping(ctx context.Context, request UpdateIdpGroupMappingRequest) (response UpdateIdpGroupMappingResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/identityProviders/{identityProviderId}/groupMappings/{mappingId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdatePolicy Updates the specified policy. You can update the description or the policy statements themselves. +// Policy changes take effect typically within 10 seconds. +func (client IdentityClient) UpdatePolicy(ctx context.Context, request UpdatePolicyRequest) (response UpdatePolicyResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/policies/{policyId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateSwiftPassword Updates the specified Swift password's description. +func (client IdentityClient) UpdateSwiftPassword(ctx context.Context, request UpdateSwiftPasswordRequest) (response UpdateSwiftPasswordResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/users/{userId}/swiftPasswords/{swiftPasswordId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateUser Updates the description of the specified user. +func (client IdentityClient) UpdateUser(ctx context.Context, request UpdateUserRequest) (response UpdateUserResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/users/{userId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateUserState Updates the state of the specified user. +func (client IdentityClient) UpdateUserState(ctx context.Context, request UpdateUserStateRequest) (response UpdateUserStateResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/users/{userId}/state/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UploadApiKey Uploads an API signing key for the specified user. +// Every user has permission to use this operation to upload a key for *their own user ID*. An +// administrator in your organization does not need to write a policy to give users this ability. +// To compare, administrators who have permission to the tenancy can use this operation to upload a +// key for any user, including themselves. +// **Important:** Even though you have permission to upload an API key, you might not yet +// have permission to do much else. If you try calling an operation unrelated to your own credential +// management (e.g., `ListUsers`, `LaunchInstance`) and receive an "unauthorized" error, +// check with an administrator to confirm which IAM Service group(s) you're in and what access +// you have. Also confirm you're working in the correct compartment. +// After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using +// the object, first make sure its `lifecycleState` has changed to ACTIVE. +func (client IdentityClient) UploadApiKey(ctx context.Context, request UploadApiKeyRequest) (response UploadApiKeyResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/users/{userId}/apiKeys/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/identity_provider.go b/vendor/github.com/oracle/oci-go-sdk/identity/identity_provider.go new file mode 100644 index 000000000..170df8879 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/identity_provider.go @@ -0,0 +1,185 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// IdentityProvider The resulting base object when you add an identity provider to your tenancy. A +// Saml2IdentityProvider +// is a specific type of `IdentityProvider` that supports the SAML 2.0 protocol. Each +// `IdentityProvider` object has its own OCID. For more information, see +// Identity Providers and Federation (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/federation.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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type IdentityProvider interface { + + // The OCID of the `IdentityProvider`. + GetId() *string + + // The OCID of the tenancy containing the `IdentityProvider`. + GetCompartmentId() *string + + // The name you assign to the `IdentityProvider` during creation. The name + // must be unique across all `IdentityProvider` objects in the tenancy and + // cannot be changed. This is the name federated users see when choosing + // which identity provider to use when signing in to the Oracle Cloud Infrastructure + // Console. + GetName() *string + + // The description you assign to the `IdentityProvider` during creation. Does + // not have to be unique, and it's changeable. + GetDescription() *string + + // The identity provider service or product. + // Supported identity providers are Oracle Identity Cloud Service (IDCS) and Microsoft + // Active Directory Federation Services (ADFS). + // Allowed values are: + // - `ADFS` + // - `IDCS` + // Example: `IDCS` + GetProductType() *string + + // Date and time the `IdentityProvider` was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + GetTimeCreated() *common.SDKTime + + // The current state. After creating an `IdentityProvider`, make sure its + // `lifecycleState` changes from CREATING to ACTIVE before using it. + GetLifecycleState() IdentityProviderLifecycleStateEnum + + // The detailed status of INACTIVE lifecycleState. + GetInactiveStatus() *int +} + +type identityprovider struct { + JsonData []byte + Id *string `mandatory:"true" json:"id"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + Name *string `mandatory:"true" json:"name"` + Description *string `mandatory:"true" json:"description"` + ProductType *string `mandatory:"true" json:"productType"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + LifecycleState IdentityProviderLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` + Protocol string `json:"protocol"` +} + +// UnmarshalJSON unmarshals json +func (m *identityprovider) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshaleridentityprovider identityprovider + s := struct { + Model Unmarshaleridentityprovider + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Id = s.Model.Id + m.CompartmentId = s.Model.CompartmentId + m.Name = s.Model.Name + m.Description = s.Model.Description + m.ProductType = s.Model.ProductType + m.TimeCreated = s.Model.TimeCreated + m.LifecycleState = s.Model.LifecycleState + m.InactiveStatus = s.Model.InactiveStatus + m.Protocol = s.Model.Protocol + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *identityprovider) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + var err error + switch m.Protocol { + case "SAML2": + mm := Saml2IdentityProvider{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + return m, nil + } +} + +//GetId returns Id +func (m identityprovider) GetId() *string { + return m.Id +} + +//GetCompartmentId returns CompartmentId +func (m identityprovider) GetCompartmentId() *string { + return m.CompartmentId +} + +//GetName returns Name +func (m identityprovider) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m identityprovider) GetDescription() *string { + return m.Description +} + +//GetProductType returns ProductType +func (m identityprovider) GetProductType() *string { + return m.ProductType +} + +//GetTimeCreated returns TimeCreated +func (m identityprovider) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +//GetLifecycleState returns LifecycleState +func (m identityprovider) GetLifecycleState() IdentityProviderLifecycleStateEnum { + return m.LifecycleState +} + +//GetInactiveStatus returns InactiveStatus +func (m identityprovider) GetInactiveStatus() *int { + return m.InactiveStatus +} + +func (m identityprovider) String() string { + return common.PointerString(m) +} + +// IdentityProviderLifecycleStateEnum Enum with underlying type: string +type IdentityProviderLifecycleStateEnum string + +// Set of constants representing the allowable values for IdentityProviderLifecycleState +const ( + IdentityProviderLifecycleStateCreating IdentityProviderLifecycleStateEnum = "CREATING" + IdentityProviderLifecycleStateActive IdentityProviderLifecycleStateEnum = "ACTIVE" + IdentityProviderLifecycleStateInactive IdentityProviderLifecycleStateEnum = "INACTIVE" + IdentityProviderLifecycleStateDeleting IdentityProviderLifecycleStateEnum = "DELETING" + IdentityProviderLifecycleStateDeleted IdentityProviderLifecycleStateEnum = "DELETED" +) + +var mappingIdentityProviderLifecycleState = map[string]IdentityProviderLifecycleStateEnum{ + "CREATING": IdentityProviderLifecycleStateCreating, + "ACTIVE": IdentityProviderLifecycleStateActive, + "INACTIVE": IdentityProviderLifecycleStateInactive, + "DELETING": IdentityProviderLifecycleStateDeleting, + "DELETED": IdentityProviderLifecycleStateDeleted, +} + +// GetIdentityProviderLifecycleStateEnumValues Enumerates the set of values for IdentityProviderLifecycleState +func GetIdentityProviderLifecycleStateEnumValues() []IdentityProviderLifecycleStateEnum { + values := make([]IdentityProviderLifecycleStateEnum, 0) + for _, v := range mappingIdentityProviderLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/idp_group_mapping.go b/vendor/github.com/oracle/oci-go-sdk/identity/idp_group_mapping.go new file mode 100644 index 000000000..cf9c0100b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/idp_group_mapping.go @@ -0,0 +1,84 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// IdpGroupMapping A mapping between a single group defined by the identity provider (IdP) you're federating with +// and a single IAM Service Group in Oracle Cloud Infrastructure. +// For more information about group mappings and what they're for, see +// Identity Providers and Federation (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/federation.htm). +// A given IdP group can be mapped to zero, one, or multiple IAM Service groups, and vice versa. +// But each `IdPGroupMapping` object is between only a single IdP group and IAM Service group. +// Each `IdPGroupMapping` object has its own OCID. +// **Note:** Any users who are in more than 50 IdP groups cannot be authenticated to use the Oracle +// Cloud Infrastructure Console. +type IdpGroupMapping struct { + + // The OCID of the `IdpGroupMapping`. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the `IdentityProvider` this mapping belongs to. + IdpId *string `mandatory:"true" json:"idpId"` + + // The name of the IdP group that is mapped to the IAM Service group. + IdpGroupName *string `mandatory:"true" json:"idpGroupName"` + + // The OCID of the IAM Service group that is mapped to the IdP group. + GroupId *string `mandatory:"true" json:"groupId"` + + // The OCID of the tenancy containing the `IdentityProvider`. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Date and time the mapping was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The mapping's current state. After creating a mapping object, make sure its `lifecycleState` changes + // from CREATING to ACTIVE before using it. + LifecycleState IdpGroupMappingLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The detailed status of INACTIVE lifecycleState. + InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` +} + +func (m IdpGroupMapping) String() string { + return common.PointerString(m) +} + +// IdpGroupMappingLifecycleStateEnum Enum with underlying type: string +type IdpGroupMappingLifecycleStateEnum string + +// Set of constants representing the allowable values for IdpGroupMappingLifecycleState +const ( + IdpGroupMappingLifecycleStateCreating IdpGroupMappingLifecycleStateEnum = "CREATING" + IdpGroupMappingLifecycleStateActive IdpGroupMappingLifecycleStateEnum = "ACTIVE" + IdpGroupMappingLifecycleStateInactive IdpGroupMappingLifecycleStateEnum = "INACTIVE" + IdpGroupMappingLifecycleStateDeleting IdpGroupMappingLifecycleStateEnum = "DELETING" + IdpGroupMappingLifecycleStateDeleted IdpGroupMappingLifecycleStateEnum = "DELETED" +) + +var mappingIdpGroupMappingLifecycleState = map[string]IdpGroupMappingLifecycleStateEnum{ + "CREATING": IdpGroupMappingLifecycleStateCreating, + "ACTIVE": IdpGroupMappingLifecycleStateActive, + "INACTIVE": IdpGroupMappingLifecycleStateInactive, + "DELETING": IdpGroupMappingLifecycleStateDeleting, + "DELETED": IdpGroupMappingLifecycleStateDeleted, +} + +// GetIdpGroupMappingLifecycleStateEnumValues Enumerates the set of values for IdpGroupMappingLifecycleState +func GetIdpGroupMappingLifecycleStateEnumValues() []IdpGroupMappingLifecycleStateEnum { + values := make([]IdpGroupMappingLifecycleStateEnum, 0) + for _, v := range mappingIdpGroupMappingLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_api_keys_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_api_keys_request_response.go new file mode 100644 index 000000000..62ce550f5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_api_keys_request_response.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListApiKeysRequest wrapper for the ListApiKeys operation +type ListApiKeysRequest struct { + + // The OCID of the user. + UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` +} + +func (request ListApiKeysRequest) String() string { + return common.PointerString(request) +} + +// ListApiKeysResponse wrapper for the ListApiKeys operation +type ListApiKeysResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []ApiKey instance + Items []ApiKey `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 pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListApiKeysResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_availability_domains_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_availability_domains_request_response.go new file mode 100644 index 000000000..407c2a36a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_availability_domains_request_response.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListAvailabilityDomainsRequest wrapper for the ListAvailabilityDomains operation +type ListAvailabilityDomainsRequest struct { + + // The OCID of the compartment (remember that the tenancy is simply the root compartment). + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` +} + +func (request ListAvailabilityDomainsRequest) String() string { + return common.PointerString(request) +} + +// ListAvailabilityDomainsResponse wrapper for the ListAvailabilityDomains operation +type ListAvailabilityDomainsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []AvailabilityDomain instance + Items []AvailabilityDomain `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 pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListAvailabilityDomainsResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_compartments_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_compartments_request_response.go new file mode 100644 index 000000000..6d4338d3d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_compartments_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListCompartmentsRequest wrapper for the ListCompartments operation +type ListCompartmentsRequest struct { + + // The OCID of the compartment (remember that the tenancy is simply the root compartment). + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated "List" call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` +} + +func (request ListCompartmentsRequest) String() string { + return common.PointerString(request) +} + +// ListCompartmentsResponse wrapper for the ListCompartments operation +type ListCompartmentsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []Compartment instance + Items []Compartment `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 pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListCompartmentsResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_customer_secret_keys_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_customer_secret_keys_request_response.go new file mode 100644 index 000000000..a1de6bb33 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_customer_secret_keys_request_response.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListCustomerSecretKeysRequest wrapper for the ListCustomerSecretKeys operation +type ListCustomerSecretKeysRequest struct { + + // The OCID of the user. + UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` +} + +func (request ListCustomerSecretKeysRequest) String() string { + return common.PointerString(request) +} + +// ListCustomerSecretKeysResponse wrapper for the ListCustomerSecretKeys operation +type ListCustomerSecretKeysResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []CustomerSecretKeySummary instance + Items []CustomerSecretKeySummary `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 pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListCustomerSecretKeysResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_fault_domains_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_fault_domains_request_response.go new file mode 100644 index 000000000..58e8cf4ed --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_fault_domains_request_response.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListFaultDomainsRequest wrapper for the ListFaultDomains operation +type ListFaultDomainsRequest struct { + + // The OCID of the compartment (remember that the tenancy is simply the root compartment). + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The name of the availibilityDomain. + AvailabilityDomain *string `mandatory:"true" contributesTo:"query" name:"availabilityDomain"` +} + +func (request ListFaultDomainsRequest) String() string { + return common.PointerString(request) +} + +// ListFaultDomainsResponse wrapper for the ListFaultDomains operation +type ListFaultDomainsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []FaultDomain instance + Items []FaultDomain `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 ListFaultDomainsResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_groups_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_groups_request_response.go new file mode 100644 index 000000000..b466a566f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_groups_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListGroupsRequest wrapper for the ListGroups operation +type ListGroupsRequest struct { + + // The OCID of the compartment (remember that the tenancy is simply the root compartment). + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated "List" call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` +} + +func (request ListGroupsRequest) String() string { + return common.PointerString(request) +} + +// ListGroupsResponse wrapper for the ListGroups operation +type ListGroupsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []Group instance + Items []Group `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 pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListGroupsResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_identity_providers_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_identity_providers_request_response.go new file mode 100644 index 000000000..abebf6877 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_identity_providers_request_response.go @@ -0,0 +1,73 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListIdentityProvidersRequest wrapper for the ListIdentityProviders operation +type ListIdentityProvidersRequest struct { + + // The protocol used for federation. + Protocol ListIdentityProvidersProtocolEnum `mandatory:"true" contributesTo:"query" name:"protocol" omitEmpty:"true"` + + // The OCID of the compartment (remember that the tenancy is simply the root compartment). + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated "List" call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` +} + +func (request ListIdentityProvidersRequest) String() string { + return common.PointerString(request) +} + +// ListIdentityProvidersResponse wrapper for the ListIdentityProviders operation +type ListIdentityProvidersResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []IdentityProvider instance + Items []IdentityProvider `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 pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListIdentityProvidersResponse) String() string { + return common.PointerString(response) +} + +// ListIdentityProvidersProtocolEnum Enum with underlying type: string +type ListIdentityProvidersProtocolEnum string + +// Set of constants representing the allowable values for ListIdentityProvidersProtocol +const ( + ListIdentityProvidersProtocolSaml2 ListIdentityProvidersProtocolEnum = "SAML2" +) + +var mappingListIdentityProvidersProtocol = map[string]ListIdentityProvidersProtocolEnum{ + "SAML2": ListIdentityProvidersProtocolSaml2, +} + +// GetListIdentityProvidersProtocolEnumValues Enumerates the set of values for ListIdentityProvidersProtocol +func GetListIdentityProvidersProtocolEnumValues() []ListIdentityProvidersProtocolEnum { + values := make([]ListIdentityProvidersProtocolEnum, 0) + for _, v := range mappingListIdentityProvidersProtocol { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_idp_group_mappings_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_idp_group_mappings_request_response.go new file mode 100644 index 000000000..09323f659 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_idp_group_mappings_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListIdpGroupMappingsRequest wrapper for the ListIdpGroupMappings operation +type ListIdpGroupMappingsRequest struct { + + // The OCID of the identity provider. + IdentityProviderId *string `mandatory:"true" contributesTo:"path" name:"identityProviderId"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated "List" call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` +} + +func (request ListIdpGroupMappingsRequest) String() string { + return common.PointerString(request) +} + +// ListIdpGroupMappingsResponse wrapper for the ListIdpGroupMappings operation +type ListIdpGroupMappingsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []IdpGroupMapping instance + Items []IdpGroupMapping `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 pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListIdpGroupMappingsResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_policies_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_policies_request_response.go new file mode 100644 index 000000000..6b6461d28 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_policies_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListPoliciesRequest wrapper for the ListPolicies operation +type ListPoliciesRequest struct { + + // The OCID of the compartment (remember that the tenancy is simply the root compartment). + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated "List" call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` +} + +func (request ListPoliciesRequest) String() string { + return common.PointerString(request) +} + +// ListPoliciesResponse wrapper for the ListPolicies operation +type ListPoliciesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []Policy instance + Items []Policy `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 pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListPoliciesResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_region_subscriptions_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_region_subscriptions_request_response.go new file mode 100644 index 000000000..a10917633 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_region_subscriptions_request_response.go @@ -0,0 +1,38 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListRegionSubscriptionsRequest wrapper for the ListRegionSubscriptions operation +type ListRegionSubscriptionsRequest struct { + + // The OCID of the tenancy. + TenancyId *string `mandatory:"true" contributesTo:"path" name:"tenancyId"` +} + +func (request ListRegionSubscriptionsRequest) String() string { + return common.PointerString(request) +} + +// ListRegionSubscriptionsResponse wrapper for the ListRegionSubscriptions operation +type ListRegionSubscriptionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []RegionSubscription instance + Items []RegionSubscription `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 ListRegionSubscriptionsResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_regions_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_regions_request_response.go new file mode 100644 index 000000000..528b6b863 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_regions_request_response.go @@ -0,0 +1,35 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListRegionsRequest wrapper for the ListRegions operation +type ListRegionsRequest struct { +} + +func (request ListRegionsRequest) String() string { + return common.PointerString(request) +} + +// ListRegionsResponse wrapper for the ListRegions operation +type ListRegionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []Region instance + Items []Region `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 ListRegionsResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_swift_passwords_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_swift_passwords_request_response.go new file mode 100644 index 000000000..86d737c0f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_swift_passwords_request_response.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListSwiftPasswordsRequest wrapper for the ListSwiftPasswords operation +type ListSwiftPasswordsRequest struct { + + // The OCID of the user. + UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` +} + +func (request ListSwiftPasswordsRequest) String() string { + return common.PointerString(request) +} + +// ListSwiftPasswordsResponse wrapper for the ListSwiftPasswords operation +type ListSwiftPasswordsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []SwiftPassword instance + Items []SwiftPassword `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 pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListSwiftPasswordsResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_user_group_memberships_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_user_group_memberships_request_response.go new file mode 100644 index 000000000..3f6d406b8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_user_group_memberships_request_response.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListUserGroupMembershipsRequest wrapper for the ListUserGroupMemberships operation +type ListUserGroupMembershipsRequest struct { + + // The OCID of the compartment (remember that the tenancy is simply the root compartment). + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the user. + UserId *string `mandatory:"false" contributesTo:"query" name:"userId"` + + // The OCID of the group. + GroupId *string `mandatory:"false" contributesTo:"query" name:"groupId"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated "List" call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` +} + +func (request ListUserGroupMembershipsRequest) String() string { + return common.PointerString(request) +} + +// ListUserGroupMembershipsResponse wrapper for the ListUserGroupMemberships operation +type ListUserGroupMembershipsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []UserGroupMembership instance + Items []UserGroupMembership `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 pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListUserGroupMembershipsResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/list_users_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/list_users_request_response.go new file mode 100644 index 000000000..905d7e8c5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/list_users_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListUsersRequest wrapper for the ListUsers operation +type ListUsersRequest struct { + + // The OCID of the compartment (remember that the tenancy is simply the root compartment). + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The value of the `opc-next-page` response header from the previous "List" call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated "List" call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` +} + +func (request ListUsersRequest) String() string { + return common.PointerString(request) +} + +// ListUsersResponse wrapper for the ListUsers operation +type ListUsersResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []User instance + Items []User `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 pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListUsersResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/policy.go b/vendor/github.com/oracle/oci-go-sdk/identity/policy.go new file mode 100644 index 000000000..39eacc77a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/policy.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Policy A document that specifies the type of access a group has to the resources in a compartment. For information about +// policies and other IAM Service components, see +// Overview of the IAM Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). If you're new to policies, see +// Getting Started with Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +// The word "policy" is used by people in different ways: +// * An individual statement written in the policy language +// * A collection of statements in a single, named "policy" document (which has an Oracle Cloud ID (OCID) assigned to it) +// * The overall body of policies your organization uses to control access to resources +// To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, +// talk to an administrator. +type Policy struct { + + // The OCID of the policy. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the compartment containing the policy (either the tenancy or another compartment). + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The name you assign to the policy during creation. The name must be unique across all policies + // in the tenancy and cannot be changed. + Name *string `mandatory:"true" json:"name"` + + // An array of one or more policy statements written in the policy language. + Statements []string `mandatory:"true" json:"statements"` + + // The description you assign to the policy. Does not have to be unique, and it's changeable. + Description *string `mandatory:"true" json:"description"` + + // Date and time the policy was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The policy's current state. After creating a policy, make sure its `lifecycleState` changes from CREATING to + // ACTIVE before using it. + LifecycleState PolicyLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The detailed status of INACTIVE lifecycleState. + InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` + + // The version of the policy. If null or set to an empty string, when a request comes in for authorization, the + // policy will be evaluated according to the current behavior of the services at that moment. If set to a particular + // date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date. + VersionDate *common.SDKTime `mandatory:"false" json:"versionDate"` +} + +func (m Policy) String() string { + return common.PointerString(m) +} + +// PolicyLifecycleStateEnum Enum with underlying type: string +type PolicyLifecycleStateEnum string + +// Set of constants representing the allowable values for PolicyLifecycleState +const ( + PolicyLifecycleStateCreating PolicyLifecycleStateEnum = "CREATING" + PolicyLifecycleStateActive PolicyLifecycleStateEnum = "ACTIVE" + PolicyLifecycleStateInactive PolicyLifecycleStateEnum = "INACTIVE" + PolicyLifecycleStateDeleting PolicyLifecycleStateEnum = "DELETING" + PolicyLifecycleStateDeleted PolicyLifecycleStateEnum = "DELETED" +) + +var mappingPolicyLifecycleState = map[string]PolicyLifecycleStateEnum{ + "CREATING": PolicyLifecycleStateCreating, + "ACTIVE": PolicyLifecycleStateActive, + "INACTIVE": PolicyLifecycleStateInactive, + "DELETING": PolicyLifecycleStateDeleting, + "DELETED": PolicyLifecycleStateDeleted, +} + +// GetPolicyLifecycleStateEnumValues Enumerates the set of values for PolicyLifecycleState +func GetPolicyLifecycleStateEnumValues() []PolicyLifecycleStateEnum { + values := make([]PolicyLifecycleStateEnum, 0) + for _, v := range mappingPolicyLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/region.go b/vendor/github.com/oracle/oci-go-sdk/identity/region.go new file mode 100644 index 000000000..ba73a4453 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/region.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Region A localized geographic area, such as Phoenix, AZ. Oracle Cloud Infrastructure is hosted in regions and Availability +// Domains. A region is composed of several Availability Domains. An Availability Domain is one or more data centers +// located within a region. For more information, see Regions and Availability Domains (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type Region struct { + + // The key of the region. + // Allowed values are: + // - `PHX` + // - `IAD` + // - `FRA` + Key *string `mandatory:"false" json:"key"` + + // The name of the region. + // Allowed values are: + // - `us-phoenix-1` + // - `us-ashburn-1` + // - `eu-frankfurt-1` + Name *string `mandatory:"false" json:"name"` +} + +func (m Region) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/region_subscription.go b/vendor/github.com/oracle/oci-go-sdk/identity/region_subscription.go new file mode 100644 index 000000000..dfa9f26b6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/region_subscription.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// RegionSubscription An object that represents your tenancy's access to a particular region (i.e., a subscription), the status of that +// access, and whether that region is the home region. For more information, see Managing Regions (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingregions.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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type RegionSubscription struct { + + // The region's key. + // Allowed values are: + // - `PHX` + // - `IAD` + // - `FRA` + RegionKey *string `mandatory:"true" json:"regionKey"` + + // The region's name. + // Allowed values are: + // - `us-phoenix-1` + // - `us-ashburn-1` + // - `eu-frankurt-1` + RegionName *string `mandatory:"true" json:"regionName"` + + // The region subscription status. + Status RegionSubscriptionStatusEnum `mandatory:"true" json:"status"` + + // Indicates if the region is the home region or not. + IsHomeRegion *bool `mandatory:"true" json:"isHomeRegion"` +} + +func (m RegionSubscription) String() string { + return common.PointerString(m) +} + +// RegionSubscriptionStatusEnum Enum with underlying type: string +type RegionSubscriptionStatusEnum string + +// Set of constants representing the allowable values for RegionSubscriptionStatus +const ( + RegionSubscriptionStatusReady RegionSubscriptionStatusEnum = "READY" + RegionSubscriptionStatusInProgress RegionSubscriptionStatusEnum = "IN_PROGRESS" +) + +var mappingRegionSubscriptionStatus = map[string]RegionSubscriptionStatusEnum{ + "READY": RegionSubscriptionStatusReady, + "IN_PROGRESS": RegionSubscriptionStatusInProgress, +} + +// GetRegionSubscriptionStatusEnumValues Enumerates the set of values for RegionSubscriptionStatus +func GetRegionSubscriptionStatusEnumValues() []RegionSubscriptionStatusEnum { + values := make([]RegionSubscriptionStatusEnum, 0) + for _, v := range mappingRegionSubscriptionStatus { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/remove_user_from_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/remove_user_from_group_request_response.go new file mode 100644 index 000000000..afed269d0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/remove_user_from_group_request_response.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// RemoveUserFromGroupRequest wrapper for the RemoveUserFromGroup operation +type RemoveUserFromGroupRequest struct { + + // The OCID of the userGroupMembership. + UserGroupMembershipId *string `mandatory:"true" contributesTo:"path" name:"userGroupMembershipId"` + + // 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"` +} + +func (request RemoveUserFromGroupRequest) String() string { + return common.PointerString(request) +} + +// RemoveUserFromGroupResponse wrapper for the RemoveUserFromGroup operation +type RemoveUserFromGroupResponse 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 RemoveUserFromGroupResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/saml2_identity_provider.go b/vendor/github.com/oracle/oci-go-sdk/identity/saml2_identity_provider.go new file mode 100644 index 000000000..0ef2511b3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/saml2_identity_provider.go @@ -0,0 +1,127 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// Saml2IdentityProvider A special type of IdentityProvider that +// supports the SAML 2.0 protocol. For more information, see +// Identity Providers and Federation (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/federation.htm). +type Saml2IdentityProvider struct { + + // The OCID of the `IdentityProvider`. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the tenancy containing the `IdentityProvider`. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The name you assign to the `IdentityProvider` during creation. The name + // must be unique across all `IdentityProvider` objects in the tenancy and + // cannot be changed. This is the name federated users see when choosing + // which identity provider to use when signing in to the Oracle Cloud Infrastructure + // Console. + Name *string `mandatory:"true" json:"name"` + + // The description you assign to the `IdentityProvider` during creation. Does + // not have to be unique, and it's changeable. + Description *string `mandatory:"true" json:"description"` + + // The identity provider service or product. + // Supported identity providers are Oracle Identity Cloud Service (IDCS) and Microsoft + // Active Directory Federation Services (ADFS). + // Allowed values are: + // - `ADFS` + // - `IDCS` + // Example: `IDCS` + ProductType *string `mandatory:"true" json:"productType"` + + // Date and time the `IdentityProvider` was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The URL for retrieving the identity provider's metadata, which + // contains information required for federating. + MetadataUrl *string `mandatory:"true" json:"metadataUrl"` + + // The identity provider's signing certificate used by the IAM Service + // to validate the SAML2 token. + SigningCertificate *string `mandatory:"true" json:"signingCertificate"` + + // The URL to redirect federated users to for authentication with the + // identity provider. + RedirectUrl *string `mandatory:"true" json:"redirectUrl"` + + // The detailed status of INACTIVE lifecycleState. + InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` + + // The current state. After creating an `IdentityProvider`, make sure its + // `lifecycleState` changes from CREATING to ACTIVE before using it. + LifecycleState IdentityProviderLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +//GetId returns Id +func (m Saml2IdentityProvider) GetId() *string { + return m.Id +} + +//GetCompartmentId returns CompartmentId +func (m Saml2IdentityProvider) GetCompartmentId() *string { + return m.CompartmentId +} + +//GetName returns Name +func (m Saml2IdentityProvider) GetName() *string { + return m.Name +} + +//GetDescription returns Description +func (m Saml2IdentityProvider) GetDescription() *string { + return m.Description +} + +//GetProductType returns ProductType +func (m Saml2IdentityProvider) GetProductType() *string { + return m.ProductType +} + +//GetTimeCreated returns TimeCreated +func (m Saml2IdentityProvider) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +//GetLifecycleState returns LifecycleState +func (m Saml2IdentityProvider) GetLifecycleState() IdentityProviderLifecycleStateEnum { + return m.LifecycleState +} + +//GetInactiveStatus returns InactiveStatus +func (m Saml2IdentityProvider) GetInactiveStatus() *int { + return m.InactiveStatus +} + +func (m Saml2IdentityProvider) String() string { + return common.PointerString(m) +} + +// MarshalJSON marshals to json representation +func (m Saml2IdentityProvider) MarshalJSON() (buff []byte, e error) { + type MarshalTypeSaml2IdentityProvider Saml2IdentityProvider + s := struct { + DiscriminatorParam string `json:"protocol"` + MarshalTypeSaml2IdentityProvider + }{ + "SAML2", + (MarshalTypeSaml2IdentityProvider)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/swift_password.go b/vendor/github.com/oracle/oci-go-sdk/identity/swift_password.go new file mode 100644 index 000000000..89a37c63c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/swift_password.go @@ -0,0 +1,83 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// SwiftPassword Swift is the OpenStack object storage service. A `SwiftPassword` is an Oracle-provided password for using a +// Swift client with the Oracle Cloud Infrastructure Object Storage Service. This password is associated with +// the user's Console login. Swift passwords never expire. A user can have up to two Swift passwords at a time. +// **Note:** The password is always an Oracle-generated string; you can't change it to a string of your choice. +// For more information, see Managing User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm). +type SwiftPassword struct { + + // The Swift password. The value is available only in the response for `CreateSwiftPassword`, and not + // for `ListSwiftPasswords` or `UpdateSwiftPassword`. + Password *string `mandatory:"false" json:"password"` + + // The OCID of the Swift password. + Id *string `mandatory:"false" json:"id"` + + // The OCID of the user the password belongs to. + UserId *string `mandatory:"false" json:"userId"` + + // The description you assign to the Swift password. Does not have to be unique, and it's changeable. + Description *string `mandatory:"false" json:"description"` + + // Date and time the `SwiftPassword` object was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Date and time when this password will expire, in the format defined by RFC3339. + // Null if it never expires. + // Example: `2016-08-25T21:10:29.600Z` + ExpiresOn *common.SDKTime `mandatory:"false" json:"expiresOn"` + + // The password's current state. After creating a password, make sure its `lifecycleState` changes from + // CREATING to ACTIVE before using it. + LifecycleState SwiftPasswordLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // The detailed status of INACTIVE lifecycleState. + InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` +} + +func (m SwiftPassword) String() string { + return common.PointerString(m) +} + +// SwiftPasswordLifecycleStateEnum Enum with underlying type: string +type SwiftPasswordLifecycleStateEnum string + +// Set of constants representing the allowable values for SwiftPasswordLifecycleState +const ( + SwiftPasswordLifecycleStateCreating SwiftPasswordLifecycleStateEnum = "CREATING" + SwiftPasswordLifecycleStateActive SwiftPasswordLifecycleStateEnum = "ACTIVE" + SwiftPasswordLifecycleStateInactive SwiftPasswordLifecycleStateEnum = "INACTIVE" + SwiftPasswordLifecycleStateDeleting SwiftPasswordLifecycleStateEnum = "DELETING" + SwiftPasswordLifecycleStateDeleted SwiftPasswordLifecycleStateEnum = "DELETED" +) + +var mappingSwiftPasswordLifecycleState = map[string]SwiftPasswordLifecycleStateEnum{ + "CREATING": SwiftPasswordLifecycleStateCreating, + "ACTIVE": SwiftPasswordLifecycleStateActive, + "INACTIVE": SwiftPasswordLifecycleStateInactive, + "DELETING": SwiftPasswordLifecycleStateDeleting, + "DELETED": SwiftPasswordLifecycleStateDeleted, +} + +// GetSwiftPasswordLifecycleStateEnumValues Enumerates the set of values for SwiftPasswordLifecycleState +func GetSwiftPasswordLifecycleStateEnumValues() []SwiftPasswordLifecycleStateEnum { + values := make([]SwiftPasswordLifecycleStateEnum, 0) + for _, v := range mappingSwiftPasswordLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/tenancy.go b/vendor/github.com/oracle/oci-go-sdk/identity/tenancy.go new file mode 100644 index 000000000..676b91b9a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/tenancy.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Tenancy The root compartment that contains all of your organization's compartments and other +// Oracle Cloud Infrastructure cloud resources. When you sign up for Oracle Cloud Infrastructure, +// Oracle creates a tenancy for your company, which is a secure and isolated partition +// where you can create, organize, and administer your cloud resources. +// 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type Tenancy struct { + + // The OCID of the tenancy. + Id *string `mandatory:"false" json:"id"` + + // The name of the tenancy. + Name *string `mandatory:"false" json:"name"` + + // The description of the tenancy. + Description *string `mandatory:"false" json:"description"` + + // The region key for the tenancy's home region. + // Allowed values are: + // - `IAD` + // - `PHX` + // - `FRA` + HomeRegionKey *string `mandatory:"false" json:"homeRegionKey"` +} + +func (m Tenancy) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/ui_password.go b/vendor/github.com/oracle/oci-go-sdk/identity/ui_password.go new file mode 100644 index 000000000..d0ff89997 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/ui_password.go @@ -0,0 +1,69 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UiPassword A text password that enables a user to sign in to the Console, the user interface for interacting with Oracle +// Cloud Infrastructure. +// For more information about user credentials, see User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/usercredentials.htm). +type UiPassword struct { + + // The user's password for the Console. + Password *string `mandatory:"false" json:"password"` + + // The OCID of the user. + UserId *string `mandatory:"false" json:"userId"` + + // Date and time the password was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The password's current state. After creating a password, make sure its `lifecycleState` changes from + // CREATING to ACTIVE before using it. + LifecycleState UiPasswordLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // The detailed status of INACTIVE lifecycleState. + InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` +} + +func (m UiPassword) String() string { + return common.PointerString(m) +} + +// UiPasswordLifecycleStateEnum Enum with underlying type: string +type UiPasswordLifecycleStateEnum string + +// Set of constants representing the allowable values for UiPasswordLifecycleState +const ( + UiPasswordLifecycleStateCreating UiPasswordLifecycleStateEnum = "CREATING" + UiPasswordLifecycleStateActive UiPasswordLifecycleStateEnum = "ACTIVE" + UiPasswordLifecycleStateInactive UiPasswordLifecycleStateEnum = "INACTIVE" + UiPasswordLifecycleStateDeleting UiPasswordLifecycleStateEnum = "DELETING" + UiPasswordLifecycleStateDeleted UiPasswordLifecycleStateEnum = "DELETED" +) + +var mappingUiPasswordLifecycleState = map[string]UiPasswordLifecycleStateEnum{ + "CREATING": UiPasswordLifecycleStateCreating, + "ACTIVE": UiPasswordLifecycleStateActive, + "INACTIVE": UiPasswordLifecycleStateInactive, + "DELETING": UiPasswordLifecycleStateDeleting, + "DELETED": UiPasswordLifecycleStateDeleted, +} + +// GetUiPasswordLifecycleStateEnumValues Enumerates the set of values for UiPasswordLifecycleState +func GetUiPasswordLifecycleStateEnumValues() []UiPasswordLifecycleStateEnum { + values := make([]UiPasswordLifecycleStateEnum, 0) + for _, v := range mappingUiPasswordLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_compartment_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_compartment_details.go new file mode 100644 index 000000000..0e064808c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_compartment_details.go @@ -0,0 +1,27 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateCompartmentDetails The representation of UpdateCompartmentDetails +type UpdateCompartmentDetails struct { + + // The description you assign to the compartment. Does not have to be unique, and it's changeable. + Description *string `mandatory:"false" json:"description"` + + // The new name you assign to the compartment. The name must be unique across all compartments in the tenancy. + Name *string `mandatory:"false" json:"name"` +} + +func (m UpdateCompartmentDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_compartment_request_response.go new file mode 100644 index 000000000..217bc6877 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_compartment_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateCompartmentRequest wrapper for the UpdateCompartment operation +type UpdateCompartmentRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"path" name:"compartmentId"` + + // Request object for updating a compartment. + UpdateCompartmentDetails `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"` +} + +func (request UpdateCompartmentRequest) String() string { + return common.PointerString(request) +} + +// UpdateCompartmentResponse wrapper for the UpdateCompartment operation +type UpdateCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Compartment instance + Compartment `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"` +} + +func (response UpdateCompartmentResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_customer_secret_key_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_customer_secret_key_details.go new file mode 100644 index 000000000..397e18396 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_customer_secret_key_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateCustomerSecretKeyDetails The representation of UpdateCustomerSecretKeyDetails +type UpdateCustomerSecretKeyDetails struct { + + // The description you assign to the secret key. Does not have to be unique, and it's changeable. + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m UpdateCustomerSecretKeyDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_customer_secret_key_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_customer_secret_key_request_response.go new file mode 100644 index 000000000..e722571e7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_customer_secret_key_request_response.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateCustomerSecretKeyRequest wrapper for the UpdateCustomerSecretKey operation +type UpdateCustomerSecretKeyRequest struct { + + // The OCID of the user. + UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` + + // The OCID of the secret key. + CustomerSecretKeyId *string `mandatory:"true" contributesTo:"path" name:"customerSecretKeyId"` + + // Request object for updating a secret key. + UpdateCustomerSecretKeyDetails `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"` +} + +func (request UpdateCustomerSecretKeyRequest) String() string { + return common.PointerString(request) +} + +// UpdateCustomerSecretKeyResponse wrapper for the UpdateCustomerSecretKey operation +type UpdateCustomerSecretKeyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CustomerSecretKeySummary instance + CustomerSecretKeySummary `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"` +} + +func (response UpdateCustomerSecretKeyResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_group_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_group_details.go new file mode 100644 index 000000000..35a082a90 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_group_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateGroupDetails The representation of UpdateGroupDetails +type UpdateGroupDetails struct { + + // The description you assign to the group. Does not have to be unique, and it's changeable. + Description *string `mandatory:"false" json:"description"` +} + +func (m UpdateGroupDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_group_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_group_request_response.go new file mode 100644 index 000000000..75840e1c0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_group_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateGroupRequest wrapper for the UpdateGroup operation +type UpdateGroupRequest struct { + + // The OCID of the group. + GroupId *string `mandatory:"true" contributesTo:"path" name:"groupId"` + + // Request object for updating a group. + UpdateGroupDetails `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"` +} + +func (request UpdateGroupRequest) String() string { + return common.PointerString(request) +} + +// UpdateGroupResponse wrapper for the UpdateGroup operation +type UpdateGroupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Group instance + Group `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"` +} + +func (response UpdateGroupResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_identity_provider_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_identity_provider_details.go new file mode 100644 index 000000000..976c40edf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_identity_provider_details.go @@ -0,0 +1,67 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateIdentityProviderDetails The representation of UpdateIdentityProviderDetails +type UpdateIdentityProviderDetails interface { + + // The description you assign to the `IdentityProvider`. Does not have to + // be unique, and it's changeable. + GetDescription() *string +} + +type updateidentityproviderdetails struct { + JsonData []byte + Description *string `mandatory:"false" json:"description"` + Protocol string `json:"protocol"` +} + +// UnmarshalJSON unmarshals json +func (m *updateidentityproviderdetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerupdateidentityproviderdetails updateidentityproviderdetails + s := struct { + Model Unmarshalerupdateidentityproviderdetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Description = s.Model.Description + m.Protocol = s.Model.Protocol + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *updateidentityproviderdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + var err error + switch m.Protocol { + case "SAML2": + mm := UpdateSaml2IdentityProviderDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + return m, nil + } +} + +//GetDescription returns Description +func (m updateidentityproviderdetails) GetDescription() *string { + return m.Description +} + +func (m updateidentityproviderdetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_identity_provider_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_identity_provider_request_response.go new file mode 100644 index 000000000..e092b59f4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_identity_provider_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateIdentityProviderRequest wrapper for the UpdateIdentityProvider operation +type UpdateIdentityProviderRequest struct { + + // The OCID of the identity provider. + IdentityProviderId *string `mandatory:"true" contributesTo:"path" name:"identityProviderId"` + + // Request object for updating a identity provider. + UpdateIdentityProviderDetails `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"` +} + +func (request UpdateIdentityProviderRequest) String() string { + return common.PointerString(request) +} + +// UpdateIdentityProviderResponse wrapper for the UpdateIdentityProvider operation +type UpdateIdentityProviderResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IdentityProvider instance + IdentityProvider `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"` +} + +func (response UpdateIdentityProviderResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_idp_group_mapping_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_idp_group_mapping_details.go new file mode 100644 index 000000000..bf7716f61 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_idp_group_mapping_details.go @@ -0,0 +1,27 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateIdpGroupMappingDetails The representation of UpdateIdpGroupMappingDetails +type UpdateIdpGroupMappingDetails struct { + + // The idp group name. + IdpGroupName *string `mandatory:"false" json:"idpGroupName"` + + // The OCID of the group. + GroupId *string `mandatory:"false" json:"groupId"` +} + +func (m UpdateIdpGroupMappingDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_idp_group_mapping_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_idp_group_mapping_request_response.go new file mode 100644 index 000000000..be9dbd3df --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_idp_group_mapping_request_response.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateIdpGroupMappingRequest wrapper for the UpdateIdpGroupMapping operation +type UpdateIdpGroupMappingRequest struct { + + // The OCID of the identity provider. + IdentityProviderId *string `mandatory:"true" contributesTo:"path" name:"identityProviderId"` + + // The OCID of the group mapping. + MappingId *string `mandatory:"true" contributesTo:"path" name:"mappingId"` + + // Request object for updating an identity provider group mapping + UpdateIdpGroupMappingDetails `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"` +} + +func (request UpdateIdpGroupMappingRequest) String() string { + return common.PointerString(request) +} + +// UpdateIdpGroupMappingResponse wrapper for the UpdateIdpGroupMapping operation +type UpdateIdpGroupMappingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IdpGroupMapping instance + IdpGroupMapping `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"` +} + +func (response UpdateIdpGroupMappingResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_policy_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_policy_details.go new file mode 100644 index 000000000..3fd45b64e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_policy_details.go @@ -0,0 +1,34 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdatePolicyDetails The representation of UpdatePolicyDetails +type UpdatePolicyDetails struct { + + // The description you assign to the policy. Does not have to be unique, and it's changeable. + Description *string `mandatory:"false" json:"description"` + + // An array of policy statements written in the policy language. See + // How Policies Work (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm) and + // Common Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/commonpolicies.htm). + Statements []string `mandatory:"false" json:"statements"` + + // The version of the policy. If null or set to an empty string, when a request comes in for authorization, the + // policy will be evaluated according to the current behavior of the services at that moment. If set to a particular + // date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date. + VersionDate *common.SDKTime `mandatory:"false" json:"versionDate"` +} + +func (m UpdatePolicyDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_policy_request_response.go new file mode 100644 index 000000000..198afbecd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_policy_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdatePolicyRequest wrapper for the UpdatePolicy operation +type UpdatePolicyRequest struct { + + // The OCID of the policy. + PolicyId *string `mandatory:"true" contributesTo:"path" name:"policyId"` + + // Request object for updating a policy. + UpdatePolicyDetails `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"` +} + +func (request UpdatePolicyRequest) String() string { + return common.PointerString(request) +} + +// UpdatePolicyResponse wrapper for the UpdatePolicy operation +type UpdatePolicyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Policy instance + Policy `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"` +} + +func (response UpdatePolicyResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_saml2_identity_provider_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_saml2_identity_provider_details.go new file mode 100644 index 000000000..f83217f2b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_saml2_identity_provider_details.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "encoding/json" + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateSaml2IdentityProviderDetails The representation of UpdateSaml2IdentityProviderDetails +type UpdateSaml2IdentityProviderDetails struct { + + // The description you assign to the `IdentityProvider`. Does not have to + // be unique, and it's changeable. + Description *string `mandatory:"false" json:"description"` + + // The URL for retrieving the identity provider's metadata, + // which contains information required for federating. + MetadataUrl *string `mandatory:"false" json:"metadataUrl"` + + // The XML that contains the information required for federating. + Metadata *string `mandatory:"false" json:"metadata"` +} + +//GetDescription returns Description +func (m UpdateSaml2IdentityProviderDetails) GetDescription() *string { + return m.Description +} + +func (m UpdateSaml2IdentityProviderDetails) String() string { + return common.PointerString(m) +} + +// MarshalJSON marshals to json representation +func (m UpdateSaml2IdentityProviderDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateSaml2IdentityProviderDetails UpdateSaml2IdentityProviderDetails + s := struct { + DiscriminatorParam string `json:"protocol"` + MarshalTypeUpdateSaml2IdentityProviderDetails + }{ + "SAML2", + (MarshalTypeUpdateSaml2IdentityProviderDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_state_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_state_details.go new file mode 100644 index 000000000..3c920d786 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_state_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateStateDetails The representation of UpdateStateDetails +type UpdateStateDetails struct { + + // Update state to blocked or unblocked. Only "false" is supported (for changing the state to unblocked). + Blocked *bool `mandatory:"false" json:"blocked"` +} + +func (m UpdateStateDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_swift_password_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_swift_password_details.go new file mode 100644 index 000000000..7f987bf70 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_swift_password_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateSwiftPasswordDetails The representation of UpdateSwiftPasswordDetails +type UpdateSwiftPasswordDetails struct { + + // The description you assign to the Swift password. Does not have to be unique, and it's changeable. + Description *string `mandatory:"false" json:"description"` +} + +func (m UpdateSwiftPasswordDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_swift_password_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_swift_password_request_response.go new file mode 100644 index 000000000..0ec212ff8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_swift_password_request_response.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateSwiftPasswordRequest wrapper for the UpdateSwiftPassword operation +type UpdateSwiftPasswordRequest struct { + + // The OCID of the user. + UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` + + // The OCID of the Swift password. + SwiftPasswordId *string `mandatory:"true" contributesTo:"path" name:"swiftPasswordId"` + + // Request object for updating a Swift password. + UpdateSwiftPasswordDetails `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"` +} + +func (request UpdateSwiftPasswordRequest) String() string { + return common.PointerString(request) +} + +// UpdateSwiftPasswordResponse wrapper for the UpdateSwiftPassword operation +type UpdateSwiftPasswordResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The SwiftPassword instance + SwiftPassword `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"` +} + +func (response UpdateSwiftPasswordResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_user_details.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_user_details.go new file mode 100644 index 000000000..07b2ce2a4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_user_details.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateUserDetails The representation of UpdateUserDetails +type UpdateUserDetails struct { + + // The description you assign to the user. Does not have to be unique, and it's changeable. + Description *string `mandatory:"false" json:"description"` +} + +func (m UpdateUserDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_user_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_user_request_response.go new file mode 100644 index 000000000..41565565e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_user_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateUserRequest wrapper for the UpdateUser operation +type UpdateUserRequest struct { + + // The OCID of the user. + UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` + + // Request object for updating a user. + UpdateUserDetails `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"` +} + +func (request UpdateUserRequest) String() string { + return common.PointerString(request) +} + +// UpdateUserResponse wrapper for the UpdateUser operation +type UpdateUserResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The User instance + User `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"` +} + +func (response UpdateUserResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/update_user_state_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/update_user_state_request_response.go new file mode 100644 index 000000000..f1e2c7514 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/update_user_state_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateUserStateRequest wrapper for the UpdateUserState operation +type UpdateUserStateRequest struct { + + // The OCID of the user. + UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` + + // Request object for updating a user state. + UpdateStateDetails `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"` +} + +func (request UpdateUserStateRequest) String() string { + return common.PointerString(request) +} + +// UpdateUserStateResponse wrapper for the UpdateUserState operation +type UpdateUserStateResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The User instance + User `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"` +} + +func (response UpdateUserStateResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/upload_api_key_request_response.go b/vendor/github.com/oracle/oci-go-sdk/identity/upload_api_key_request_response.go new file mode 100644 index 000000000..4a971b526 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/upload_api_key_request_response.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UploadApiKeyRequest wrapper for the UploadApiKey operation +type UploadApiKeyRequest struct { + + // The OCID of the user. + UserId *string `mandatory:"true" contributesTo:"path" name:"userId"` + + // Request object for uploading an API key for a user. + CreateApiKeyDetails `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 (e.g., 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"` +} + +func (request UploadApiKeyRequest) String() string { + return common.PointerString(request) +} + +// UploadApiKeyResponse wrapper for the UploadApiKey operation +type UploadApiKeyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ApiKey instance + ApiKey `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"` +} + +func (response UploadApiKeyResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/user.go b/vendor/github.com/oracle/oci-go-sdk/identity/user.go new file mode 100644 index 000000000..945e672e4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/user.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// User An individual employee or system that needs to manage or use your company's Oracle Cloud Infrastructure +// resources. Users might need to launch instances, manage remote disks, work with your cloud network, etc. Users +// have one or more IAM Service credentials (ApiKey, +// UIPassword, and SwiftPassword). +// For more information, see User Credentials (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usercredentials.htm)). End users of your +// application are not typically IAM Service users. For conceptual information about users and other IAM Service +// components, see Overview of the IAM Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). +// These users are created directly within the Oracle Cloud Infrastructure system, via the IAM service. +// They are different from *federated users*, who authenticate themselves to the Oracle Cloud Infrastructure +// Console via an identity provider. For more information, see +// Identity Providers and Federation (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/federation.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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type User struct { + + // The OCID of the user. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the tenancy containing the user. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The name you assign to the user during creation. This is the user's login for the Console. + // The name must be unique across all users in the tenancy and cannot be changed. + Name *string `mandatory:"true" json:"name"` + + // The description you assign to the user. Does not have to be unique, and it's changeable. + Description *string `mandatory:"true" json:"description"` + + // Date and time the user was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The user's current state. After creating a user, make sure its `lifecycleState` changes from CREATING to + // ACTIVE before using it. + LifecycleState UserLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Returned only if the user's `lifecycleState` is INACTIVE. A 16-bit value showing the reason why the user + // is inactive: + // - bit 0: SUSPENDED (reserved for future use) + // - bit 1: DISABLED (reserved for future use) + // - bit 2: BLOCKED (the user has exceeded the maximum number of failed login attempts for the Console) + InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` +} + +func (m User) String() string { + return common.PointerString(m) +} + +// UserLifecycleStateEnum Enum with underlying type: string +type UserLifecycleStateEnum string + +// Set of constants representing the allowable values for UserLifecycleState +const ( + UserLifecycleStateCreating UserLifecycleStateEnum = "CREATING" + UserLifecycleStateActive UserLifecycleStateEnum = "ACTIVE" + UserLifecycleStateInactive UserLifecycleStateEnum = "INACTIVE" + UserLifecycleStateDeleting UserLifecycleStateEnum = "DELETING" + UserLifecycleStateDeleted UserLifecycleStateEnum = "DELETED" +) + +var mappingUserLifecycleState = map[string]UserLifecycleStateEnum{ + "CREATING": UserLifecycleStateCreating, + "ACTIVE": UserLifecycleStateActive, + "INACTIVE": UserLifecycleStateInactive, + "DELETING": UserLifecycleStateDeleting, + "DELETED": UserLifecycleStateDeleted, +} + +// GetUserLifecycleStateEnumValues Enumerates the set of values for UserLifecycleState +func GetUserLifecycleStateEnumValues() []UserLifecycleStateEnum { + values := make([]UserLifecycleStateEnum, 0) + for _, v := range mappingUserLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/identity/user_group_membership.go b/vendor/github.com/oracle/oci-go-sdk/identity/user_group_membership.go new file mode 100644 index 000000000..f2b1a3aee --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/identity/user_group_membership.go @@ -0,0 +1,74 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Identity and Access Management Service API +// +// APIs for managing users, groups, compartments, and policies. +// + +package identity + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UserGroupMembership An object that represents the membership of a user in a group. When you add a user to a group, the result is a +// `UserGroupMembership` with its own OCID. To remove a user from a group, you delete the `UserGroupMembership` object. +type UserGroupMembership struct { + + // The OCID of the membership. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the tenancy containing the user, group, and membership object. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the group. + GroupId *string `mandatory:"true" json:"groupId"` + + // The OCID of the user. + UserId *string `mandatory:"true" json:"userId"` + + // Date and time the membership was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The membership's current state. After creating a membership object, make sure its `lifecycleState` changes + // from CREATING to ACTIVE before using it. + LifecycleState UserGroupMembershipLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The detailed status of INACTIVE lifecycleState. + InactiveStatus *int `mandatory:"false" json:"inactiveStatus"` +} + +func (m UserGroupMembership) String() string { + return common.PointerString(m) +} + +// UserGroupMembershipLifecycleStateEnum Enum with underlying type: string +type UserGroupMembershipLifecycleStateEnum string + +// Set of constants representing the allowable values for UserGroupMembershipLifecycleState +const ( + UserGroupMembershipLifecycleStateCreating UserGroupMembershipLifecycleStateEnum = "CREATING" + UserGroupMembershipLifecycleStateActive UserGroupMembershipLifecycleStateEnum = "ACTIVE" + UserGroupMembershipLifecycleStateInactive UserGroupMembershipLifecycleStateEnum = "INACTIVE" + UserGroupMembershipLifecycleStateDeleting UserGroupMembershipLifecycleStateEnum = "DELETING" + UserGroupMembershipLifecycleStateDeleted UserGroupMembershipLifecycleStateEnum = "DELETED" +) + +var mappingUserGroupMembershipLifecycleState = map[string]UserGroupMembershipLifecycleStateEnum{ + "CREATING": UserGroupMembershipLifecycleStateCreating, + "ACTIVE": UserGroupMembershipLifecycleStateActive, + "INACTIVE": UserGroupMembershipLifecycleStateInactive, + "DELETING": UserGroupMembershipLifecycleStateDeleting, + "DELETED": UserGroupMembershipLifecycleStateDeleted, +} + +// GetUserGroupMembershipLifecycleStateEnumValues Enumerates the set of values for UserGroupMembershipLifecycleState +func GetUserGroupMembershipLifecycleStateEnumValues() []UserGroupMembershipLifecycleStateEnum { + values := make([]UserGroupMembershipLifecycleStateEnum, 0) + for _, v := range mappingUserGroupMembershipLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend.go new file mode 100644 index 000000000..ecca968c3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Backend The configuration of a backend server that is a member of a load balancer backend set. +// For more information, see Managing Backend Servers (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingbackendservers.htm). +type Backend struct { + + // Whether the load balancer should treat this server as a backup unit. If `true`, the load balancer forwards no ingress + // traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy. + // Example: `true` + Backup *bool `mandatory:"true" json:"backup"` + + // Whether the load balancer should drain this server. Servers marked "drain" receive no new + // incoming traffic. + // Example: `true` + Drain *bool `mandatory:"true" json:"drain"` + + // The IP address of the backend server. + // Example: `10.10.10.4` + IpAddress *string `mandatory:"true" json:"ipAddress"` + + // A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. + // Example: `10.10.10.4:8080` + Name *string `mandatory:"true" json:"name"` + + // Whether the load balancer should treat this server as offline. Offline servers receive no incoming + // traffic. + // Example: `true` + Offline *bool `mandatory:"true" json:"offline"` + + // The communication port for the backend server. + // Example: `8080` + Port *int `mandatory:"true" json:"port"` + + // The load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger + // proportion of incoming traffic. For example, a server weighted '3' receives 3 times the number of new connections + // as a server weighted '1'. + // For more information on load balancing policies, see + // How Load Balancing Policies Work (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Reference/lbpolicies.htm). + // Example: `3` + Weight *int `mandatory:"true" json:"weight"` +} + +func (m Backend) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_details.go new file mode 100644 index 000000000..a65e538e3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_details.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// BackendDetails The load balancing configuration details of a backend server. +type BackendDetails struct { + + // The IP address of the backend server. + // Example: `10.10.10.4` + IpAddress *string `mandatory:"true" json:"ipAddress"` + + // The communication port for the backend server. + // Example: `8080` + Port *int `mandatory:"true" json:"port"` + + // Whether the load balancer should treat this server as a backup unit. If `true`, the load balancer forwards no ingress + // traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy. + // Example: `true` + Backup *bool `mandatory:"false" json:"backup"` + + // Whether the load balancer should drain this server. Servers marked "drain" receive no new + // incoming traffic. + // Example: `true` + Drain *bool `mandatory:"false" json:"drain"` + + // Whether the load balancer should treat this server as offline. Offline servers receive no incoming + // traffic. + // Example: `true` + Offline *bool `mandatory:"false" json:"offline"` + + // The load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger + // proportion of incoming traffic. For example, a server weighted '3' receives 3 times the number of new connections + // as a server weighted '1'. + // For more information on load balancing policies, see + // How Load Balancing Policies Work (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Reference/lbpolicies.htm). + // Example: `3` + Weight *int `mandatory:"false" json:"weight"` +} + +func (m BackendDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_health.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_health.go new file mode 100644 index 000000000..ca8cbc42c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_health.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// BackendHealth The health status of the specified backend server as reported by the primary and standby load balancers. +type BackendHealth struct { + + // A list of the most recent health check results returned for the specified backend server. + HealthCheckResults []HealthCheckResult `mandatory:"true" json:"healthCheckResults"` + + // The general health status of the specified backend server as reported by the primary and standby load balancers. + // * **OK:** Both health checks returned `OK`. + // * **WARNING:** One health check returned `OK` and one did not. + // * **CRITICAL:** Neither health check returned `OK`. + // * **UNKNOWN:** One or both health checks returned `UNKNOWN`, or the system was unable to retrieve metrics at this time. + Status BackendHealthStatusEnum `mandatory:"true" json:"status"` +} + +func (m BackendHealth) String() string { + return common.PointerString(m) +} + +// BackendHealthStatusEnum Enum with underlying type: string +type BackendHealthStatusEnum string + +// Set of constants representing the allowable values for BackendHealthStatus +const ( + BackendHealthStatusOk BackendHealthStatusEnum = "OK" + BackendHealthStatusWarning BackendHealthStatusEnum = "WARNING" + BackendHealthStatusCritical BackendHealthStatusEnum = "CRITICAL" + BackendHealthStatusUnknown BackendHealthStatusEnum = "UNKNOWN" +) + +var mappingBackendHealthStatus = map[string]BackendHealthStatusEnum{ + "OK": BackendHealthStatusOk, + "WARNING": BackendHealthStatusWarning, + "CRITICAL": BackendHealthStatusCritical, + "UNKNOWN": BackendHealthStatusUnknown, +} + +// GetBackendHealthStatusEnumValues Enumerates the set of values for BackendHealthStatus +func GetBackendHealthStatusEnumValues() []BackendHealthStatusEnum { + values := make([]BackendHealthStatusEnum, 0) + for _, v := range mappingBackendHealthStatus { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set.go new file mode 100644 index 000000000..c47097c7a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// BackendSet The configuration of a load balancer backend set. +// For more information on backend set configuration, see +// Managing Backend Sets (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/tasks/managingbackendsets.htm). +type BackendSet struct { + Backends []Backend `mandatory:"true" json:"backends"` + + HealthChecker *HealthChecker `mandatory:"true" json:"healthChecker"` + + // A friendly name for the backend set. It must be unique and it cannot be changed. + // Valid backend set names include only alphanumeric characters, dashes, and underscores. Backend set names cannot + // contain spaces. Avoid entering confidential information. + // Example: `My_backend_set` + Name *string `mandatory:"true" json:"name"` + + // The load balancer policy for the backend set. To get a list of available policies, use the + // ListPolicies operation. + // Example: `LEAST_CONNECTIONS` + Policy *string `mandatory:"true" json:"policy"` + + SessionPersistenceConfiguration *SessionPersistenceConfigurationDetails `mandatory:"false" json:"sessionPersistenceConfiguration"` + + SslConfiguration *SslConfiguration `mandatory:"false" json:"sslConfiguration"` +} + +func (m BackendSet) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set_details.go new file mode 100644 index 000000000..dad4d6591 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set_details.go @@ -0,0 +1,35 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// BackendSetDetails The configuration details for a load balancer backend set. +// For more information on backend set configuration, see +// Managing Backend Sets (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/tasks/managingbackendsets.htm). +type BackendSetDetails struct { + HealthChecker *HealthCheckerDetails `mandatory:"true" json:"healthChecker"` + + // The load balancer policy for the backend set. To get a list of available policies, use the + // ListPolicies operation. + // Example: `LEAST_CONNECTIONS` + Policy *string `mandatory:"true" json:"policy"` + + Backends []BackendDetails `mandatory:"false" json:"backends"` + + SessionPersistenceConfiguration *SessionPersistenceConfigurationDetails `mandatory:"false" json:"sessionPersistenceConfiguration"` + + SslConfiguration *SslConfigurationDetails `mandatory:"false" json:"sslConfiguration"` +} + +func (m BackendSetDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set_health.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set_health.go new file mode 100644 index 000000000..1ef062996 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/backend_set_health.go @@ -0,0 +1,78 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// BackendSetHealth The health status details for a backend set. +// This object does not explicitly enumerate backend servers with a status of `OK`. However, they are included in the +// `totalBackendCount` sum. +type BackendSetHealth struct { + + // A list of backend servers that are currently in the `CRITICAL` health state. The list identifies each backend server by + // IP address and port. + // Example: `1.1.1.1:80` + CriticalStateBackendNames []string `mandatory:"true" json:"criticalStateBackendNames"` + + // Overall health status of the backend set. + // * **OK:** All backend servers in the backend set return a status of `OK`. + // * **WARNING:** Half or more of the backend set's backend servers return a status of `OK` and at least one backend + // server returns a status of `WARNING`, `CRITICAL`, or `UNKNOWN`. + // * **CRITICAL:** Fewer than half of the backend set's backend servers return a status of `OK`. + // * **UNKNOWN:** More than half of the backend set's backend servers return a status of `UNKNOWN`, the system was + // unable to retrieve metrics, or the backend set does not have a listener attached. + Status BackendSetHealthStatusEnum `mandatory:"true" json:"status"` + + // The total number of backend servers in this backend set. + // Example: `5` + TotalBackendCount *int `mandatory:"true" json:"totalBackendCount"` + + // A list of backend servers that are currently in the `UNKNOWN` health state. The list identifies each backend server by + // IP address and port. + // Example: `1.1.1.5:80` + UnknownStateBackendNames []string `mandatory:"true" json:"unknownStateBackendNames"` + + // A list of backend servers that are currently in the `WARNING` health state. The list identifies each backend server by + // IP address and port. + // Example: `1.1.1.7:42` + WarningStateBackendNames []string `mandatory:"true" json:"warningStateBackendNames"` +} + +func (m BackendSetHealth) String() string { + return common.PointerString(m) +} + +// BackendSetHealthStatusEnum Enum with underlying type: string +type BackendSetHealthStatusEnum string + +// Set of constants representing the allowable values for BackendSetHealthStatus +const ( + BackendSetHealthStatusOk BackendSetHealthStatusEnum = "OK" + BackendSetHealthStatusWarning BackendSetHealthStatusEnum = "WARNING" + BackendSetHealthStatusCritical BackendSetHealthStatusEnum = "CRITICAL" + BackendSetHealthStatusUnknown BackendSetHealthStatusEnum = "UNKNOWN" +) + +var mappingBackendSetHealthStatus = map[string]BackendSetHealthStatusEnum{ + "OK": BackendSetHealthStatusOk, + "WARNING": BackendSetHealthStatusWarning, + "CRITICAL": BackendSetHealthStatusCritical, + "UNKNOWN": BackendSetHealthStatusUnknown, +} + +// GetBackendSetHealthStatusEnumValues Enumerates the set of values for BackendSetHealthStatus +func GetBackendSetHealthStatusEnumValues() []BackendSetHealthStatusEnum { + values := make([]BackendSetHealthStatusEnum, 0) + for _, v := range mappingBackendSetHealthStatus { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/certificate.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/certificate.go new file mode 100644 index 000000000..e2d038de7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/certificate.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Certificate The configuration details of a listener certificate bundle. +// For more information on SSL certficate configuration, see +// Managing SSL Certificates (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingcertificates.htm). +type Certificate struct { + + // The Certificate Authority certificate, or any interim certificate, that you received from your SSL certificate provider. + // Example: + // -----BEGIN CERTIFICATE----- + // MIIEczCCA1ugAwIBAgIBADANBgkqhkiG9w0BAQQFAD..AkGA1UEBhMCR0Ix + // EzARBgNVBAgTClNvbWUtU3RhdGUxFDASBgNVBAoTC0..0EgTHRkMTcwNQYD + // VQQLEy5DbGFzcyAxIFB1YmxpYyBQcmltYXJ5IENlcn..XRpb24gQXV0aG9y + // aXR5MRQwEgYDVQQDEwtCZXN0IENBIEx0ZDAeFw0wMD..TUwMTZaFw0wMTAy + // ... + // -----END CERTIFICATE----- + CaCertificate *string `mandatory:"true" json:"caCertificate"` + + // A friendly name for the certificate bundle. It must be unique and it cannot be changed. + // Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. + // Certificate bundle names cannot contain spaces. Avoid entering confidential information. + // Example: `My_certificate_bundle` + CertificateName *string `mandatory:"true" json:"certificateName"` + + // The public certificate, in PEM format, that you received from your SSL certificate provider. + // Example: + // -----BEGIN CERTIFICATE----- + // MIIC2jCCAkMCAg38MA0GCSqGSIb3DQEBBQUAMIGbMQswCQYDVQQGEwJKUDEOMAwG + // A1UECBMFVG9reW8xEDAOBgNVBAcTB0NodW8ta3UxETAPBgNVBAoTCEZyYW5rNERE + // MRgwFgYDVQQLEw9XZWJDZXJ0IFN1cHBvcnQxGDAWBgNVBAMTD0ZyYW5rNEREIFdl + // YiBDQTEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBmcmFuazRkZC5jb20wHhcNMTIw + // ... + // -----END CERTIFICATE----- + PublicCertificate *string `mandatory:"true" json:"publicCertificate"` +} + +func (m Certificate) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/certificate_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/certificate_details.go new file mode 100644 index 000000000..d63af94d9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/certificate_details.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CertificateDetails The configuration details for a listener certificate bundle. +// For more information on SSL certficate configuration, see +// Managing SSL Certificates (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingcertificates.htm). +type CertificateDetails struct { + + // A friendly name for the certificate bundle. It must be unique and it cannot be changed. + // Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. + // Certificate bundle names cannot contain spaces. Avoid entering confidential information. + // Example: `My_certificate_bundle` + CertificateName *string `mandatory:"true" json:"certificateName"` + + // The Certificate Authority certificate, or any interim certificate, that you received from your SSL certificate provider. + // Example: + // -----BEGIN CERTIFICATE----- + // MIIEczCCA1ugAwIBAgIBADANBgkqhkiG9w0BAQQFAD..AkGA1UEBhMCR0Ix + // EzARBgNVBAgTClNvbWUtU3RhdGUxFDASBgNVBAoTC0..0EgTHRkMTcwNQYD + // VQQLEy5DbGFzcyAxIFB1YmxpYyBQcmltYXJ5IENlcn..XRpb24gQXV0aG9y + // aXR5MRQwEgYDVQQDEwtCZXN0IENBIEx0ZDAeFw0wMD..TUwMTZaFw0wMTAy + // ... + // -----END CERTIFICATE----- + CaCertificate *string `mandatory:"false" json:"caCertificate"` + + // A passphrase for encrypted private keys. This is needed only if you created your certificate with a passphrase. + // Example: `Mysecretunlockingcode42!1!` + Passphrase *string `mandatory:"false" json:"passphrase"` + + // The SSL private key for your certificate, in PEM format. + // Example: + // -----BEGIN RSA PRIVATE KEY----- + // jO1O1v2ftXMsawM90tnXwc6xhOAT1gDBC9S8DKeca..JZNUgYYwNS0dP2UK + // tmyN+XqVcAKw4HqVmChXy5b5msu8eIq3uc2NqNVtR..2ksSLukP8pxXcHyb + // +sEwvM4uf8qbnHAqwnOnP9+KV9vds6BaH1eRA4CHz..n+NVZlzBsTxTlS16 + // /Umr7wJzVrMqK5sDiSu4WuaaBdqMGfL5hLsTjcBFD..Da2iyQmSKuVD4lIZ + // ... + // -----END RSA PRIVATE KEY----- + PrivateKey *string `mandatory:"false" json:"privateKey"` + + // The public certificate, in PEM format, that you received from your SSL certificate provider. + // Example: + // -----BEGIN CERTIFICATE----- + // MIIC2jCCAkMCAg38MA0GCSqGSIb3DQEBBQUAMIGbMQswCQYDVQQGEwJKUDEOMAwG + // A1UECBMFVG9reW8xEDAOBgNVBAcTB0NodW8ta3UxETAPBgNVBAoTCEZyYW5rNERE + // MRgwFgYDVQQLEw9XZWJDZXJ0IFN1cHBvcnQxGDAWBgNVBAMTD0ZyYW5rNEREIFdl + // YiBDQTEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBmcmFuazRkZC5jb20wHhcNMTIw + // ... + // -----END CERTIFICATE----- + PublicCertificate *string `mandatory:"false" json:"publicCertificate"` +} + +func (m CertificateDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_details.go new file mode 100644 index 000000000..b47a042c0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_details.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateBackendDetails The configuration details for creating a backend server in a backend set. +// For more information on backend server configuration, see +// Managing Backend Servers (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/tasks/managingbackendservers.htm). +type CreateBackendDetails struct { + + // The IP address of the backend server. + // Example: `10.10.10.4` + IpAddress *string `mandatory:"true" json:"ipAddress"` + + // The communication port for the backend server. + // Example: `8080` + Port *int `mandatory:"true" json:"port"` + + // Whether the load balancer should treat this server as a backup unit. If `true`, the load balancer forwards no ingress + // traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy. + // Example: `true` + Backup *bool `mandatory:"false" json:"backup"` + + // Whether the load balancer should drain this server. Servers marked "drain" receive no new + // incoming traffic. + // Example: `true` + Drain *bool `mandatory:"false" json:"drain"` + + // Whether the load balancer should treat this server as offline. Offline servers receive no incoming + // traffic. + // Example: `true` + Offline *bool `mandatory:"false" json:"offline"` + + // The load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger + // proportion of incoming traffic. For example, a server weighted '3' receives 3 times the number of new connections + // as a server weighted '1'. + // For more information on load balancing policies, see + // How Load Balancing Policies Work (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Reference/lbpolicies.htm). + // Example: `3` + Weight *int `mandatory:"false" json:"weight"` +} + +func (m CreateBackendDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_request_response.go new file mode 100644 index 000000000..3d14273ce --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_request_response.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateBackendRequest wrapper for the CreateBackend operation +type CreateBackendRequest struct { + + // The details to add a backend server to a backend set. + CreateBackendDetails `contributesTo:"body"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set and servers. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The name of the backend set to add the backend server to. + // Example: `My_backend_set` + BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` + + // The unique Oracle-assigned identifier for the request. If 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 (e.g., 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"` +} + +func (request CreateBackendRequest) String() string { + return common.PointerString(request) +} + +// CreateBackendResponse wrapper for the CreateBackend operation +type CreateBackendResponse 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response CreateBackendResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_set_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_set_details.go new file mode 100644 index 000000000..2bf3acb40 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_set_details.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateBackendSetDetails The configuration details for creating a backend set in a load balancer. +// For more information on backend set configuration, see +// Managing Backend Sets (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/tasks/managingbackendsets.htm). +type CreateBackendSetDetails struct { + HealthChecker *HealthCheckerDetails `mandatory:"true" json:"healthChecker"` + + // A friendly name for the backend set. It must be unique and it cannot be changed. + // Valid backend set names include only alphanumeric characters, dashes, and underscores. Backend set names cannot + // contain spaces. Avoid entering confidential information. + // Example: `My_backend_set` + Name *string `mandatory:"true" json:"name"` + + // The load balancer policy for the backend set. To get a list of available policies, use the + // ListPolicies operation. + // Example: `LEAST_CONNECTIONS` + Policy *string `mandatory:"true" json:"policy"` + + Backends []BackendDetails `mandatory:"false" json:"backends"` + + SessionPersistenceConfiguration *SessionPersistenceConfigurationDetails `mandatory:"false" json:"sessionPersistenceConfiguration"` + + SslConfiguration *SslConfigurationDetails `mandatory:"false" json:"sslConfiguration"` +} + +func (m CreateBackendSetDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_set_request_response.go new file mode 100644 index 000000000..7617987a4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_backend_set_request_response.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateBackendSetRequest wrapper for the CreateBackendSet operation +type CreateBackendSetRequest struct { + + // The details for adding a backend set. + CreateBackendSetDetails `contributesTo:"body"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer on which to add a backend set. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The unique Oracle-assigned identifier for the request. If 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 (e.g., 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"` +} + +func (request CreateBackendSetRequest) String() string { + return common.PointerString(request) +} + +// CreateBackendSetResponse wrapper for the CreateBackendSet operation +type CreateBackendSetResponse 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response CreateBackendSetResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_certificate_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_certificate_details.go new file mode 100644 index 000000000..c7f4789bf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_certificate_details.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateCertificateDetails The configuration details for adding a certificate bundle to a listener. +// For more information on SSL certficate configuration, see +// Managing SSL Certificates (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingcertificates.htm). +type CreateCertificateDetails struct { + + // A friendly name for the certificate bundle. It must be unique and it cannot be changed. + // Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. + // Certificate bundle names cannot contain spaces. Avoid entering confidential information. + // Example: `My_certificate_bundle` + CertificateName *string `mandatory:"true" json:"certificateName"` + + // The Certificate Authority certificate, or any interim certificate, that you received from your SSL certificate provider. + // Example: + // -----BEGIN CERTIFICATE----- + // MIIEczCCA1ugAwIBAgIBADANBgkqhkiG9w0BAQQFAD..AkGA1UEBhMCR0Ix + // EzARBgNVBAgTClNvbWUtU3RhdGUxFDASBgNVBAoTC0..0EgTHRkMTcwNQYD + // VQQLEy5DbGFzcyAxIFB1YmxpYyBQcmltYXJ5IENlcn..XRpb24gQXV0aG9y + // aXR5MRQwEgYDVQQDEwtCZXN0IENBIEx0ZDAeFw0wMD..TUwMTZaFw0wMTAy + // ... + // -----END CERTIFICATE----- + CaCertificate *string `mandatory:"false" json:"caCertificate"` + + // A passphrase for encrypted private keys. This is needed only if you created your certificate with a passphrase. + // Example: `Mysecretunlockingcode42!1!` + Passphrase *string `mandatory:"false" json:"passphrase"` + + // The SSL private key for your certificate, in PEM format. + // Example: + // -----BEGIN RSA PRIVATE KEY----- + // jO1O1v2ftXMsawM90tnXwc6xhOAT1gDBC9S8DKeca..JZNUgYYwNS0dP2UK + // tmyN+XqVcAKw4HqVmChXy5b5msu8eIq3uc2NqNVtR..2ksSLukP8pxXcHyb + // +sEwvM4uf8qbnHAqwnOnP9+KV9vds6BaH1eRA4CHz..n+NVZlzBsTxTlS16 + // /Umr7wJzVrMqK5sDiSu4WuaaBdqMGfL5hLsTjcBFD..Da2iyQmSKuVD4lIZ + // ... + // -----END RSA PRIVATE KEY----- + PrivateKey *string `mandatory:"false" json:"privateKey"` + + // The public certificate, in PEM format, that you received from your SSL certificate provider. + // Example: + // -----BEGIN CERTIFICATE----- + // MIIC2jCCAkMCAg38MA0GCSqGSIb3DQEBBQUAMIGbMQswCQYDVQQGEwJKUDEOMAwG + // A1UECBMFVG9reW8xEDAOBgNVBAcTB0NodW8ta3UxETAPBgNVBAoTCEZyYW5rNERE + // MRgwFgYDVQQLEw9XZWJDZXJ0IFN1cHBvcnQxGDAWBgNVBAMTD0ZyYW5rNEREIFdl + // YiBDQTEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBmcmFuazRkZC5jb20wHhcNMTIw + // ... + // -----END CERTIFICATE----- + PublicCertificate *string `mandatory:"false" json:"publicCertificate"` +} + +func (m CreateCertificateDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_certificate_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_certificate_request_response.go new file mode 100644 index 000000000..f92bd347e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_certificate_request_response.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateCertificateRequest wrapper for the CreateCertificate operation +type CreateCertificateRequest struct { + + // The details of the certificate to add. + CreateCertificateDetails `contributesTo:"body"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer on which to add the certificate. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The unique Oracle-assigned identifier for the request. If 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 (e.g., 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"` +} + +func (request CreateCertificateRequest) String() string { + return common.PointerString(request) +} + +// CreateCertificateResponse wrapper for the CreateCertificate operation +type CreateCertificateResponse 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response CreateCertificateResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_listener_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_listener_details.go new file mode 100644 index 000000000..58e7b30d6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_listener_details.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateListenerDetails The configuration details for adding a listener to a backend set. +// For more information on listener configuration, see +// Managing Load Balancer Listeners (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/tasks/managinglisteners.htm). +type CreateListenerDetails struct { + + // The name of the associated backend set. + DefaultBackendSetName *string `mandatory:"true" json:"defaultBackendSetName"` + + // A friendly name for the listener. It must be unique and it cannot be changed. + // Avoid entering confidential information. + // Example: `My listener` + Name *string `mandatory:"true" json:"name"` + + // The communication port for the listener. + // Example: `80` + Port *int `mandatory:"true" json:"port"` + + // The protocol on which the listener accepts connection requests. + // To get a list of valid protocols, use the ListProtocols + // operation. + // Example: `HTTP` + Protocol *string `mandatory:"true" json:"protocol"` + + SslConfiguration *SslConfigurationDetails `mandatory:"false" json:"sslConfiguration"` +} + +func (m CreateListenerDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_listener_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_listener_request_response.go new file mode 100644 index 000000000..9c9c9f570 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_listener_request_response.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateListenerRequest wrapper for the CreateListener operation +type CreateListenerRequest struct { + + // Details to add a listener. + CreateListenerDetails `contributesTo:"body"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer on which to add a listener. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The unique Oracle-assigned identifier for the request. If 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 (e.g., 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"` +} + +func (request CreateListenerRequest) String() string { + return common.PointerString(request) +} + +// CreateListenerResponse wrapper for the CreateListener operation +type CreateListenerResponse 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response CreateListenerResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_load_balancer_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_load_balancer_details.go new file mode 100644 index 000000000..5b08bf52a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_load_balancer_details.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateLoadBalancerDetails The configuration details for creating a load balancer. +type CreateLoadBalancerDetails struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment in which to create the load balancer. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. It does not have to be unique, and it is changeable. + // Avoid entering confidential information. + // Example: `My load balancer` + DisplayName *string `mandatory:"true" json:"displayName"` + + // A template that determines the total pre-provisioned bandwidth (ingress plus egress). + // To get a list of available shapes, use the ListShapes + // operation. + // Example: `100Mbps` + ShapeName *string `mandatory:"true" json:"shapeName"` + + // An array of subnet OCIDs (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + SubnetIds []string `mandatory:"true" json:"subnetIds"` + + BackendSets map[string]BackendSetDetails `mandatory:"false" json:"backendSets"` + + Certificates map[string]CertificateDetails `mandatory:"false" json:"certificates"` + + // Whether the load balancer has a VCN-local (private) IP address. + // If "true", the service assigns a private IP address to the load balancer. The load balancer requires only one subnet + // to host both the primary and secondary load balancers. The private IP address is local to the subnet. The load balancer + // is accessible only from within the VCN that contains the associated subnet, or as further restricted by your security + // list rules. The load balancer can route traffic to any backend server that is reachable from the VCN. + // For a private load balancer, both the primary and secondary load balancer hosts are within the same Availability Domain. + // If "false", the service assigns a public IP address to the load balancer. A load balancer with a public IP address + // requires two subnets, each in a different Availability Domain. One subnet hosts the primary load balancer and the other + // hosts the secondary (standby) load balancer. A public load balancer is accessible from the internet, depending on your + // VCN's security list rules (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/securitylists.htm). + // Example: `false` + IsPrivate *bool `mandatory:"false" json:"isPrivate"` + + Listeners map[string]ListenerDetails `mandatory:"false" json:"listeners"` +} + +func (m CreateLoadBalancerDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_load_balancer_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_load_balancer_request_response.go new file mode 100644 index 000000000..0ff053e4e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/create_load_balancer_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateLoadBalancerRequest wrapper for the CreateLoadBalancer operation +type CreateLoadBalancerRequest struct { + + // The configuration details for creating a load balancer. + CreateLoadBalancerDetails `contributesTo:"body"` + + // The unique Oracle-assigned identifier for the request. If 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 (e.g., 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"` +} + +func (request CreateLoadBalancerRequest) String() string { + return common.PointerString(request) +} + +// CreateLoadBalancerResponse wrapper for the CreateLoadBalancer operation +type CreateLoadBalancerResponse 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response CreateLoadBalancerResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_backend_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_backend_request_response.go new file mode 100644 index 000000000..acc746c90 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_backend_request_response.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteBackendRequest wrapper for the DeleteBackend operation +type DeleteBackendRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set and server. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The name of the backend set associated with the backend server. + // Example: `My_backend_set` + BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` + + // The IP address and port of the backend server to remove. + // Example: `1.1.1.7:42` + BackendName *string `mandatory:"true" contributesTo:"path" name:"backendName"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` +} + +func (request DeleteBackendRequest) String() string { + return common.PointerString(request) +} + +// DeleteBackendResponse wrapper for the DeleteBackend operation +type DeleteBackendResponse 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response DeleteBackendResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_backend_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_backend_set_request_response.go new file mode 100644 index 000000000..6a73967a2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_backend_set_request_response.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteBackendSetRequest wrapper for the DeleteBackendSet operation +type DeleteBackendSetRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The name of the backend set to delete. + // Example: `My_backend_set` + BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` +} + +func (request DeleteBackendSetRequest) String() string { + return common.PointerString(request) +} + +// DeleteBackendSetResponse wrapper for the DeleteBackendSet operation +type DeleteBackendSetResponse 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response DeleteBackendSetResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_certificate_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_certificate_request_response.go new file mode 100644 index 000000000..db86b0637 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_certificate_request_response.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteCertificateRequest wrapper for the DeleteCertificate operation +type DeleteCertificateRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the certificate to be deleted. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The name of the certificate to delete. + // Example: `My_certificate_bundle` + CertificateName *string `mandatory:"true" contributesTo:"path" name:"certificateName"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` +} + +func (request DeleteCertificateRequest) String() string { + return common.PointerString(request) +} + +// DeleteCertificateResponse wrapper for the DeleteCertificate operation +type DeleteCertificateResponse 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response DeleteCertificateResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_listener_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_listener_request_response.go new file mode 100644 index 000000000..b5496e029 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_listener_request_response.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteListenerRequest wrapper for the DeleteListener operation +type DeleteListenerRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the listener to delete. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The name of the listener to delete. + // Example: `My listener` + ListenerName *string `mandatory:"true" contributesTo:"path" name:"listenerName"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` +} + +func (request DeleteListenerRequest) String() string { + return common.PointerString(request) +} + +// DeleteListenerResponse wrapper for the DeleteListener operation +type DeleteListenerResponse 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response DeleteListenerResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_load_balancer_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_load_balancer_request_response.go new file mode 100644 index 000000000..3e39b143c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/delete_load_balancer_request_response.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteLoadBalancerRequest wrapper for the DeleteLoadBalancer operation +type DeleteLoadBalancerRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer to delete. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` +} + +func (request DeleteLoadBalancerRequest) String() string { + return common.PointerString(request) +} + +// DeleteLoadBalancerResponse wrapper for the DeleteLoadBalancer operation +type DeleteLoadBalancerResponse 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response DeleteLoadBalancerResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_health_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_health_request_response.go new file mode 100644 index 000000000..6216d7aa9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_health_request_response.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetBackendHealthRequest wrapper for the GetBackendHealth operation +type GetBackendHealthRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend server health status to be retrieved. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The name of the backend set associated with the backend server to retrieve the health status for. + // Example: `My_backend_set` + BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` + + // The IP address and port of the backend server to retrieve the health status for. + // Example: `1.1.1.7:42` + BackendName *string `mandatory:"true" contributesTo:"path" name:"backendName"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` +} + +func (request GetBackendHealthRequest) String() string { + return common.PointerString(request) +} + +// GetBackendHealthResponse wrapper for the GetBackendHealth operation +type GetBackendHealthResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The BackendHealth instance + BackendHealth `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 GetBackendHealthResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_request_response.go new file mode 100644 index 000000000..b795f0a4f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_request_response.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetBackendRequest wrapper for the GetBackend operation +type GetBackendRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set and server. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The name of the backend set that includes the backend server. + // Example: `My_backend_set` + BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` + + // The IP address and port of the backend server to retrieve. + // Example: `1.1.1.7:42` + BackendName *string `mandatory:"true" contributesTo:"path" name:"backendName"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` +} + +func (request GetBackendRequest) String() string { + return common.PointerString(request) +} + +// GetBackendResponse wrapper for the GetBackend operation +type GetBackendResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Backend instance + Backend `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 GetBackendResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_set_health_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_set_health_request_response.go new file mode 100644 index 000000000..9c1952f17 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_set_health_request_response.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetBackendSetHealthRequest wrapper for the GetBackendSetHealth operation +type GetBackendSetHealthRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set health status to be retrieved. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The name of the backend set to retrieve the health status for. + // Example: `My_backend_set` + BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` +} + +func (request GetBackendSetHealthRequest) String() string { + return common.PointerString(request) +} + +// GetBackendSetHealthResponse wrapper for the GetBackendSetHealth operation +type GetBackendSetHealthResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The BackendSetHealth instance + BackendSetHealth `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 GetBackendSetHealthResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_set_request_response.go new file mode 100644 index 000000000..19b461368 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_backend_set_request_response.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetBackendSetRequest wrapper for the GetBackendSet operation +type GetBackendSetRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the specified load balancer. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The name of the backend set to retrieve. + // Example: `My_backend_set` + BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` +} + +func (request GetBackendSetRequest) String() string { + return common.PointerString(request) +} + +// GetBackendSetResponse wrapper for the GetBackendSet operation +type GetBackendSetResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The BackendSet instance + BackendSet `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 GetBackendSetResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_health_checker_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_health_checker_request_response.go new file mode 100644 index 000000000..70cfdc6f6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_health_checker_request_response.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetHealthCheckerRequest wrapper for the GetHealthChecker operation +type GetHealthCheckerRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the health check policy to be retrieved. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The name of the backend set associated with the health check policy to be retrieved. + // Example: `My_backend_set` + BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` +} + +func (request GetHealthCheckerRequest) String() string { + return common.PointerString(request) +} + +// GetHealthCheckerResponse wrapper for the GetHealthChecker operation +type GetHealthCheckerResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The HealthChecker instance + HealthChecker `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 GetHealthCheckerResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_load_balancer_health_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_load_balancer_health_request_response.go new file mode 100644 index 000000000..03783ea3a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_load_balancer_health_request_response.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetLoadBalancerHealthRequest wrapper for the GetLoadBalancerHealth operation +type GetLoadBalancerHealthRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer to return health status for. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` +} + +func (request GetLoadBalancerHealthRequest) String() string { + return common.PointerString(request) +} + +// GetLoadBalancerHealthResponse wrapper for the GetLoadBalancerHealth operation +type GetLoadBalancerHealthResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The LoadBalancerHealth instance + LoadBalancerHealth `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 GetLoadBalancerHealthResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_load_balancer_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_load_balancer_request_response.go new file mode 100644 index 000000000..4f6347794 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_load_balancer_request_response.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetLoadBalancerRequest wrapper for the GetLoadBalancer operation +type GetLoadBalancerRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer to retrieve. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` +} + +func (request GetLoadBalancerRequest) String() string { + return common.PointerString(request) +} + +// GetLoadBalancerResponse wrapper for the GetLoadBalancer operation +type GetLoadBalancerResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The LoadBalancer instance + LoadBalancer `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 GetLoadBalancerResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_work_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_work_request_request_response.go new file mode 100644 index 000000000..5159bf9c7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/get_work_request_request_response.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetWorkRequestRequest wrapper for the GetWorkRequest operation +type GetWorkRequestRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request to retrieve. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` +} + +func (request GetWorkRequestRequest) String() string { + return common.PointerString(request) +} + +// 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, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetWorkRequestResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_check_result.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_check_result.go new file mode 100644 index 000000000..8c7a04152 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_check_result.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// HealthCheckResult Information about a single backend server health check result reported by a load balancer. +type HealthCheckResult struct { + + // The result of the most recent health check. + HealthCheckStatus HealthCheckResultHealthCheckStatusEnum `mandatory:"true" json:"healthCheckStatus"` + + // The IP address of the health check status report provider. This identifier helps you differentiate same-subnet + // (private) load balancers that report health check status. + // Example: `10.2.0.1` + SourceIpAddress *string `mandatory:"true" json:"sourceIpAddress"` + + // The OCID of the subnet hosting the load balancer that reported this health check status. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // The date and time the data was retrieved, in the format defined by RFC3339. + // Example: `2017-06-02T18:28:11+00:00` + Timestamp *common.SDKTime `mandatory:"true" json:"timestamp"` +} + +func (m HealthCheckResult) String() string { + return common.PointerString(m) +} + +// HealthCheckResultHealthCheckStatusEnum Enum with underlying type: string +type HealthCheckResultHealthCheckStatusEnum string + +// Set of constants representing the allowable values for HealthCheckResultHealthCheckStatus +const ( + HealthCheckResultHealthCheckStatusOk HealthCheckResultHealthCheckStatusEnum = "OK" + HealthCheckResultHealthCheckStatusInvalidStatusCode HealthCheckResultHealthCheckStatusEnum = "INVALID_STATUS_CODE" + HealthCheckResultHealthCheckStatusTimedOut HealthCheckResultHealthCheckStatusEnum = "TIMED_OUT" + HealthCheckResultHealthCheckStatusRegexMismatch HealthCheckResultHealthCheckStatusEnum = "REGEX_MISMATCH" + HealthCheckResultHealthCheckStatusConnectFailed HealthCheckResultHealthCheckStatusEnum = "CONNECT_FAILED" + HealthCheckResultHealthCheckStatusIoError HealthCheckResultHealthCheckStatusEnum = "IO_ERROR" + HealthCheckResultHealthCheckStatusOffline HealthCheckResultHealthCheckStatusEnum = "OFFLINE" + HealthCheckResultHealthCheckStatusUnknown HealthCheckResultHealthCheckStatusEnum = "UNKNOWN" +) + +var mappingHealthCheckResultHealthCheckStatus = map[string]HealthCheckResultHealthCheckStatusEnum{ + "OK": HealthCheckResultHealthCheckStatusOk, + "INVALID_STATUS_CODE": HealthCheckResultHealthCheckStatusInvalidStatusCode, + "TIMED_OUT": HealthCheckResultHealthCheckStatusTimedOut, + "REGEX_MISMATCH": HealthCheckResultHealthCheckStatusRegexMismatch, + "CONNECT_FAILED": HealthCheckResultHealthCheckStatusConnectFailed, + "IO_ERROR": HealthCheckResultHealthCheckStatusIoError, + "OFFLINE": HealthCheckResultHealthCheckStatusOffline, + "UNKNOWN": HealthCheckResultHealthCheckStatusUnknown, +} + +// GetHealthCheckResultHealthCheckStatusEnumValues Enumerates the set of values for HealthCheckResultHealthCheckStatus +func GetHealthCheckResultHealthCheckStatusEnumValues() []HealthCheckResultHealthCheckStatusEnum { + values := make([]HealthCheckResultHealthCheckStatusEnum, 0) + for _, v := range mappingHealthCheckResultHealthCheckStatus { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_checker.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_checker.go new file mode 100644 index 000000000..5f5150076 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_checker.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// HealthChecker The health check policy configuration. +// For more information, see Editing Health Check Policies (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/editinghealthcheck.htm). +type HealthChecker struct { + + // The backend server port against which to run the health check. If the port is not specified, the load balancer uses the + // port information from the `Backend` object. + // Example: `8080` + Port *int `mandatory:"true" json:"port"` + + // The protocol the health check must use; either HTTP or TCP. + // Example: `HTTP` + Protocol *string `mandatory:"true" json:"protocol"` + + // A regular expression for parsing the response body from the backend server. + // Example: `^(500|40[1348])$` + ResponseBodyRegex *string `mandatory:"true" json:"responseBodyRegex"` + + // The status code a healthy backend server should return. If you configure the health check policy to use the HTTP protocol, + // you can use common HTTP status codes such as "200". + // Example: `200` + ReturnCode *int `mandatory:"true" json:"returnCode"` + + // The interval between health checks, in milliseconds. The default is 10000 (10 seconds). + // Example: `30000` + IntervalInMillis *int `mandatory:"false" json:"intervalInMillis"` + + // The number of retries to attempt before a backend server is considered "unhealthy". Defaults to 3. + // Example: `3` + Retries *int `mandatory:"false" json:"retries"` + + // The maximum time, in milliseconds, to wait for a reply to a health check. A health check is successful only if a reply + // returns within this timeout period. Defaults to 3000 (3 seconds). + // Example: `6000` + TimeoutInMillis *int `mandatory:"false" json:"timeoutInMillis"` + + // The path against which to run the health check. + // Example: `/healthcheck` + UrlPath *string `mandatory:"false" json:"urlPath"` +} + +func (m HealthChecker) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_checker_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_checker_details.go new file mode 100644 index 000000000..29f9a90c8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/health_checker_details.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// HealthCheckerDetails The health check policy's configuration details. +type HealthCheckerDetails struct { + + // The protocol the health check must use; either HTTP or TCP. + // Example: `HTTP` + Protocol *string `mandatory:"true" json:"protocol"` + + // The interval between health checks, in milliseconds. + // Example: `30000` + IntervalInMillis *int `mandatory:"false" json:"intervalInMillis"` + + // The backend server port against which to run the health check. If the port is not specified, the load balancer uses the + // port information from the `Backend` object. + // Example: `8080` + Port *int `mandatory:"false" json:"port"` + + // A regular expression for parsing the response body from the backend server. + // Example: `^(500|40[1348])$` + ResponseBodyRegex *string `mandatory:"false" json:"responseBodyRegex"` + + // The number of retries to attempt before a backend server is considered "unhealthy". + // Example: `3` + Retries *int `mandatory:"false" json:"retries"` + + // The status code a healthy backend server should return. + // Example: `200` + ReturnCode *int `mandatory:"false" json:"returnCode"` + + // The maximum time, in milliseconds, to wait for a reply to a health check. A health check is successful only if a reply + // returns within this timeout period. + // Example: `6000` + TimeoutInMillis *int `mandatory:"false" json:"timeoutInMillis"` + + // The path against which to run the health check. + // Example: `/healthcheck` + UrlPath *string `mandatory:"false" json:"urlPath"` +} + +func (m HealthCheckerDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ip_address.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ip_address.go new file mode 100644 index 000000000..04892809e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ip_address.go @@ -0,0 +1,30 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// IpAddress A load balancer IP address. +type IpAddress struct { + + // An IP address. + // Example: `128.148.10.20` + IpAddress *string `mandatory:"true" json:"ipAddress"` + + // Whether the IP address is public or private. + // If "true", the IP address is public and accessible from the internet. + // If "false", the IP address is private and accessible only from within the associated VCN. + IsPublic *bool `mandatory:"false" json:"isPublic"` +} + +func (m IpAddress) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_backend_sets_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_backend_sets_request_response.go new file mode 100644 index 000000000..240a49811 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_backend_sets_request_response.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListBackendSetsRequest wrapper for the ListBackendSets operation +type ListBackendSetsRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend sets to retrieve. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` +} + +func (request ListBackendSetsRequest) String() string { + return common.PointerString(request) +} + +// ListBackendSetsResponse wrapper for the ListBackendSets operation +type ListBackendSetsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []BackendSet instance + Items []BackendSet `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 ListBackendSetsResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_backends_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_backends_request_response.go new file mode 100644 index 000000000..dd68c498a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_backends_request_response.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListBackendsRequest wrapper for the ListBackends operation +type ListBackendsRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set and servers. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The name of the backend set associated with the backend servers. + // Example: `My_backend_set` + BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` +} + +func (request ListBackendsRequest) String() string { + return common.PointerString(request) +} + +// ListBackendsResponse wrapper for the ListBackends operation +type ListBackendsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []Backend instance + Items []Backend `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 ListBackendsResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_certificates_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_certificates_request_response.go new file mode 100644 index 000000000..b5e62bc07 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_certificates_request_response.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListCertificatesRequest wrapper for the ListCertificates operation +type ListCertificatesRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the certificates to be listed. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` +} + +func (request ListCertificatesRequest) String() string { + return common.PointerString(request) +} + +// ListCertificatesResponse wrapper for the ListCertificates operation +type ListCertificatesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []Certificate instance + Items []Certificate `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 ListCertificatesResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_load_balancer_healths_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_load_balancer_healths_request_response.go new file mode 100644 index 000000000..959153da0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_load_balancer_healths_request_response.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListLoadBalancerHealthsRequest wrapper for the ListLoadBalancerHealths operation +type ListLoadBalancerHealthsRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment containing the load balancers to return health status information for. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The unique Oracle-assigned identifier for the request. If 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 maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + // Example: `3` + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListLoadBalancerHealthsRequest) String() string { + return common.PointerString(request) +} + +// ListLoadBalancerHealthsResponse wrapper for the ListLoadBalancerHealths operation +type ListLoadBalancerHealthsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []LoadBalancerHealthSummary instance + Items []LoadBalancerHealthSummary `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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 ListLoadBalancerHealthsResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_load_balancers_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_load_balancers_request_response.go new file mode 100644 index 000000000..608697685 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_load_balancers_request_response.go @@ -0,0 +1,117 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListLoadBalancersRequest wrapper for the ListLoadBalancers operation +type ListLoadBalancersRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment containing the load balancers to list. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The unique Oracle-assigned identifier for the request. If 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 maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + // Example: `3` + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The level of detail to return for each result. Can be `full` or `simple`. + // Example: `full` + Detail *string `mandatory:"false" contributesTo:"query" name:"detail"` + + // The field to sort by. Only one sort order may be provided. Time created is default ordered as descending. Display name is default ordered as ascending. + SortBy ListLoadBalancersSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'asc' or 'desc' + SortOrder ListLoadBalancersSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // A filter to only return resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // A filter to only return resources that match the given lifecycle state. + LifecycleState LoadBalancerLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` +} + +func (request ListLoadBalancersRequest) String() string { + return common.PointerString(request) +} + +// ListLoadBalancersResponse wrapper for the ListLoadBalancers operation +type ListLoadBalancersResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []LoadBalancer instance + Items []LoadBalancer `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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 ListLoadBalancersResponse) String() string { + return common.PointerString(response) +} + +// ListLoadBalancersSortByEnum Enum with underlying type: string +type ListLoadBalancersSortByEnum string + +// Set of constants representing the allowable values for ListLoadBalancersSortBy +const ( + ListLoadBalancersSortByTimecreated ListLoadBalancersSortByEnum = "TIMECREATED" + ListLoadBalancersSortByDisplayname ListLoadBalancersSortByEnum = "DISPLAYNAME" +) + +var mappingListLoadBalancersSortBy = map[string]ListLoadBalancersSortByEnum{ + "TIMECREATED": ListLoadBalancersSortByTimecreated, + "DISPLAYNAME": ListLoadBalancersSortByDisplayname, +} + +// GetListLoadBalancersSortByEnumValues Enumerates the set of values for ListLoadBalancersSortBy +func GetListLoadBalancersSortByEnumValues() []ListLoadBalancersSortByEnum { + values := make([]ListLoadBalancersSortByEnum, 0) + for _, v := range mappingListLoadBalancersSortBy { + values = append(values, v) + } + return values +} + +// ListLoadBalancersSortOrderEnum Enum with underlying type: string +type ListLoadBalancersSortOrderEnum string + +// Set of constants representing the allowable values for ListLoadBalancersSortOrder +const ( + ListLoadBalancersSortOrderAsc ListLoadBalancersSortOrderEnum = "ASC" + ListLoadBalancersSortOrderDesc ListLoadBalancersSortOrderEnum = "DESC" +) + +var mappingListLoadBalancersSortOrder = map[string]ListLoadBalancersSortOrderEnum{ + "ASC": ListLoadBalancersSortOrderAsc, + "DESC": ListLoadBalancersSortOrderDesc, +} + +// GetListLoadBalancersSortOrderEnumValues Enumerates the set of values for ListLoadBalancersSortOrder +func GetListLoadBalancersSortOrderEnumValues() []ListLoadBalancersSortOrderEnum { + values := make([]ListLoadBalancersSortOrderEnum, 0) + for _, v := range mappingListLoadBalancersSortOrder { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_policies_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_policies_request_response.go new file mode 100644 index 000000000..197f32e5a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_policies_request_response.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListPoliciesRequest wrapper for the ListPolicies operation +type ListPoliciesRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment containing the load balancer policies to list. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The unique Oracle-assigned identifier for the request. If 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 maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + // Example: `3` + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListPoliciesRequest) String() string { + return common.PointerString(request) +} + +// ListPoliciesResponse wrapper for the ListPolicies operation +type ListPoliciesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []LoadBalancerPolicy instance + Items []LoadBalancerPolicy `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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 ListPoliciesResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_protocols_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_protocols_request_response.go new file mode 100644 index 000000000..d6e9c4e30 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_protocols_request_response.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListProtocolsRequest wrapper for the ListProtocols operation +type ListProtocolsRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment containing the load balancer protocols to list. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The unique Oracle-assigned identifier for the request. If 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 maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + // Example: `3` + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListProtocolsRequest) String() string { + return common.PointerString(request) +} + +// ListProtocolsResponse wrapper for the ListProtocols operation +type ListProtocolsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []LoadBalancerProtocol instance + Items []LoadBalancerProtocol `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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 ListProtocolsResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_shapes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_shapes_request_response.go new file mode 100644 index 000000000..0db13f617 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_shapes_request_response.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListShapesRequest wrapper for the ListShapes operation +type ListShapesRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment containing the load balancer shapes to list. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The unique Oracle-assigned identifier for the request. If 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 maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + // Example: `3` + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListShapesRequest) String() string { + return common.PointerString(request) +} + +// ListShapesResponse wrapper for the ListShapes operation +type ListShapesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []LoadBalancerShape instance + Items []LoadBalancerShape `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_work_requests_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_work_requests_request_response.go new file mode 100644 index 000000000..13018c150 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/list_work_requests_request_response.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListWorkRequestsRequest wrapper for the ListWorkRequests operation +type ListWorkRequestsRequest struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the work requests to retrieve. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The unique Oracle-assigned identifier for the request. If 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 maximum number of items to return in a paginated "List" call. + // Example: `500` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The value of the `opc-next-page` response header from the previous "List" call. + // Example: `3` + Page *string `mandatory:"false" contributesTo:"query" name:"page"` +} + +func (request ListWorkRequestsRequest) String() string { + return common.PointerString(request) +} + +// ListWorkRequestsResponse wrapper for the ListWorkRequests operation +type ListWorkRequestsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []WorkRequest instance + Items []WorkRequest `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + 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 ListWorkRequestsResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/listener.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/listener.go new file mode 100644 index 000000000..31110fd5e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/listener.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Listener The listener's configuration. +// For more information on backend set configuration, see +// Managing Load Balancer Listeners (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/tasks/managinglisteners.htm). +type Listener struct { + + // The name of the associated backend set. + DefaultBackendSetName *string `mandatory:"true" json:"defaultBackendSetName"` + + // A friendly name for the listener. It must be unique and it cannot be changed. + // Example: `My listener` + Name *string `mandatory:"true" json:"name"` + + // The communication port for the listener. + // Example: `80` + Port *int `mandatory:"true" json:"port"` + + // The protocol on which the listener accepts connection requests. + // To get a list of valid protocols, use the ListProtocols + // operation. + // Example: `HTTP` + Protocol *string `mandatory:"true" json:"protocol"` + + SslConfiguration *SslConfiguration `mandatory:"false" json:"sslConfiguration"` +} + +func (m Listener) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/listener_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/listener_details.go new file mode 100644 index 000000000..15b4e5d9a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/listener_details.go @@ -0,0 +1,36 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// ListenerDetails The listener's configuration details. +type ListenerDetails struct { + + // The name of the associated backend set. + DefaultBackendSetName *string `mandatory:"true" json:"defaultBackendSetName"` + + // The communication port for the listener. + // Example: `80` + Port *int `mandatory:"true" json:"port"` + + // The protocol on which the listener accepts connection requests. + // To get a list of valid protocols, use the ListProtocols + // operation. + // Example: `HTTP` + Protocol *string `mandatory:"true" json:"protocol"` + + SslConfiguration *SslConfigurationDetails `mandatory:"false" json:"sslConfiguration"` +} + +func (m ListenerDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer.go new file mode 100644 index 000000000..bf621e4a9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// LoadBalancer The properties that define a load balancer. For more information, see +// Managing a Load Balancer (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingloadbalancer.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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +// For information about endpoints and signing API requests, see +// About the API (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm). For information about available SDKs and tools, see +// SDKS and Other Tools (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdks.htm). +type LoadBalancer struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment containing the load balancer. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. It does not have to be unique, and it is changeable. + // Example: `My load balancer` + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer. + Id *string `mandatory:"true" json:"id"` + + // The current state of the load balancer. + LifecycleState LoadBalancerLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // A template that determines the total pre-provisioned bandwidth (ingress plus egress). + // To get a list of available shapes, use the ListShapes + // operation. + // Example: `100Mbps` + ShapeName *string `mandatory:"true" json:"shapeName"` + + // The date and time the load balancer was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + BackendSets map[string]BackendSet `mandatory:"false" json:"backendSets"` + + Certificates map[string]Certificate `mandatory:"false" json:"certificates"` + + // An array of IP addresses. + IpAddresses []IpAddress `mandatory:"false" json:"ipAddresses"` + + // Whether the load balancer has a VCN-local (private) IP address. + // If "true", the service assigns a private IP address to the load balancer. The load balancer requires only one subnet + // to host both the primary and secondary load balancers. The private IP address is local to the subnet. The load balancer + // is accessible only from within the VCN that contains the associated subnet, or as further restricted by your security + // list rules. The load balancer can route traffic to any backend server that is reachable from the VCN. + // For a private load balancer, both the primary and secondary load balancer hosts are within the same Availability Domain. + // If "false", the service assigns a public IP address to the load balancer. A load balancer with a public IP address + // requires two subnets, each in a different Availability Domain. One subnet hosts the primary load balancer and the other + // hosts the secondary (standby) load balancer. A public load balancer is accessible from the internet, depending on your + // VCN's security list rules (https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/securitylists.htm). + IsPrivate *bool `mandatory:"false" json:"isPrivate"` + + Listeners map[string]Listener `mandatory:"false" json:"listeners"` + + // An array of subnet OCIDs (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). + SubnetIds []string `mandatory:"false" json:"subnetIds"` +} + +func (m LoadBalancer) String() string { + return common.PointerString(m) +} + +// LoadBalancerLifecycleStateEnum Enum with underlying type: string +type LoadBalancerLifecycleStateEnum string + +// Set of constants representing the allowable values for LoadBalancerLifecycleState +const ( + LoadBalancerLifecycleStateCreating LoadBalancerLifecycleStateEnum = "CREATING" + LoadBalancerLifecycleStateFailed LoadBalancerLifecycleStateEnum = "FAILED" + LoadBalancerLifecycleStateActive LoadBalancerLifecycleStateEnum = "ACTIVE" + LoadBalancerLifecycleStateDeleting LoadBalancerLifecycleStateEnum = "DELETING" + LoadBalancerLifecycleStateDeleted LoadBalancerLifecycleStateEnum = "DELETED" +) + +var mappingLoadBalancerLifecycleState = map[string]LoadBalancerLifecycleStateEnum{ + "CREATING": LoadBalancerLifecycleStateCreating, + "FAILED": LoadBalancerLifecycleStateFailed, + "ACTIVE": LoadBalancerLifecycleStateActive, + "DELETING": LoadBalancerLifecycleStateDeleting, + "DELETED": LoadBalancerLifecycleStateDeleted, +} + +// GetLoadBalancerLifecycleStateEnumValues Enumerates the set of values for LoadBalancerLifecycleState +func GetLoadBalancerLifecycleStateEnumValues() []LoadBalancerLifecycleStateEnum { + values := make([]LoadBalancerLifecycleStateEnum, 0) + for _, v := range mappingLoadBalancerLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_health.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_health.go new file mode 100644 index 000000000..ab7de4a9d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_health.go @@ -0,0 +1,82 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// LoadBalancerHealth The health status details for the specified load balancer. +// This object does not explicitly enumerate backend sets with a status of `OK`. However, they are included in the +// `totalBackendSetCount` sum. +type LoadBalancerHealth struct { + + // A list of backend sets that are currently in the `CRITICAL` health state. The list identifies each backend set by the + // friendly name you assigned when you created it. + // Example: `My_backend_set` + CriticalStateBackendSetNames []string `mandatory:"true" json:"criticalStateBackendSetNames"` + + // The overall health status of the load balancer. + // * **OK:** All backend sets associated with the load balancer return a status of `OK`. + // * **WARNING:** At least one of the backend sets associated with the load balancer returns a status of `WARNING`, + // no backend sets return a status of `CRITICAL`, and the load balancer life cycle state is `ACTIVE`. + // * **CRITICAL:** One or more of the backend sets associated with the load balancer return a status of `CRITICAL`. + // * **UNKNOWN:** If any one of the following conditions is true: + // * The load balancer life cycle state is not `ACTIVE`. + // * No backend sets are defined for the load balancer. + // * More than half of the backend sets associated with the load balancer return a status of `UNKNOWN`, none of the backend + // sets return a status of `WARNING` or `CRITICAL`, and the load balancer life cycle state is `ACTIVE`. + // * The system could not retrieve metrics for any reason. + Status LoadBalancerHealthStatusEnum `mandatory:"true" json:"status"` + + // The total number of backend sets associated with this load balancer. + // Example: `4` + TotalBackendSetCount *int `mandatory:"true" json:"totalBackendSetCount"` + + // A list of backend sets that are currently in the `UNKNOWN` health state. The list identifies each backend set by the + // friendly name you assigned when you created it. + // Example: `Backend_set2` + UnknownStateBackendSetNames []string `mandatory:"true" json:"unknownStateBackendSetNames"` + + // A list of backend sets that are currently in the `WARNING` health state. The list identifies each backend set by the + // friendly name you assigned when you created it. + // Example: `Backend_set3` + WarningStateBackendSetNames []string `mandatory:"true" json:"warningStateBackendSetNames"` +} + +func (m LoadBalancerHealth) String() string { + return common.PointerString(m) +} + +// LoadBalancerHealthStatusEnum Enum with underlying type: string +type LoadBalancerHealthStatusEnum string + +// Set of constants representing the allowable values for LoadBalancerHealthStatus +const ( + LoadBalancerHealthStatusOk LoadBalancerHealthStatusEnum = "OK" + LoadBalancerHealthStatusWarning LoadBalancerHealthStatusEnum = "WARNING" + LoadBalancerHealthStatusCritical LoadBalancerHealthStatusEnum = "CRITICAL" + LoadBalancerHealthStatusUnknown LoadBalancerHealthStatusEnum = "UNKNOWN" +) + +var mappingLoadBalancerHealthStatus = map[string]LoadBalancerHealthStatusEnum{ + "OK": LoadBalancerHealthStatusOk, + "WARNING": LoadBalancerHealthStatusWarning, + "CRITICAL": LoadBalancerHealthStatusCritical, + "UNKNOWN": LoadBalancerHealthStatusUnknown, +} + +// GetLoadBalancerHealthStatusEnumValues Enumerates the set of values for LoadBalancerHealthStatus +func GetLoadBalancerHealthStatusEnumValues() []LoadBalancerHealthStatusEnum { + values := make([]LoadBalancerHealthStatusEnum, 0) + for _, v := range mappingLoadBalancerHealthStatus { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_health_summary.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_health_summary.go new file mode 100644 index 000000000..0ff51e894 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_health_summary.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// LoadBalancerHealthSummary A health status summary for the specified load balancer. +type LoadBalancerHealthSummary struct { + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer the health status is associated with. + LoadBalancerId *string `mandatory:"true" json:"loadBalancerId"` + + // The overall health status of the load balancer. + // * **OK:** All backend sets associated with the load balancer return a status of `OK`. + // * **WARNING:** At least one of the backend sets associated with the load balancer returns a status of `WARNING`, + // no backend sets return a status of `CRITICAL`, and the load balancer life cycle state is `ACTIVE`. + // * **CRITICAL:** One or more of the backend sets associated with the load balancer return a status of `CRITICAL`. + // * **UNKNOWN:** If any one of the following conditions is true: + // * The load balancer life cycle state is not `ACTIVE`. + // * No backend sets are defined for the load balancer. + // * More than half of the backend sets associated with the load balancer return a status of `UNKNOWN`, none of the backend + // sets return a status of `WARNING` or `CRITICAL`, and the load balancer life cycle state is `ACTIVE`. + // * The system could not retrieve metrics for any reason. + Status LoadBalancerHealthSummaryStatusEnum `mandatory:"true" json:"status"` +} + +func (m LoadBalancerHealthSummary) String() string { + return common.PointerString(m) +} + +// LoadBalancerHealthSummaryStatusEnum Enum with underlying type: string +type LoadBalancerHealthSummaryStatusEnum string + +// Set of constants representing the allowable values for LoadBalancerHealthSummaryStatus +const ( + LoadBalancerHealthSummaryStatusOk LoadBalancerHealthSummaryStatusEnum = "OK" + LoadBalancerHealthSummaryStatusWarning LoadBalancerHealthSummaryStatusEnum = "WARNING" + LoadBalancerHealthSummaryStatusCritical LoadBalancerHealthSummaryStatusEnum = "CRITICAL" + LoadBalancerHealthSummaryStatusUnknown LoadBalancerHealthSummaryStatusEnum = "UNKNOWN" +) + +var mappingLoadBalancerHealthSummaryStatus = map[string]LoadBalancerHealthSummaryStatusEnum{ + "OK": LoadBalancerHealthSummaryStatusOk, + "WARNING": LoadBalancerHealthSummaryStatusWarning, + "CRITICAL": LoadBalancerHealthSummaryStatusCritical, + "UNKNOWN": LoadBalancerHealthSummaryStatusUnknown, +} + +// GetLoadBalancerHealthSummaryStatusEnumValues Enumerates the set of values for LoadBalancerHealthSummaryStatus +func GetLoadBalancerHealthSummaryStatusEnumValues() []LoadBalancerHealthSummaryStatusEnum { + values := make([]LoadBalancerHealthSummaryStatusEnum, 0) + for _, v := range mappingLoadBalancerHealthSummaryStatus { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_policy.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_policy.go new file mode 100644 index 000000000..610a970b8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_policy.go @@ -0,0 +1,26 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// LoadBalancerPolicy A policy that determines how traffic is distributed among backend servers. +// For more information on load balancing policies, see +// How Load Balancing Policies Work (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Reference/lbpolicies.htm). +type LoadBalancerPolicy struct { + + // The name of the load balancing policy. + Name *string `mandatory:"true" json:"name"` +} + +func (m LoadBalancerPolicy) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_protocol.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_protocol.go new file mode 100644 index 000000000..91be70bb7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_protocol.go @@ -0,0 +1,24 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// LoadBalancerProtocol The protocol that defines the type of traffic accepted by a listener. +type LoadBalancerProtocol struct { + + // The name of the protocol. + Name *string `mandatory:"true" json:"name"` +} + +func (m LoadBalancerProtocol) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_shape.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_shape.go new file mode 100644 index 000000000..de82ebb47 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/load_balancer_shape.go @@ -0,0 +1,27 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// LoadBalancerShape A shape is a template that determines the total pre-provisioned bandwidth (ingress plus egress) for the +// load balancer. +// Note that the pre-provisioned maximum capacity applies to aggregated connections, not to a single client +// attempting to use the full bandwidth. +type LoadBalancerShape struct { + + // The name of the shape. + Name *string `mandatory:"true" json:"name"` +} + +func (m LoadBalancerShape) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/loadbalancer_client.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/loadbalancer_client.go new file mode 100644 index 000000000..cb408565e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/loadbalancer_client.go @@ -0,0 +1,656 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +//LoadBalancerClient a client for LoadBalancer +type LoadBalancerClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewLoadBalancerClientWithConfigurationProvider Creates a new default LoadBalancer client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewLoadBalancerClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client LoadBalancerClient, err error) { + baseClient, err := common.NewClientWithConfig(configProvider) + if err != nil { + return + } + + client = LoadBalancerClient{BaseClient: baseClient} + client.BasePath = "20170115" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *LoadBalancerClient) SetRegion(region string) { + client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "iaas", region) +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *LoadBalancerClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { + if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { + return err + } + + // Error has been checked already + region, _ := configProvider.Region() + client.config = &configProvider + client.SetRegion(region) + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *LoadBalancerClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// CreateBackend Adds a backend server to a backend set. +func (client LoadBalancerClient) CreateBackend(ctx context.Context, request CreateBackendRequest) (response CreateBackendResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateBackendSet Adds a backend set to a load balancer. +func (client LoadBalancerClient) CreateBackendSet(ctx context.Context, request CreateBackendSetRequest) (response CreateBackendSetResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/loadBalancers/{loadBalancerId}/backendSets", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateCertificate Creates an asynchronous request to add an SSL certificate. +func (client LoadBalancerClient) CreateCertificate(ctx context.Context, request CreateCertificateRequest) (response CreateCertificateResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/loadBalancers/{loadBalancerId}/certificates", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateListener Adds a listener to a load balancer. +func (client LoadBalancerClient) CreateListener(ctx context.Context, request CreateListenerRequest) (response CreateListenerResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/loadBalancers/{loadBalancerId}/listeners", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateLoadBalancer Creates a new load balancer in the specified compartment. For general information about load balancers, +// see Overview of the Load Balancing Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Concepts/balanceoverview.htm). +// For the purposes of access control, you must provide the OCID of the compartment where you want +// the load balancer to reside. Notice that the load balancer doesn't have to be in the same compartment as the VCN +// or backend set. If you're not sure which compartment to use, put the load balancer in the same compartment as the VCN. +// For information about access control and compartments, see +// Overview of the IAM Service (https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). +// You must specify a display name for the load balancer. It does not have to be unique, and you can change it. +// For information about Availability Domains, see +// Regions and Availability Domains (https://docs.us-phoenix-1.oraclecloud.com/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 load balancers, 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. Fore more information, see +// Resource Identifiers (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). +// After you send your request, the new object's state will temporarily be PROVISIONING. Before using the +// object, first make sure its state has changed to RUNNING. +// When you create a load balancer, the system assigns an IP address. +// To get the IP address, use the GetLoadBalancer operation. +func (client LoadBalancerClient) CreateLoadBalancer(ctx context.Context, request CreateLoadBalancerRequest) (response CreateLoadBalancerResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/loadBalancers", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteBackend Removes a backend server from a given load balancer and backend set. +func (client LoadBalancerClient) DeleteBackend(ctx context.Context, request DeleteBackendRequest) (response DeleteBackendResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteBackendSet Deletes the specified backend set. Note that deleting a backend set removes its backend servers from the load balancer. +// Before you can delete a backend set, you must remove it from any active listeners. +func (client LoadBalancerClient) DeleteBackendSet(ctx context.Context, request DeleteBackendSetRequest) (response DeleteBackendSetResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteCertificate Deletes an SSL certificate from a load balancer. +func (client LoadBalancerClient) DeleteCertificate(ctx context.Context, request DeleteCertificateRequest) (response DeleteCertificateResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/loadBalancers/{loadBalancerId}/certificates/{certificateName}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteListener Deletes a listener from a load balancer. +func (client LoadBalancerClient) DeleteListener(ctx context.Context, request DeleteListenerRequest) (response DeleteListenerResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/loadBalancers/{loadBalancerId}/listeners/{listenerName}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteLoadBalancer Stops a load balancer and removes it from service. +func (client LoadBalancerClient) DeleteLoadBalancer(ctx context.Context, request DeleteLoadBalancerRequest) (response DeleteLoadBalancerResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/loadBalancers/{loadBalancerId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetBackend Gets the specified backend server's configuration information. +func (client LoadBalancerClient) GetBackend(ctx context.Context, request GetBackendRequest) (response GetBackendResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetBackendHealth Gets the current health status of the specified backend server. +func (client LoadBalancerClient) GetBackendHealth(ctx context.Context, request GetBackendHealthRequest) (response GetBackendHealthResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}/health", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetBackendSet Gets the specified backend set's configuration information. +func (client LoadBalancerClient) GetBackendSet(ctx context.Context, request GetBackendSetRequest) (response GetBackendSetResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetBackendSetHealth Gets the health status for the specified backend set. +func (client LoadBalancerClient) GetBackendSetHealth(ctx context.Context, request GetBackendSetHealthRequest) (response GetBackendSetHealthResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/health", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetHealthChecker Gets the health check policy information for a given load balancer and backend set. +func (client LoadBalancerClient) GetHealthChecker(ctx context.Context, request GetHealthCheckerRequest) (response GetHealthCheckerResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/healthChecker", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetLoadBalancer Gets the specified load balancer's configuration information. +func (client LoadBalancerClient) GetLoadBalancer(ctx context.Context, request GetLoadBalancerRequest) (response GetLoadBalancerResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancers/{loadBalancerId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetLoadBalancerHealth Gets the health status for the specified load balancer. +func (client LoadBalancerClient) GetLoadBalancerHealth(ctx context.Context, request GetLoadBalancerHealthRequest) (response GetLoadBalancerHealthResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancers/{loadBalancerId}/health", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetWorkRequest Gets the details of a work request. +func (client LoadBalancerClient) GetWorkRequest(ctx context.Context, request GetWorkRequestRequest) (response GetWorkRequestResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancerWorkRequests/{workRequestId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListBackendSets Lists all backend sets associated with a given load balancer. +func (client LoadBalancerClient) ListBackendSets(ctx context.Context, request ListBackendSetsRequest) (response ListBackendSetsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListBackends Lists the backend servers for a given load balancer and backend set. +func (client LoadBalancerClient) ListBackends(ctx context.Context, request ListBackendsRequest) (response ListBackendsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListCertificates Lists all SSL certificates associated with a given load balancer. +func (client LoadBalancerClient) ListCertificates(ctx context.Context, request ListCertificatesRequest) (response ListCertificatesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancers/{loadBalancerId}/certificates", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListLoadBalancerHealths Lists the summary health statuses for all load balancers in the specified compartment. +func (client LoadBalancerClient) ListLoadBalancerHealths(ctx context.Context, request ListLoadBalancerHealthsRequest) (response ListLoadBalancerHealthsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancerHealths", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListLoadBalancers Lists all load balancers in the specified compartment. +func (client LoadBalancerClient) ListLoadBalancers(ctx context.Context, request ListLoadBalancersRequest) (response ListLoadBalancersResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancers", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListPolicies Lists the available load balancer policies. +func (client LoadBalancerClient) ListPolicies(ctx context.Context, request ListPoliciesRequest) (response ListPoliciesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancerPolicies", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListProtocols Lists all supported traffic protocols. +func (client LoadBalancerClient) ListProtocols(ctx context.Context, request ListProtocolsRequest) (response ListProtocolsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancerProtocols", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListShapes Lists the valid load balancer shapes. +func (client LoadBalancerClient) ListShapes(ctx context.Context, request ListShapesRequest) (response ListShapesResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancerShapes", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListWorkRequests Lists the work requests for a given load balancer. +func (client LoadBalancerClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/loadBalancers/{loadBalancerId}/workRequests", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateBackend Updates the configuration of a backend server within the specified backend set. +func (client LoadBalancerClient) UpdateBackend(ctx context.Context, request UpdateBackendRequest) (response UpdateBackendResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateBackendSet Updates a backend set. +func (client LoadBalancerClient) UpdateBackendSet(ctx context.Context, request UpdateBackendSetRequest) (response UpdateBackendSetResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateHealthChecker Updates the health check policy for a given load balancer and backend set. +func (client LoadBalancerClient) UpdateHealthChecker(ctx context.Context, request UpdateHealthCheckerRequest) (response UpdateHealthCheckerResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/healthChecker", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateListener Updates a listener for a given load balancer. +func (client LoadBalancerClient) UpdateListener(ctx context.Context, request UpdateListenerRequest) (response UpdateListenerResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/loadBalancers/{loadBalancerId}/listeners/{listenerName}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateLoadBalancer Updates a load balancer's configuration. +func (client LoadBalancerClient) UpdateLoadBalancer(ctx context.Context, request UpdateLoadBalancerRequest) (response UpdateLoadBalancerResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/loadBalancers/{loadBalancerId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/session_persistence_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/session_persistence_configuration_details.go new file mode 100644 index 000000000..a83e81d99 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/session_persistence_configuration_details.go @@ -0,0 +1,37 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// SessionPersistenceConfigurationDetails The configuration details for implementing session persistence. Session persistence enables the Load Balancing +// Service to direct any number of requests that originate from a single logical client to a single backend web server. +// For more information, see Session Persistence (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Reference/sessionpersistence.htm). +// To disable session persistence on a running load balancer, use the +// UpdateBackendSet operation and specify "null" for the +// `SessionPersistenceConfigurationDetails` object. +// Example: `SessionPersistenceConfigurationDetails: null` +type SessionPersistenceConfigurationDetails struct { + + // The name of the cookie used to detect a session initiated by the backend server. Use '*' to specify + // that any cookie set by the backend causes the session to persist. + // Example: `myCookieName` + CookieName *string `mandatory:"true" json:"cookieName"` + + // Whether the load balancer is prevented from directing traffic from a persistent session client to + // a different backend server if the original server is unavailable. Defaults to false. + // Example: `true` + DisableFallback *bool `mandatory:"false" json:"disableFallback"` +} + +func (m SessionPersistenceConfigurationDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ssl_configuration.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ssl_configuration.go new file mode 100644 index 000000000..5f9c102dc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ssl_configuration.go @@ -0,0 +1,36 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// SslConfiguration A listener's SSL handling configuration. +// To use SSL, a listener must be associated with a Certificate. +type SslConfiguration struct { + + // A friendly name for the certificate bundle. It must be unique and it cannot be changed. + // Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. + // Certificate bundle names cannot contain spaces. Avoid entering confidential information. + // Example: `My_certificate_bundle` + CertificateName *string `mandatory:"true" json:"certificateName"` + + // The maximum depth for peer certificate chain verification. + // Example: `3` + VerifyDepth *int `mandatory:"true" json:"verifyDepth"` + + // Whether the load balancer listener should verify peer certificates. + // Example: `true` + VerifyPeerCertificate *bool `mandatory:"true" json:"verifyPeerCertificate"` +} + +func (m SslConfiguration) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ssl_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ssl_configuration_details.go new file mode 100644 index 000000000..7b083fcf7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/ssl_configuration_details.go @@ -0,0 +1,35 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// SslConfigurationDetails The load balancer's SSL handling configuration details. +type SslConfigurationDetails struct { + + // A friendly name for the certificate bundle. It must be unique and it cannot be changed. + // Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. + // Certificate bundle names cannot contain spaces. Avoid entering confidential information. + // Example: `My_certificate_bundle` + CertificateName *string `mandatory:"true" json:"certificateName"` + + // The maximum depth for peer certificate chain verification. + // Example: `3` + VerifyDepth *int `mandatory:"false" json:"verifyDepth"` + + // Whether the load balancer listener should verify peer certificates. + // Example: `true` + VerifyPeerCertificate *bool `mandatory:"false" json:"verifyPeerCertificate"` +} + +func (m SslConfigurationDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_details.go new file mode 100644 index 000000000..56efca6d9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_details.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateBackendDetails The configuration details for updating a backend server. +type UpdateBackendDetails struct { + + // Whether the load balancer should treat this server as a backup unit. If `true`, the load balancer forwards no ingress + // traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy. + // Example: `true` + Backup *bool `mandatory:"true" json:"backup"` + + // Whether the load balancer should drain this server. Servers marked "drain" receive no new + // incoming traffic. + // Example: `true` + Drain *bool `mandatory:"true" json:"drain"` + + // Whether the load balancer should treat this server as offline. Offline servers receive no incoming + // traffic. + // Example: `true` + Offline *bool `mandatory:"true" json:"offline"` + + // The load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger + // proportion of incoming traffic. For example, a server weighted '3' receives 3 times the number of new connections + // as a server weighted '1'. + // For more information on load balancing policies, see + // How Load Balancing Policies Work (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Reference/lbpolicies.htm). + // Example: `3` + Weight *int `mandatory:"true" json:"weight"` +} + +func (m UpdateBackendDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_request_response.go new file mode 100644 index 000000000..0d9915a19 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_request_response.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateBackendRequest wrapper for the UpdateBackend operation +type UpdateBackendRequest struct { + + // Details for updating a backend server. + UpdateBackendDetails `contributesTo:"body"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set and server. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The name of the backend set associated with the backend server. + // Example: `My_backend_set` + BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` + + // The IP address and port of the backend server to update. + // Example: `1.1.1.7:42` + BackendName *string `mandatory:"true" contributesTo:"path" name:"backendName"` + + // The unique Oracle-assigned identifier for the request. If 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 (e.g., 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"` +} + +func (request UpdateBackendRequest) String() string { + return common.PointerString(request) +} + +// UpdateBackendResponse wrapper for the UpdateBackend operation +type UpdateBackendResponse 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response UpdateBackendResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_set_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_set_details.go new file mode 100644 index 000000000..4da009e97 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_set_details.go @@ -0,0 +1,35 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateBackendSetDetails The configuration details for updating a load balancer backend set. +// For more information on backend set configuration, see +// Managing Backend Sets (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/tasks/managingbackendsets.htm). +type UpdateBackendSetDetails struct { + Backends []BackendDetails `mandatory:"true" json:"backends"` + + HealthChecker *HealthCheckerDetails `mandatory:"true" json:"healthChecker"` + + // The load balancer policy for the backend set. To get a list of available policies, use the + // ListPolicies operation. + // Example: `LEAST_CONNECTIONS` + Policy *string `mandatory:"true" json:"policy"` + + SessionPersistenceConfiguration *SessionPersistenceConfigurationDetails `mandatory:"false" json:"sessionPersistenceConfiguration"` + + SslConfiguration *SslConfigurationDetails `mandatory:"false" json:"sslConfiguration"` +} + +func (m UpdateBackendSetDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_set_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_set_request_response.go new file mode 100644 index 000000000..e099e1db4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_backend_set_request_response.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateBackendSetRequest wrapper for the UpdateBackendSet operation +type UpdateBackendSetRequest struct { + + // The details to update a backend set. + UpdateBackendSetDetails `contributesTo:"body"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The name of the backend set to update. + // Example: `My_backend_set` + BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` + + // The unique Oracle-assigned identifier for the request. If 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 (e.g., 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"` +} + +func (request UpdateBackendSetRequest) String() string { + return common.PointerString(request) +} + +// UpdateBackendSetResponse wrapper for the UpdateBackendSet operation +type UpdateBackendSetResponse 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response UpdateBackendSetResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_health_checker_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_health_checker_details.go new file mode 100644 index 000000000..5e2e8cda8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_health_checker_details.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateHealthCheckerDetails The health checker's configuration details. +type UpdateHealthCheckerDetails struct { + + // The interval between health checks, in milliseconds. + // Example: `30000` + IntervalInMillis *int `mandatory:"true" json:"intervalInMillis"` + + // The backend server port against which to run the health check. + // Example: `8080` + Port *int `mandatory:"true" json:"port"` + + // The protocol the health check must use; either HTTP or TCP. + // Example: `HTTP` + Protocol *string `mandatory:"true" json:"protocol"` + + // A regular expression for parsing the response body from the backend server. + // Example: `^(500|40[1348])$` + ResponseBodyRegex *string `mandatory:"true" json:"responseBodyRegex"` + + // The number of retries to attempt before a backend server is considered "unhealthy". + // Example: `3` + Retries *int `mandatory:"true" json:"retries"` + + // The status code a healthy backend server should return. + // Example: `200` + ReturnCode *int `mandatory:"true" json:"returnCode"` + + // The maximum time, in milliseconds, to wait for a reply to a health check. A health check is successful only if a reply + // returns within this timeout period. + // Example: `6000` + TimeoutInMillis *int `mandatory:"true" json:"timeoutInMillis"` + + // The path against which to run the health check. + // Example: `/healthcheck` + UrlPath *string `mandatory:"false" json:"urlPath"` +} + +func (m UpdateHealthCheckerDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_health_checker_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_health_checker_request_response.go new file mode 100644 index 000000000..54ddccbbe --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_health_checker_request_response.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateHealthCheckerRequest wrapper for the UpdateHealthChecker operation +type UpdateHealthCheckerRequest struct { + + // The health check policy configuration details. + UpdateHealthCheckerDetails `contributesTo:"body"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the health check policy to be updated. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The name of the backend set associated with the health check policy to be retrieved. + // Example: `My_backend_set` + BackendSetName *string `mandatory:"true" contributesTo:"path" name:"backendSetName"` + + // The unique Oracle-assigned identifier for the request. If 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 (e.g., 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"` +} + +func (request UpdateHealthCheckerRequest) String() string { + return common.PointerString(request) +} + +// UpdateHealthCheckerResponse wrapper for the UpdateHealthChecker operation +type UpdateHealthCheckerResponse 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response UpdateHealthCheckerResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_listener_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_listener_details.go new file mode 100644 index 000000000..c935eac54 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_listener_details.go @@ -0,0 +1,36 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateListenerDetails The configuration details for updating a listener. +type UpdateListenerDetails struct { + + // The name of the associated backend set. + DefaultBackendSetName *string `mandatory:"true" json:"defaultBackendSetName"` + + // The communication port for the listener. + // Example: `80` + Port *int `mandatory:"true" json:"port"` + + // The protocol on which the listener accepts connection requests. + // To get a list of valid protocols, use the ListProtocols + // operation. + // Example: `HTTP` + Protocol *string `mandatory:"true" json:"protocol"` + + SslConfiguration *SslConfigurationDetails `mandatory:"false" json:"sslConfiguration"` +} + +func (m UpdateListenerDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_listener_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_listener_request_response.go new file mode 100644 index 000000000..b07a7a250 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_listener_request_response.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateListenerRequest wrapper for the UpdateListener operation +type UpdateListenerRequest struct { + + // Details to update a listener. + UpdateListenerDetails `contributesTo:"body"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the listener to update. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The name of the listener to update. + // Example: `My listener` + ListenerName *string `mandatory:"true" contributesTo:"path" name:"listenerName"` + + // The unique Oracle-assigned identifier for the request. If 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 (e.g., 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"` +} + +func (request UpdateListenerRequest) String() string { + return common.PointerString(request) +} + +// UpdateListenerResponse wrapper for the UpdateListener operation +type UpdateListenerResponse 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response UpdateListenerResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_load_balancer_details.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_load_balancer_details.go new file mode 100644 index 000000000..8a66761f4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_load_balancer_details.go @@ -0,0 +1,26 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateLoadBalancerDetails Configuration details to update a load balancer. +type UpdateLoadBalancerDetails struct { + + // The user-friendly display name for the load balancer. It does not have to be unique, and it is changeable. + // Avoid entering confidential information. + // Example: `My load balancer` + DisplayName *string `mandatory:"true" json:"displayName"` +} + +func (m UpdateLoadBalancerDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_load_balancer_request_response.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_load_balancer_request_response.go new file mode 100644 index 000000000..15101ba1c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/update_load_balancer_request_response.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateLoadBalancerRequest wrapper for the UpdateLoadBalancer operation +type UpdateLoadBalancerRequest struct { + + // The details for updating a load balancer's configuration. + UpdateLoadBalancerDetails `contributesTo:"body"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer to update. + LoadBalancerId *string `mandatory:"true" contributesTo:"path" name:"loadBalancerId"` + + // The unique Oracle-assigned identifier for the request. If 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 (e.g., 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"` +} + +func (request UpdateLoadBalancerRequest) String() string { + return common.PointerString(request) +} + +// UpdateLoadBalancerResponse wrapper for the UpdateLoadBalancer operation +type UpdateLoadBalancerResponse 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response UpdateLoadBalancerResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/work_request.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/work_request.go new file mode 100644 index 000000000..0a8a007f4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/work_request.go @@ -0,0 +1,82 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// WorkRequest Many of the API requests you use to create and configure load balancing do not take effect immediately. +// In these cases, the request spawns an asynchronous work flow to fulfill the request. WorkRequest objects provide visibility +// for in-progress work flows. +// For more information about work requests, see Viewing the State of a Work Request (https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/viewingworkrequest.htm). +type WorkRequest struct { + ErrorDetails []WorkRequestError `mandatory:"true" json:"errorDetails"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. + Id *string `mandatory:"true" json:"id"` + + // The current state of the work request. + LifecycleState WorkRequestLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer with which the work request + // is associated. + LoadBalancerId *string `mandatory:"true" json:"loadBalancerId"` + + // A collection of data, related to the load balancer provisioning process, that helps with debugging in the event of failure. + // Possible data elements include: + // - workflow name + // - event ID + // - work request ID + // - load balancer ID + // - workflow completion message + Message *string `mandatory:"true" json:"message"` + + // The date and time the work request was created, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeAccepted *common.SDKTime `mandatory:"true" json:"timeAccepted"` + + // The type of action the work request represents. + Type *string `mandatory:"true" json:"type"` + + // The date and time the work request was completed, in the format defined by RFC3339. + // Example: `2016-08-25T21:10:29.600Z` + TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` +} + +func (m WorkRequest) String() string { + return common.PointerString(m) +} + +// WorkRequestLifecycleStateEnum Enum with underlying type: string +type WorkRequestLifecycleStateEnum string + +// Set of constants representing the allowable values for WorkRequestLifecycleState +const ( + WorkRequestLifecycleStateAccepted WorkRequestLifecycleStateEnum = "ACCEPTED" + WorkRequestLifecycleStateInProgress WorkRequestLifecycleStateEnum = "IN_PROGRESS" + WorkRequestLifecycleStateFailed WorkRequestLifecycleStateEnum = "FAILED" + WorkRequestLifecycleStateSucceeded WorkRequestLifecycleStateEnum = "SUCCEEDED" +) + +var mappingWorkRequestLifecycleState = map[string]WorkRequestLifecycleStateEnum{ + "ACCEPTED": WorkRequestLifecycleStateAccepted, + "IN_PROGRESS": WorkRequestLifecycleStateInProgress, + "FAILED": WorkRequestLifecycleStateFailed, + "SUCCEEDED": WorkRequestLifecycleStateSucceeded, +} + +// GetWorkRequestLifecycleStateEnumValues Enumerates the set of values for WorkRequestLifecycleState +func GetWorkRequestLifecycleStateEnumValues() []WorkRequestLifecycleStateEnum { + values := make([]WorkRequestLifecycleStateEnum, 0) + for _, v := range mappingWorkRequestLifecycleState { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/loadbalancer/work_request_error.go b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/work_request_error.go new file mode 100644 index 000000000..6b755f4b1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/loadbalancer/work_request_error.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Load Balancing Service API +// +// API for the Load Balancing Service +// + +package loadbalancer + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// WorkRequestError An object returned in the event of a work request error. +type WorkRequestError struct { + ErrorCode WorkRequestErrorErrorCodeEnum `mandatory:"true" json:"errorCode"` + + // A human-readable error string. + Message *string `mandatory:"true" json:"message"` +} + +func (m WorkRequestError) String() string { + return common.PointerString(m) +} + +// WorkRequestErrorErrorCodeEnum Enum with underlying type: string +type WorkRequestErrorErrorCodeEnum string + +// Set of constants representing the allowable values for WorkRequestErrorErrorCode +const ( + WorkRequestErrorErrorCodeBadInput WorkRequestErrorErrorCodeEnum = "BAD_INPUT" + WorkRequestErrorErrorCodeInternalError WorkRequestErrorErrorCodeEnum = "INTERNAL_ERROR" +) + +var mappingWorkRequestErrorErrorCode = map[string]WorkRequestErrorErrorCodeEnum{ + "BAD_INPUT": WorkRequestErrorErrorCodeBadInput, + "INTERNAL_ERROR": WorkRequestErrorErrorCodeInternalError, +} + +// GetWorkRequestErrorErrorCodeEnumValues Enumerates the set of values for WorkRequestErrorErrorCode +func GetWorkRequestErrorErrorCodeEnumValues() []WorkRequestErrorErrorCodeEnum { + values := make([]WorkRequestErrorErrorCodeEnum, 0) + for _, v := range mappingWorkRequestErrorErrorCode { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/abort_multipart_upload_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/abort_multipart_upload_request_response.go new file mode 100644 index 000000000..8858e1066 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/abort_multipart_upload_request_response.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// AbortMultipartUploadRequest wrapper for the AbortMultipartUpload operation +type AbortMultipartUploadRequest struct { + + // The top-level namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The name of the object. + // 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"` +} + +func (request AbortMultipartUploadRequest) String() string { + return common.PointerString(request) +} + +// 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, please provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response AbortMultipartUploadResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/bucket.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/bucket.go new file mode 100644 index 000000000..81462ba1a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/bucket.go @@ -0,0 +1,73 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// APIs for managing buckets and objects. +// + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// Bucket 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type Bucket struct { + + // The namespace in which the bucket lives. + Namespace *string `mandatory:"true" json:"namespace"` + + // The name of the bucket. + 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 of the user who created the bucket. + CreatedBy *string `mandatory:"true" json:"createdBy"` + + // The date and time at which the bucket was created. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The entity tag for the bucket. + Etag *string `mandatory:"true" json:"etag"` + + // The type of public access available on this bucket. Allows authenticated caller to access the bucket or + // contents of this bucket. By default a bucket is set to NoPublicAccess. It is treated as NoPublicAccess + // when this value is not specified. When the type is NoPublicAccess the bucket does not allow any public access. + // When the type is ObjectRead the bucket allows public access to the GetObject, HeadObject, ListObjects. + PublicAccessType BucketPublicAccessTypeEnum `mandatory:"false" json:"publicAccessType,omitempty"` +} + +func (m Bucket) String() string { + return common.PointerString(m) +} + +// BucketPublicAccessTypeEnum Enum with underlying type: string +type BucketPublicAccessTypeEnum string + +// Set of constants representing the allowable values for BucketPublicAccessType +const ( + BucketPublicAccessTypeNopublicaccess BucketPublicAccessTypeEnum = "NoPublicAccess" + BucketPublicAccessTypeObjectread BucketPublicAccessTypeEnum = "ObjectRead" +) + +var mappingBucketPublicAccessType = map[string]BucketPublicAccessTypeEnum{ + "NoPublicAccess": BucketPublicAccessTypeNopublicaccess, + "ObjectRead": BucketPublicAccessTypeObjectread, +} + +// GetBucketPublicAccessTypeEnumValues Enumerates the set of values for BucketPublicAccessType +func GetBucketPublicAccessTypeEnumValues() []BucketPublicAccessTypeEnum { + values := make([]BucketPublicAccessTypeEnum, 0) + for _, v := range mappingBucketPublicAccessType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/bucket_summary.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/bucket_summary.go new file mode 100644 index 000000000..028177a52 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/bucket_summary.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// APIs for managing buckets and objects. +// + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// BucketSummary 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type BucketSummary struct { + + // The namespace in which the bucket lives. + Namespace *string `mandatory:"true" json:"namespace"` + + // The name of the bucket. + Name *string `mandatory:"true" json:"name"` + + // The compartment ID in which the bucket is authorized. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the user who created the bucket. + CreatedBy *string `mandatory:"true" json:"createdBy"` + + // The date and time at which the bucket was created. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The entity tag for the bucket. + Etag *string `mandatory:"true" json:"etag"` +} + +func (m BucketSummary) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_details.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_details.go new file mode 100644 index 000000000..c285f7383 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_details.go @@ -0,0 +1,30 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// APIs for managing buckets and objects. +// + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CommitMultipartUploadDetails 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type CommitMultipartUploadDetails struct { + + // The part numbers and 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_part_details.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_part_details.go new file mode 100644 index 000000000..a4d053b37 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_part_details.go @@ -0,0 +1,29 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// APIs for managing buckets and objects. +// + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CommitMultipartUploadPartDetails 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type CommitMultipartUploadPartDetails struct { + + // The part number for this part. + PartNum *int `mandatory:"true" json:"partNum"` + + // The ETag returned when this part was uploaded. + Etag *string `mandatory:"true" json:"etag"` +} + +func (m CommitMultipartUploadPartDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_request_response.go new file mode 100644 index 000000000..101834254 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/commit_multipart_upload_request_response.go @@ -0,0 +1,76 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CommitMultipartUploadRequest wrapper for the CommitMultipartUpload operation +type CommitMultipartUploadRequest struct { + + // The top-level namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The name of the object. + // 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 ETags for the parts you want to commit. + CommitMultipartUploadDetails `contributesTo:"body"` + + // The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. + // For uploading a part, this is the entity tag of the target part. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The entity tag to avoid matching. The only valid value is ‘*’, which indicates that the request should fail if the object already exists. + // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag + // of the target part. + 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"` +} + +func (request CommitMultipartUploadRequest) String() string { + return common.PointerString(request) +} + +// 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, please provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // Base-64 representation of the multipart object 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. + OpcMultipartMd5 *string `presentIn:"header" name:"opc-multipart-md5"` + + // The entity tag 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/rfc/rfc2616), section 14.29. + LastModified *common.SDKTime `presentIn:"header" name:"last-modified"` +} + +func (response CommitMultipartUploadResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_bucket_details.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_bucket_details.go new file mode 100644 index 000000000..b6be2982c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_bucket_details.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// APIs for managing buckets and objects. +// + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateBucketDetails 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type CreateBucketDetails struct { + + // The name of the bucket. Valid characters are uppercase or lowercase letters, + // numbers, and dashes. Bucket names must be unique within the namespace. + 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 available on this bucket. Allows authenticated caller to access the bucket or + // contents of this bucket. By default a bucket is set to NoPublicAccess. It is treated as NoPublicAccess + // when this value is not specified. When the type is NoPublicAccess the bucket does not allow any public access. + // When the type is ObjectRead the bucket allows public access to the GetObject, HeadObject, ListObjects. + PublicAccessType CreateBucketDetailsPublicAccessTypeEnum `mandatory:"false" json:"publicAccessType,omitempty"` +} + +func (m CreateBucketDetails) String() string { + return common.PointerString(m) +} + +// CreateBucketDetailsPublicAccessTypeEnum Enum with underlying type: string +type CreateBucketDetailsPublicAccessTypeEnum string + +// Set of constants representing the allowable values for CreateBucketDetailsPublicAccessType +const ( + CreateBucketDetailsPublicAccessTypeNopublicaccess CreateBucketDetailsPublicAccessTypeEnum = "NoPublicAccess" + CreateBucketDetailsPublicAccessTypeObjectread CreateBucketDetailsPublicAccessTypeEnum = "ObjectRead" +) + +var mappingCreateBucketDetailsPublicAccessType = map[string]CreateBucketDetailsPublicAccessTypeEnum{ + "NoPublicAccess": CreateBucketDetailsPublicAccessTypeNopublicaccess, + "ObjectRead": CreateBucketDetailsPublicAccessTypeObjectread, +} + +// GetCreateBucketDetailsPublicAccessTypeEnumValues Enumerates the set of values for CreateBucketDetailsPublicAccessType +func GetCreateBucketDetailsPublicAccessTypeEnumValues() []CreateBucketDetailsPublicAccessTypeEnum { + values := make([]CreateBucketDetailsPublicAccessTypeEnum, 0) + for _, v := range mappingCreateBucketDetailsPublicAccessType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_bucket_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_bucket_request_response.go new file mode 100644 index 000000000..00a7aa13c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_bucket_request_response.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateBucketRequest wrapper for the CreateBucket operation +type CreateBucketRequest struct { + + // The top-level 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"` +} + +func (request CreateBucketRequest) String() string { + return common.PointerString(request) +} + +// 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, please provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The entity tag 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_multipart_upload_details.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_multipart_upload_details.go new file mode 100644 index 000000000..f21262d54 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_multipart_upload_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// APIs for managing buckets and objects. +// + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreateMultipartUploadDetails 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type CreateMultipartUploadDetails struct { + + // the name of the object to which this multi-part upload is targetted. + Object *string `mandatory:"true" json:"object"` + + // the content type of the object to upload. + ContentType *string `mandatory:"false" json:"contentType"` + + // the content language of the object to upload. + ContentLanguage *string `mandatory:"false" json:"contentLanguage"` + + // the content encoding of the object to upload. + ContentEncoding *string `mandatory:"false" json:"contentEncoding"` + + // Arbitrary string keys and values for the user-defined metadata for the object. + // Keys must be in "opc-meta-*" format. + Metadata map[string]string `mandatory:"false" json:"metadata"` +} + +func (m CreateMultipartUploadDetails) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_multipart_upload_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_multipart_upload_request_response.go new file mode 100644 index 000000000..ca790ade0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_multipart_upload_request_response.go @@ -0,0 +1,63 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreateMultipartUploadRequest wrapper for the CreateMultipartUpload operation +type CreateMultipartUploadRequest struct { + + // The top-level namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // Request object for creating a multi-part upload. + CreateMultipartUploadDetails `contributesTo:"body"` + + // The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. + // For uploading a part, this is the entity tag of the target part. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The entity tag to avoid matching. The only valid value is ‘*’, which indicates that the request should fail if the object already exists. + // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag + // of the target part. + 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"` +} + +func (request CreateMultipartUploadRequest) String() string { + return common.PointerString(request) +} + +// 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, please 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_preauthenticated_request_details.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_preauthenticated_request_details.go new file mode 100644 index 000000000..498dc6dd4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_preauthenticated_request_details.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// APIs for managing buckets and objects. +// + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// CreatePreauthenticatedRequestDetails The representation of CreatePreauthenticatedRequestDetails +type CreatePreauthenticatedRequestDetails struct { + + // user specified name for pre-authenticated request. Helpful for management purposes. + Name *string `mandatory:"true" json:"name"` + + // the operation that can be performed on this resource e.g PUT or GET. + AccessType CreatePreauthenticatedRequestDetailsAccessTypeEnum `mandatory:"true" json:"accessType"` + + // The expiration date after which the pre-authenticated request will no longer be valid per spec + // RFC 3339 (https://tools.ietf.org/rfc/rfc3339) + TimeExpires *common.SDKTime `mandatory:"true" json:"timeExpires"` + + // Name of object that is being granted access to by the pre-authenticated request. This can be null and that would mean that the pre-authenticated request is granting access to the entire bucket + ObjectName *string `mandatory:"false" json:"objectName"` +} + +func (m CreatePreauthenticatedRequestDetails) String() string { + return common.PointerString(m) +} + +// CreatePreauthenticatedRequestDetailsAccessTypeEnum Enum with underlying type: string +type CreatePreauthenticatedRequestDetailsAccessTypeEnum string + +// Set of constants representing the allowable values for CreatePreauthenticatedRequestDetailsAccessType +const ( + CreatePreauthenticatedRequestDetailsAccessTypeObjectread CreatePreauthenticatedRequestDetailsAccessTypeEnum = "ObjectRead" + CreatePreauthenticatedRequestDetailsAccessTypeObjectwrite CreatePreauthenticatedRequestDetailsAccessTypeEnum = "ObjectWrite" + CreatePreauthenticatedRequestDetailsAccessTypeObjectreadwrite CreatePreauthenticatedRequestDetailsAccessTypeEnum = "ObjectReadWrite" + CreatePreauthenticatedRequestDetailsAccessTypeAnyobjectwrite CreatePreauthenticatedRequestDetailsAccessTypeEnum = "AnyObjectWrite" +) + +var mappingCreatePreauthenticatedRequestDetailsAccessType = map[string]CreatePreauthenticatedRequestDetailsAccessTypeEnum{ + "ObjectRead": CreatePreauthenticatedRequestDetailsAccessTypeObjectread, + "ObjectWrite": CreatePreauthenticatedRequestDetailsAccessTypeObjectwrite, + "ObjectReadWrite": CreatePreauthenticatedRequestDetailsAccessTypeObjectreadwrite, + "AnyObjectWrite": CreatePreauthenticatedRequestDetailsAccessTypeAnyobjectwrite, +} + +// GetCreatePreauthenticatedRequestDetailsAccessTypeEnumValues Enumerates the set of values for CreatePreauthenticatedRequestDetailsAccessType +func GetCreatePreauthenticatedRequestDetailsAccessTypeEnumValues() []CreatePreauthenticatedRequestDetailsAccessTypeEnum { + values := make([]CreatePreauthenticatedRequestDetailsAccessTypeEnum, 0) + for _, v := range mappingCreatePreauthenticatedRequestDetailsAccessType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_preauthenticated_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_preauthenticated_request_request_response.go new file mode 100644 index 000000000..f0580b6d1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/create_preauthenticated_request_request_response.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// CreatePreauthenticatedRequestRequest wrapper for the CreatePreauthenticatedRequest operation +type CreatePreauthenticatedRequestRequest struct { + + // The top-level namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // details for creating the pre-authenticated request. + CreatePreauthenticatedRequestDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` +} + +func (request CreatePreauthenticatedRequestRequest) String() string { + return common.PointerString(request) +} + +// 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, please provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreatePreauthenticatedRequestResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_bucket_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_bucket_request_response.go new file mode 100644 index 000000000..71385a147 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_bucket_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteBucketRequest wrapper for the DeleteBucket operation +type DeleteBucketRequest struct { + + // The top-level namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. + // For uploading a part, this is the entity tag of the target part. + 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"` +} + +func (request DeleteBucketRequest) String() string { + return common.PointerString(request) +} + +// 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, please provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteBucketResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_object_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_object_request_response.go new file mode 100644 index 000000000..ae33f3a61 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_object_request_response.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeleteObjectRequest wrapper for the DeleteObject operation +type DeleteObjectRequest struct { + + // The top-level namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The name of the object. + // Example: `test/object1.log` + ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` + + // The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. + // For uploading a part, this is the entity tag of the target part. + 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"` +} + +func (request DeleteObjectRequest) String() string { + return common.PointerString(request) +} + +// 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, please 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/rfc/rfc2616), section 14.29. + LastModified *common.SDKTime `presentIn:"header" name:"last-modified"` +} + +func (response DeleteObjectResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_preauthenticated_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_preauthenticated_request_request_response.go new file mode 100644 index 000000000..675d24927 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/delete_preauthenticated_request_request_response.go @@ -0,0 +1,49 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// DeletePreauthenticatedRequestRequest wrapper for the DeletePreauthenticatedRequest operation +type DeletePreauthenticatedRequestRequest struct { + + // The top-level namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The unique identifier for the pre-authenticated request (PAR). This can be used to manage the PAR + // such as GET or DELETE the PAR + 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"` +} + +func (request DeletePreauthenticatedRequestRequest) String() string { + return common.PointerString(request) +} + +// 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, please provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeletePreauthenticatedRequestResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_bucket_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_bucket_request_response.go new file mode 100644 index 000000000..4284a4a56 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_bucket_request_response.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetBucketRequest wrapper for the GetBucket operation +type GetBucketRequest struct { + + // The top-level namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. + // For uploading a part, this is the entity tag of the target part. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The entity tag to avoid matching. The only valid value is ‘*’, which indicates that the request should fail if the object already exists. + // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag + // of the target part. + 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"` +} + +func (request GetBucketRequest) String() string { + return common.PointerString(request) +} + +// 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, please provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The current entity tag 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_namespace_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_namespace_request_response.go new file mode 100644 index 000000000..043ae9c99 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_namespace_request_response.go @@ -0,0 +1,34 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetNamespaceRequest wrapper for the GetNamespace operation +type GetNamespaceRequest struct { + + // The client request ID for tracing. + OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` +} + +func (request GetNamespaceRequest) String() string { + return common.PointerString(request) +} + +// 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_object_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_object_request_response.go new file mode 100644 index 000000000..f75e36b74 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_object_request_response.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "io" + "net/http" +) + +// GetObjectRequest wrapper for the GetObject operation +type GetObjectRequest struct { + + // The top-level namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The name of the object. + // Example: `test/object1.log` + ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` + + // The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. + // For uploading a part, this is the entity tag of the target part. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The entity tag to avoid matching. The only valid value is ‘*’, which indicates that the request should fail if the object already exists. + // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag + // of the target part. + 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/rfc/rfc7233), section 2.1. + // Note, only a single range of bytes is supported. + Range *string `mandatory:"false" contributesTo:"header" name:"range"` +} + +func (request GetObjectRequest) String() string { + return common.PointerString(request) +} + +// 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, please provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The entity tag 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 *int `presentIn:"header" name:"content-length"` + + // Content-Range header for range requests, per RFC 7233 (https://tools.ietf.org/rfc/rfc7233), section 4.2. + ContentRange *string `presentIn:"header" name:"content-range"` + + // Content-MD5 header, as described in RFC 2616 (https://tools.ietf.org/rfc/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"` + + // Content-Type header, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.17. + ContentType *string `presentIn:"header" name:"content-type"` + + // Content-Language header, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.12. + ContentLanguage *string `presentIn:"header" name:"content-language"` + + // Content-Encoding header, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.11. + ContentEncoding *string `presentIn:"header" name:"content-encoding"` + + // The object modification time, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.29. + LastModified *common.SDKTime `presentIn:"header" name:"last-modified"` + + // 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_preauthenticated_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_preauthenticated_request_request_response.go new file mode 100644 index 000000000..0e41fff80 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/get_preauthenticated_request_request_response.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// GetPreauthenticatedRequestRequest wrapper for the GetPreauthenticatedRequest operation +type GetPreauthenticatedRequestRequest struct { + + // The top-level namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The unique identifier for the pre-authenticated request (PAR). This can be used to manage the PAR + // such as GET or DELETE the PAR + 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"` +} + +func (request GetPreauthenticatedRequestRequest) String() string { + return common.PointerString(request) +} + +// 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, please provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetPreauthenticatedRequestResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/head_bucket_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/head_bucket_request_response.go new file mode 100644 index 000000000..cca2efc72 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/head_bucket_request_response.go @@ -0,0 +1,63 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// HeadBucketRequest wrapper for the HeadBucket operation +type HeadBucketRequest struct { + + // The top-level namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. + // For uploading a part, this is the entity tag of the target part. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The entity tag to avoid matching. The only valid value is ‘*’, which indicates that the request should fail if the object already exists. + // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag + // of the target part. + 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"` +} + +func (request HeadBucketRequest) String() string { + return common.PointerString(request) +} + +// 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, please provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The current entity tag 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/head_object_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/head_object_request_response.go new file mode 100644 index 000000000..b058a2d01 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/head_object_request_response.go @@ -0,0 +1,96 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// HeadObjectRequest wrapper for the HeadObject operation +type HeadObjectRequest struct { + + // The top-level namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The name of the object. + // Example: `test/object1.log` + ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` + + // The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. + // For uploading a part, this is the entity tag of the target part. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The entity tag to avoid matching. The only valid value is ‘*’, which indicates that the request should fail if the object already exists. + // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag + // of the target part. + 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"` +} + +func (request HeadObjectRequest) String() string { + return common.PointerString(request) +} + +// 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, please provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The entity tag 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 *int `presentIn:"header" name:"content-length"` + + // Content-MD5 header, as described in RFC 2616 (https://tools.ietf.org/rfc/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"` + + // Content-Type header, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.17. + ContentType *string `presentIn:"header" name:"content-type"` + + // Content-Language header, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.12. + ContentLanguage *string `presentIn:"header" name:"content-language"` + + // Content-Encoding header, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.11. + ContentEncoding *string `presentIn:"header" name:"content-encoding"` + + // The object modification time, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.29. + LastModified *common.SDKTime `presentIn:"header" name:"last-modified"` + + // 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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_buckets_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_buckets_request_response.go new file mode 100644 index 000000000..09474ba93 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_buckets_request_response.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListBucketsRequest wrapper for the ListBuckets operation +type ListBucketsRequest struct { + + // The top-level namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The ID of the compartment in which to create the bucket. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The page at which to start retrieving results. + 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"` +} + +func (request ListBucketsRequest) String() string { + return common.PointerString(request) +} + +// ListBucketsResponse wrapper for the ListBuckets operation +type ListBucketsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []BucketSummary instance + 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, please provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of `Bucket`s. If this header appears in the response, then this + // is a partial list of buckets. Include this value as the `page` parameter in a subsequent + // GET request to get the next batch of buckets. For information about pagination, see + // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListBucketsResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_multipart_upload_parts_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_multipart_upload_parts_request_response.go new file mode 100644 index 000000000..367ea7af7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_multipart_upload_parts_request_response.go @@ -0,0 +1,67 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListMultipartUploadPartsRequest wrapper for the ListMultipartUploadParts operation +type ListMultipartUploadPartsRequest struct { + + // The top-level namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The name of the object. + // 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 maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The page at which to start retrieving results. + 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"` +} + +func (request ListMultipartUploadPartsRequest) String() string { + return common.PointerString(request) +} + +// ListMultipartUploadPartsResponse wrapper for the ListMultipartUploadParts operation +type ListMultipartUploadPartsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []MultipartUploadPartSummary instance + 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, please provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of `MultipartUploadPartSummary`s. If this header appears in the response, + // then this is a partial list of object parts. Include this value as the `page` parameter in a subsequent + // GET request to get the next batch of object parts. For information about pagination, see + // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListMultipartUploadPartsResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_multipart_uploads_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_multipart_uploads_request_response.go new file mode 100644 index 000000000..259e0630e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_multipart_uploads_request_response.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListMultipartUploadsRequest wrapper for the ListMultipartUploads operation +type ListMultipartUploadsRequest struct { + + // The top-level namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The page at which to start retrieving results. + 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"` +} + +func (request ListMultipartUploadsRequest) String() string { + return common.PointerString(request) +} + +// ListMultipartUploadsResponse wrapper for the ListMultipartUploads operation +type ListMultipartUploadsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []MultipartUpload instance + 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, please provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of `MultipartUpload`s. If this header appears in the response, then + // this is a partial list of multipart uploads. Include this value as the `page` parameter in a subsequent + // GET request. For information about pagination, see + // List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListMultipartUploadsResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_objects.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_objects.go new file mode 100644 index 000000000..aa216e61d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_objects.go @@ -0,0 +1,33 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// APIs for managing buckets and objects. +// + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// ListObjects 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.us-phoenix-1.oraclecloud.com/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 'startWith' parameter to obtain the next page of + // a truncated ListObjects response. + NextStartWith *string `mandatory:"false" json:"nextStartWith"` +} + +func (m ListObjects) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_objects_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_objects_request_response.go new file mode 100644 index 000000000..0cca1b1c6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_objects_request_response.go @@ -0,0 +1,73 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListObjectsRequest wrapper for the ListObjects operation +type ListObjectsRequest struct { + + // The top-level namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. + // 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"` + + // Object names returned by a list query must be greater or equal to this parameter. + Start *string `mandatory:"false" contributesTo:"query" name:"start"` + + // Object names returned by a list query must be strictly less than this parameter. + End *string `mandatory:"false" contributesTo:"query" name:"end"` + + // The maximum number of items to return. + 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. Scanned objects whose names contain the + // delimiter have part of their name up to the last occurrence of the delimiter (after 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 in list of objects includes the 'name' field. This parameter can also include 'size' + // (object size in bytes), 'md5', and 'timeCreated' (object creation date and time) fields. + // Value of this parameter should be a comma-separated, case-insensitive list of those field names. + // For example 'name,timeCreated,md5'. + 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"` +} + +func (request ListObjectsRequest) String() string { + return common.PointerString(request) +} + +// 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, please provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListObjectsResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_preauthenticated_requests_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_preauthenticated_requests_request_response.go new file mode 100644 index 000000000..4adcbe26a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/list_preauthenticated_requests_request_response.go @@ -0,0 +1,63 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// ListPreauthenticatedRequestsRequest wrapper for the ListPreauthenticatedRequests operation +type ListPreauthenticatedRequestsRequest struct { + + // The top-level namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // Pre-authenticated requests returned by the list must have object names starting with prefix + ObjectNamePrefix *string `mandatory:"false" contributesTo:"query" name:"objectNamePrefix"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The page at which to start retrieving results. + 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"` +} + +func (request ListPreauthenticatedRequestsRequest) String() string { + return common.PointerString(request) +} + +// ListPreauthenticatedRequestsResponse wrapper for the ListPreauthenticatedRequests operation +type ListPreauthenticatedRequestsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []PreauthenticatedRequestSummary instance + 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, please provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of pre-authenticated requests, if this header appears in the response, + // then this is a partial list. Include this value as the `page` parameter in a subsequent + // GET request to get the next batch of pre-authenticated requests. + // For information about pagination, see List Pagination (https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListPreauthenticatedRequestsResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/multipart_upload.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/multipart_upload.go new file mode 100644 index 000000000..00cad6055 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/multipart_upload.go @@ -0,0 +1,38 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// APIs for managing buckets and objects. +// + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// MultipartUpload 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type MultipartUpload struct { + + // The 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 when the upload was created. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` +} + +func (m MultipartUpload) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/multipart_upload_part_summary.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/multipart_upload_part_summary.go new file mode 100644 index 000000000..05f9aff44 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/multipart_upload_part_summary.go @@ -0,0 +1,35 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// APIs for managing buckets and objects. +// + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// MultipartUploadPartSummary 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type MultipartUploadPartSummary struct { + + // the current entity tag 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 *int `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) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/object_summary.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/object_summary.go new file mode 100644 index 000000000..c1cf92ba8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/object_summary.go @@ -0,0 +1,35 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// APIs for managing buckets and objects. +// + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// ObjectSummary 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type ObjectSummary struct { + + // The name of the object. + Name *string `mandatory:"true" json:"name"` + + // Size of the object in bytes. + Size *int `mandatory:"false" json:"size"` + + // Base64-encoded MD5 hash of the object data. + Md5 *string `mandatory:"false" json:"md5"` + + // Date and time of object creation. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m ObjectSummary) String() string { + return common.PointerString(m) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/objectstorage_client.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/objectstorage_client.go new file mode 100644 index 000000000..eaf8bdfb6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/objectstorage_client.go @@ -0,0 +1,478 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// APIs for managing buckets and objects. +// + +package objectstorage + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +//ObjectStorageClient a client for ObjectStorage +type ObjectStorageClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +func buildSigner(configProvider common.ConfigurationProvider) common.HTTPRequestSigner { + objStorageHeaders := []string{"date", "(request-target)", "host"} + defaultBodyHeaders := []string{"content-length", "content-type", "x-content-sha256"} + shouldHashBody := func(r *http.Request) bool { + return r.Method == http.MethodPost + } + signer := common.RequestSignerWithBodyHashingPredicate(configProvider, objStorageHeaders, defaultBodyHeaders, shouldHashBody) + return signer +} + +// 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) { + baseClient, err := common.NewClientWithConfig(configProvider) + if err != nil { + return + } + baseClient.Signer = buildSigner(configProvider) + + client = ObjectStorageClient{BaseClient: baseClient} + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *ObjectStorageClient) SetRegion(region string) { + client.Host = fmt.Sprintf(common.DefaultHostURLTemplate, "objectstorage", region) +} + +// 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.config = &configProvider + client.SetRegion(region) + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *ObjectStorageClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// AbortMultipartUpload Aborts an in-progress multipart upload and deletes all parts that have been uploaded. +func (client ObjectStorageClient) AbortMultipartUpload(ctx context.Context, request AbortMultipartUploadRequest) (response AbortMultipartUploadResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/n/{namespaceName}/b/{bucketName}/u/{objectName}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CommitMultipartUpload Commits a multipart upload, which involves checking part numbers and ETags of the parts, to create an aggregate object. +func (client ObjectStorageClient) CommitMultipartUpload(ctx context.Context, request CommitMultipartUploadRequest) (response CommitMultipartUploadResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/u/{objectName}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateBucket Creates a bucket in the given namespace with a bucket name and optional user-defined metadata. +// To use this and other 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +func (client ObjectStorageClient) CreateBucket(ctx context.Context, request CreateBucketRequest) (response CreateBucketResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/n/{namespaceName}/b/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreateMultipartUpload Starts a new multipart upload to a specific object in the given bucket in the given namespace. +func (client ObjectStorageClient) CreateMultipartUpload(ctx context.Context, request CreateMultipartUploadRequest) (response CreateMultipartUploadResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/u", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// CreatePreauthenticatedRequest Create a pre-authenticated request specific to the bucket +func (client ObjectStorageClient) CreatePreauthenticatedRequest(ctx context.Context, request CreatePreauthenticatedRequestRequest) (response CreatePreauthenticatedRequestResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/p/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteBucket Deletes a bucket if it is already empty. If the bucket is not empty, use DeleteObject first. +func (client ObjectStorageClient) DeleteBucket(ctx context.Context, request DeleteBucketRequest) (response DeleteBucketResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/n/{namespaceName}/b/{bucketName}/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeleteObject Deletes an object. +func (client ObjectStorageClient) DeleteObject(ctx context.Context, request DeleteObjectRequest) (response DeleteObjectResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/n/{namespaceName}/b/{bucketName}/o/{objectName}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// DeletePreauthenticatedRequest Deletes the bucket level pre-authenticateted request +func (client ObjectStorageClient) DeletePreauthenticatedRequest(ctx context.Context, request DeletePreauthenticatedRequestRequest) (response DeletePreauthenticatedRequestResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodDelete, "/n/{namespaceName}/b/{bucketName}/p/{parId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetBucket Gets the current representation of the given bucket in the given namespace. +func (client ObjectStorageClient) GetBucket(ctx context.Context, request GetBucketRequest) (response GetBucketResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetNamespace Gets the name of the namespace for the user making the request. An account name must be unique, must start with a +// letter, and can have up to 15 lowercase letters and numbers. You cannot use spaces or special characters. +func (client ObjectStorageClient) GetNamespace(ctx context.Context, request GetNamespaceRequest) (response GetNamespaceResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/n/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetObject Gets the metadata and body of an object. +func (client ObjectStorageClient) GetObject(ctx context.Context, request GetObjectRequest) (response GetObjectResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/o/{objectName}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// GetPreauthenticatedRequest Get the bucket level pre-authenticateted request +func (client ObjectStorageClient) GetPreauthenticatedRequest(ctx context.Context, request GetPreauthenticatedRequestRequest) (response GetPreauthenticatedRequestResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/p/{parId}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// HeadBucket Efficiently checks if a bucket exists and gets the current ETag for the bucket. +func (client ObjectStorageClient) HeadBucket(ctx context.Context, request HeadBucketRequest) (response HeadBucketResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodHead, "/n/{namespaceName}/b/{bucketName}/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// HeadObject Gets the user-defined metadata and entity tag for an object. +func (client ObjectStorageClient) HeadObject(ctx context.Context, request HeadObjectRequest) (response HeadObjectResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodHead, "/n/{namespaceName}/b/{bucketName}/o/{objectName}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListBuckets Gets a list of all `BucketSummary`s in a compartment. A `BucketSummary` contains only summary fields for the bucket +// and does not contain fields like the user-defined metadata. +// To use this and other 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +func (client ObjectStorageClient) ListBuckets(ctx context.Context, request ListBucketsRequest) (response ListBucketsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/n/{namespaceName}/b/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListMultipartUploadParts Lists the parts of an in-progress multipart upload. +func (client ObjectStorageClient) ListMultipartUploadParts(ctx context.Context, request ListMultipartUploadPartsRequest) (response ListMultipartUploadPartsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/u/{objectName}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListMultipartUploads Lists all in-progress multipart uploads for the given bucket in the given namespace. +func (client ObjectStorageClient) ListMultipartUploads(ctx context.Context, request ListMultipartUploadsRequest) (response ListMultipartUploadsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/u", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListObjects Lists the objects in a bucket. +// To use this and other 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +func (client ObjectStorageClient) ListObjects(ctx context.Context, request ListObjectsRequest) (response ListObjectsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/o", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// ListPreauthenticatedRequests List pre-authenticated requests for the bucket +func (client ObjectStorageClient) ListPreauthenticatedRequests(ctx context.Context, request ListPreauthenticatedRequestsRequest) (response ListPreauthenticatedRequestsResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodGet, "/n/{namespaceName}/b/{bucketName}/p/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// PutObject Creates a new object or overwrites an existing one. +// To use this and other 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +func (client ObjectStorageClient) PutObject(ctx context.Context, request PutObjectRequest) (response PutObjectResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/n/{namespaceName}/b/{bucketName}/o/{objectName}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UpdateBucket Performs a partial or full update of a bucket's user-defined metadata. +func (client ObjectStorageClient) UpdateBucket(ctx context.Context, request UpdateBucketRequest) (response UpdateBucketResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPost, "/n/{namespaceName}/b/{bucketName}/", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} + +// UploadPart Uploads a single part of a multipart upload. +func (client ObjectStorageClient) UploadPart(ctx context.Context, request UploadPartRequest) (response UploadPartResponse, err error) { + httpRequest, err := common.MakeDefaultHTTPRequestWithTaggedStruct(http.MethodPut, "/n/{namespaceName}/b/{bucketName}/u/{objectName}", request) + if err != nil { + return + } + + httpResponse, err := client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + return + } + + err = common.UnmarshalResponse(httpResponse, &response) + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/preauthenticated_request.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/preauthenticated_request.go new file mode 100644 index 000000000..54e4d2430 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/preauthenticated_request.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// APIs for managing buckets and objects. +// + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// PreauthenticatedRequest The representation of PreauthenticatedRequest +type PreauthenticatedRequest struct { + + // the unique identifier to use when directly addressing the pre-authenticated request + Id *string `mandatory:"true" json:"id"` + + // the user supplied 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 e.g PUT or GET. + AccessType PreauthenticatedRequestAccessTypeEnum `mandatory:"true" json:"accessType"` + + // the expiration date after which the pre authenticated request will no longer be valid as per spec + // RFC 3339 (https://tools.ietf.org/rfc/rfc3339) + TimeExpires *common.SDKTime `mandatory:"true" json:"timeExpires"` + + // the date when the pre-authenticated request was created as per spec + // RFC 3339 (https://tools.ietf.org/rfc/rfc3339) + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Name of object that is being granted access to by the pre-authenticated request. This can be null and that would mean that the pre-authenticated request is granting access to the entire bucket + ObjectName *string `mandatory:"false" json:"objectName"` +} + +func (m PreauthenticatedRequest) String() string { + return common.PointerString(m) +} + +// PreauthenticatedRequestAccessTypeEnum Enum with underlying type: string +type PreauthenticatedRequestAccessTypeEnum string + +// Set of constants representing the allowable values for PreauthenticatedRequestAccessType +const ( + PreauthenticatedRequestAccessTypeObjectread PreauthenticatedRequestAccessTypeEnum = "ObjectRead" + PreauthenticatedRequestAccessTypeObjectwrite PreauthenticatedRequestAccessTypeEnum = "ObjectWrite" + PreauthenticatedRequestAccessTypeObjectreadwrite PreauthenticatedRequestAccessTypeEnum = "ObjectReadWrite" + PreauthenticatedRequestAccessTypeAnyobjectwrite PreauthenticatedRequestAccessTypeEnum = "AnyObjectWrite" +) + +var mappingPreauthenticatedRequestAccessType = map[string]PreauthenticatedRequestAccessTypeEnum{ + "ObjectRead": PreauthenticatedRequestAccessTypeObjectread, + "ObjectWrite": PreauthenticatedRequestAccessTypeObjectwrite, + "ObjectReadWrite": PreauthenticatedRequestAccessTypeObjectreadwrite, + "AnyObjectWrite": PreauthenticatedRequestAccessTypeAnyobjectwrite, +} + +// GetPreauthenticatedRequestAccessTypeEnumValues Enumerates the set of values for PreauthenticatedRequestAccessType +func GetPreauthenticatedRequestAccessTypeEnumValues() []PreauthenticatedRequestAccessTypeEnum { + values := make([]PreauthenticatedRequestAccessTypeEnum, 0) + for _, v := range mappingPreauthenticatedRequestAccessType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/preauthenticated_request_summary.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/preauthenticated_request_summary.go new file mode 100644 index 000000000..f293237bc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/preauthenticated_request_summary.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// APIs for managing buckets and objects. +// + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// PreauthenticatedRequestSummary The representation of PreauthenticatedRequestSummary +type PreauthenticatedRequestSummary struct { + + // the unique identifier to use when directly addressing the pre-authenticated request + Id *string `mandatory:"true" json:"id"` + + // the user supplied name of the pre-authenticated request + Name *string `mandatory:"true" json:"name"` + + // the operation that can be performed on this resource e.g PUT or GET. + AccessType PreauthenticatedRequestSummaryAccessTypeEnum `mandatory:"true" json:"accessType"` + + // the expiration date after which the pre authenticated request will no longer be valid as per spec + // RFC 3339 (https://tools.ietf.org/rfc/rfc3339) + TimeExpires *common.SDKTime `mandatory:"true" json:"timeExpires"` + + // the date when the pre-authenticated request was created as per spec + // RFC 3339 (https://tools.ietf.org/rfc/rfc3339) + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Name of object that is being granted access to by the pre-authenticated request. This can be null and that would mean that the pre-authenticated request is granting access to the entire bucket + ObjectName *string `mandatory:"false" json:"objectName"` +} + +func (m PreauthenticatedRequestSummary) String() string { + return common.PointerString(m) +} + +// PreauthenticatedRequestSummaryAccessTypeEnum Enum with underlying type: string +type PreauthenticatedRequestSummaryAccessTypeEnum string + +// Set of constants representing the allowable values for PreauthenticatedRequestSummaryAccessType +const ( + PreauthenticatedRequestSummaryAccessTypeObjectread PreauthenticatedRequestSummaryAccessTypeEnum = "ObjectRead" + PreauthenticatedRequestSummaryAccessTypeObjectwrite PreauthenticatedRequestSummaryAccessTypeEnum = "ObjectWrite" + PreauthenticatedRequestSummaryAccessTypeObjectreadwrite PreauthenticatedRequestSummaryAccessTypeEnum = "ObjectReadWrite" + PreauthenticatedRequestSummaryAccessTypeAnyobjectwrite PreauthenticatedRequestSummaryAccessTypeEnum = "AnyObjectWrite" +) + +var mappingPreauthenticatedRequestSummaryAccessType = map[string]PreauthenticatedRequestSummaryAccessTypeEnum{ + "ObjectRead": PreauthenticatedRequestSummaryAccessTypeObjectread, + "ObjectWrite": PreauthenticatedRequestSummaryAccessTypeObjectwrite, + "ObjectReadWrite": PreauthenticatedRequestSummaryAccessTypeObjectreadwrite, + "AnyObjectWrite": PreauthenticatedRequestSummaryAccessTypeAnyobjectwrite, +} + +// GetPreauthenticatedRequestSummaryAccessTypeEnumValues Enumerates the set of values for PreauthenticatedRequestSummaryAccessType +func GetPreauthenticatedRequestSummaryAccessTypeEnumValues() []PreauthenticatedRequestSummaryAccessTypeEnum { + values := make([]PreauthenticatedRequestSummaryAccessTypeEnum, 0) + for _, v := range mappingPreauthenticatedRequestSummaryAccessType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/put_object_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/put_object_request_response.go new file mode 100644 index 000000000..3652da5fc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/put_object_request_response.go @@ -0,0 +1,92 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "io" + "net/http" +) + +// PutObjectRequest wrapper for the PutObject operation +type PutObjectRequest struct { + + // The top-level namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The name of the object. + // Example: `test/object1.log` + ObjectName *string `mandatory:"true" contributesTo:"path" name:"objectName"` + + // The content length of the body. + ContentLength *int `mandatory:"true" 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 to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. + // For uploading a part, this is the entity tag of the target part. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The entity tag to avoid matching. The only valid value is ‘*’, which indicates that the request should fail if the object already exists. + // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag + // of the target part. + 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"` + + // 100-continue + Expect *string `mandatory:"false" contributesTo:"header" name:"Expect"` + + // The base-64 encoded MD5 hash of the body. + ContentMD5 *string `mandatory:"false" contributesTo:"header" name:"Content-MD5"` + + // The content type of the object. Defaults to 'application/octet-stream' if not overridden during the PutObject call. + ContentType *string `mandatory:"false" contributesTo:"header" name:"Content-Type"` + + // The content language of the object. + ContentLanguage *string `mandatory:"false" contributesTo:"header" name:"Content-Language"` + + // The content encoding of the object. + ContentEncoding *string `mandatory:"false" contributesTo:"header" name:"Content-Encoding"` + + // Optional user-defined metadata key and value. + OpcMeta map[string]string `mandatory:"false" contributesTo:"header-collection" prefix:"opc-meta-"` +} + +func (request PutObjectRequest) String() string { + return common.PointerString(request) +} + +// 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, please provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The base-64 encoded MD5 hash of the request body as computed by the server. + OpcContentMd5 *string `presentIn:"header" name:"opc-content-md5"` + + // The entity tag for the object. + ETag *string `presentIn:"header" name:"etag"` + + // The time the object was modified, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.29. + LastModified *common.SDKTime `presentIn:"header" name:"last-modified"` +} + +func (response PutObjectResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_bucket_details.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_bucket_details.go new file mode 100644 index 000000000..a3cf083a5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_bucket_details.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +// Object Storage Service API +// +// APIs for managing buckets and objects. +// + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" +) + +// UpdateBucketDetails 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.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm). +type UpdateBucketDetails struct { + + // The namespace in which the bucket lives. + Namespace *string `mandatory:"false" json:"namespace"` + + // The name of the bucket. + 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 available on this bucket. Allows authenticated caller to access the bucket or + // contents of this bucket. By default a bucket is set to NoPublicAccess. It is treated as NoPublicAccess + // when this value is not specified. When the type is NoPublicAccess the bucket does not allow any public access. + // When the type is ObjectRead the bucket allows public access to the GetObject, HeadObject, ListObjects. + PublicAccessType UpdateBucketDetailsPublicAccessTypeEnum `mandatory:"false" json:"publicAccessType,omitempty"` +} + +func (m UpdateBucketDetails) String() string { + return common.PointerString(m) +} + +// UpdateBucketDetailsPublicAccessTypeEnum Enum with underlying type: string +type UpdateBucketDetailsPublicAccessTypeEnum string + +// Set of constants representing the allowable values for UpdateBucketDetailsPublicAccessType +const ( + UpdateBucketDetailsPublicAccessTypeNopublicaccess UpdateBucketDetailsPublicAccessTypeEnum = "NoPublicAccess" + UpdateBucketDetailsPublicAccessTypeObjectread UpdateBucketDetailsPublicAccessTypeEnum = "ObjectRead" +) + +var mappingUpdateBucketDetailsPublicAccessType = map[string]UpdateBucketDetailsPublicAccessTypeEnum{ + "NoPublicAccess": UpdateBucketDetailsPublicAccessTypeNopublicaccess, + "ObjectRead": UpdateBucketDetailsPublicAccessTypeObjectread, +} + +// GetUpdateBucketDetailsPublicAccessTypeEnumValues Enumerates the set of values for UpdateBucketDetailsPublicAccessType +func GetUpdateBucketDetailsPublicAccessTypeEnumValues() []UpdateBucketDetailsPublicAccessTypeEnum { + values := make([]UpdateBucketDetailsPublicAccessTypeEnum, 0) + for _, v := range mappingUpdateBucketDetailsPublicAccessType { + values = append(values, v) + } + return values +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_bucket_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_bucket_request_response.go new file mode 100644 index 000000000..a352d64fe --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/update_bucket_request_response.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "net/http" +) + +// UpdateBucketRequest wrapper for the UpdateBucket operation +type UpdateBucketRequest struct { + + // The top-level namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // Request object for updating a bucket. + UpdateBucketDetails `contributesTo:"body"` + + // The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. + // For uploading a part, this is the entity tag of the target part. + 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"` +} + +func (request UpdateBucketRequest) String() string { + return common.PointerString(request) +} + +// 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, please provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The entity tag for the updated bucket. + ETag *string `presentIn:"header" name:"etag"` +} + +func (response UpdateBucketResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/objectstorage/upload_part_request_response.go b/vendor/github.com/oracle/oci-go-sdk/objectstorage/upload_part_request_response.go new file mode 100644 index 000000000..9a48fa05c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/objectstorage/upload_part_request_response.go @@ -0,0 +1,83 @@ +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// Code generated. DO NOT EDIT. + +package objectstorage + +import ( + "github.com/oracle/oci-go-sdk/common" + "io" + "net/http" +) + +// UploadPartRequest wrapper for the UploadPart operation +type UploadPartRequest struct { + + // The top-level namespace used for the request. + NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` + + // The name of the bucket. + // Example: `my-new-bucket1` + BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` + + // The name of the object. + // 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 *int `mandatory:"true" 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 to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. + // For uploading a part, this is the entity tag of the target part. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The entity tag to avoid matching. The only valid value is ‘*’, which indicates that the request should fail if the object already exists. + // For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag + // of the target part. + IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` + + // 100-continue + Expect *string `mandatory:"false" contributesTo:"header" name:"Expect"` + + // The base-64 encoded MD5 hash of the body. + ContentMD5 *string `mandatory:"false" contributesTo:"header" name:"Content-MD5"` +} + +func (request UploadPartRequest) String() string { + return common.PointerString(request) +} + +// 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, please 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 entity tag for the object. + ETag *string `presentIn:"header" name:"etag"` +} + +func (response UploadPartResponse) String() string { + return common.PointerString(response) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/oci.go b/vendor/github.com/oracle/oci-go-sdk/oci.go new file mode 100644 index 000000000..47fcef9c6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/oci.go @@ -0,0 +1,232 @@ + +/* +This is the official Go SDK for Oracle Cloud Infrastructure + +Installation + +Refer to https://github.com/oracle/oci-go-sdk/blob/master/README.md#installing for installation instructions. + +Configuration + +Refer to https://github.com/oracle/oci-go-sdk/blob/master/README.md#configuring for configuration instructions. + +Quickstart + +The following example shows how to get started with the SDK. The example belows creates an identityClient +struct with the default configuration. It then utilizes the identityClient to list availability domains and prints +them out to stdout + + import ( + "context" + "fmt" + + "github.com/oracle/oci-go-sdk/common" + "github.com/oracle/oci-go-sdk/identity" + ) + + func main() { + c, err := identity.NewIdentityClientWithConfigurationProvider(common.DefaultConfigProvider()) + if err != nil { + fmt.Println("Error:", err) + return + } + + // The OCID of the tenancy containing the compartment. + tenancyID, err := common.DefaultConfigProvider().TenancyOCID() + if err != nil { + fmt.Println("Error:", err) + return + } + + request := identity.ListAvailabilityDomainsRequest{ + CompartmentId: &tenancyID, + } + + r, err := c.ListAvailabilityDomains(context.Background(), request) + if err != nil { + fmt.Println("Error:", err) + return + } + + fmt.Printf("List of available domains: %v", r.Items) + return + } + +More examples can be found in the SDK Github repo: https://github.com/oracle/oci-go-sdk/tree/master/example + +Optional fields in the SDK + +Optional fields are represented with the `mandatory:"false"` tag on input structs. The SDK will omit all optional fields that are nil when making requests. +In the case of enum-type fields, the SDK will omit fields whose value is an empty string. + +Helper functions + +The SDK uses pointers for primitive types in many input structs. To aid in the construction of such structs, the SDK provides +functions that return a pointer for a given value. For example: + + // Given the struct + type CreateVcnDetails struct { + + // Example: `172.16.0.0/16` + CidrBlock *string `mandatory:"true" json:"cidrBlock"` + + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + DisplayName *string `mandatory:"false" json:"displayName"` + + } + + // We can use the helper functions to build the struct + details := core.CreateVcnDetails{ + CidrBlock: common.String("172.16.0.0/16"), + CompartmentId: common.String("someOcid"), + DisplayName: common.String("myVcn"), + } + + +Signing custom requests + +The SDK exposes a stand-alone signer that can be used to signing custom requests. Related code can be found here: +https://github.com/oracle/oci-go-sdk/blob/master/common/http_signer.go. + +The example below shows how to create a default signer. + + client := http.Client{} + var request http.Request + request = ... // some custom request + + // Set the Date header + request.Header.Set("Date", time.Now().UTC().Format(http.TimeFormat)) + + // And a provider of cryptographic keys + provider := common.DefaultConfigProvider() + + // Build the signer + signer := common.DefaultSigner(provider) + + // Sign the request + signer.Sign(&request) + + // Execute the request + client.Do(request) + + + +The signer also allows more granular control on the headers used for signing. For example: + + client := http.Client{} + var request http.Request + request = ... // some custom request + + // Set the Date header + request.Header.Set("Date", time.Now().UTC().Format(http.TimeFormat)) + + // Mandatory headers to be used in the sign process + defaultGenericHeaders = []string{"date", "(request-target)", "host"} + + // Optional headers + optionalHeaders = []string{"content-length", "content-type", "x-content-sha256"} + + // A predicate that specifies when to use the optional signing headers + optionalHeadersPredicate := func (r *http.Request) bool { + return r.Method == http.MethodPost + } + + // And a provider of cryptographic keys + provider := common.DefaultConfigProvider() + + // Build the signer + signer := common.RequestSigner(provider, defaultGenericHeaders, optionalHeaders, optionalHeadersPredicate) + + // Sign the request + signer.Sign(&request) + + // Execute the request + c.Do(request) + +For more information on the signing algorithm refer to: https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/signingrequests.htm + +Polymorphic json requests and responses + +Some operations accept or return polymorphic json objects. The SDK models such objects as interfaces. Further the SDK provides +structs that implement such interfaces. Thus, for all operations that expect interfaces as input, pass the struct in the SDK that satisfies +such interface. For example: + + c, err := identity.NewIdentityClientWithConfigurationProvider(common.DefaultConfigProvider()) + if err != nil { + panic(err) + } + + // The CreateIdentityProviderRequest takes a CreateIdentityProviderDetails interface as input + rCreate := identity.CreateIdentityProviderRequest{} + + // The CreateSaml2IdentityProviderDetails struct implements the CreateIdentityProviderDetails interface + details := identity.CreateSaml2IdentityProviderDetails{} + details.CompartmentId = common.String(getTenancyID()) + details.Name = common.String("someName") + //... more setup if needed + // Use the above struct + rCreate.CreateIdentityProviderDetails = details + + // Make the call + rspCreate, createErr := c.CreateIdentityProvider(context.Background(), rCreate) + +In the case of a polymorphic response you can type assert the interface to the expected type. For example: + + rRead := identity.GetIdentityProviderRequest{} + rRead.IdentityProviderId = common.String("aValidId") + response, err := c.GetIdentityProvider(context.Background(), rRead) + + provider := response.IdentityProvider.(identity.Saml2IdentityProvider) + +An example of polymorphic json request handling can be found here: https://github.com/oracle/oci-go-sdk/blob/master/example/example_core_test.go#L63 + + +Pagination + +When calling a list operation, the operation will retrieve a page of results. To retrieve more data, call the list operation again, +passing in the value of the most recent response's OpcNextPage as the value of Page in the next list operation call. +When there is no more data the OpcNextPage field will be nil. An example of pagination using this logic can be found here: https://github.com/oracle/oci-go-sdk/blob/master/example/example_core_test.go#L86 + +Logging and Debugging + +The SDK has a built-in logging mechanism used internally. The internal logging logic is used to record the raw http +requests, responses and potential errors when (un)marshalling request and responses. + +To expose debugging logs, set the environment variable "OCI_GO_SDK_DEBUG" to "1", or some other non empty string. + + +Forward Compatibility + +Some response fields are enum-typed. In the future, individual services may return values not covered by existing enums +for that field. To address this possibility, every enum-type response field is a modeled as a type that supports any string. +Thus if a service returns a value that is not recognized by your version of the SDK, then the response field will be set to this value. + +When individual services return a polymorphic json response not available as a concrete struct, the SDK will return an implementation that only satisfies +the interface modeling the polymorphic json response. + + +Contributions + +Got a fix for a bug, or a new feature you'd like to contribute? The SDK is open source and accepting pull requests on GitHub +https://github.com/oracle/oci-go-sdk + +License + +Licensing information available at: https://github.com/oracle/oci-go-sdk/blob/master/LICENSE.txt + +Notifications + +To be notified when a new version of the Go SDK is released, subscribe to the following feed: https://github.com/oracle/oci-go-sdk/releases.atom + +Questions or Feedback + +Please refer to this link: https://github.com/oracle/oci-go-sdk#help + + + + + */ +package oci + +//go:generate go run cmd/genver/main.go cmd/genver/version_template.go --output common/version.go diff --git a/vendor/github.com/oracle/oci-go-sdk/wercker.yml b/vendor/github.com/oracle/oci-go-sdk/wercker.yml new file mode 100644 index 000000000..58255f22c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/wercker.yml @@ -0,0 +1,26 @@ +box: + id: golang + ports: + - "5000" + +build: + steps: + - script: + name: golint-prepare + code: | + go get github.com/golang/lint/golint + go install github.com/golang/lint/golint + + - script: + name: symlinking src code + code: | + mkdir -p $GOPATH/src/github.com/oracle + ln -s $WERCKER_SOURCE_DIR $GOPATH/src/github.com/oracle/oci-go-sdk + ls -al $GOPATH/src/github.com/oracle/oci-go-sdk + + - script: + name: make-build + code: | + make build + + diff --git a/vendor/vendor.json b/vendor/vendor.json index 5bf27241f..2f5bcd780 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -1088,6 +1088,13 @@ "revision": "96aac992fc8b1a4c83841a6c3e7178d20d989625", "revisionTime": "2018-01-05T11:11:33Z" }, + { + "checksumSHA1": "/LfGOK58LAN5bN/kVhyjw6prFuw=", + "path": "github.com/oracle/oci-go-sdk", + "revision": "36126af3da60f6d2053487efed8801aa794f7605", + "revisionTime": "2018-03-02T19:49:46Z", + "tree": true + }, { "checksumSHA1": "/NoE6t3UkW4/iKAtbf59GGv6tF8=", "path": "github.com/packer-community/winrmcp/winrmcp",