diff --git a/go.mod b/go.mod
index 01e8e134ef..1bc3afe955 100644
--- a/go.mod
+++ b/go.mod
@@ -12,10 +12,10 @@ require (
github.com/IBM-Cloud/bluemix-go v0.0.0-20211102075456-ffc4e11dfb16
github.com/IBM-Cloud/power-go-client v1.1.5
github.com/IBM/go-sdk-core/v4 v4.9.0
- github.com/IBM/go-sdk-core/v5 v5.9.1
+ github.com/IBM/go-sdk-core/v5 v5.9.5
github.com/IBM/networking-go-sdk v0.14.0
github.com/IBM/platform-services-go-sdk v0.18.16
- github.com/IBM/vpc-go-sdk v1.0.1
+ github.com/IBM/vpc-go-sdk v0.20.0
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1264
github.com/aliyun/aliyun-oss-go-sdk v2.1.8+incompatible
github.com/apparentlymart/go-cidr v1.1.0
diff --git a/go.sum b/go.sum
index c6169cd0a1..36c202148d 100644
--- a/go.sum
+++ b/go.sum
@@ -100,18 +100,18 @@ github.com/IBM/go-sdk-core v1.1.0/go.mod h1:2pcx9YWsIsZ3I7kH+1amiAkXvLTZtAq9kbxs
github.com/IBM/go-sdk-core/v4 v4.5.1/go.mod h1:lTUXbqIX6/aAbSCkP6q59+dyFsTwZAc0ewRS2vJWVbg=
github.com/IBM/go-sdk-core/v4 v4.9.0 h1:OkSg5kaEfVoNuBA4IsIOz8Ur5rbGHbWxmWCZ7nK/oc0=
github.com/IBM/go-sdk-core/v4 v4.9.0/go.mod h1:DbQ+3pFoIjxGGTEiA9zQ2V0cemMNmFMkLBBnR729HKg=
-github.com/IBM/go-sdk-core/v5 v5.2.0/go.mod h1:vyNdbFujJtdTj9HbihtvKwwS3k/GKSKpOx9ZIQ6MWDY=
github.com/IBM/go-sdk-core/v5 v5.4.0/go.mod h1:+MNa5Jbqb9FO7KEevo982Pb/YXr4adkyEffJlPs2TGc=
github.com/IBM/go-sdk-core/v5 v5.4.2/go.mod h1:Sn+z+qTDREQvCr+UFa22TqqfXNxx3o723y8GsfLV8e0=
-github.com/IBM/go-sdk-core/v5 v5.9.1 h1:06pXbD9Rgmqqe2HA5YAeQbB4eYRRFgIoOT+Kh3cp1zo=
github.com/IBM/go-sdk-core/v5 v5.9.1/go.mod h1:axE2JrRq79gIJTjKPBwV6gWHswvVptBjbcvvCPIxARM=
+github.com/IBM/go-sdk-core/v5 v5.9.5 h1:+uMyHpOyBlFFd/I0PB+7JqqXOPY2DzRR0tbBjTc4d/g=
+github.com/IBM/go-sdk-core/v5 v5.9.5/go.mod h1:YlOwV9LeuclmT/qi/LAK2AsobbAP42veV0j68/rlZsE=
github.com/IBM/networking-go-sdk v0.14.0 h1:CWQufnSxynqxYORGbkSqePPSZ33fUijiwmcuZsMRv/Q=
github.com/IBM/networking-go-sdk v0.14.0/go.mod h1:8f3hEoWVUSYKbaIj7WZhdeJaseYGDSY85Iz+PqxLEbQ=
github.com/IBM/platform-services-go-sdk v0.18.16 h1:blYycstPoNtPKtu1uZe240WvzcJENy/Lzx+HMUA8bOo=
github.com/IBM/platform-services-go-sdk v0.18.16/go.mod h1:awc7TZUeGMlToSeMSaWEz34Knf0lQnuGWumcI4pcuoM=
github.com/IBM/vpc-go-sdk v0.6.0/go.mod h1:wxicPDnSTPXt1eNxSO/9KNGqOW9RMgxPoSh4gd8KJY4=
-github.com/IBM/vpc-go-sdk v1.0.1 h1:D2cu4KRsM8Q8bLWz/uxp8m7nzUm33mcgDv1sD0w/E8M=
-github.com/IBM/vpc-go-sdk v1.0.1/go.mod h1:bhd7r482lV30UJz46r2oRgYGawGEo+TuS41ZLIY65y0=
+github.com/IBM/vpc-go-sdk v0.20.0 h1:xetXFYv/GDSOVTm2h7MSki2D9x2dpNsiwHVRmdSIrPc=
+github.com/IBM/vpc-go-sdk v0.20.0/go.mod h1:YPyIfI+/qhPqlYp+I7dyx2U1GLcXgp/jzVvsZfUH4y8=
github.com/InVisionApp/go-health v2.1.0+incompatible/go.mod h1:/+Gv1o8JUsrjC6pi6MN6/CgKJo4OqZ6x77XAnImrzhg=
github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E=
github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE=
diff --git a/pkg/destroy/ibmcloud/disk.go b/pkg/destroy/ibmcloud/disk.go
new file mode 100644
index 0000000000..8405eb6acc
--- /dev/null
+++ b/pkg/destroy/ibmcloud/disk.go
@@ -0,0 +1,128 @@
+package ibmcloud
+
+import (
+ "net/http"
+ "strings"
+
+ "github.com/pkg/errors"
+)
+
+func (o *ClusterUninstaller) listDisks() ([]cloudResource, error) {
+ o.Logger.Infof("Listing disks")
+
+ result := []cloudResource{}
+ clusterOwnedTag := o.clusterLabelFilter()
+ options := o.vpcSvc.NewListVolumesOptions()
+
+ for {
+ ctx, cancel := o.contextWithTimeout()
+ defer cancel()
+ options.SetLimit(100)
+ resources, _, err := o.vpcSvc.ListVolumesWithContext(ctx, options)
+ if err != nil {
+ return nil, errors.Wrap(err, "Listing disks failed")
+ }
+
+ for _, volume := range resources.Volumes {
+ userTags := strings.Join(volume.UserTags, ",")
+ if strings.Contains(userTags, clusterOwnedTag) {
+ o.Logger.Debugf("Found disk: %s", *volume.ID)
+ result = append(result, cloudResource{
+ key: *volume.ID,
+ name: *volume.Name,
+ status: *volume.Status,
+ typeName: "disk",
+ id: *volume.ID,
+ })
+ }
+ }
+
+ //This was the last page, please exit the loop.
+ if resources.Next == nil {
+ o.Logger.Debugf("All disks fetched")
+ break
+ }
+
+ //Set the start for the next page.
+ start, _ := resources.GetNextStart()
+ o.Logger.Debugf("Listing next page %s", *start)
+ options.SetStart(*start)
+ }
+ return result, nil
+}
+
+func (o *ClusterUninstaller) deleteDisk(item cloudResource) error {
+ o.Logger.Infof("Deleting disk %s", item.id)
+ ctx, cancel := o.contextWithTimeout()
+ defer cancel()
+ options := o.vpcSvc.NewDeleteVolumeOptions(item.id)
+ details, err := o.vpcSvc.DeleteVolumeWithContext(ctx, options)
+
+ if err != nil && details.StatusCode != http.StatusNotFound {
+ return errors.Wrapf(err, "Failed to delete disk name=%s, id=%s.If this error continues to persist for more than 20 minutes then please try to manually cleanup the volume using - ibmcloud is vold %s", item.name, item.id, item.id)
+ }
+
+ if err != nil && details.StatusCode == http.StatusNotFound {
+ // The resource is gone
+ o.deletePendingItems(item.typeName, []cloudResource{item})
+ o.Logger.Infof("Deleted disk %s", item.id)
+ }
+
+ return nil
+}
+
+func (o *ClusterUninstaller) waitForDiskDeletion(item cloudResource) error {
+ o.Logger.Infof("Waiting for disk %s to be deleted", item.id)
+ var skip = false
+
+ err := o.Retry(func() (error, bool) {
+ ctx, cancel := o.contextWithTimeout()
+ defer cancel()
+ volumeOptions := o.vpcSvc.NewGetVolumeOptions(item.id)
+ _, response, err := o.vpcSvc.GetVolumeWithContext(ctx, volumeOptions)
+ // Keep retry, until GetVolume returns volume not found
+ if err != nil && response.StatusCode == http.StatusNotFound {
+ skip = true
+ return nil, skip
+ }
+ return err, false // continue retry as we are not seeing error which means volume is available
+ })
+
+ if err == nil && skip {
+ // The resource is gone
+ o.deletePendingItems(item.typeName, []cloudResource{item})
+ o.Logger.Infof("Deleted disk %s", item.id)
+ } else {
+ return errors.Wrapf(err, "Failed to delete disk name=%s, id=%s.If this error continues to persist for more than 20 minutes then please try to manually cleanup the volume using - ibmcloud is vold %s", item.name, item.id, item.id)
+ }
+
+ return err
+}
+
+// destroyDisks removes all disk resources that have a name prefixed
+// with the cluster's infra ID.
+func (o *ClusterUninstaller) destroyDisks() error {
+ found, err := o.listDisks()
+ if err != nil {
+ return err
+ }
+ items := o.insertPendingItems("disk", found)
+ for _, item := range items {
+ err := o.deleteDisk(item)
+ if err != nil {
+ o.errorTracker.suppressWarning(item.key, err, o.Logger)
+ }
+ }
+
+ for _, item := range items {
+ err := o.waitForDiskDeletion(item)
+ if err != nil {
+ o.errorTracker.suppressWarning(item.key, err, o.Logger)
+ }
+ }
+
+ if items = o.getPendingItems("disk"); len(items) > 0 {
+ return errors.Errorf("%d items pending", len(items))
+ }
+ return nil
+}
diff --git a/pkg/destroy/ibmcloud/ibmcloud.go b/pkg/destroy/ibmcloud/ibmcloud.go
index 2282bf98b6..1633e6d338 100644
--- a/pkg/destroy/ibmcloud/ibmcloud.go
+++ b/pkg/destroy/ibmcloud/ibmcloud.go
@@ -51,6 +51,7 @@ type ClusterUninstaller struct {
iamPolicyManagementSvc *iampolicymanagementv1.IamPolicyManagementV1
zonesSvc *zonesv1.ZonesV1
dnsRecordsSvc *dnsrecordsv1.DnsRecordsV1
+ maxRetryAttempt int
resourceGroupID string
cosInstanceID string
@@ -74,9 +75,33 @@ func New(logger logrus.FieldLogger, metadata *types.ClusterMetadata) (providers.
UserProvidedSubnets: metadata.ClusterPlatformMetadata.IBMCloud.Subnets,
UserProvidedVPC: metadata.ClusterPlatformMetadata.IBMCloud.VPC,
pendingItemTracker: newPendingItemTracker(),
+ maxRetryAttempt: 30,
}, nil
}
+// Retry ...
+func (o *ClusterUninstaller) Retry(funcToRetry func() (error, bool)) error {
+ var err error
+ var stopRetry bool
+ retryGap := 10
+ for i := 0; i < o.maxRetryAttempt; i++ {
+ if i > 0 {
+ time.Sleep(time.Duration(retryGap) * time.Second)
+ }
+ // Call function which required retry, retry is decided by function itself
+ err, stopRetry = funcToRetry()
+ if stopRetry {
+ break
+ }
+
+ if (i + 1) < o.maxRetryAttempt {
+ o.Logger.Infof("UNEXPECTED RESULT, Re-attempting execution .., attempt=%d, retry-gap=%d, max-retry-Attempts=%d, stopRetry=%t, error=%v", i+1,
+ retryGap, o.maxRetryAttempt, stopRetry, err)
+ }
+ }
+ return err
+}
+
// Run is the entrypoint to start the uninstall process
func (o *ClusterUninstaller) Run() (*types.ClusterQuota, error) {
err := o.loadSDKServices()
@@ -100,6 +125,7 @@ func (o *ClusterUninstaller) destroyCluster() error {
{name: "Stop instances", execute: o.stopInstances},
}, {
{name: "Instances", execute: o.destroyInstances},
+ {name: "Disks", execute: o.destroyDisks},
}, {
{name: "Load Balancers", execute: o.destroyLoadBalancers},
}, {
@@ -403,3 +429,7 @@ func (t pendingItemTracker) deletePendingItems(itemType string, items []cloudRes
func isErrorStatus(code int64) bool {
return code != 0 && (code < 200 || code >= 300)
}
+
+func (o *ClusterUninstaller) clusterLabelFilter() string {
+ return fmt.Sprintf("kubernetes-io-cluster-%s:owned", o.InfraID)
+}
diff --git a/vendor/github.com/IBM/go-sdk-core/v5/core/base_service.go b/vendor/github.com/IBM/go-sdk-core/v5/core/base_service.go
index c124c12d54..687a236d15 100644
--- a/vendor/github.com/IBM/go-sdk-core/v5/core/base_service.go
+++ b/vendor/github.com/IBM/go-sdk-core/v5/core/base_service.go
@@ -1,6 +1,6 @@
package core
-// (C) Copyright IBM Corp. 2019, 2021.
+// (C) Copyright IBM Corp. 2019, 2022.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -227,31 +227,69 @@ func (service *BaseService) SetDefaultHeaders(headers http.Header) {
service.DefaultHeaders = headers
}
-// SetHTTPClient updates the client handling the requests.
+// SetHTTPClient will set "client" as the http.Client instance to be used
+// to invoke individual HTTP requests.
+// If automatic retries are currently enabled on "service", then
+// "client" will be set as the embedded client instance within
+// the retryable client; otherwise "client" will be stored
+// directly on "service".
func (service *BaseService) SetHTTPClient(client *http.Client) {
- service.Client = client
+ setMinimumTLSVersion(client)
+
+ if isRetryableClient(service.Client) {
+ // If "service" is currently holding a retryable client,
+ // then set "client" as the embedded client used for individual requests.
+ tr := service.Client.Transport.(*retryablehttp.RoundTripper)
+ tr.Client.HTTPClient = client
+ } else {
+ // Otherwise, just hang "client" directly off the base service.
+ service.Client = client
+ }
}
-// DisableSSLVerification skips SSL verification.
-// This function sets a new http.Client instance on the service
-// and configures it to bypass verification of server certificates
-// and host names, making the client susceptible to "man-in-the-middle"
-// attacks. This should be used only for testing.
+// GetHTTPClient will return the http.Client instance used
+// to invoke individual HTTP requests.
+// If automatic retries are enabled, the returned value will
+// be the http.Client instance embedded within the retryable client.
+// If automatic retries are not enabled, then the returned value
+// will simply be the "Client" field of the base service.
+func (service *BaseService) GetHTTPClient() *http.Client {
+ if isRetryableClient(service.Client) {
+ tr := service.Client.Transport.(*retryablehttp.RoundTripper)
+ return tr.Client.HTTPClient
+ }
+ return service.Client
+}
+
+// DisableSSLVerification will configure the service to
+// skip the verification of server certificates and hostnames.
+// This will make the client susceptible to "man-in-the-middle"
+// attacks. This should be used only for testing or in secure
+// environments.
func (service *BaseService) DisableSSLVerification() {
- client := DefaultHTTPClient()
- tr, ok := client.Transport.(*http.Transport)
- if tr != nil && ok {
- tr.TLSClientConfig = &tls.Config{InsecureSkipVerify: true} // #nosec G402
+ // Make sure we have a non-nil client hanging off the BaseService.
+ if service.Client == nil {
+ service.Client = DefaultHTTPClient()
}
- service.SetHTTPClient(client)
+ client := service.GetHTTPClient()
+ if tr, ok := client.Transport.(*http.Transport); tr != nil && ok {
+ // If no TLS config, then create a new one.
+ if tr.TLSClientConfig == nil {
+ tr.TLSClientConfig = &tls.Config{} // #nosec G402
+ }
+
+ // Disable server ssl cert & hostname verification.
+ tr.TLSClientConfig.InsecureSkipVerify = true // #nosec G402
+ }
}
// IsSSLDisabled returns true if and only if the service's http.Client instance
// is configured to skip verification of server SSL certificates.
func (service *BaseService) IsSSLDisabled() bool {
- if service.Client != nil {
- if tr, ok := service.Client.Transport.(*http.Transport); tr != nil && ok {
+ client := service.GetHTTPClient()
+ if client != nil {
+ if tr, ok := client.Transport.(*http.Transport); tr != nil && ok {
if tr.TLSClientConfig != nil {
return tr.TLSClientConfig.InsecureSkipVerify
}
@@ -260,6 +298,17 @@ func (service *BaseService) IsSSLDisabled() bool {
return false
}
+// setMinimumTLSVersion sets the minimum TLS version required by the client to TLS v1.2
+func setMinimumTLSVersion(client *http.Client) {
+ if tr, ok := client.Transport.(*http.Transport); tr != nil && ok {
+ if tr.TLSClientConfig == nil {
+ tr.TLSClientConfig = &tls.Config{} // #nosec G402
+ }
+
+ tr.TLSClientConfig.MinVersion = tls.VersionTLS12
+ }
+}
+
// SetEnableGzipCompression sets the service's EnableGzipCompression field
func (service *BaseService) SetEnableGzipCompression(enableGzip bool) {
service.Options.EnableGzipCompression = enableGzip
@@ -278,7 +327,7 @@ func (service *BaseService) buildUserAgent() string {
// SetUserAgent sets the user agent value.
func (service *BaseService) SetUserAgent(userAgentString string) {
if userAgentString == "" {
- service.UserAgent = service.buildUserAgent()
+ userAgentString = service.buildUserAgent()
}
service.UserAgent = userAgentString
}
@@ -348,25 +397,9 @@ func (service *BaseService) Request(req *http.Request, result interface{}) (deta
}
}
+ // Invoke the request, then check for errors during the invocation.
var httpResponse *http.Response
-
- // Try to get the retryable Client hidden inside service.Client
- retryableClient := getRetryableHTTPClient(service.Client)
- if retryableClient != nil {
- retryableRequest, retryableErr := retryablehttp.FromRequest(req)
- if retryableErr != nil {
- err = fmt.Errorf(ERRORMSG_CREATE_RETRYABLE_REQ, retryableErr.Error())
- return
- }
-
- // Invoke the retryable request.
- httpResponse, err = retryableClient.Do(retryableRequest)
- } else {
- // Invoke the normal (non-retryable) request.
- httpResponse, err = service.Client.Do(req)
- }
-
- // Check for errors during the invocation.
+ httpResponse, err = service.Client.Do(req)
if err != nil {
if strings.Contains(err.Error(), SSL_CERTIFICATION_ERROR) {
err = fmt.Errorf(ERRORMSG_SSL_VERIFICATION_FAILED + "\n" + err.Error())
@@ -577,31 +610,89 @@ func getErrorMessage(responseMap map[string]interface{}, statusCode int) string
return http.StatusText(statusCode)
}
-// EnableRetries will construct a "retryable" HTTP Client with the specified
-// configuration, and then set it on the service instance.
-// If maxRetries and/or maxRetryInterval are specified as 0, then default values
-// are used instead.
-func (service *BaseService) EnableRetries(maxRetries int, maxRetryInterval time.Duration) {
- client := NewRetryableHTTPClient()
- if maxRetries > 0 {
- client.RetryMax = maxRetries
+// isRetryableClient() will return true if and only if "client" is
+// an http.Client instance that is configured for automatic retries.
+// A retryable client is a client whose transport is a
+// retryablehttp.RoundTripper instance.
+func isRetryableClient(client *http.Client) bool {
+ var isRetryable bool = false
+ if client != nil && client.Transport != nil {
+ _, isRetryable = client.Transport.(*retryablehttp.RoundTripper)
}
- if maxRetryInterval > 0 {
- client.RetryWaitMax = maxRetryInterval
- }
-
- service.SetHTTPClient(client.StandardClient())
+ return isRetryable
}
-// DisableRetries will disable automatic retries by constructing a new
-// default (non-retryable) HTTP Client instance and setting it on the service.
+// EnableRetries will configure the service to perform automatic retries of failed requests.
+// If "maxRetries" and/or "maxRetryInterval" are specified as 0, then default values
+// are used instead.
+//
+// In a scenario where retries ARE NOT enabled:
+// - BaseService.Client will be a "normal" http.Client instance used to invoke requests
+// - BaseService.Client.Transport will be an instance of the default http.RoundTripper
+// - BaseService.Client.Do() calls http.RoundTripper.RoundTrip() to invoke the request
+// - Only one http.Client instance needed/used (BaseService.Client) in this scenario
+// - Result: "normal" request processing without any automatic retries being performed
+//
+// In a scenario where retries ARE enabled:
+// - BaseService.Client will be a "shim" http.Client instance
+// - BaseService.Client.Transport will be an instance of retryablehttp.RoundTripper
+// - BaseService.Client.Do() calls retryablehttp.RoundTripper.RoundTrip() (via the shim)
+// to invoke the request
+// - The retryablehttp.RoundTripper instance is configured with the retryablehttp.Client
+// instance which holds the various retry config properties (max retries, max interval, etc.)
+// - The retryablehttp.RoundTripper.RoundTrip() method triggers the retry logic in the retryablehttp.Client
+// - The retryablehttp.Client instance's HTTPClient field holds a "normal" http.Client instance,
+// which is used to invoke individual requests within the retry loop.
+// - To summarize, there are three client instances used for request processing in this scenario:
+// - The "shim" http.Client instance (BaseService.Client)
+// - The retryablehttp.Client instance that implements the retry logic
+// - The "normal" http.Client instance embedded in the retryablehttp.Client which is used to invoke
+// individual requests within the retry logic
+// - Result: Each request is invoked such that the automatic retry logic is employed
+func (service *BaseService) EnableRetries(maxRetries int, maxRetryInterval time.Duration) {
+ if isRetryableClient(service.Client) {
+ // If retries are already enabled, then we just need to adjust
+ // the retryable client's config using "maxRetries" and "maxRetryInterval".
+ tr := service.Client.Transport.(*retryablehttp.RoundTripper)
+ if maxRetries > 0 {
+ tr.Client.RetryMax = maxRetries
+ }
+ if maxRetryInterval > 0 {
+ tr.Client.RetryWaitMax = maxRetryInterval
+ }
+ } else {
+ // Otherwise, we need to create a new retryable client instance
+ // and hang it off the base service.
+ client := NewRetryableClientWithHTTPClient(service.Client)
+ if maxRetries > 0 {
+ client.RetryMax = maxRetries
+ }
+ if maxRetryInterval > 0 {
+ client.RetryWaitMax = maxRetryInterval
+ }
+
+ // Hang the retryable client off the base service via the "shim" client.
+ service.Client = client.StandardClient()
+ }
+}
+
+// DisableRetries will disable automatic retries in the service.
func (service *BaseService) DisableRetries() {
- service.SetHTTPClient(DefaultHTTPClient())
+ if isRetryableClient(service.Client) {
+ // If the current client hanging off the base service is retryable,
+ // then we need to get ahold of the embedded http.Client instance
+ // and set that on the base service and effectively remove
+ // the retryable client instance.
+ tr := service.Client.Transport.(*retryablehttp.RoundTripper)
+ service.Client = tr.Client.HTTPClient
+ }
}
// DefaultHTTPClient returns a non-retryable http client with default configuration.
func DefaultHTTPClient() *http.Client {
- return cleanhttp.DefaultPooledClient()
+ client := cleanhttp.DefaultPooledClient()
+ setMinimumTLSVersion(client)
+ return client
}
// httpLogger is a shim layer used to allow the Go core's logger to be used with the retryablehttp interfaces.
@@ -615,30 +706,34 @@ func (l *httpLogger) Printf(format string, inserts ...interface{}) {
}
}
-// NewRetryableHTTPClient returns a new instance of go-retryablehttp.Client
+// NewRetryableHTTPClient returns a new instance of a retryable client
// with a default configuration that supports Go SDK usage.
func NewRetryableHTTPClient() *retryablehttp.Client {
+ return NewRetryableClientWithHTTPClient(nil)
+}
+
+// NewRetryableClientWithHTTPClient will return a new instance of a
+// retryable client, using "httpClient" as the embedded client used to
+// invoke individual requests within the retry logic.
+// If "httpClient" is passed in as nil, then a default HTTP client will be
+// used as the embedded client instead.
+func NewRetryableClientWithHTTPClient(httpClient *http.Client) *retryablehttp.Client {
client := retryablehttp.NewClient()
client.Logger = &httpLogger{}
client.CheckRetry = IBMCloudSDKRetryPolicy
client.Backoff = IBMCloudSDKBackoffPolicy
client.ErrorHandler = retryablehttp.PassthroughErrorHandler
- return client
-}
-// getRetryableHTTPClient returns the "retryable" Client hidden inside the specified http.Client instance
-// or nil if "client" is not hiding a retryable Client instance.
-func getRetryableHTTPClient(client *http.Client) *retryablehttp.Client {
- if client != nil {
- if client.Transport != nil {
- // A retryable client will have its Transport field set to an
- // instance of retryablehttp.RoundTripper.
- if rt, ok := client.Transport.(*retryablehttp.RoundTripper); ok {
- return rt.Client
- }
- }
+ if httpClient != nil {
+ // If a non-nil http client was passed in, then let's use that
+ // as our embedded client used to invoke individual requests.
+ client.HTTPClient = httpClient
+ } else {
+ // Otherwise, we'll use construct a default HTTP client and use that
+ client.HTTPClient = DefaultHTTPClient()
}
- return nil
+
+ return client
}
var (
diff --git a/vendor/github.com/IBM/go-sdk-core/v5/core/constants.go b/vendor/github.com/IBM/go-sdk-core/v5/core/constants.go
index b02274edfd..923d1ebcee 100644
--- a/vendor/github.com/IBM/go-sdk-core/v5/core/constants.go
+++ b/vendor/github.com/IBM/go-sdk-core/v5/core/constants.go
@@ -1,6 +1,6 @@
package core
-// (C) Copyright IBM Corp. 2019, 2021.
+// (C) Copyright IBM Corp. 2019, 2022.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -76,7 +76,6 @@ const (
ERRORMSG_PARAM_NOT_SLICE = "The 'slice' parameter must be a slice"
ERRORMSG_MARSHAL_SLICE = "An error occurred while marshalling the slice: %s"
ERRORMSG_CONVERT_SLICE = "An error occurred while converting 'slice' to string slice"
- ERRORMSG_CREATE_RETRYABLE_REQ = "An error occurred while creating a retryable http Request: %s"
ERRORMSG_UNEXPECTED_STATUS_CODE = "Unexpected HTTP status code %d (%s)"
ERRORMSG_UNMARSHAL_AUTH_RESPONSE = "error unmarshalling authentication response: %s"
ERRORMSG_UNABLE_RETRIEVE_CRTOKEN = "unable to retrieve compute resource token value: %s" // #nosec G101
diff --git a/vendor/github.com/IBM/go-sdk-core/v5/core/container_authenticator.go b/vendor/github.com/IBM/go-sdk-core/v5/core/container_authenticator.go
index ff73283759..9892da9cc6 100644
--- a/vendor/github.com/IBM/go-sdk-core/v5/core/container_authenticator.go
+++ b/vendor/github.com/IBM/go-sdk-core/v5/core/container_authenticator.go
@@ -54,7 +54,8 @@ type ContainerAuthenticator struct {
// [optional] The IAM token server's base endpoint URL.
// Default value: "https://iam.cloud.ibm.com"
- URL string
+ URL string
+ urlInit sync.Once
// [optional] The ClientID and ClientSecret fields are used to form a "basic auth"
// Authorization header for interactions with the IAM token server.
@@ -223,6 +224,20 @@ func (authenticator *ContainerAuthenticator) Authenticate(request *http.Request)
return nil
}
+// url returns the authenticator's URL property after potentially initializing it.
+func (authenticator *ContainerAuthenticator) url() string {
+ authenticator.urlInit.Do(func() {
+ if authenticator.URL == "" {
+ // If URL was not specified, then use the default IAM endpoint.
+ authenticator.URL = defaultIamTokenServerEndpoint
+ } else {
+ // Canonicalize the URL by removing the operation path if it was specified by the user.
+ authenticator.URL = strings.TrimSuffix(authenticator.URL, iamAuthOperationPathGetToken)
+ }
+ })
+ return authenticator.URL
+}
+
// getTokenData returns the tokenData field from the authenticator with synchronization.
func (authenticator *ContainerAuthenticator) getTokenData() *iamTokenData {
authenticator.tokenDataMutex.Lock()
@@ -332,7 +347,6 @@ func (authenticator *ContainerAuthenticator) invokeRequestTokenData() error {
// that to obtain a new IAM access token from the IAM token server.
func (authenticator *ContainerAuthenticator) RequestToken() (*IamTokenServerResponse, error) {
var err error
- var operationPath string = "/identity/token"
// First, retrieve the CR token value for this compute resource.
crToken, err := authenticator.retrieveCRToken()
@@ -343,18 +357,9 @@ func (authenticator *ContainerAuthenticator) RequestToken() (*IamTokenServerResp
return nil, NewAuthenticationError(&DetailedResponse{}, err)
}
- // Use the default IAM URL if one was not specified by the user.
- url := authenticator.URL
- if url == "" {
- url = defaultIamTokenServerEndpoint
- } else {
- // Canonicalize the URL by removing the operation path if it was specified by the user.
- url = strings.TrimSuffix(url, operationPath)
- }
-
// Set up the request for the IAM "get token" invocation.
builder := NewRequestBuilder(POST)
- _, err = builder.ResolveRequestURL(url, operationPath, nil)
+ _, err = builder.ResolveRequestURL(authenticator.url(), iamAuthOperationPathGetToken, nil)
if err != nil {
return nil, NewAuthenticationError(&DetailedResponse{}, err)
}
diff --git a/vendor/github.com/IBM/go-sdk-core/v5/core/iam_authenticator.go b/vendor/github.com/IBM/go-sdk-core/v5/core/iam_authenticator.go
index 6a3247e45e..da4e957750 100644
--- a/vendor/github.com/IBM/go-sdk-core/v5/core/iam_authenticator.go
+++ b/vendor/github.com/IBM/go-sdk-core/v5/core/iam_authenticator.go
@@ -48,7 +48,8 @@ type IamAuthenticator struct {
// The URL representing the IAM token server's endpoint; If not specified,
// a suitable default value will be used [optional].
- URL string
+ URL string
+ urlInit sync.Once
// The ClientId and ClientSecret fields are used to form a "basic auth"
// Authorization header for interactions with the IAM token server.
@@ -226,6 +227,20 @@ func (authenticator *IamAuthenticator) Authenticate(request *http.Request) error
return nil
}
+// url returns the authenticator's URL property after potentially initializing it.
+func (authenticator *IamAuthenticator) url() string {
+ authenticator.urlInit.Do(func() {
+ if authenticator.URL == "" {
+ // If URL was not specified, then use the default IAM endpoint.
+ authenticator.URL = defaultIamTokenServerEndpoint
+ } else {
+ // Canonicalize the URL by removing the operation path if it was specified by the user.
+ authenticator.URL = strings.TrimSuffix(authenticator.URL, iamAuthOperationPathGetToken)
+ }
+ })
+ return authenticator.URL
+}
+
// getTokenData returns the tokenData field from the authenticator.
func (authenticator *IamAuthenticator) getTokenData() *iamTokenData {
authenticator.tokenDataMutex.Lock()
@@ -260,9 +275,24 @@ func (authenticator *IamAuthenticator) setTokenData(tokenData *iamTokenData) {
// and that the ClientId and ClientSecret properties are mutually inclusive.
func (this *IamAuthenticator) Validate() error {
- // The user should specify exactly one of ApiKey or RefreshToken.
- if this.ApiKey == "" && this.RefreshToken == "" ||
- this.ApiKey != "" && this.RefreshToken != "" {
+ // The user should specify at least one of ApiKey or RefreshToken.
+ // Note: We'll allow both ApiKey and RefreshToken to be specified,
+ // in which case we'd use ApiKey in the RequestToken() method.
+ // Consider this scenario...
+ // - An IamAuthenticator instance is configured with an apikey and is initially
+ // declared to be "valid" by the Validate() method.
+ // - The authenticator is used to construct a service, then an operation is
+ // invoked which then triggers the very first call to RequestToken().
+ // - The authenticator invokes the IAM get_token operation and then receives
+ // the response. The authenticator copies the refresh_token value from the response
+ // to the authenticator's RefreshToken field.
+ // - At this point, the authenticator would have non-empty values in both the
+ // ApiKey and RefreshToken fields.
+ // This all means that we must try to make sure that a previously-validated
+ // instance of the authenticator doesn't become invalidated simply through
+ // normal use.
+ //
+ if this.ApiKey == "" && this.RefreshToken == "" {
return fmt.Errorf(ERRORMSG_EXCLUSIVE_PROPS_ERROR, "ApiKey", "RefreshToken")
}
@@ -271,10 +301,9 @@ func (this *IamAuthenticator) Validate() error {
}
// Validate ClientId and ClientSecret.
- // If RefreshToken is not specified, then both or neither should be specified.
- // If RefreshToken is specified, then both must be specified.
- if this.ClientId == "" && this.ClientSecret == "" && this.RefreshToken == "" {
- // Do nothing as this is the valid scenario
+ // Either both or neither should be specified.
+ if this.ClientId == "" && this.ClientSecret == "" {
+ // Do nothing as this is the valid scenario.
} else {
// Since it is NOT the case that both properties are empty, make sure BOTH are specified.
if this.ClientId == "" {
@@ -348,17 +377,8 @@ func (authenticator *IamAuthenticator) invokeRequestTokenData() error {
// RequestToken fetches a new access token from the token server.
func (authenticator *IamAuthenticator) RequestToken() (*IamTokenServerResponse, error) {
- // Use the default IAM URL if one was not specified by the user.
- url := authenticator.URL
- if url == "" {
- url = defaultIamTokenServerEndpoint
- } else {
- // Canonicalize the URL by removing the operation path if it was specified by the user.
- url = strings.TrimSuffix(url, iamAuthOperationPathGetToken)
- }
-
builder := NewRequestBuilder(POST)
- _, err := builder.ResolveRequestURL(url, iamAuthOperationPathGetToken, nil)
+ _, err := builder.ResolveRequestURL(authenticator.url(), iamAuthOperationPathGetToken, nil)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/IBM/go-sdk-core/v5/core/version.go b/vendor/github.com/IBM/go-sdk-core/v5/core/version.go
index 9f8c0a039a..7b09a3b3aa 100644
--- a/vendor/github.com/IBM/go-sdk-core/v5/core/version.go
+++ b/vendor/github.com/IBM/go-sdk-core/v5/core/version.go
@@ -15,4 +15,4 @@ package core
// limitations under the License.
// Version of the SDK
-const __VERSION__ = "5.9.1"
+const __VERSION__ = "5.9.5"
diff --git a/vendor/github.com/IBM/go-sdk-core/v5/core/vpc_instance_authenticator.go b/vendor/github.com/IBM/go-sdk-core/v5/core/vpc_instance_authenticator.go
index e0130d7ee2..11a851b405 100644
--- a/vendor/github.com/IBM/go-sdk-core/v5/core/vpc_instance_authenticator.go
+++ b/vendor/github.com/IBM/go-sdk-core/v5/core/vpc_instance_authenticator.go
@@ -280,11 +280,6 @@ func (authenticator *VpcInstanceAuthenticator) invokeRequestTokenData() error {
// and then (2) exchange that for an IAM access token.
func (authenticator *VpcInstanceAuthenticator) RequestToken() (iamTokenResponse *IamTokenServerResponse, err error) {
- // Use the default VPC base endpoint if user didn't specifiy the URL property.
- if authenticator.URL == "" {
- authenticator.URL = vpcauthDefaultIMSEndpoint
- }
-
// Retrieve the instance identity token from the VPC Instance Metadata Service.
instanceIdentityToken, err := authenticator.retrieveInstanceIdentityToken()
if err != nil {
diff --git a/vendor/github.com/IBM/vpc-go-sdk/common/version.go b/vendor/github.com/IBM/vpc-go-sdk/common/version.go
index 157beb25bc..67f6a4d978 100644
--- a/vendor/github.com/IBM/vpc-go-sdk/common/version.go
+++ b/vendor/github.com/IBM/vpc-go-sdk/common/version.go
@@ -1,4 +1,4 @@
package common
// Version of the SDK
-const Version = "1.0.1"
+const Version = "0.20.0"
diff --git a/vendor/github.com/IBM/vpc-go-sdk/vpcv1/vpc_v1.go b/vendor/github.com/IBM/vpc-go-sdk/vpcv1/vpc_v1.go
index 5b5b30be5d..468fb69d58 100644
--- a/vendor/github.com/IBM/vpc-go-sdk/vpcv1/vpc_v1.go
+++ b/vendor/github.com/IBM/vpc-go-sdk/vpcv1/vpc_v1.go
@@ -1,5 +1,5 @@
/**
- * (C) Copyright IBM Corp. 2021.
+ * (C) Copyright IBM Corp. 2020, 2021, 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/*
- * IBM OpenAPI SDK Code Generator Version: 3.28.0-55613c9e-20210220-164656
+ * IBM OpenAPI SDK Code Generator Version: 3.48.1-52130155-20220425-145431
*/
// Package vpcv1 : Operations and models for the VpcV1 service
@@ -34,18 +34,18 @@ import (
"github.com/go-openapi/strfmt"
)
-// VpcV1 : The IBM Cloud Virtual Private Cloud (VPC) API can be used to programmatically provision and manage
-// infrastructure resources, including virtual server instances, subnets, volumes, and load balancers.
+// VpcV1 : The IBM Cloud Virtual Private Cloud (VPC) API can be used to programmatically provision and manage virtual
+// server instances, along with subnets, volumes, load balancers, and more.
//
-// Version: 2021-03-30
+// API Version: 2022-05-31
type VpcV1 struct {
Service *core.BaseService
- // Requests the version of the API as of a date in the format `YYYY-MM-DD`. Any date up to the current date may be
- // provided. Specify the current date to request the latest version.
+ // The API version, in format `YYYY-MM-DD`. For the API behavior documented here, specify any date between `2022-03-29`
+ // and today's date (UTC).
Version *string
- // The infrastructure generation for the request. For the API behavior documented here, use
+ // The infrastructure generation. For the API behavior documented here, specify
// `2`.
generation *int64
}
@@ -62,8 +62,8 @@ type VpcV1Options struct {
URL string
Authenticator core.Authenticator
- // Requests the version of the API as of a date in the format `YYYY-MM-DD`. Any date up to the current date may be
- // provided. Specify the current date to request the latest version.
+ // The API version, in format `YYYY-MM-DD`. For the API behavior documented here, specify any date between `2022-03-29`
+ // and today's date (UTC).
Version *string
}
@@ -121,7 +121,7 @@ func NewVpcV1(options *VpcV1Options) (service *VpcV1, err error) {
}
if options.Version == nil {
- options.Version = core.StringPtr("2021-03-30")
+ options.Version = core.StringPtr("2022-05-31")
}
service = &VpcV1{
@@ -242,11 +242,13 @@ func (vpc *VpcV1) ListVpcsWithContext(ctx context.Context, listVpcsOptions *List
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPCCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPCCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -315,11 +317,13 @@ func (vpc *VpcV1) CreateVPCWithContext(ctx context.Context, createVPCOptions *Cr
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPC)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPC)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -430,11 +434,13 @@ func (vpc *VpcV1) GetVPCWithContext(ctx context.Context, getVPCOptions *GetVPCOp
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPC)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPC)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -497,11 +503,13 @@ func (vpc *VpcV1) UpdateVPCWithContext(ctx context.Context, updateVPCOptions *Up
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPC)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPC)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -559,11 +567,13 @@ func (vpc *VpcV1) GetVPCDefaultNetworkACLWithContext(ctx context.Context, getVPC
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDefaultNetworkACL)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDefaultNetworkACL)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -622,18 +632,21 @@ func (vpc *VpcV1) GetVPCDefaultRoutingTableWithContext(ctx context.Context, getV
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDefaultRoutingTable)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDefaultRoutingTable)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
// GetVPCDefaultSecurityGroup : Retrieve a VPC's default security group
-// This request retrieves the default security group for the VPC specified by the identifier in the URL. The default
-// security group is applied to any new network interfaces in the VPC that do not specify a security group.
+// This request retrieves the default security group for the VPC specified by the identifier in the URL. Resources that
+// optionally allow a security group to be specified upon creation will be attached to this security group if a security
+// group is not specified.
func (vpc *VpcV1) GetVPCDefaultSecurityGroup(getVPCDefaultSecurityGroupOptions *GetVPCDefaultSecurityGroupOptions) (result *DefaultSecurityGroup, response *core.DetailedResponse, err error) {
return vpc.GetVPCDefaultSecurityGroupWithContext(context.Background(), getVPCDefaultSecurityGroupOptions)
}
@@ -684,11 +697,13 @@ func (vpc *VpcV1) GetVPCDefaultSecurityGroupWithContext(ctx context.Context, get
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDefaultSecurityGroup)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDefaultSecurityGroup)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -751,11 +766,13 @@ func (vpc *VpcV1) ListVPCAddressPrefixesWithContext(ctx context.Context, listVPC
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalAddressPrefixCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalAddressPrefixCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -832,11 +849,13 @@ func (vpc *VpcV1) CreateVPCAddressPrefixWithContext(ctx context.Context, createV
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalAddressPrefix)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalAddressPrefix)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -947,11 +966,13 @@ func (vpc *VpcV1) GetVPCAddressPrefixWithContext(ctx context.Context, getVPCAddr
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalAddressPrefix)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalAddressPrefix)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -1016,11 +1037,13 @@ func (vpc *VpcV1) UpdateVPCAddressPrefixWithContext(ctx context.Context, updateV
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalAddressPrefix)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalAddressPrefix)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -1088,11 +1111,13 @@ func (vpc *VpcV1) ListVPCRoutesWithContext(ctx context.Context, listVPCRoutesOpt
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRouteCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRouteCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -1173,11 +1198,13 @@ func (vpc *VpcV1) CreateVPCRouteWithContext(ctx context.Context, createVPCRouteO
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoute)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoute)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -1287,11 +1314,13 @@ func (vpc *VpcV1) GetVPCRouteWithContext(ctx context.Context, getVPCRouteOptions
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoute)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoute)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -1356,11 +1385,13 @@ func (vpc *VpcV1) UpdateVPCRouteWithContext(ctx context.Context, updateVPCRouteO
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoute)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoute)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -1368,8 +1399,8 @@ func (vpc *VpcV1) UpdateVPCRouteWithContext(ctx context.Context, updateVPCRouteO
// ListVPCRoutingTables : List all routing tables for a VPC
// This request lists all user-defined routing tables for a VPC. Each subnet in a VPC is associated with a routing
// table, which controls delivery of packets sent on that subnet according to the action of the most specific matching
-// route in the table. If multiple equally-specific routes exist, traffic will be distributed across them. If no
-// routes match, delivery will be controlled by the system's built-in routes.
+// route in the table. If multiple equally-specific routes exist, traffic will be distributed across them. If no routes
+// match, delivery will be controlled by the system's built-in routes.
func (vpc *VpcV1) ListVPCRoutingTables(listVPCRoutingTablesOptions *ListVPCRoutingTablesOptions) (result *RoutingTableCollection, response *core.DetailedResponse, err error) {
return vpc.ListVPCRoutingTablesWithContext(context.Background(), listVPCRoutingTablesOptions)
}
@@ -1429,11 +1460,13 @@ func (vpc *VpcV1) ListVPCRoutingTablesWithContext(ctx context.Context, listVPCRo
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoutingTableCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoutingTableCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -1514,11 +1547,13 @@ func (vpc *VpcV1) CreateVPCRoutingTableWithContext(ctx context.Context, createVP
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoutingTable)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoutingTable)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -1629,11 +1664,13 @@ func (vpc *VpcV1) GetVPCRoutingTableWithContext(ctx context.Context, getVPCRouti
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoutingTable)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoutingTable)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -1698,20 +1735,22 @@ func (vpc *VpcV1) UpdateVPCRoutingTableWithContext(ctx context.Context, updateVP
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoutingTable)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoutingTable)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
// ListVPCRoutingTableRoutes : List all routes in a VPC routing table
-// This request lists all routes in a VPC routing table. If a subnet has been associated with this routing table,
-// delivery of packets sent on a subnet is performed according to the action of the most specific matching route in the
-// table (provided the subnet and route are in the same zone). If multiple equally-specific routes exist, traffic will
-// be distributed across them. If no routes match, delivery will be controlled by the system's built-in routes.
+// This request lists all routes in a VPC routing table. If subnets are associated with this routing table, delivery of
+// packets sent on a subnet is performed according to the action of the most specific matching route in the table
+// (provided the subnet and route are in the same zone). If multiple equally-specific routes exist, traffic will be
+// distributed across them. If no routes match, delivery will be controlled by the system's built-in routes.
func (vpc *VpcV1) ListVPCRoutingTableRoutes(listVPCRoutingTableRoutesOptions *ListVPCRoutingTableRoutesOptions) (result *RouteCollection, response *core.DetailedResponse, err error) {
return vpc.ListVPCRoutingTableRoutesWithContext(context.Background(), listVPCRoutingTableRoutesOptions)
}
@@ -1769,11 +1808,13 @@ func (vpc *VpcV1) ListVPCRoutingTableRoutesWithContext(ctx context.Context, list
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRouteCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRouteCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -1854,11 +1895,13 @@ func (vpc *VpcV1) CreateVPCRoutingTableRouteWithContext(ctx context.Context, cre
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoute)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoute)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -1970,11 +2013,13 @@ func (vpc *VpcV1) GetVPCRoutingTableRouteWithContext(ctx context.Context, getVPC
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoute)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoute)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -2040,11 +2085,13 @@ func (vpc *VpcV1) UpdateVPCRoutingTableRouteWithContext(ctx context.Context, upd
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoute)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoute)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -2109,11 +2156,13 @@ func (vpc *VpcV1) ListSubnetsWithContext(ctx context.Context, listSubnetsOptions
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSubnetCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSubnetCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -2174,11 +2223,13 @@ func (vpc *VpcV1) CreateSubnetWithContext(ctx context.Context, createSubnetOptio
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSubnet)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSubnet)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -2289,11 +2340,13 @@ func (vpc *VpcV1) GetSubnetWithContext(ctx context.Context, getSubnetOptions *Ge
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSubnet)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSubnet)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -2357,11 +2410,13 @@ func (vpc *VpcV1) UpdateSubnetWithContext(ctx context.Context, updateSubnetOptio
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSubnet)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSubnet)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -2418,11 +2473,13 @@ func (vpc *VpcV1) GetSubnetNetworkACLWithContext(ctx context.Context, getSubnetN
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACL)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACL)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -2486,11 +2543,13 @@ func (vpc *VpcV1) ReplaceSubnetNetworkACLWithContext(ctx context.Context, replac
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACL)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACL)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -2598,11 +2657,13 @@ func (vpc *VpcV1) GetSubnetPublicGatewayWithContext(ctx context.Context, getSubn
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPublicGateway)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPublicGateway)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -2666,11 +2727,13 @@ func (vpc *VpcV1) SetSubnetPublicGatewayWithContext(ctx context.Context, setSubn
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPublicGateway)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPublicGateway)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -2727,11 +2790,13 @@ func (vpc *VpcV1) GetSubnetRoutingTableWithContext(ctx context.Context, getSubne
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoutingTable)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoutingTable)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -2798,17 +2863,20 @@ func (vpc *VpcV1) ReplaceSubnetRoutingTableWithContext(ctx context.Context, repl
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoutingTable)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoutingTable)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
// ListSubnetReservedIps : List all reserved IPs in a subnet
-// This request lists reserved IPs in a subnet that are unbound or bound to an endpoint gateway.
+// This request lists all reserved IPs in a subnet. A reserved IP resource will exist for every address in the subnet
+// which is not available for use.
func (vpc *VpcV1) ListSubnetReservedIps(listSubnetReservedIpsOptions *ListSubnetReservedIpsOptions) (result *ReservedIPCollection, response *core.DetailedResponse, err error) {
return vpc.ListSubnetReservedIpsWithContext(context.Background(), listSubnetReservedIpsOptions)
}
@@ -2868,17 +2936,20 @@ func (vpc *VpcV1) ListSubnetReservedIpsWithContext(ctx context.Context, listSubn
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIPCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIPCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
// CreateSubnetReservedIP : Reserve an IP in a subnet
-// This request reserves a system-selected IP address in a subnet.
+// This request reserves an IP address in a subnet. If the provided prototype object includes an `address`, the address
+// must not already be reserved.
func (vpc *VpcV1) CreateSubnetReservedIP(createSubnetReservedIPOptions *CreateSubnetReservedIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) {
return vpc.CreateSubnetReservedIPWithContext(context.Background(), createSubnetReservedIPOptions)
}
@@ -2921,6 +2992,9 @@ func (vpc *VpcV1) CreateSubnetReservedIPWithContext(ctx context.Context, createS
builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
body := make(map[string]interface{})
+ if createSubnetReservedIPOptions.Address != nil {
+ body["address"] = createSubnetReservedIPOptions.Address
+ }
if createSubnetReservedIPOptions.AutoDelete != nil {
body["auto_delete"] = createSubnetReservedIPOptions.AutoDelete
}
@@ -2945,16 +3019,18 @@ func (vpc *VpcV1) CreateSubnetReservedIPWithContext(ctx context.Context, createS
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIP)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIP)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
-// DeleteSubnetReservedIP : Release a reserved IP
+// DeleteSubnetReservedIP : Delete a reserved IP
// This request releases a reserved IP. This operation cannot be reversed.
func (vpc *VpcV1) DeleteSubnetReservedIP(deleteSubnetReservedIPOptions *DeleteSubnetReservedIPOptions) (response *core.DetailedResponse, err error) {
return vpc.DeleteSubnetReservedIPWithContext(context.Background(), deleteSubnetReservedIPOptions)
@@ -3059,11 +3135,13 @@ func (vpc *VpcV1) GetSubnetReservedIPWithContext(ctx context.Context, getSubnetR
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIP)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIP)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -3128,18 +3206,20 @@ func (vpc *VpcV1) UpdateSubnetReservedIPWithContext(ctx context.Context, updateS
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIP)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIP)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
// ListImages : List all images
-// This request lists all provisionable images available in the region. An image provides source data for a volume.
-// Images are either system-provided, or created from another source, such as importing from object storage.
+// This request lists all images available in the region. An image provides source data for a volume. Images are either
+// system-provided, or created from another source, such as importing from object storage.
//
// The images will be sorted by their `created_at` property values, with the newest first. Images with identical
// `created_at` values will be secondarily sorted by ascending `id` property values.
@@ -3200,19 +3280,22 @@ func (vpc *VpcV1) ListImagesWithContext(ctx context.Context, listImagesOptions *
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalImageCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalImageCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
// CreateImage : Create an image
// This request creates a new image from an image prototype object. The prototype object is structured in the same way
-// as a retrieved image, and contains the information necessary to create the new image. A URL to the image file on
-// object storage must be provided.
+// as a retrieved image, and contains the information necessary to create the new image. If an image is being imported,
+// a URL to the image file on object storage must be specified. If an image is being created from an existing volume,
+// that volume must be specified.
func (vpc *VpcV1) CreateImage(createImageOptions *CreateImageOptions) (result *Image, response *core.DetailedResponse, err error) {
return vpc.CreateImageWithContext(context.Background(), createImageOptions)
}
@@ -3265,18 +3348,22 @@ func (vpc *VpcV1) CreateImageWithContext(ctx context.Context, createImageOptions
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalImage)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalImage)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
// DeleteImage : Delete an image
-// This request deletes an image. This operation cannot be reversed. System-provided images are not allowed to be
-// deleted. An image with a `status` of `pending`, `tentative`, or `deleting` cannot be deleted.
+// This request deletes an image. This operation cannot be reversed. A system-provided image is not allowed to be
+// deleted. Additionally, an image cannot be deleted if it:
+// - has a `status` of `tentative` or `deleting`
+// - has a `status` of `pending` with a `status_reasons` code of `image_request_in_progress`.
func (vpc *VpcV1) DeleteImage(deleteImageOptions *DeleteImageOptions) (response *core.DetailedResponse, err error) {
return vpc.DeleteImageWithContext(context.Background(), deleteImageOptions)
}
@@ -3378,18 +3465,20 @@ func (vpc *VpcV1) GetImageWithContext(ctx context.Context, getImageOptions *GetI
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalImage)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalImage)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
// UpdateImage : Update an image
// This request updates an image with the information in a provided image patch. The image patch object is structured in
-// the same way as a retrieved image and contains only the information to be updated. System-provided images are not
+// the same way as a retrieved image and contains only the information to be updated. A system-provided image is not
// allowed to be updated. An image with a `status` of `deleting` cannot be updated.
func (vpc *VpcV1) UpdateImage(updateImageOptions *UpdateImageOptions) (result *Image, response *core.DetailedResponse, err error) {
return vpc.UpdateImageWithContext(context.Background(), updateImageOptions)
@@ -3447,11 +3536,13 @@ func (vpc *VpcV1) UpdateImageWithContext(ctx context.Context, updateImageOptions
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalImage)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalImage)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -3506,11 +3597,13 @@ func (vpc *VpcV1) ListOperatingSystemsWithContext(ctx context.Context, listOpera
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalOperatingSystemCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalOperatingSystemCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -3567,11 +3660,13 @@ func (vpc *VpcV1) GetOperatingSystemWithContext(ctx context.Context, getOperatin
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalOperatingSystem)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalOperatingSystem)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -3610,8 +3705,11 @@ func (vpc *VpcV1) ListKeysWithContext(ctx context.Context, listKeysOptions *List
builder.AddQuery("version", fmt.Sprint(*vpc.Version))
builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
- if listKeysOptions.ResourceGroupID != nil {
- builder.AddQuery("resource_group.id", fmt.Sprint(*listKeysOptions.ResourceGroupID))
+ if listKeysOptions.Start != nil {
+ builder.AddQuery("start", fmt.Sprint(*listKeysOptions.Start))
+ }
+ if listKeysOptions.Limit != nil {
+ builder.AddQuery("limit", fmt.Sprint(*listKeysOptions.Limit))
}
request, err := builder.Build()
@@ -3624,11 +3722,13 @@ func (vpc *VpcV1) ListKeysWithContext(ctx context.Context, listKeysOptions *List
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalKeyCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalKeyCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -3702,11 +3802,13 @@ func (vpc *VpcV1) CreateKeyWithContext(ctx context.Context, createKeyOptions *Cr
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalKey)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalKey)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -3814,11 +3916,13 @@ func (vpc *VpcV1) GetKeyWithContext(ctx context.Context, getKeyOptions *GetKeyOp
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalKey)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalKey)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -3881,11 +3985,13 @@ func (vpc *VpcV1) UpdateKeyWithContext(ctx context.Context, updateKeyOptions *Up
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalKey)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalKey)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -3935,11 +4041,13 @@ func (vpc *VpcV1) ListInstanceProfilesWithContext(ctx context.Context, listInsta
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceProfileCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceProfileCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -3996,11 +4104,13 @@ func (vpc *VpcV1) GetInstanceProfileWithContext(ctx context.Context, getInstance
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceProfile)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceProfile)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -4049,17 +4159,23 @@ func (vpc *VpcV1) ListInstanceTemplatesWithContext(ctx context.Context, listInst
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceTemplateCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceTemplateCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
// CreateInstanceTemplate : Create an instance template
-// This request creates a new instance template.
+// This request creates a new instance template. The prototype object is structured in the same way as a retrieved
+// instance template, and contains the information necessary to provision a new instance from the template.
+//
+// If a `source_template` is specified in the prototype object, its contents are copied into the new template prior to
+// copying any other properties provided in the prototype object.
func (vpc *VpcV1) CreateInstanceTemplate(createInstanceTemplateOptions *CreateInstanceTemplateOptions) (result InstanceTemplateIntf, response *core.DetailedResponse, err error) {
return vpc.CreateInstanceTemplateWithContext(context.Background(), createInstanceTemplateOptions)
}
@@ -4112,11 +4228,13 @@ func (vpc *VpcV1) CreateInstanceTemplateWithContext(ctx context.Context, createI
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceTemplate)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceTemplate)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -4224,11 +4342,13 @@ func (vpc *VpcV1) GetInstanceTemplateWithContext(ctx context.Context, getInstanc
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceTemplate)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceTemplate)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -4293,11 +4413,13 @@ func (vpc *VpcV1) UpdateInstanceTemplateWithContext(ctx context.Context, updateI
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceTemplate)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceTemplate)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -4356,6 +4478,24 @@ func (vpc *VpcV1) ListInstancesWithContext(ctx context.Context, listInstancesOpt
if listInstancesOptions.VPCName != nil {
builder.AddQuery("vpc.name", fmt.Sprint(*listInstancesOptions.VPCName))
}
+ if listInstancesOptions.DedicatedHostID != nil {
+ builder.AddQuery("dedicated_host.id", fmt.Sprint(*listInstancesOptions.DedicatedHostID))
+ }
+ if listInstancesOptions.DedicatedHostCRN != nil {
+ builder.AddQuery("dedicated_host.crn", fmt.Sprint(*listInstancesOptions.DedicatedHostCRN))
+ }
+ if listInstancesOptions.DedicatedHostName != nil {
+ builder.AddQuery("dedicated_host.name", fmt.Sprint(*listInstancesOptions.DedicatedHostName))
+ }
+ if listInstancesOptions.PlacementGroupID != nil {
+ builder.AddQuery("placement_group.id", fmt.Sprint(*listInstancesOptions.PlacementGroupID))
+ }
+ if listInstancesOptions.PlacementGroupCRN != nil {
+ builder.AddQuery("placement_group.crn", fmt.Sprint(*listInstancesOptions.PlacementGroupCRN))
+ }
+ if listInstancesOptions.PlacementGroupName != nil {
+ builder.AddQuery("placement_group.name", fmt.Sprint(*listInstancesOptions.PlacementGroupName))
+ }
request, err := builder.Build()
if err != nil {
@@ -4367,11 +4507,13 @@ func (vpc *VpcV1) ListInstancesWithContext(ctx context.Context, listInstancesOpt
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -4432,11 +4574,13 @@ func (vpc *VpcV1) CreateInstanceWithContext(ctx context.Context, createInstanceO
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstance)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstance)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -4546,11 +4690,13 @@ func (vpc *VpcV1) GetInstanceWithContext(ctx context.Context, getInstanceOptions
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstance)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstance)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -4614,11 +4760,13 @@ func (vpc *VpcV1) UpdateInstanceWithContext(ctx context.Context, updateInstanceO
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstance)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstance)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -4676,11 +4824,13 @@ func (vpc *VpcV1) GetInstanceInitializationWithContext(ctx context.Context, getI
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceInitialization)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceInitialization)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -4751,11 +4901,13 @@ func (vpc *VpcV1) CreateInstanceActionWithContext(ctx context.Context, createIns
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceAction)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceAction)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -4828,11 +4980,13 @@ func (vpc *VpcV1) CreateInstanceConsoleAccessTokenWithContext(ctx context.Contex
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceConsoleAccessToken)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceConsoleAccessToken)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -4891,11 +5045,13 @@ func (vpc *VpcV1) ListInstanceDisksWithContext(ctx context.Context, listInstance
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceDiskCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceDiskCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -4953,11 +5109,13 @@ func (vpc *VpcV1) GetInstanceDiskWithContext(ctx context.Context, getInstanceDis
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceDisk)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceDisk)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -5021,11 +5179,13 @@ func (vpc *VpcV1) UpdateInstanceDiskWithContext(ctx context.Context, updateInsta
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceDisk)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceDisk)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -5085,11 +5245,13 @@ func (vpc *VpcV1) ListInstanceNetworkInterfacesWithContext(ctx context.Context,
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterfaceUnpaginatedCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterfaceUnpaginatedCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -5150,8 +5312,8 @@ func (vpc *VpcV1) CreateInstanceNetworkInterfaceWithContext(ctx context.Context,
if createInstanceNetworkInterfaceOptions.Name != nil {
body["name"] = createInstanceNetworkInterfaceOptions.Name
}
- if createInstanceNetworkInterfaceOptions.PrimaryIpv4Address != nil {
- body["primary_ipv4_address"] = createInstanceNetworkInterfaceOptions.PrimaryIpv4Address
+ if createInstanceNetworkInterfaceOptions.PrimaryIP != nil {
+ body["primary_ip"] = createInstanceNetworkInterfaceOptions.PrimaryIP
}
if createInstanceNetworkInterfaceOptions.SecurityGroups != nil {
body["security_groups"] = createInstanceNetworkInterfaceOptions.SecurityGroups
@@ -5171,11 +5333,13 @@ func (vpc *VpcV1) CreateInstanceNetworkInterfaceWithContext(ctx context.Context,
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterface)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterface)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -5287,19 +5451,21 @@ func (vpc *VpcV1) GetInstanceNetworkInterfaceWithContext(ctx context.Context, ge
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterface)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterface)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
// UpdateInstanceNetworkInterface : Update a network interface
-// This request updates a network interface with the information in a provided network interface patch. The network
-// interface patch object is structured in the same way as a retrieved network interface and can contain an updated name
-// and/or port speed.
+// This request updates a network interface with the information provided in a network interface patch object. The
+// network interface patch object is structured in the same way as a retrieved network interface and needs to contain
+// only the information to be updated.
func (vpc *VpcV1) UpdateInstanceNetworkInterface(updateInstanceNetworkInterfaceOptions *UpdateInstanceNetworkInterfaceOptions) (result *NetworkInterface, response *core.DetailedResponse, err error) {
return vpc.UpdateInstanceNetworkInterfaceWithContext(context.Background(), updateInstanceNetworkInterfaceOptions)
}
@@ -5357,11 +5523,13 @@ func (vpc *VpcV1) UpdateInstanceNetworkInterfaceWithContext(ctx context.Context,
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterface)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterface)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -5419,11 +5587,13 @@ func (vpc *VpcV1) ListInstanceNetworkInterfaceFloatingIpsWithContext(ctx context
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIPUnpaginatedCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIPUnpaginatedCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -5536,11 +5706,13 @@ func (vpc *VpcV1) GetInstanceNetworkInterfaceFloatingIPWithContext(ctx context.C
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIP)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIP)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -5548,7 +5720,7 @@ func (vpc *VpcV1) GetInstanceNetworkInterfaceFloatingIPWithContext(ctx context.C
// AddInstanceNetworkInterfaceFloatingIP : Associate a floating IP with a network interface
// This request associates the specified floating IP with the specified network interface, replacing any existing
// association. For this request to succeed, the existing floating IP must not be required by another resource, such as
-// a public gateway. A request body is not required, and if supplied, is ignored.
+// a public gateway. A request body is not required, and if provided, is ignored.
func (vpc *VpcV1) AddInstanceNetworkInterfaceFloatingIP(addInstanceNetworkInterfaceFloatingIPOptions *AddInstanceNetworkInterfaceFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) {
return vpc.AddInstanceNetworkInterfaceFloatingIPWithContext(context.Background(), addInstanceNetworkInterfaceFloatingIPOptions)
}
@@ -5601,11 +5773,149 @@ func (vpc *VpcV1) AddInstanceNetworkInterfaceFloatingIPWithContext(ctx context.C
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIP)
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIP)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// ListInstanceNetworkInterfaceIps : List all reserved IPs bound to a network interface
+// This request lists all reserved IPs bound to a network interface.
+func (vpc *VpcV1) ListInstanceNetworkInterfaceIps(listInstanceNetworkInterfaceIpsOptions *ListInstanceNetworkInterfaceIpsOptions) (result *ReservedIPCollectionNetworkInterfaceContext, response *core.DetailedResponse, err error) {
+ return vpc.ListInstanceNetworkInterfaceIpsWithContext(context.Background(), listInstanceNetworkInterfaceIpsOptions)
+}
+
+// ListInstanceNetworkInterfaceIpsWithContext is an alternate form of the ListInstanceNetworkInterfaceIps method which supports a Context parameter
+func (vpc *VpcV1) ListInstanceNetworkInterfaceIpsWithContext(ctx context.Context, listInstanceNetworkInterfaceIpsOptions *ListInstanceNetworkInterfaceIpsOptions) (result *ReservedIPCollectionNetworkInterfaceContext, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(listInstanceNetworkInterfaceIpsOptions, "listInstanceNetworkInterfaceIpsOptions cannot be nil")
if err != nil {
return
}
- response.Result = result
+ err = core.ValidateStruct(listInstanceNetworkInterfaceIpsOptions, "listInstanceNetworkInterfaceIpsOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "instance_id": *listInstanceNetworkInterfaceIpsOptions.InstanceID,
+ "network_interface_id": *listInstanceNetworkInterfaceIpsOptions.NetworkInterfaceID,
+ }
+
+ builder := core.NewRequestBuilder(core.GET)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{network_interface_id}/ips`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range listInstanceNetworkInterfaceIpsOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListInstanceNetworkInterfaceIps")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+ if listInstanceNetworkInterfaceIpsOptions.Start != nil {
+ builder.AddQuery("start", fmt.Sprint(*listInstanceNetworkInterfaceIpsOptions.Start))
+ }
+ if listInstanceNetworkInterfaceIpsOptions.Limit != nil {
+ builder.AddQuery("limit", fmt.Sprint(*listInstanceNetworkInterfaceIpsOptions.Limit))
+ }
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIPCollectionNetworkInterfaceContext)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// GetInstanceNetworkInterfaceIP : Retrieve bound reserved IP
+// This request a retrieves the specified reserved IP address if it is bound to the network interface and instance
+// specified in the URL.
+func (vpc *VpcV1) GetInstanceNetworkInterfaceIP(getInstanceNetworkInterfaceIPOptions *GetInstanceNetworkInterfaceIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) {
+ return vpc.GetInstanceNetworkInterfaceIPWithContext(context.Background(), getInstanceNetworkInterfaceIPOptions)
+}
+
+// GetInstanceNetworkInterfaceIPWithContext is an alternate form of the GetInstanceNetworkInterfaceIP method which supports a Context parameter
+func (vpc *VpcV1) GetInstanceNetworkInterfaceIPWithContext(ctx context.Context, getInstanceNetworkInterfaceIPOptions *GetInstanceNetworkInterfaceIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(getInstanceNetworkInterfaceIPOptions, "getInstanceNetworkInterfaceIPOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(getInstanceNetworkInterfaceIPOptions, "getInstanceNetworkInterfaceIPOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "instance_id": *getInstanceNetworkInterfaceIPOptions.InstanceID,
+ "network_interface_id": *getInstanceNetworkInterfaceIPOptions.NetworkInterfaceID,
+ "id": *getInstanceNetworkInterfaceIPOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.GET)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{network_interface_id}/ips/{id}`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range getInstanceNetworkInterfaceIPOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetInstanceNetworkInterfaceIP")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIP)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
return
}
@@ -5664,19 +5974,22 @@ func (vpc *VpcV1) ListInstanceVolumeAttachmentsWithContext(ctx context.Context,
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeAttachmentCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeAttachmentCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
// CreateInstanceVolumeAttachment : Create a volume attachment on an instance
-// This request creates a new volume attachment from a volume attachment prototype object. The prototype object is
-// structured in the same way as a retrieved volume attachment, and contains the information necessary to create the new
-// volume attachment. The creation of a new volume attachment connects a volume to an instance.
+// This request creates a new volume attachment from a volume attachment prototype object, connecting a volume to an
+// instance. For this request to succeed, the specified volume must not be busy. The prototype object is structured in
+// the same way as a retrieved volume attachment, and contains the information necessary to create the new volume
+// attachment.
func (vpc *VpcV1) CreateInstanceVolumeAttachment(createInstanceVolumeAttachmentOptions *CreateInstanceVolumeAttachmentOptions) (result *VolumeAttachment, response *core.DetailedResponse, err error) {
return vpc.CreateInstanceVolumeAttachmentWithContext(context.Background(), createInstanceVolumeAttachmentOptions)
}
@@ -5743,17 +6056,20 @@ func (vpc *VpcV1) CreateInstanceVolumeAttachmentWithContext(ctx context.Context,
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeAttachment)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeAttachment)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
// DeleteInstanceVolumeAttachment : Delete a volume attachment
-// This request deletes a volume attachment. The deletion of a volume attachment detaches a volume from an instance.
+// This request deletes a volume attachment. This operation cannot be reversed, but a new volume attachment may
+// subsequently be created for the volume. For this request to succeed, the volume must not be busy.
func (vpc *VpcV1) DeleteInstanceVolumeAttachment(deleteInstanceVolumeAttachmentOptions *DeleteInstanceVolumeAttachmentOptions) (response *core.DetailedResponse, err error) {
return vpc.DeleteInstanceVolumeAttachmentWithContext(context.Background(), deleteInstanceVolumeAttachmentOptions)
}
@@ -5857,19 +6173,21 @@ func (vpc *VpcV1) GetInstanceVolumeAttachmentWithContext(ctx context.Context, ge
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeAttachment)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeAttachment)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
// UpdateInstanceVolumeAttachment : Update a volume attachment
-// This request updates a volume attachment with the information in a provided volume attachment patch. The volume
-// attachment patch object is structured in the same way as a retrieved volume attachment and can contain an updated
-// name.
+// This request updates a volume attachment with the information provided in a volume attachment patch object. The
+// volume attachment patch object is structured in the same way as a retrieved volume attachment and needs to contain
+// only the information to be updated.
func (vpc *VpcV1) UpdateInstanceVolumeAttachment(updateInstanceVolumeAttachmentOptions *UpdateInstanceVolumeAttachmentOptions) (result *VolumeAttachment, response *core.DetailedResponse, err error) {
return vpc.UpdateInstanceVolumeAttachmentWithContext(context.Background(), updateInstanceVolumeAttachmentOptions)
}
@@ -5927,11 +6245,13 @@ func (vpc *VpcV1) UpdateInstanceVolumeAttachmentWithContext(ctx context.Context,
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeAttachment)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeAttachment)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -5986,11 +6306,13 @@ func (vpc *VpcV1) ListInstanceGroupsWithContext(ctx context.Context, listInstanc
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -6074,11 +6396,13 @@ func (vpc *VpcV1) CreateInstanceGroupWithContext(ctx context.Context, createInst
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroup)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroup)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -6187,11 +6511,13 @@ func (vpc *VpcV1) GetInstanceGroupWithContext(ctx context.Context, getInstanceGr
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroup)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroup)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -6255,11 +6581,13 @@ func (vpc *VpcV1) UpdateInstanceGroupWithContext(ctx context.Context, updateInst
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroup)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroup)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -6373,11 +6701,13 @@ func (vpc *VpcV1) ListInstanceGroupManagersWithContext(ctx context.Context, list
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -6440,11 +6770,13 @@ func (vpc *VpcV1) CreateInstanceGroupManagerWithContext(ctx context.Context, cre
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManager)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManager)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -6554,11 +6886,13 @@ func (vpc *VpcV1) GetInstanceGroupManagerWithContext(ctx context.Context, getIns
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManager)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManager)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -6622,11 +6956,342 @@ func (vpc *VpcV1) UpdateInstanceGroupManagerWithContext(ctx context.Context, upd
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManager)
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManager)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// ListInstanceGroupManagerActions : List all actions for an instance group manager
+// This request lists all instance group actions for an instance group manager.
+func (vpc *VpcV1) ListInstanceGroupManagerActions(listInstanceGroupManagerActionsOptions *ListInstanceGroupManagerActionsOptions) (result *InstanceGroupManagerActionsCollection, response *core.DetailedResponse, err error) {
+ return vpc.ListInstanceGroupManagerActionsWithContext(context.Background(), listInstanceGroupManagerActionsOptions)
+}
+
+// ListInstanceGroupManagerActionsWithContext is an alternate form of the ListInstanceGroupManagerActions method which supports a Context parameter
+func (vpc *VpcV1) ListInstanceGroupManagerActionsWithContext(ctx context.Context, listInstanceGroupManagerActionsOptions *ListInstanceGroupManagerActionsOptions) (result *InstanceGroupManagerActionsCollection, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(listInstanceGroupManagerActionsOptions, "listInstanceGroupManagerActionsOptions cannot be nil")
if err != nil {
return
}
- response.Result = result
+ err = core.ValidateStruct(listInstanceGroupManagerActionsOptions, "listInstanceGroupManagerActionsOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "instance_group_id": *listInstanceGroupManagerActionsOptions.InstanceGroupID,
+ "instance_group_manager_id": *listInstanceGroupManagerActionsOptions.InstanceGroupManagerID,
+ }
+
+ builder := core.NewRequestBuilder(core.GET)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range listInstanceGroupManagerActionsOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListInstanceGroupManagerActions")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+ if listInstanceGroupManagerActionsOptions.Start != nil {
+ builder.AddQuery("start", fmt.Sprint(*listInstanceGroupManagerActionsOptions.Start))
+ }
+ if listInstanceGroupManagerActionsOptions.Limit != nil {
+ builder.AddQuery("limit", fmt.Sprint(*listInstanceGroupManagerActionsOptions.Limit))
+ }
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerActionsCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// CreateInstanceGroupManagerAction : Create an instance group manager action
+// This request creates a new instance group manager action.
+func (vpc *VpcV1) CreateInstanceGroupManagerAction(createInstanceGroupManagerActionOptions *CreateInstanceGroupManagerActionOptions) (result InstanceGroupManagerActionIntf, response *core.DetailedResponse, err error) {
+ return vpc.CreateInstanceGroupManagerActionWithContext(context.Background(), createInstanceGroupManagerActionOptions)
+}
+
+// CreateInstanceGroupManagerActionWithContext is an alternate form of the CreateInstanceGroupManagerAction method which supports a Context parameter
+func (vpc *VpcV1) CreateInstanceGroupManagerActionWithContext(ctx context.Context, createInstanceGroupManagerActionOptions *CreateInstanceGroupManagerActionOptions) (result InstanceGroupManagerActionIntf, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(createInstanceGroupManagerActionOptions, "createInstanceGroupManagerActionOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(createInstanceGroupManagerActionOptions, "createInstanceGroupManagerActionOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "instance_group_id": *createInstanceGroupManagerActionOptions.InstanceGroupID,
+ "instance_group_manager_id": *createInstanceGroupManagerActionOptions.InstanceGroupManagerID,
+ }
+
+ builder := core.NewRequestBuilder(core.POST)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range createInstanceGroupManagerActionOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateInstanceGroupManagerAction")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+ builder.AddHeader("Content-Type", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ _, err = builder.SetBodyContentJSON(createInstanceGroupManagerActionOptions.InstanceGroupManagerActionPrototype)
+ if err != nil {
+ return
+ }
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerAction)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// DeleteInstanceGroupManagerAction : Delete specified instance group manager action
+// This request deletes an instance group manager action. This operation cannot be reversed.
+func (vpc *VpcV1) DeleteInstanceGroupManagerAction(deleteInstanceGroupManagerActionOptions *DeleteInstanceGroupManagerActionOptions) (response *core.DetailedResponse, err error) {
+ return vpc.DeleteInstanceGroupManagerActionWithContext(context.Background(), deleteInstanceGroupManagerActionOptions)
+}
+
+// DeleteInstanceGroupManagerActionWithContext is an alternate form of the DeleteInstanceGroupManagerAction method which supports a Context parameter
+func (vpc *VpcV1) DeleteInstanceGroupManagerActionWithContext(ctx context.Context, deleteInstanceGroupManagerActionOptions *DeleteInstanceGroupManagerActionOptions) (response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(deleteInstanceGroupManagerActionOptions, "deleteInstanceGroupManagerActionOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(deleteInstanceGroupManagerActionOptions, "deleteInstanceGroupManagerActionOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "instance_group_id": *deleteInstanceGroupManagerActionOptions.InstanceGroupID,
+ "instance_group_manager_id": *deleteInstanceGroupManagerActionOptions.InstanceGroupManagerID,
+ "id": *deleteInstanceGroupManagerActionOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.DELETE)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions/{id}`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range deleteInstanceGroupManagerActionOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteInstanceGroupManagerAction")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ response, err = vpc.Service.Request(request, nil)
+
+ return
+}
+
+// GetInstanceGroupManagerAction : Retrieve specified instance group manager action
+// This request retrieves a single instance group manager action specified by identifier in the URL.
+func (vpc *VpcV1) GetInstanceGroupManagerAction(getInstanceGroupManagerActionOptions *GetInstanceGroupManagerActionOptions) (result InstanceGroupManagerActionIntf, response *core.DetailedResponse, err error) {
+ return vpc.GetInstanceGroupManagerActionWithContext(context.Background(), getInstanceGroupManagerActionOptions)
+}
+
+// GetInstanceGroupManagerActionWithContext is an alternate form of the GetInstanceGroupManagerAction method which supports a Context parameter
+func (vpc *VpcV1) GetInstanceGroupManagerActionWithContext(ctx context.Context, getInstanceGroupManagerActionOptions *GetInstanceGroupManagerActionOptions) (result InstanceGroupManagerActionIntf, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(getInstanceGroupManagerActionOptions, "getInstanceGroupManagerActionOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(getInstanceGroupManagerActionOptions, "getInstanceGroupManagerActionOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "instance_group_id": *getInstanceGroupManagerActionOptions.InstanceGroupID,
+ "instance_group_manager_id": *getInstanceGroupManagerActionOptions.InstanceGroupManagerID,
+ "id": *getInstanceGroupManagerActionOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.GET)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions/{id}`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range getInstanceGroupManagerActionOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetInstanceGroupManagerAction")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerAction)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// UpdateInstanceGroupManagerAction : Update specified instance group manager action
+// This request updates an instance group manager action.
+func (vpc *VpcV1) UpdateInstanceGroupManagerAction(updateInstanceGroupManagerActionOptions *UpdateInstanceGroupManagerActionOptions) (result InstanceGroupManagerActionIntf, response *core.DetailedResponse, err error) {
+ return vpc.UpdateInstanceGroupManagerActionWithContext(context.Background(), updateInstanceGroupManagerActionOptions)
+}
+
+// UpdateInstanceGroupManagerActionWithContext is an alternate form of the UpdateInstanceGroupManagerAction method which supports a Context parameter
+func (vpc *VpcV1) UpdateInstanceGroupManagerActionWithContext(ctx context.Context, updateInstanceGroupManagerActionOptions *UpdateInstanceGroupManagerActionOptions) (result InstanceGroupManagerActionIntf, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(updateInstanceGroupManagerActionOptions, "updateInstanceGroupManagerActionOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(updateInstanceGroupManagerActionOptions, "updateInstanceGroupManagerActionOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "instance_group_id": *updateInstanceGroupManagerActionOptions.InstanceGroupID,
+ "instance_group_manager_id": *updateInstanceGroupManagerActionOptions.InstanceGroupManagerID,
+ "id": *updateInstanceGroupManagerActionOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.PATCH)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions/{id}`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range updateInstanceGroupManagerActionOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateInstanceGroupManagerAction")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+ builder.AddHeader("Content-Type", "application/merge-patch+json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ _, err = builder.SetBodyContentJSON(updateInstanceGroupManagerActionOptions.InstanceGroupManagerActionPatch)
+ if err != nil {
+ return
+ }
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerAction)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
return
}
@@ -6690,11 +7355,13 @@ func (vpc *VpcV1) ListInstanceGroupManagerPoliciesWithContext(ctx context.Contex
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerPolicyCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerPolicyCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -6758,11 +7425,13 @@ func (vpc *VpcV1) CreateInstanceGroupManagerPolicyWithContext(ctx context.Contex
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerPolicy)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerPolicy)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -6874,11 +7543,13 @@ func (vpc *VpcV1) GetInstanceGroupManagerPolicyWithContext(ctx context.Context,
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerPolicy)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerPolicy)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -6943,11 +7614,13 @@ func (vpc *VpcV1) UpdateInstanceGroupManagerPolicyWithContext(ctx context.Contex
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerPolicy)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerPolicy)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -7062,11 +7735,13 @@ func (vpc *VpcV1) ListInstanceGroupMembershipsWithContext(ctx context.Context, l
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupMembershipCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupMembershipCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -7177,11 +7852,13 @@ func (vpc *VpcV1) GetInstanceGroupMembershipWithContext(ctx context.Context, get
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupMembership)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupMembership)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -7245,11 +7922,13 @@ func (vpc *VpcV1) UpdateInstanceGroupMembershipWithContext(ctx context.Context,
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupMembership)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupMembership)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -7300,6 +7979,9 @@ func (vpc *VpcV1) ListDedicatedHostGroupsWithContext(ctx context.Context, listDe
if listDedicatedHostGroupsOptions.ZoneName != nil {
builder.AddQuery("zone.name", fmt.Sprint(*listDedicatedHostGroupsOptions.ZoneName))
}
+ if listDedicatedHostGroupsOptions.Name != nil {
+ builder.AddQuery("name", fmt.Sprint(*listDedicatedHostGroupsOptions.Name))
+ }
request, err := builder.Build()
if err != nil {
@@ -7311,11 +7993,13 @@ func (vpc *VpcV1) ListDedicatedHostGroupsWithContext(ctx context.Context, listDe
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostGroupCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostGroupCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -7386,11 +8070,13 @@ func (vpc *VpcV1) CreateDedicatedHostGroupWithContext(ctx context.Context, creat
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostGroup)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostGroup)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -7498,11 +8184,13 @@ func (vpc *VpcV1) GetDedicatedHostGroupWithContext(ctx context.Context, getDedic
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostGroup)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostGroup)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -7567,11 +8255,13 @@ func (vpc *VpcV1) UpdateDedicatedHostGroupWithContext(ctx context.Context, updat
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostGroup)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostGroup)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -7627,11 +8317,13 @@ func (vpc *VpcV1) ListDedicatedHostProfilesWithContext(ctx context.Context, list
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostProfileCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostProfileCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -7688,11 +8380,13 @@ func (vpc *VpcV1) GetDedicatedHostProfileWithContext(ctx context.Context, getDed
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostProfile)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostProfile)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -7745,6 +8439,9 @@ func (vpc *VpcV1) ListDedicatedHostsWithContext(ctx context.Context, listDedicat
if listDedicatedHostsOptions.ZoneName != nil {
builder.AddQuery("zone.name", fmt.Sprint(*listDedicatedHostsOptions.ZoneName))
}
+ if listDedicatedHostsOptions.Name != nil {
+ builder.AddQuery("name", fmt.Sprint(*listDedicatedHostsOptions.Name))
+ }
request, err := builder.Build()
if err != nil {
@@ -7756,11 +8453,13 @@ func (vpc *VpcV1) ListDedicatedHostsWithContext(ctx context.Context, listDedicat
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -7819,11 +8518,13 @@ func (vpc *VpcV1) CreateDedicatedHostWithContext(ctx context.Context, createDedi
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHost)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHost)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -7882,11 +8583,13 @@ func (vpc *VpcV1) ListDedicatedHostDisksWithContext(ctx context.Context, listDed
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostDiskCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostDiskCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -7944,11 +8647,13 @@ func (vpc *VpcV1) GetDedicatedHostDiskWithContext(ctx context.Context, getDedica
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostDisk)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostDisk)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -8012,11 +8717,13 @@ func (vpc *VpcV1) UpdateDedicatedHostDiskWithContext(ctx context.Context, update
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostDisk)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostDisk)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -8124,11 +8831,13 @@ func (vpc *VpcV1) GetDedicatedHostWithContext(ctx context.Context, getDedicatedH
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHost)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHost)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -8193,11 +8902,2042 @@ func (vpc *VpcV1) UpdateDedicatedHostWithContext(ctx context.Context, updateDedi
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHost)
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHost)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// ListPlacementGroups : List all placement groups
+// This request lists all placement groups in the region.
+func (vpc *VpcV1) ListPlacementGroups(listPlacementGroupsOptions *ListPlacementGroupsOptions) (result *PlacementGroupCollection, response *core.DetailedResponse, err error) {
+ return vpc.ListPlacementGroupsWithContext(context.Background(), listPlacementGroupsOptions)
+}
+
+// ListPlacementGroupsWithContext is an alternate form of the ListPlacementGroups method which supports a Context parameter
+func (vpc *VpcV1) ListPlacementGroupsWithContext(ctx context.Context, listPlacementGroupsOptions *ListPlacementGroupsOptions) (result *PlacementGroupCollection, response *core.DetailedResponse, err error) {
+ err = core.ValidateStruct(listPlacementGroupsOptions, "listPlacementGroupsOptions")
if err != nil {
return
}
- response.Result = result
+
+ builder := core.NewRequestBuilder(core.GET)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/placement_groups`, nil)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range listPlacementGroupsOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListPlacementGroups")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+ if listPlacementGroupsOptions.Start != nil {
+ builder.AddQuery("start", fmt.Sprint(*listPlacementGroupsOptions.Start))
+ }
+ if listPlacementGroupsOptions.Limit != nil {
+ builder.AddQuery("limit", fmt.Sprint(*listPlacementGroupsOptions.Limit))
+ }
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPlacementGroupCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// CreatePlacementGroup : Create a placement group
+// This request creates a new placement group.
+func (vpc *VpcV1) CreatePlacementGroup(createPlacementGroupOptions *CreatePlacementGroupOptions) (result *PlacementGroup, response *core.DetailedResponse, err error) {
+ return vpc.CreatePlacementGroupWithContext(context.Background(), createPlacementGroupOptions)
+}
+
+// CreatePlacementGroupWithContext is an alternate form of the CreatePlacementGroup method which supports a Context parameter
+func (vpc *VpcV1) CreatePlacementGroupWithContext(ctx context.Context, createPlacementGroupOptions *CreatePlacementGroupOptions) (result *PlacementGroup, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(createPlacementGroupOptions, "createPlacementGroupOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(createPlacementGroupOptions, "createPlacementGroupOptions")
+ if err != nil {
+ return
+ }
+
+ builder := core.NewRequestBuilder(core.POST)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/placement_groups`, nil)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range createPlacementGroupOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreatePlacementGroup")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+ builder.AddHeader("Content-Type", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ body := make(map[string]interface{})
+ if createPlacementGroupOptions.Strategy != nil {
+ body["strategy"] = createPlacementGroupOptions.Strategy
+ }
+ if createPlacementGroupOptions.Name != nil {
+ body["name"] = createPlacementGroupOptions.Name
+ }
+ if createPlacementGroupOptions.ResourceGroup != nil {
+ body["resource_group"] = createPlacementGroupOptions.ResourceGroup
+ }
+ _, err = builder.SetBodyContentJSON(body)
+ if err != nil {
+ return
+ }
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPlacementGroup)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// DeletePlacementGroup : Delete a placement group
+// This request deletes a placement group. This operation cannot be reversed. For this request to succeed, the placement
+// group must not be associated with an instance.
+func (vpc *VpcV1) DeletePlacementGroup(deletePlacementGroupOptions *DeletePlacementGroupOptions) (response *core.DetailedResponse, err error) {
+ return vpc.DeletePlacementGroupWithContext(context.Background(), deletePlacementGroupOptions)
+}
+
+// DeletePlacementGroupWithContext is an alternate form of the DeletePlacementGroup method which supports a Context parameter
+func (vpc *VpcV1) DeletePlacementGroupWithContext(ctx context.Context, deletePlacementGroupOptions *DeletePlacementGroupOptions) (response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(deletePlacementGroupOptions, "deletePlacementGroupOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(deletePlacementGroupOptions, "deletePlacementGroupOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "id": *deletePlacementGroupOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.DELETE)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/placement_groups/{id}`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range deletePlacementGroupOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeletePlacementGroup")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ response, err = vpc.Service.Request(request, nil)
+
+ return
+}
+
+// GetPlacementGroup : Retrieve a placement group
+// This request retrieves a single placement group specified by identifier in the URL.
+func (vpc *VpcV1) GetPlacementGroup(getPlacementGroupOptions *GetPlacementGroupOptions) (result *PlacementGroup, response *core.DetailedResponse, err error) {
+ return vpc.GetPlacementGroupWithContext(context.Background(), getPlacementGroupOptions)
+}
+
+// GetPlacementGroupWithContext is an alternate form of the GetPlacementGroup method which supports a Context parameter
+func (vpc *VpcV1) GetPlacementGroupWithContext(ctx context.Context, getPlacementGroupOptions *GetPlacementGroupOptions) (result *PlacementGroup, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(getPlacementGroupOptions, "getPlacementGroupOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(getPlacementGroupOptions, "getPlacementGroupOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "id": *getPlacementGroupOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.GET)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/placement_groups/{id}`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range getPlacementGroupOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetPlacementGroup")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPlacementGroup)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// UpdatePlacementGroup : Update a placement group
+// This request updates a placement group with the information provided placement group patch. The placement group patch
+// object is structured in the same way as a retrieved placement group and contains only the information to be updated.
+func (vpc *VpcV1) UpdatePlacementGroup(updatePlacementGroupOptions *UpdatePlacementGroupOptions) (result *PlacementGroup, response *core.DetailedResponse, err error) {
+ return vpc.UpdatePlacementGroupWithContext(context.Background(), updatePlacementGroupOptions)
+}
+
+// UpdatePlacementGroupWithContext is an alternate form of the UpdatePlacementGroup method which supports a Context parameter
+func (vpc *VpcV1) UpdatePlacementGroupWithContext(ctx context.Context, updatePlacementGroupOptions *UpdatePlacementGroupOptions) (result *PlacementGroup, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(updatePlacementGroupOptions, "updatePlacementGroupOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(updatePlacementGroupOptions, "updatePlacementGroupOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "id": *updatePlacementGroupOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.PATCH)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/placement_groups/{id}`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range updatePlacementGroupOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdatePlacementGroup")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+ builder.AddHeader("Content-Type", "application/merge-patch+json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ _, err = builder.SetBodyContentJSON(updatePlacementGroupOptions.PlacementGroupPatch)
+ if err != nil {
+ return
+ }
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPlacementGroup)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// ListBareMetalServerProfiles : List all bare metal server profiles
+// This request lists all bare metal server profiles available in the region. A bare metal server profile specifies the
+// performance characteristics and pricing model for a bare metal server.
+func (vpc *VpcV1) ListBareMetalServerProfiles(listBareMetalServerProfilesOptions *ListBareMetalServerProfilesOptions) (result *BareMetalServerProfileCollection, response *core.DetailedResponse, err error) {
+ return vpc.ListBareMetalServerProfilesWithContext(context.Background(), listBareMetalServerProfilesOptions)
+}
+
+// ListBareMetalServerProfilesWithContext is an alternate form of the ListBareMetalServerProfiles method which supports a Context parameter
+func (vpc *VpcV1) ListBareMetalServerProfilesWithContext(ctx context.Context, listBareMetalServerProfilesOptions *ListBareMetalServerProfilesOptions) (result *BareMetalServerProfileCollection, response *core.DetailedResponse, err error) {
+ err = core.ValidateStruct(listBareMetalServerProfilesOptions, "listBareMetalServerProfilesOptions")
+ if err != nil {
+ return
+ }
+
+ builder := core.NewRequestBuilder(core.GET)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_server/profiles`, nil)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range listBareMetalServerProfilesOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListBareMetalServerProfiles")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+ if listBareMetalServerProfilesOptions.Start != nil {
+ builder.AddQuery("start", fmt.Sprint(*listBareMetalServerProfilesOptions.Start))
+ }
+ if listBareMetalServerProfilesOptions.Limit != nil {
+ builder.AddQuery("limit", fmt.Sprint(*listBareMetalServerProfilesOptions.Limit))
+ }
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerProfileCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// GetBareMetalServerProfile : Retrieve a bare metal server profile
+// This request retrieves a single bare metal server profile specified by the name in the URL.
+func (vpc *VpcV1) GetBareMetalServerProfile(getBareMetalServerProfileOptions *GetBareMetalServerProfileOptions) (result *BareMetalServerProfile, response *core.DetailedResponse, err error) {
+ return vpc.GetBareMetalServerProfileWithContext(context.Background(), getBareMetalServerProfileOptions)
+}
+
+// GetBareMetalServerProfileWithContext is an alternate form of the GetBareMetalServerProfile method which supports a Context parameter
+func (vpc *VpcV1) GetBareMetalServerProfileWithContext(ctx context.Context, getBareMetalServerProfileOptions *GetBareMetalServerProfileOptions) (result *BareMetalServerProfile, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(getBareMetalServerProfileOptions, "getBareMetalServerProfileOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(getBareMetalServerProfileOptions, "getBareMetalServerProfileOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "name": *getBareMetalServerProfileOptions.Name,
+ }
+
+ builder := core.NewRequestBuilder(core.GET)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_server/profiles/{name}`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range getBareMetalServerProfileOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetBareMetalServerProfile")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerProfile)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// ListBareMetalServers : List all bare metal servers
+// This request lists all bare metal servers in the region.
+func (vpc *VpcV1) ListBareMetalServers(listBareMetalServersOptions *ListBareMetalServersOptions) (result *BareMetalServerCollection, response *core.DetailedResponse, err error) {
+ return vpc.ListBareMetalServersWithContext(context.Background(), listBareMetalServersOptions)
+}
+
+// ListBareMetalServersWithContext is an alternate form of the ListBareMetalServers method which supports a Context parameter
+func (vpc *VpcV1) ListBareMetalServersWithContext(ctx context.Context, listBareMetalServersOptions *ListBareMetalServersOptions) (result *BareMetalServerCollection, response *core.DetailedResponse, err error) {
+ err = core.ValidateStruct(listBareMetalServersOptions, "listBareMetalServersOptions")
+ if err != nil {
+ return
+ }
+
+ builder := core.NewRequestBuilder(core.GET)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers`, nil)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range listBareMetalServersOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListBareMetalServers")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+ if listBareMetalServersOptions.Start != nil {
+ builder.AddQuery("start", fmt.Sprint(*listBareMetalServersOptions.Start))
+ }
+ if listBareMetalServersOptions.Limit != nil {
+ builder.AddQuery("limit", fmt.Sprint(*listBareMetalServersOptions.Limit))
+ }
+ if listBareMetalServersOptions.ResourceGroupID != nil {
+ builder.AddQuery("resource_group.id", fmt.Sprint(*listBareMetalServersOptions.ResourceGroupID))
+ }
+ if listBareMetalServersOptions.Name != nil {
+ builder.AddQuery("name", fmt.Sprint(*listBareMetalServersOptions.Name))
+ }
+ if listBareMetalServersOptions.VPCID != nil {
+ builder.AddQuery("vpc.id", fmt.Sprint(*listBareMetalServersOptions.VPCID))
+ }
+ if listBareMetalServersOptions.VPCCRN != nil {
+ builder.AddQuery("vpc.crn", fmt.Sprint(*listBareMetalServersOptions.VPCCRN))
+ }
+ if listBareMetalServersOptions.VPCName != nil {
+ builder.AddQuery("vpc.name", fmt.Sprint(*listBareMetalServersOptions.VPCName))
+ }
+ if listBareMetalServersOptions.NetworkInterfacesSubnetID != nil {
+ builder.AddQuery("network_interfaces.subnet.id", fmt.Sprint(*listBareMetalServersOptions.NetworkInterfacesSubnetID))
+ }
+ if listBareMetalServersOptions.NetworkInterfacesSubnetCRN != nil {
+ builder.AddQuery("network_interfaces.subnet.crn", fmt.Sprint(*listBareMetalServersOptions.NetworkInterfacesSubnetCRN))
+ }
+ if listBareMetalServersOptions.NetworkInterfacesSubnetName != nil {
+ builder.AddQuery("network_interfaces.subnet.name", fmt.Sprint(*listBareMetalServersOptions.NetworkInterfacesSubnetName))
+ }
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// CreateBareMetalServer : Create a bare metal server
+// This request provisions a new bare metal server from a prototype object. The prototype object is structured in the
+// same way as a retrieved bare metal server, and contains the information necessary to provision the new bare metal
+// server. The bare metal server is automatically started.
+func (vpc *VpcV1) CreateBareMetalServer(createBareMetalServerOptions *CreateBareMetalServerOptions) (result *BareMetalServer, response *core.DetailedResponse, err error) {
+ return vpc.CreateBareMetalServerWithContext(context.Background(), createBareMetalServerOptions)
+}
+
+// CreateBareMetalServerWithContext is an alternate form of the CreateBareMetalServer method which supports a Context parameter
+func (vpc *VpcV1) CreateBareMetalServerWithContext(ctx context.Context, createBareMetalServerOptions *CreateBareMetalServerOptions) (result *BareMetalServer, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(createBareMetalServerOptions, "createBareMetalServerOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(createBareMetalServerOptions, "createBareMetalServerOptions")
+ if err != nil {
+ return
+ }
+
+ builder := core.NewRequestBuilder(core.POST)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers`, nil)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range createBareMetalServerOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateBareMetalServer")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+ builder.AddHeader("Content-Type", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ body := make(map[string]interface{})
+ if createBareMetalServerOptions.Initialization != nil {
+ body["initialization"] = createBareMetalServerOptions.Initialization
+ }
+ if createBareMetalServerOptions.PrimaryNetworkInterface != nil {
+ body["primary_network_interface"] = createBareMetalServerOptions.PrimaryNetworkInterface
+ }
+ if createBareMetalServerOptions.Profile != nil {
+ body["profile"] = createBareMetalServerOptions.Profile
+ }
+ if createBareMetalServerOptions.Zone != nil {
+ body["zone"] = createBareMetalServerOptions.Zone
+ }
+ if createBareMetalServerOptions.Name != nil {
+ body["name"] = createBareMetalServerOptions.Name
+ }
+ if createBareMetalServerOptions.NetworkInterfaces != nil {
+ body["network_interfaces"] = createBareMetalServerOptions.NetworkInterfaces
+ }
+ if createBareMetalServerOptions.ResourceGroup != nil {
+ body["resource_group"] = createBareMetalServerOptions.ResourceGroup
+ }
+ if createBareMetalServerOptions.VPC != nil {
+ body["vpc"] = createBareMetalServerOptions.VPC
+ }
+ _, err = builder.SetBodyContentJSON(body)
+ if err != nil {
+ return
+ }
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServer)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// CreateBareMetalServerConsoleAccessToken : Create a console access token for a bare metal server
+// This request creates a new single-use console access token for a bare metal server. All console configuration is
+// provided at token create time, and the token is subsequently used in the `access_token` query parameter for the
+// WebSocket request. The access token is only valid for a short period of time, and a maximum of one token is valid
+// for a given bare metal server at a time.
+func (vpc *VpcV1) CreateBareMetalServerConsoleAccessToken(createBareMetalServerConsoleAccessTokenOptions *CreateBareMetalServerConsoleAccessTokenOptions) (result *BareMetalServerConsoleAccessToken, response *core.DetailedResponse, err error) {
+ return vpc.CreateBareMetalServerConsoleAccessTokenWithContext(context.Background(), createBareMetalServerConsoleAccessTokenOptions)
+}
+
+// CreateBareMetalServerConsoleAccessTokenWithContext is an alternate form of the CreateBareMetalServerConsoleAccessToken method which supports a Context parameter
+func (vpc *VpcV1) CreateBareMetalServerConsoleAccessTokenWithContext(ctx context.Context, createBareMetalServerConsoleAccessTokenOptions *CreateBareMetalServerConsoleAccessTokenOptions) (result *BareMetalServerConsoleAccessToken, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(createBareMetalServerConsoleAccessTokenOptions, "createBareMetalServerConsoleAccessTokenOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(createBareMetalServerConsoleAccessTokenOptions, "createBareMetalServerConsoleAccessTokenOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "bare_metal_server_id": *createBareMetalServerConsoleAccessTokenOptions.BareMetalServerID,
+ }
+
+ builder := core.NewRequestBuilder(core.POST)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/console_access_token`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range createBareMetalServerConsoleAccessTokenOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateBareMetalServerConsoleAccessToken")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+ builder.AddHeader("Content-Type", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ body := make(map[string]interface{})
+ if createBareMetalServerConsoleAccessTokenOptions.ConsoleType != nil {
+ body["console_type"] = createBareMetalServerConsoleAccessTokenOptions.ConsoleType
+ }
+ if createBareMetalServerConsoleAccessTokenOptions.Force != nil {
+ body["force"] = createBareMetalServerConsoleAccessTokenOptions.Force
+ }
+ _, err = builder.SetBodyContentJSON(body)
+ if err != nil {
+ return
+ }
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerConsoleAccessToken)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// ListBareMetalServerDisks : List all disks on a bare metal server
+// This request lists all disks on a bare metal server. A disk is a block device that is locally attached to the
+// physical server. By default, the listed disks are sorted by their `created_at` property values, with the newest disk
+// first.
+func (vpc *VpcV1) ListBareMetalServerDisks(listBareMetalServerDisksOptions *ListBareMetalServerDisksOptions) (result *BareMetalServerDiskCollection, response *core.DetailedResponse, err error) {
+ return vpc.ListBareMetalServerDisksWithContext(context.Background(), listBareMetalServerDisksOptions)
+}
+
+// ListBareMetalServerDisksWithContext is an alternate form of the ListBareMetalServerDisks method which supports a Context parameter
+func (vpc *VpcV1) ListBareMetalServerDisksWithContext(ctx context.Context, listBareMetalServerDisksOptions *ListBareMetalServerDisksOptions) (result *BareMetalServerDiskCollection, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(listBareMetalServerDisksOptions, "listBareMetalServerDisksOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(listBareMetalServerDisksOptions, "listBareMetalServerDisksOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "bare_metal_server_id": *listBareMetalServerDisksOptions.BareMetalServerID,
+ }
+
+ builder := core.NewRequestBuilder(core.GET)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/disks`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range listBareMetalServerDisksOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListBareMetalServerDisks")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerDiskCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// GetBareMetalServerDisk : Retrieve a bare metal server disk
+// This request retrieves a single disk specified by the identifier in the URL.
+func (vpc *VpcV1) GetBareMetalServerDisk(getBareMetalServerDiskOptions *GetBareMetalServerDiskOptions) (result *BareMetalServerDisk, response *core.DetailedResponse, err error) {
+ return vpc.GetBareMetalServerDiskWithContext(context.Background(), getBareMetalServerDiskOptions)
+}
+
+// GetBareMetalServerDiskWithContext is an alternate form of the GetBareMetalServerDisk method which supports a Context parameter
+func (vpc *VpcV1) GetBareMetalServerDiskWithContext(ctx context.Context, getBareMetalServerDiskOptions *GetBareMetalServerDiskOptions) (result *BareMetalServerDisk, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(getBareMetalServerDiskOptions, "getBareMetalServerDiskOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(getBareMetalServerDiskOptions, "getBareMetalServerDiskOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "bare_metal_server_id": *getBareMetalServerDiskOptions.BareMetalServerID,
+ "id": *getBareMetalServerDiskOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.GET)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/disks/{id}`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range getBareMetalServerDiskOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetBareMetalServerDisk")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerDisk)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// UpdateBareMetalServerDisk : Update a bare metal server disk
+// This request updates the bare metal server disk with the information in a provided patch.
+func (vpc *VpcV1) UpdateBareMetalServerDisk(updateBareMetalServerDiskOptions *UpdateBareMetalServerDiskOptions) (result *BareMetalServerDisk, response *core.DetailedResponse, err error) {
+ return vpc.UpdateBareMetalServerDiskWithContext(context.Background(), updateBareMetalServerDiskOptions)
+}
+
+// UpdateBareMetalServerDiskWithContext is an alternate form of the UpdateBareMetalServerDisk method which supports a Context parameter
+func (vpc *VpcV1) UpdateBareMetalServerDiskWithContext(ctx context.Context, updateBareMetalServerDiskOptions *UpdateBareMetalServerDiskOptions) (result *BareMetalServerDisk, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(updateBareMetalServerDiskOptions, "updateBareMetalServerDiskOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(updateBareMetalServerDiskOptions, "updateBareMetalServerDiskOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "bare_metal_server_id": *updateBareMetalServerDiskOptions.BareMetalServerID,
+ "id": *updateBareMetalServerDiskOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.PATCH)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/disks/{id}`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range updateBareMetalServerDiskOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateBareMetalServerDisk")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+ builder.AddHeader("Content-Type", "application/merge-patch+json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ _, err = builder.SetBodyContentJSON(updateBareMetalServerDiskOptions.BareMetalServerDiskPatch)
+ if err != nil {
+ return
+ }
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerDisk)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// ListBareMetalServerNetworkInterfaces : List all network interfaces on a bare metal server
+// This request lists all network interfaces on a bare metal server. A network interface is an abstract representation
+// of a network interface card and connects a bare metal server to a subnet. While each network interface can attach to
+// only one subnet, multiple network interfaces can be created to attach to multiple subnets. Multiple interfaces may
+// also attach to the same subnet.
+func (vpc *VpcV1) ListBareMetalServerNetworkInterfaces(listBareMetalServerNetworkInterfacesOptions *ListBareMetalServerNetworkInterfacesOptions) (result *BareMetalServerNetworkInterfaceCollection, response *core.DetailedResponse, err error) {
+ return vpc.ListBareMetalServerNetworkInterfacesWithContext(context.Background(), listBareMetalServerNetworkInterfacesOptions)
+}
+
+// ListBareMetalServerNetworkInterfacesWithContext is an alternate form of the ListBareMetalServerNetworkInterfaces method which supports a Context parameter
+func (vpc *VpcV1) ListBareMetalServerNetworkInterfacesWithContext(ctx context.Context, listBareMetalServerNetworkInterfacesOptions *ListBareMetalServerNetworkInterfacesOptions) (result *BareMetalServerNetworkInterfaceCollection, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(listBareMetalServerNetworkInterfacesOptions, "listBareMetalServerNetworkInterfacesOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(listBareMetalServerNetworkInterfacesOptions, "listBareMetalServerNetworkInterfacesOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "bare_metal_server_id": *listBareMetalServerNetworkInterfacesOptions.BareMetalServerID,
+ }
+
+ builder := core.NewRequestBuilder(core.GET)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_interfaces`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range listBareMetalServerNetworkInterfacesOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListBareMetalServerNetworkInterfaces")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+ if listBareMetalServerNetworkInterfacesOptions.Start != nil {
+ builder.AddQuery("start", fmt.Sprint(*listBareMetalServerNetworkInterfacesOptions.Start))
+ }
+ if listBareMetalServerNetworkInterfacesOptions.Limit != nil {
+ builder.AddQuery("limit", fmt.Sprint(*listBareMetalServerNetworkInterfacesOptions.Limit))
+ }
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerNetworkInterfaceCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// CreateBareMetalServerNetworkInterface : Create a network interface on a bare metal server
+// This request creates a new network interface from a network interface prototype object. The prototype object is
+// structured in the same way as a retrieved network interface, and contains the information necessary to create the new
+// network interface. Any subnet in the bare metal server's VPC may be specified, even if it is already attached to
+// another network interface. Addresses on the network interface must be within the specified subnet's CIDR blocks.
+func (vpc *VpcV1) CreateBareMetalServerNetworkInterface(createBareMetalServerNetworkInterfaceOptions *CreateBareMetalServerNetworkInterfaceOptions) (result BareMetalServerNetworkInterfaceIntf, response *core.DetailedResponse, err error) {
+ return vpc.CreateBareMetalServerNetworkInterfaceWithContext(context.Background(), createBareMetalServerNetworkInterfaceOptions)
+}
+
+// CreateBareMetalServerNetworkInterfaceWithContext is an alternate form of the CreateBareMetalServerNetworkInterface method which supports a Context parameter
+func (vpc *VpcV1) CreateBareMetalServerNetworkInterfaceWithContext(ctx context.Context, createBareMetalServerNetworkInterfaceOptions *CreateBareMetalServerNetworkInterfaceOptions) (result BareMetalServerNetworkInterfaceIntf, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(createBareMetalServerNetworkInterfaceOptions, "createBareMetalServerNetworkInterfaceOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(createBareMetalServerNetworkInterfaceOptions, "createBareMetalServerNetworkInterfaceOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "bare_metal_server_id": *createBareMetalServerNetworkInterfaceOptions.BareMetalServerID,
+ }
+
+ builder := core.NewRequestBuilder(core.POST)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_interfaces`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range createBareMetalServerNetworkInterfaceOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateBareMetalServerNetworkInterface")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+ builder.AddHeader("Content-Type", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ _, err = builder.SetBodyContentJSON(createBareMetalServerNetworkInterfaceOptions.BareMetalServerNetworkInterfacePrototype)
+ if err != nil {
+ return
+ }
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerNetworkInterface)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// DeleteBareMetalServerNetworkInterface : Delete a network interface
+// This request deletes a network interface. This operation cannot be reversed. Any floating IPs associated with the
+// network interface are implicitly disassociated. The primary network interface is not allowed to be deleted.
+func (vpc *VpcV1) DeleteBareMetalServerNetworkInterface(deleteBareMetalServerNetworkInterfaceOptions *DeleteBareMetalServerNetworkInterfaceOptions) (response *core.DetailedResponse, err error) {
+ return vpc.DeleteBareMetalServerNetworkInterfaceWithContext(context.Background(), deleteBareMetalServerNetworkInterfaceOptions)
+}
+
+// DeleteBareMetalServerNetworkInterfaceWithContext is an alternate form of the DeleteBareMetalServerNetworkInterface method which supports a Context parameter
+func (vpc *VpcV1) DeleteBareMetalServerNetworkInterfaceWithContext(ctx context.Context, deleteBareMetalServerNetworkInterfaceOptions *DeleteBareMetalServerNetworkInterfaceOptions) (response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(deleteBareMetalServerNetworkInterfaceOptions, "deleteBareMetalServerNetworkInterfaceOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(deleteBareMetalServerNetworkInterfaceOptions, "deleteBareMetalServerNetworkInterfaceOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "bare_metal_server_id": *deleteBareMetalServerNetworkInterfaceOptions.BareMetalServerID,
+ "id": *deleteBareMetalServerNetworkInterfaceOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.DELETE)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{id}`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range deleteBareMetalServerNetworkInterfaceOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteBareMetalServerNetworkInterface")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ response, err = vpc.Service.Request(request, nil)
+
+ return
+}
+
+// GetBareMetalServerNetworkInterface : Retrieve a network interface
+// This request retrieves a single network interface specified by the identifier in the URL.
+func (vpc *VpcV1) GetBareMetalServerNetworkInterface(getBareMetalServerNetworkInterfaceOptions *GetBareMetalServerNetworkInterfaceOptions) (result BareMetalServerNetworkInterfaceIntf, response *core.DetailedResponse, err error) {
+ return vpc.GetBareMetalServerNetworkInterfaceWithContext(context.Background(), getBareMetalServerNetworkInterfaceOptions)
+}
+
+// GetBareMetalServerNetworkInterfaceWithContext is an alternate form of the GetBareMetalServerNetworkInterface method which supports a Context parameter
+func (vpc *VpcV1) GetBareMetalServerNetworkInterfaceWithContext(ctx context.Context, getBareMetalServerNetworkInterfaceOptions *GetBareMetalServerNetworkInterfaceOptions) (result BareMetalServerNetworkInterfaceIntf, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(getBareMetalServerNetworkInterfaceOptions, "getBareMetalServerNetworkInterfaceOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(getBareMetalServerNetworkInterfaceOptions, "getBareMetalServerNetworkInterfaceOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "bare_metal_server_id": *getBareMetalServerNetworkInterfaceOptions.BareMetalServerID,
+ "id": *getBareMetalServerNetworkInterfaceOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.GET)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{id}`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range getBareMetalServerNetworkInterfaceOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetBareMetalServerNetworkInterface")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerNetworkInterface)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// UpdateBareMetalServerNetworkInterface : Update a network interface
+// This request updates a network interface with the information provided in a network interface patch object. The
+// network interface patch object is structured in the same way as a retrieved network interface and needs to contain
+// only the information to be updated.
+func (vpc *VpcV1) UpdateBareMetalServerNetworkInterface(updateBareMetalServerNetworkInterfaceOptions *UpdateBareMetalServerNetworkInterfaceOptions) (result BareMetalServerNetworkInterfaceIntf, response *core.DetailedResponse, err error) {
+ return vpc.UpdateBareMetalServerNetworkInterfaceWithContext(context.Background(), updateBareMetalServerNetworkInterfaceOptions)
+}
+
+// UpdateBareMetalServerNetworkInterfaceWithContext is an alternate form of the UpdateBareMetalServerNetworkInterface method which supports a Context parameter
+func (vpc *VpcV1) UpdateBareMetalServerNetworkInterfaceWithContext(ctx context.Context, updateBareMetalServerNetworkInterfaceOptions *UpdateBareMetalServerNetworkInterfaceOptions) (result BareMetalServerNetworkInterfaceIntf, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(updateBareMetalServerNetworkInterfaceOptions, "updateBareMetalServerNetworkInterfaceOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(updateBareMetalServerNetworkInterfaceOptions, "updateBareMetalServerNetworkInterfaceOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "bare_metal_server_id": *updateBareMetalServerNetworkInterfaceOptions.BareMetalServerID,
+ "id": *updateBareMetalServerNetworkInterfaceOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.PATCH)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{id}`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range updateBareMetalServerNetworkInterfaceOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateBareMetalServerNetworkInterface")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+ builder.AddHeader("Content-Type", "application/merge-patch+json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ _, err = builder.SetBodyContentJSON(updateBareMetalServerNetworkInterfaceOptions.BareMetalServerNetworkInterfacePatch)
+ if err != nil {
+ return
+ }
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerNetworkInterface)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// ListBareMetalServerNetworkInterfaceFloatingIps : List all floating IPs associated with a network interface
+// This request lists all floating IPs associated with a network interface.
+func (vpc *VpcV1) ListBareMetalServerNetworkInterfaceFloatingIps(listBareMetalServerNetworkInterfaceFloatingIpsOptions *ListBareMetalServerNetworkInterfaceFloatingIpsOptions) (result *FloatingIPUnpaginatedCollection, response *core.DetailedResponse, err error) {
+ return vpc.ListBareMetalServerNetworkInterfaceFloatingIpsWithContext(context.Background(), listBareMetalServerNetworkInterfaceFloatingIpsOptions)
+}
+
+// ListBareMetalServerNetworkInterfaceFloatingIpsWithContext is an alternate form of the ListBareMetalServerNetworkInterfaceFloatingIps method which supports a Context parameter
+func (vpc *VpcV1) ListBareMetalServerNetworkInterfaceFloatingIpsWithContext(ctx context.Context, listBareMetalServerNetworkInterfaceFloatingIpsOptions *ListBareMetalServerNetworkInterfaceFloatingIpsOptions) (result *FloatingIPUnpaginatedCollection, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(listBareMetalServerNetworkInterfaceFloatingIpsOptions, "listBareMetalServerNetworkInterfaceFloatingIpsOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(listBareMetalServerNetworkInterfaceFloatingIpsOptions, "listBareMetalServerNetworkInterfaceFloatingIpsOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "bare_metal_server_id": *listBareMetalServerNetworkInterfaceFloatingIpsOptions.BareMetalServerID,
+ "network_interface_id": *listBareMetalServerNetworkInterfaceFloatingIpsOptions.NetworkInterfaceID,
+ }
+
+ builder := core.NewRequestBuilder(core.GET)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/floating_ips`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range listBareMetalServerNetworkInterfaceFloatingIpsOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListBareMetalServerNetworkInterfaceFloatingIps")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIPUnpaginatedCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// RemoveBareMetalServerNetworkInterfaceFloatingIP : Disassociate a floating IP from a network interface
+// This request disassociates the specified floating IP from the specified network interface.
+func (vpc *VpcV1) RemoveBareMetalServerNetworkInterfaceFloatingIP(removeBareMetalServerNetworkInterfaceFloatingIPOptions *RemoveBareMetalServerNetworkInterfaceFloatingIPOptions) (response *core.DetailedResponse, err error) {
+ return vpc.RemoveBareMetalServerNetworkInterfaceFloatingIPWithContext(context.Background(), removeBareMetalServerNetworkInterfaceFloatingIPOptions)
+}
+
+// RemoveBareMetalServerNetworkInterfaceFloatingIPWithContext is an alternate form of the RemoveBareMetalServerNetworkInterfaceFloatingIP method which supports a Context parameter
+func (vpc *VpcV1) RemoveBareMetalServerNetworkInterfaceFloatingIPWithContext(ctx context.Context, removeBareMetalServerNetworkInterfaceFloatingIPOptions *RemoveBareMetalServerNetworkInterfaceFloatingIPOptions) (response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(removeBareMetalServerNetworkInterfaceFloatingIPOptions, "removeBareMetalServerNetworkInterfaceFloatingIPOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(removeBareMetalServerNetworkInterfaceFloatingIPOptions, "removeBareMetalServerNetworkInterfaceFloatingIPOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "bare_metal_server_id": *removeBareMetalServerNetworkInterfaceFloatingIPOptions.BareMetalServerID,
+ "network_interface_id": *removeBareMetalServerNetworkInterfaceFloatingIPOptions.NetworkInterfaceID,
+ "id": *removeBareMetalServerNetworkInterfaceFloatingIPOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.DELETE)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/floating_ips/{id}`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range removeBareMetalServerNetworkInterfaceFloatingIPOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "RemoveBareMetalServerNetworkInterfaceFloatingIP")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ response, err = vpc.Service.Request(request, nil)
+
+ return
+}
+
+// GetBareMetalServerNetworkInterfaceFloatingIP : Retrieve associated floating IP
+// This request a retrieves a specified floating IP address if it is associated with the network interface and bare
+// metal server specified in the URL.
+func (vpc *VpcV1) GetBareMetalServerNetworkInterfaceFloatingIP(getBareMetalServerNetworkInterfaceFloatingIPOptions *GetBareMetalServerNetworkInterfaceFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) {
+ return vpc.GetBareMetalServerNetworkInterfaceFloatingIPWithContext(context.Background(), getBareMetalServerNetworkInterfaceFloatingIPOptions)
+}
+
+// GetBareMetalServerNetworkInterfaceFloatingIPWithContext is an alternate form of the GetBareMetalServerNetworkInterfaceFloatingIP method which supports a Context parameter
+func (vpc *VpcV1) GetBareMetalServerNetworkInterfaceFloatingIPWithContext(ctx context.Context, getBareMetalServerNetworkInterfaceFloatingIPOptions *GetBareMetalServerNetworkInterfaceFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(getBareMetalServerNetworkInterfaceFloatingIPOptions, "getBareMetalServerNetworkInterfaceFloatingIPOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(getBareMetalServerNetworkInterfaceFloatingIPOptions, "getBareMetalServerNetworkInterfaceFloatingIPOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "bare_metal_server_id": *getBareMetalServerNetworkInterfaceFloatingIPOptions.BareMetalServerID,
+ "network_interface_id": *getBareMetalServerNetworkInterfaceFloatingIPOptions.NetworkInterfaceID,
+ "id": *getBareMetalServerNetworkInterfaceFloatingIPOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.GET)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/floating_ips/{id}`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range getBareMetalServerNetworkInterfaceFloatingIPOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetBareMetalServerNetworkInterfaceFloatingIP")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIP)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// AddBareMetalServerNetworkInterfaceFloatingIP : Associate a floating IP with a network interface
+// This request associates the specified floating IP with the specified network interface. If
+// `enable_infrastructure_nat` is `false`, this adds the IP to any existing associations. If `enable_infrastructure_nat`
+// is `true`, this replaces any existing association. For this request to succeed, the existing floating IP must not be
+// required by another resource, such as a public gateway. A request body is not required, and if provided, is ignored.
+func (vpc *VpcV1) AddBareMetalServerNetworkInterfaceFloatingIP(addBareMetalServerNetworkInterfaceFloatingIPOptions *AddBareMetalServerNetworkInterfaceFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) {
+ return vpc.AddBareMetalServerNetworkInterfaceFloatingIPWithContext(context.Background(), addBareMetalServerNetworkInterfaceFloatingIPOptions)
+}
+
+// AddBareMetalServerNetworkInterfaceFloatingIPWithContext is an alternate form of the AddBareMetalServerNetworkInterfaceFloatingIP method which supports a Context parameter
+func (vpc *VpcV1) AddBareMetalServerNetworkInterfaceFloatingIPWithContext(ctx context.Context, addBareMetalServerNetworkInterfaceFloatingIPOptions *AddBareMetalServerNetworkInterfaceFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(addBareMetalServerNetworkInterfaceFloatingIPOptions, "addBareMetalServerNetworkInterfaceFloatingIPOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(addBareMetalServerNetworkInterfaceFloatingIPOptions, "addBareMetalServerNetworkInterfaceFloatingIPOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "bare_metal_server_id": *addBareMetalServerNetworkInterfaceFloatingIPOptions.BareMetalServerID,
+ "network_interface_id": *addBareMetalServerNetworkInterfaceFloatingIPOptions.NetworkInterfaceID,
+ "id": *addBareMetalServerNetworkInterfaceFloatingIPOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.PUT)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/floating_ips/{id}`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range addBareMetalServerNetworkInterfaceFloatingIPOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "AddBareMetalServerNetworkInterfaceFloatingIP")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIP)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// ListBareMetalServerNetworkInterfaceIps : List all reserved IPs bound to a network interface
+// This request lists all reserved IPs bound to a network interface.
+func (vpc *VpcV1) ListBareMetalServerNetworkInterfaceIps(listBareMetalServerNetworkInterfaceIpsOptions *ListBareMetalServerNetworkInterfaceIpsOptions) (result *ReservedIPCollectionNetworkInterfaceContext, response *core.DetailedResponse, err error) {
+ return vpc.ListBareMetalServerNetworkInterfaceIpsWithContext(context.Background(), listBareMetalServerNetworkInterfaceIpsOptions)
+}
+
+// ListBareMetalServerNetworkInterfaceIpsWithContext is an alternate form of the ListBareMetalServerNetworkInterfaceIps method which supports a Context parameter
+func (vpc *VpcV1) ListBareMetalServerNetworkInterfaceIpsWithContext(ctx context.Context, listBareMetalServerNetworkInterfaceIpsOptions *ListBareMetalServerNetworkInterfaceIpsOptions) (result *ReservedIPCollectionNetworkInterfaceContext, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(listBareMetalServerNetworkInterfaceIpsOptions, "listBareMetalServerNetworkInterfaceIpsOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(listBareMetalServerNetworkInterfaceIpsOptions, "listBareMetalServerNetworkInterfaceIpsOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "bare_metal_server_id": *listBareMetalServerNetworkInterfaceIpsOptions.BareMetalServerID,
+ "network_interface_id": *listBareMetalServerNetworkInterfaceIpsOptions.NetworkInterfaceID,
+ }
+
+ builder := core.NewRequestBuilder(core.GET)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/ips`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range listBareMetalServerNetworkInterfaceIpsOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListBareMetalServerNetworkInterfaceIps")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIPCollectionNetworkInterfaceContext)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// GetBareMetalServerNetworkInterfaceIP : Retrieve bound reserved IP
+// This request a retrieves the specified reserved IP address if it is bound to the network interface and bare metal
+// server specified in the URL.
+func (vpc *VpcV1) GetBareMetalServerNetworkInterfaceIP(getBareMetalServerNetworkInterfaceIPOptions *GetBareMetalServerNetworkInterfaceIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) {
+ return vpc.GetBareMetalServerNetworkInterfaceIPWithContext(context.Background(), getBareMetalServerNetworkInterfaceIPOptions)
+}
+
+// GetBareMetalServerNetworkInterfaceIPWithContext is an alternate form of the GetBareMetalServerNetworkInterfaceIP method which supports a Context parameter
+func (vpc *VpcV1) GetBareMetalServerNetworkInterfaceIPWithContext(ctx context.Context, getBareMetalServerNetworkInterfaceIPOptions *GetBareMetalServerNetworkInterfaceIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(getBareMetalServerNetworkInterfaceIPOptions, "getBareMetalServerNetworkInterfaceIPOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(getBareMetalServerNetworkInterfaceIPOptions, "getBareMetalServerNetworkInterfaceIPOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "bare_metal_server_id": *getBareMetalServerNetworkInterfaceIPOptions.BareMetalServerID,
+ "network_interface_id": *getBareMetalServerNetworkInterfaceIPOptions.NetworkInterfaceID,
+ "id": *getBareMetalServerNetworkInterfaceIPOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.GET)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{bare_metal_server_id}/network_interfaces/{network_interface_id}/ips/{id}`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range getBareMetalServerNetworkInterfaceIPOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetBareMetalServerNetworkInterfaceIP")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIP)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// DeleteBareMetalServer : Delete a bare metal server
+// This request deletes a bare metal server. This operation cannot be reversed. Any floating IPs associated with the
+// bare metal server's network interfaces are implicitly disassociated.
+func (vpc *VpcV1) DeleteBareMetalServer(deleteBareMetalServerOptions *DeleteBareMetalServerOptions) (response *core.DetailedResponse, err error) {
+ return vpc.DeleteBareMetalServerWithContext(context.Background(), deleteBareMetalServerOptions)
+}
+
+// DeleteBareMetalServerWithContext is an alternate form of the DeleteBareMetalServer method which supports a Context parameter
+func (vpc *VpcV1) DeleteBareMetalServerWithContext(ctx context.Context, deleteBareMetalServerOptions *DeleteBareMetalServerOptions) (response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(deleteBareMetalServerOptions, "deleteBareMetalServerOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(deleteBareMetalServerOptions, "deleteBareMetalServerOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "id": *deleteBareMetalServerOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.DELETE)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{id}`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range deleteBareMetalServerOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteBareMetalServer")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ response, err = vpc.Service.Request(request, nil)
+
+ return
+}
+
+// GetBareMetalServer : Retrieve a bare metal server
+// This request retrieves a single bare metal server specified by the identifier in the URL.
+func (vpc *VpcV1) GetBareMetalServer(getBareMetalServerOptions *GetBareMetalServerOptions) (result *BareMetalServer, response *core.DetailedResponse, err error) {
+ return vpc.GetBareMetalServerWithContext(context.Background(), getBareMetalServerOptions)
+}
+
+// GetBareMetalServerWithContext is an alternate form of the GetBareMetalServer method which supports a Context parameter
+func (vpc *VpcV1) GetBareMetalServerWithContext(ctx context.Context, getBareMetalServerOptions *GetBareMetalServerOptions) (result *BareMetalServer, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(getBareMetalServerOptions, "getBareMetalServerOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(getBareMetalServerOptions, "getBareMetalServerOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "id": *getBareMetalServerOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.GET)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{id}`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range getBareMetalServerOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetBareMetalServer")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServer)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// UpdateBareMetalServer : Update a bare metal server
+// This request updates a bare metal server with the information in a provided patch. The bare metal server patch object
+// is structured in the same way as a retrieved bare metal server and contains only the information to be updated.
+func (vpc *VpcV1) UpdateBareMetalServer(updateBareMetalServerOptions *UpdateBareMetalServerOptions) (result *BareMetalServer, response *core.DetailedResponse, err error) {
+ return vpc.UpdateBareMetalServerWithContext(context.Background(), updateBareMetalServerOptions)
+}
+
+// UpdateBareMetalServerWithContext is an alternate form of the UpdateBareMetalServer method which supports a Context parameter
+func (vpc *VpcV1) UpdateBareMetalServerWithContext(ctx context.Context, updateBareMetalServerOptions *UpdateBareMetalServerOptions) (result *BareMetalServer, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(updateBareMetalServerOptions, "updateBareMetalServerOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(updateBareMetalServerOptions, "updateBareMetalServerOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "id": *updateBareMetalServerOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.PATCH)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{id}`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range updateBareMetalServerOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateBareMetalServer")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+ builder.AddHeader("Content-Type", "application/merge-patch+json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ _, err = builder.SetBodyContentJSON(updateBareMetalServerOptions.BareMetalServerPatch)
+ if err != nil {
+ return
+ }
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServer)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// GetBareMetalServerInitialization : Retrieve initialization configuration for a bare metal server
+// This request retrieves configuration variables used to initialize the bare metal server, such as the image used, SSH
+// keys, and any configured usernames and passwords. These attributes can subsequently be changed manually by the user
+// and so are not guaranteed to be current.
+func (vpc *VpcV1) GetBareMetalServerInitialization(getBareMetalServerInitializationOptions *GetBareMetalServerInitializationOptions) (result *BareMetalServerInitialization, response *core.DetailedResponse, err error) {
+ return vpc.GetBareMetalServerInitializationWithContext(context.Background(), getBareMetalServerInitializationOptions)
+}
+
+// GetBareMetalServerInitializationWithContext is an alternate form of the GetBareMetalServerInitialization method which supports a Context parameter
+func (vpc *VpcV1) GetBareMetalServerInitializationWithContext(ctx context.Context, getBareMetalServerInitializationOptions *GetBareMetalServerInitializationOptions) (result *BareMetalServerInitialization, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(getBareMetalServerInitializationOptions, "getBareMetalServerInitializationOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(getBareMetalServerInitializationOptions, "getBareMetalServerInitializationOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "id": *getBareMetalServerInitializationOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.GET)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{id}/initialization`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range getBareMetalServerInitializationOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetBareMetalServerInitialization")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalBareMetalServerInitialization)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// RestartBareMetalServer : Restart a bare metal server
+// This request restarts a bare metal server. It will run immediately regardless of the state of the server.
+func (vpc *VpcV1) RestartBareMetalServer(restartBareMetalServerOptions *RestartBareMetalServerOptions) (response *core.DetailedResponse, err error) {
+ return vpc.RestartBareMetalServerWithContext(context.Background(), restartBareMetalServerOptions)
+}
+
+// RestartBareMetalServerWithContext is an alternate form of the RestartBareMetalServer method which supports a Context parameter
+func (vpc *VpcV1) RestartBareMetalServerWithContext(ctx context.Context, restartBareMetalServerOptions *RestartBareMetalServerOptions) (response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(restartBareMetalServerOptions, "restartBareMetalServerOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(restartBareMetalServerOptions, "restartBareMetalServerOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "id": *restartBareMetalServerOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.POST)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{id}/restart`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range restartBareMetalServerOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "RestartBareMetalServer")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ response, err = vpc.Service.Request(request, nil)
+
+ return
+}
+
+// StartBareMetalServer : Start a bare metal server
+// This request starts a bare metal server. It will run immediately provided the server is stopped.
+func (vpc *VpcV1) StartBareMetalServer(startBareMetalServerOptions *StartBareMetalServerOptions) (response *core.DetailedResponse, err error) {
+ return vpc.StartBareMetalServerWithContext(context.Background(), startBareMetalServerOptions)
+}
+
+// StartBareMetalServerWithContext is an alternate form of the StartBareMetalServer method which supports a Context parameter
+func (vpc *VpcV1) StartBareMetalServerWithContext(ctx context.Context, startBareMetalServerOptions *StartBareMetalServerOptions) (response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(startBareMetalServerOptions, "startBareMetalServerOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(startBareMetalServerOptions, "startBareMetalServerOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "id": *startBareMetalServerOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.POST)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{id}/start`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range startBareMetalServerOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "StartBareMetalServer")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ response, err = vpc.Service.Request(request, nil)
+
+ return
+}
+
+// StopBareMetalServer : Stop a bare metal server
+// This request stops a bare metal server. It will run immediately provided the server is running. Note: A soft stop may
+// not complete as it relies on the operating system to perform the operation.
+func (vpc *VpcV1) StopBareMetalServer(stopBareMetalServerOptions *StopBareMetalServerOptions) (response *core.DetailedResponse, err error) {
+ return vpc.StopBareMetalServerWithContext(context.Background(), stopBareMetalServerOptions)
+}
+
+// StopBareMetalServerWithContext is an alternate form of the StopBareMetalServer method which supports a Context parameter
+func (vpc *VpcV1) StopBareMetalServerWithContext(ctx context.Context, stopBareMetalServerOptions *StopBareMetalServerOptions) (response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(stopBareMetalServerOptions, "stopBareMetalServerOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(stopBareMetalServerOptions, "stopBareMetalServerOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "id": *stopBareMetalServerOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.POST)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/bare_metal_servers/{id}/stop`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range stopBareMetalServerOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "StopBareMetalServer")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Content-Type", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ body := make(map[string]interface{})
+ if stopBareMetalServerOptions.Type != nil {
+ body["type"] = stopBareMetalServerOptions.Type
+ }
+ _, err = builder.SetBodyContentJSON(body)
+ if err != nil {
+ return
+ }
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ response, err = vpc.Service.Request(request, nil)
return
}
@@ -8253,11 +10993,13 @@ func (vpc *VpcV1) ListVolumeProfilesWithContext(ctx context.Context, listVolumeP
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeProfileCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeProfileCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -8314,11 +11056,13 @@ func (vpc *VpcV1) GetVolumeProfileWithContext(ctx context.Context, getVolumeProf
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeProfile)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeProfile)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -8380,11 +11124,13 @@ func (vpc *VpcV1) ListVolumesWithContext(ctx context.Context, listVolumesOptions
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -8444,11 +11190,13 @@ func (vpc *VpcV1) CreateVolumeWithContext(ctx context.Context, createVolumeOptio
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolume)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolume)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -8491,6 +11239,9 @@ func (vpc *VpcV1) DeleteVolumeWithContext(ctx context.Context, deleteVolumeOptio
for headerName, headerValue := range sdkHeaders {
builder.AddHeader(headerName, headerValue)
}
+ if deleteVolumeOptions.IfMatch != nil {
+ builder.AddHeader("If-Match", fmt.Sprint(*deleteVolumeOptions.IfMatch))
+ }
builder.AddQuery("version", fmt.Sprint(*vpc.Version))
builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
@@ -8557,11 +11308,13 @@ func (vpc *VpcV1) GetVolumeWithContext(ctx context.Context, getVolumeOptions *Ge
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolume)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolume)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -8606,6 +11359,9 @@ func (vpc *VpcV1) UpdateVolumeWithContext(ctx context.Context, updateVolumeOptio
}
builder.AddHeader("Accept", "application/json")
builder.AddHeader("Content-Type", "application/merge-patch+json")
+ if updateVolumeOptions.IfMatch != nil {
+ builder.AddHeader("If-Match", fmt.Sprint(*updateVolumeOptions.IfMatch))
+ }
builder.AddQuery("version", fmt.Sprint(*vpc.Version))
builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
@@ -8625,11 +11381,402 @@ func (vpc *VpcV1) UpdateVolumeWithContext(ctx context.Context, updateVolumeOptio
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolume)
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolume)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// DeleteSnapshots : Delete a filtered collection of snapshots
+// This request deletes all snapshots created from a specific source volume.
+func (vpc *VpcV1) DeleteSnapshots(deleteSnapshotsOptions *DeleteSnapshotsOptions) (response *core.DetailedResponse, err error) {
+ return vpc.DeleteSnapshotsWithContext(context.Background(), deleteSnapshotsOptions)
+}
+
+// DeleteSnapshotsWithContext is an alternate form of the DeleteSnapshots method which supports a Context parameter
+func (vpc *VpcV1) DeleteSnapshotsWithContext(ctx context.Context, deleteSnapshotsOptions *DeleteSnapshotsOptions) (response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(deleteSnapshotsOptions, "deleteSnapshotsOptions cannot be nil")
if err != nil {
return
}
- response.Result = result
+ err = core.ValidateStruct(deleteSnapshotsOptions, "deleteSnapshotsOptions")
+ if err != nil {
+ return
+ }
+
+ builder := core.NewRequestBuilder(core.DELETE)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/snapshots`, nil)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range deleteSnapshotsOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteSnapshots")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+ builder.AddQuery("source_volume.id", fmt.Sprint(*deleteSnapshotsOptions.SourceVolumeID))
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ response, err = vpc.Service.Request(request, nil)
+
+ return
+}
+
+// ListSnapshots : List all snapshots
+// This request lists all snapshots in the region. A snapshot preserves the data of a volume at the time the snapshot is
+// created.
+func (vpc *VpcV1) ListSnapshots(listSnapshotsOptions *ListSnapshotsOptions) (result *SnapshotCollection, response *core.DetailedResponse, err error) {
+ return vpc.ListSnapshotsWithContext(context.Background(), listSnapshotsOptions)
+}
+
+// ListSnapshotsWithContext is an alternate form of the ListSnapshots method which supports a Context parameter
+func (vpc *VpcV1) ListSnapshotsWithContext(ctx context.Context, listSnapshotsOptions *ListSnapshotsOptions) (result *SnapshotCollection, response *core.DetailedResponse, err error) {
+ err = core.ValidateStruct(listSnapshotsOptions, "listSnapshotsOptions")
+ if err != nil {
+ return
+ }
+
+ builder := core.NewRequestBuilder(core.GET)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/snapshots`, nil)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range listSnapshotsOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListSnapshots")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+ if listSnapshotsOptions.Start != nil {
+ builder.AddQuery("start", fmt.Sprint(*listSnapshotsOptions.Start))
+ }
+ if listSnapshotsOptions.Limit != nil {
+ builder.AddQuery("limit", fmt.Sprint(*listSnapshotsOptions.Limit))
+ }
+ if listSnapshotsOptions.Tag != nil {
+ builder.AddQuery("tag", fmt.Sprint(*listSnapshotsOptions.Tag))
+ }
+ if listSnapshotsOptions.ResourceGroupID != nil {
+ builder.AddQuery("resource_group.id", fmt.Sprint(*listSnapshotsOptions.ResourceGroupID))
+ }
+ if listSnapshotsOptions.Name != nil {
+ builder.AddQuery("name", fmt.Sprint(*listSnapshotsOptions.Name))
+ }
+ if listSnapshotsOptions.SourceVolumeID != nil {
+ builder.AddQuery("source_volume.id", fmt.Sprint(*listSnapshotsOptions.SourceVolumeID))
+ }
+ if listSnapshotsOptions.SourceVolumeCRN != nil {
+ builder.AddQuery("source_volume.crn", fmt.Sprint(*listSnapshotsOptions.SourceVolumeCRN))
+ }
+ if listSnapshotsOptions.SourceImageID != nil {
+ builder.AddQuery("source_image.id", fmt.Sprint(*listSnapshotsOptions.SourceImageID))
+ }
+ if listSnapshotsOptions.SourceImageCRN != nil {
+ builder.AddQuery("source_image.crn", fmt.Sprint(*listSnapshotsOptions.SourceImageCRN))
+ }
+ if listSnapshotsOptions.Sort != nil {
+ builder.AddQuery("sort", fmt.Sprint(*listSnapshotsOptions.Sort))
+ }
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSnapshotCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// CreateSnapshot : Create a snapshot
+// This request creates a new snapshot from a snapshot prototype object. The prototype object is structured in the same
+// way as a retrieved snapshot, and contains the information necessary to provision the new snapshot.
+func (vpc *VpcV1) CreateSnapshot(createSnapshotOptions *CreateSnapshotOptions) (result *Snapshot, response *core.DetailedResponse, err error) {
+ return vpc.CreateSnapshotWithContext(context.Background(), createSnapshotOptions)
+}
+
+// CreateSnapshotWithContext is an alternate form of the CreateSnapshot method which supports a Context parameter
+func (vpc *VpcV1) CreateSnapshotWithContext(ctx context.Context, createSnapshotOptions *CreateSnapshotOptions) (result *Snapshot, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(createSnapshotOptions, "createSnapshotOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(createSnapshotOptions, "createSnapshotOptions")
+ if err != nil {
+ return
+ }
+
+ builder := core.NewRequestBuilder(core.POST)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/snapshots`, nil)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range createSnapshotOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateSnapshot")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+ builder.AddHeader("Content-Type", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ _, err = builder.SetBodyContentJSON(createSnapshotOptions.SnapshotPrototype)
+ if err != nil {
+ return
+ }
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSnapshot)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// DeleteSnapshot : Delete a snapshot
+// This request deletes a snapshot. This operation cannot be reversed.
+func (vpc *VpcV1) DeleteSnapshot(deleteSnapshotOptions *DeleteSnapshotOptions) (response *core.DetailedResponse, err error) {
+ return vpc.DeleteSnapshotWithContext(context.Background(), deleteSnapshotOptions)
+}
+
+// DeleteSnapshotWithContext is an alternate form of the DeleteSnapshot method which supports a Context parameter
+func (vpc *VpcV1) DeleteSnapshotWithContext(ctx context.Context, deleteSnapshotOptions *DeleteSnapshotOptions) (response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(deleteSnapshotOptions, "deleteSnapshotOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(deleteSnapshotOptions, "deleteSnapshotOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "id": *deleteSnapshotOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.DELETE)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/snapshots/{id}`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range deleteSnapshotOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteSnapshot")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ if deleteSnapshotOptions.IfMatch != nil {
+ builder.AddHeader("If-Match", fmt.Sprint(*deleteSnapshotOptions.IfMatch))
+ }
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ response, err = vpc.Service.Request(request, nil)
+
+ return
+}
+
+// GetSnapshot : Retrieve a snapshot
+// This request retrieves a single snapshot specified by the identifier in the URL.
+func (vpc *VpcV1) GetSnapshot(getSnapshotOptions *GetSnapshotOptions) (result *Snapshot, response *core.DetailedResponse, err error) {
+ return vpc.GetSnapshotWithContext(context.Background(), getSnapshotOptions)
+}
+
+// GetSnapshotWithContext is an alternate form of the GetSnapshot method which supports a Context parameter
+func (vpc *VpcV1) GetSnapshotWithContext(ctx context.Context, getSnapshotOptions *GetSnapshotOptions) (result *Snapshot, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(getSnapshotOptions, "getSnapshotOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(getSnapshotOptions, "getSnapshotOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "id": *getSnapshotOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.GET)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/snapshots/{id}`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range getSnapshotOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetSnapshot")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSnapshot)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
+
+ return
+}
+
+// UpdateSnapshot : Update a snapshot
+// This request updates a snapshot's name.
+func (vpc *VpcV1) UpdateSnapshot(updateSnapshotOptions *UpdateSnapshotOptions) (result *Snapshot, response *core.DetailedResponse, err error) {
+ return vpc.UpdateSnapshotWithContext(context.Background(), updateSnapshotOptions)
+}
+
+// UpdateSnapshotWithContext is an alternate form of the UpdateSnapshot method which supports a Context parameter
+func (vpc *VpcV1) UpdateSnapshotWithContext(ctx context.Context, updateSnapshotOptions *UpdateSnapshotOptions) (result *Snapshot, response *core.DetailedResponse, err error) {
+ err = core.ValidateNotNil(updateSnapshotOptions, "updateSnapshotOptions cannot be nil")
+ if err != nil {
+ return
+ }
+ err = core.ValidateStruct(updateSnapshotOptions, "updateSnapshotOptions")
+ if err != nil {
+ return
+ }
+
+ pathParamsMap := map[string]string{
+ "id": *updateSnapshotOptions.ID,
+ }
+
+ builder := core.NewRequestBuilder(core.PATCH)
+ builder = builder.WithContext(ctx)
+ builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
+ _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/snapshots/{id}`, pathParamsMap)
+ if err != nil {
+ return
+ }
+
+ for headerName, headerValue := range updateSnapshotOptions.Headers {
+ builder.AddHeader(headerName, headerValue)
+ }
+
+ sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateSnapshot")
+ for headerName, headerValue := range sdkHeaders {
+ builder.AddHeader(headerName, headerValue)
+ }
+ builder.AddHeader("Accept", "application/json")
+ builder.AddHeader("Content-Type", "application/merge-patch+json")
+ if updateSnapshotOptions.IfMatch != nil {
+ builder.AddHeader("If-Match", fmt.Sprint(*updateSnapshotOptions.IfMatch))
+ }
+
+ builder.AddQuery("version", fmt.Sprint(*vpc.Version))
+ builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+
+ _, err = builder.SetBodyContentJSON(updateSnapshotOptions.SnapshotPatch)
+ if err != nil {
+ return
+ }
+
+ request, err := builder.Build()
+ if err != nil {
+ return
+ }
+
+ var rawResponse map[string]json.RawMessage
+ response, err = vpc.Service.Request(request, &rawResponse)
+ if err != nil {
+ return
+ }
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSnapshot)
+ if err != nil {
+ return
+ }
+ response.Result = result
+ }
return
}
@@ -8682,11 +11829,13 @@ func (vpc *VpcV1) ListRegionsWithContext(ctx context.Context, listRegionsOptions
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRegionCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRegionCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -8743,11 +11892,13 @@ func (vpc *VpcV1) GetRegionWithContext(ctx context.Context, getRegionOptions *Ge
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRegion)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRegion)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -8805,11 +11956,13 @@ func (vpc *VpcV1) ListRegionZonesWithContext(ctx context.Context, listRegionZone
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalZoneCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalZoneCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -8867,11 +12020,13 @@ func (vpc *VpcV1) GetRegionZoneWithContext(ctx context.Context, getRegionZoneOpt
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalZone)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalZone)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -8931,11 +12086,13 @@ func (vpc *VpcV1) ListPublicGatewaysWithContext(ctx context.Context, listPublicG
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPublicGatewayCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPublicGatewayCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -9015,11 +12172,13 @@ func (vpc *VpcV1) CreatePublicGatewayWithContext(ctx context.Context, createPubl
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPublicGateway)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPublicGateway)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -9129,11 +12288,13 @@ func (vpc *VpcV1) GetPublicGatewayWithContext(ctx context.Context, getPublicGate
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPublicGateway)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPublicGateway)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -9196,11 +12357,13 @@ func (vpc *VpcV1) UpdatePublicGatewayWithContext(ctx context.Context, updatePubl
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPublicGateway)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPublicGateway)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -9248,6 +12411,9 @@ func (vpc *VpcV1) ListFloatingIpsWithContext(ctx context.Context, listFloatingIp
if listFloatingIpsOptions.ResourceGroupID != nil {
builder.AddQuery("resource_group.id", fmt.Sprint(*listFloatingIpsOptions.ResourceGroupID))
}
+ if listFloatingIpsOptions.Sort != nil {
+ builder.AddQuery("sort", fmt.Sprint(*listFloatingIpsOptions.Sort))
+ }
request, err := builder.Build()
if err != nil {
@@ -9259,11 +12425,13 @@ func (vpc *VpcV1) ListFloatingIpsWithContext(ctx context.Context, listFloatingIp
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIPCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIPCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -9322,16 +12490,18 @@ func (vpc *VpcV1) CreateFloatingIPWithContext(ctx context.Context, createFloatin
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIP)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIP)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
-// DeleteFloatingIP : Release a floating IP
+// DeleteFloatingIP : Delete a floating IP
// This request disassociates (if associated) and releases a floating IP. This operation cannot be reversed. For this
// request to succeed, the floating IP must not be required by another resource, such as a public gateway.
func (vpc *VpcV1) DeleteFloatingIP(deleteFloatingIPOptions *DeleteFloatingIPOptions) (response *core.DetailedResponse, err error) {
@@ -9435,11 +12605,13 @@ func (vpc *VpcV1) GetFloatingIPWithContext(ctx context.Context, getFloatingIPOpt
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIP)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIP)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -9502,11 +12674,13 @@ func (vpc *VpcV1) UpdateFloatingIPWithContext(ctx context.Context, updateFloatin
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIP)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIP)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -9566,11 +12740,13 @@ func (vpc *VpcV1) ListNetworkAclsWithContext(ctx context.Context, listNetworkAcl
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACLCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACLCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -9628,11 +12804,13 @@ func (vpc *VpcV1) CreateNetworkACLWithContext(ctx context.Context, createNetwork
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACL)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACL)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -9741,11 +12919,13 @@ func (vpc *VpcV1) GetNetworkACLWithContext(ctx context.Context, getNetworkACLOpt
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACL)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACL)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -9808,11 +12988,13 @@ func (vpc *VpcV1) UpdateNetworkACLWithContext(ctx context.Context, updateNetwork
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACL)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACL)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -9879,11 +13061,13 @@ func (vpc *VpcV1) ListNetworkACLRulesWithContext(ctx context.Context, listNetwor
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACLRuleCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACLRuleCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -9947,11 +13131,13 @@ func (vpc *VpcV1) CreateNetworkACLRuleWithContext(ctx context.Context, createNet
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACLRule)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACLRule)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -10061,11 +13247,13 @@ func (vpc *VpcV1) GetNetworkACLRuleWithContext(ctx context.Context, getNetworkAC
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACLRule)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACLRule)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -10130,11 +13318,13 @@ func (vpc *VpcV1) UpdateNetworkACLRuleWithContext(ctx context.Context, updateNet
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACLRule)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACLRule)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -10204,11 +13394,13 @@ func (vpc *VpcV1) ListSecurityGroupsWithContext(ctx context.Context, listSecurit
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -10284,19 +13476,20 @@ func (vpc *VpcV1) CreateSecurityGroupWithContext(ctx context.Context, createSecu
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroup)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroup)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
// DeleteSecurityGroup : Delete a security group
-// This request deletes a security group. A security group cannot be deleted if it is referenced by any network
-// interfaces or other security group rules. Additionally, a VPC's default security group cannot be deleted. This
-// operation cannot be reversed.
+// This request deletes a security group. A security group cannot be deleted if it is referenced by any security group
+// targets or rules. Additionally, a VPC's default security group cannot be deleted. This operation cannot be reversed.
func (vpc *VpcV1) DeleteSecurityGroup(deleteSecurityGroupOptions *DeleteSecurityGroupOptions) (response *core.DetailedResponse, err error) {
return vpc.DeleteSecurityGroupWithContext(context.Background(), deleteSecurityGroupOptions)
}
@@ -10398,11 +13591,13 @@ func (vpc *VpcV1) GetSecurityGroupWithContext(ctx context.Context, getSecurityGr
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroup)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroup)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -10467,261 +13662,13 @@ func (vpc *VpcV1) UpdateSecurityGroupWithContext(ctx context.Context, updateSecu
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroup)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroup)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
-
- return
-}
-
-// ListSecurityGroupNetworkInterfaces : List all network interfaces associated with a security group
-// This request lists all network interfaces associated with a security group, to which the rules in the security group
-// are applied.
-func (vpc *VpcV1) ListSecurityGroupNetworkInterfaces(listSecurityGroupNetworkInterfacesOptions *ListSecurityGroupNetworkInterfacesOptions) (result *NetworkInterfaceCollection, response *core.DetailedResponse, err error) {
- return vpc.ListSecurityGroupNetworkInterfacesWithContext(context.Background(), listSecurityGroupNetworkInterfacesOptions)
-}
-
-// ListSecurityGroupNetworkInterfacesWithContext is an alternate form of the ListSecurityGroupNetworkInterfaces method which supports a Context parameter
-func (vpc *VpcV1) ListSecurityGroupNetworkInterfacesWithContext(ctx context.Context, listSecurityGroupNetworkInterfacesOptions *ListSecurityGroupNetworkInterfacesOptions) (result *NetworkInterfaceCollection, response *core.DetailedResponse, err error) {
- err = core.ValidateNotNil(listSecurityGroupNetworkInterfacesOptions, "listSecurityGroupNetworkInterfacesOptions cannot be nil")
- if err != nil {
- return
- }
- err = core.ValidateStruct(listSecurityGroupNetworkInterfacesOptions, "listSecurityGroupNetworkInterfacesOptions")
- if err != nil {
- return
- }
-
- pathParamsMap := map[string]string{
- "security_group_id": *listSecurityGroupNetworkInterfacesOptions.SecurityGroupID,
- }
-
- builder := core.NewRequestBuilder(core.GET)
- builder = builder.WithContext(ctx)
- builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
- _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/network_interfaces`, pathParamsMap)
- if err != nil {
- return
- }
-
- for headerName, headerValue := range listSecurityGroupNetworkInterfacesOptions.Headers {
- builder.AddHeader(headerName, headerValue)
- }
-
- sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListSecurityGroupNetworkInterfaces")
- for headerName, headerValue := range sdkHeaders {
- builder.AddHeader(headerName, headerValue)
- }
- builder.AddHeader("Accept", "application/json")
-
- builder.AddQuery("version", fmt.Sprint(*vpc.Version))
- builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
- if listSecurityGroupNetworkInterfacesOptions.Start != nil {
- builder.AddQuery("start", fmt.Sprint(*listSecurityGroupNetworkInterfacesOptions.Start))
- }
- if listSecurityGroupNetworkInterfacesOptions.Limit != nil {
- builder.AddQuery("limit", fmt.Sprint(*listSecurityGroupNetworkInterfacesOptions.Limit))
- }
-
- request, err := builder.Build()
- if err != nil {
- return
- }
-
- var rawResponse map[string]json.RawMessage
- response, err = vpc.Service.Request(request, &rawResponse)
- if err != nil {
- return
- }
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterfaceCollection)
- if err != nil {
- return
- }
- response.Result = result
-
- return
-}
-
-// RemoveSecurityGroupNetworkInterface : Remove a network interface from a security group
-// This request removes a network interface from a security group. Security groups are stateful, so any changes to a
-// network interface's security groups are applied to new connections. Existing connections are not affected. If the
-// network interface being removed has no other security groups, it will be attached to the VPC's default security
-// group.
-func (vpc *VpcV1) RemoveSecurityGroupNetworkInterface(removeSecurityGroupNetworkInterfaceOptions *RemoveSecurityGroupNetworkInterfaceOptions) (response *core.DetailedResponse, err error) {
- return vpc.RemoveSecurityGroupNetworkInterfaceWithContext(context.Background(), removeSecurityGroupNetworkInterfaceOptions)
-}
-
-// RemoveSecurityGroupNetworkInterfaceWithContext is an alternate form of the RemoveSecurityGroupNetworkInterface method which supports a Context parameter
-func (vpc *VpcV1) RemoveSecurityGroupNetworkInterfaceWithContext(ctx context.Context, removeSecurityGroupNetworkInterfaceOptions *RemoveSecurityGroupNetworkInterfaceOptions) (response *core.DetailedResponse, err error) {
- err = core.ValidateNotNil(removeSecurityGroupNetworkInterfaceOptions, "removeSecurityGroupNetworkInterfaceOptions cannot be nil")
- if err != nil {
- return
- }
- err = core.ValidateStruct(removeSecurityGroupNetworkInterfaceOptions, "removeSecurityGroupNetworkInterfaceOptions")
- if err != nil {
- return
- }
-
- pathParamsMap := map[string]string{
- "security_group_id": *removeSecurityGroupNetworkInterfaceOptions.SecurityGroupID,
- "id": *removeSecurityGroupNetworkInterfaceOptions.ID,
- }
-
- builder := core.NewRequestBuilder(core.DELETE)
- builder = builder.WithContext(ctx)
- builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
- _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/network_interfaces/{id}`, pathParamsMap)
- if err != nil {
- return
- }
-
- for headerName, headerValue := range removeSecurityGroupNetworkInterfaceOptions.Headers {
- builder.AddHeader(headerName, headerValue)
- }
-
- sdkHeaders := common.GetSdkHeaders("vpc", "V1", "RemoveSecurityGroupNetworkInterface")
- for headerName, headerValue := range sdkHeaders {
- builder.AddHeader(headerName, headerValue)
- }
-
- builder.AddQuery("version", fmt.Sprint(*vpc.Version))
- builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
-
- request, err := builder.Build()
- if err != nil {
- return
- }
-
- response, err = vpc.Service.Request(request, nil)
-
- return
-}
-
-// GetSecurityGroupNetworkInterface : Retrieve a network interface in a security group
-// This request retrieves a single network interface specified by the identifier in the URL path. The network interface
-// must be an existing member of the security group.
-func (vpc *VpcV1) GetSecurityGroupNetworkInterface(getSecurityGroupNetworkInterfaceOptions *GetSecurityGroupNetworkInterfaceOptions) (result *NetworkInterface, response *core.DetailedResponse, err error) {
- return vpc.GetSecurityGroupNetworkInterfaceWithContext(context.Background(), getSecurityGroupNetworkInterfaceOptions)
-}
-
-// GetSecurityGroupNetworkInterfaceWithContext is an alternate form of the GetSecurityGroupNetworkInterface method which supports a Context parameter
-func (vpc *VpcV1) GetSecurityGroupNetworkInterfaceWithContext(ctx context.Context, getSecurityGroupNetworkInterfaceOptions *GetSecurityGroupNetworkInterfaceOptions) (result *NetworkInterface, response *core.DetailedResponse, err error) {
- err = core.ValidateNotNil(getSecurityGroupNetworkInterfaceOptions, "getSecurityGroupNetworkInterfaceOptions cannot be nil")
- if err != nil {
- return
- }
- err = core.ValidateStruct(getSecurityGroupNetworkInterfaceOptions, "getSecurityGroupNetworkInterfaceOptions")
- if err != nil {
- return
- }
-
- pathParamsMap := map[string]string{
- "security_group_id": *getSecurityGroupNetworkInterfaceOptions.SecurityGroupID,
- "id": *getSecurityGroupNetworkInterfaceOptions.ID,
- }
-
- builder := core.NewRequestBuilder(core.GET)
- builder = builder.WithContext(ctx)
- builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
- _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/network_interfaces/{id}`, pathParamsMap)
- if err != nil {
- return
- }
-
- for headerName, headerValue := range getSecurityGroupNetworkInterfaceOptions.Headers {
- builder.AddHeader(headerName, headerValue)
- }
-
- sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetSecurityGroupNetworkInterface")
- for headerName, headerValue := range sdkHeaders {
- builder.AddHeader(headerName, headerValue)
- }
- builder.AddHeader("Accept", "application/json")
-
- builder.AddQuery("version", fmt.Sprint(*vpc.Version))
- builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
-
- request, err := builder.Build()
- if err != nil {
- return
- }
-
- var rawResponse map[string]json.RawMessage
- response, err = vpc.Service.Request(request, &rawResponse)
- if err != nil {
- return
- }
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterface)
- if err != nil {
- return
- }
- response.Result = result
-
- return
-}
-
-// AddSecurityGroupNetworkInterface : Add a network interface to a security group
-// This request adds an existing network interface to an existing security group. When a network interface is added to a
-// security group, the security group rules are applied to the network interface. A request body is not required, and if
-// supplied, is ignored.
-func (vpc *VpcV1) AddSecurityGroupNetworkInterface(addSecurityGroupNetworkInterfaceOptions *AddSecurityGroupNetworkInterfaceOptions) (result *NetworkInterface, response *core.DetailedResponse, err error) {
- return vpc.AddSecurityGroupNetworkInterfaceWithContext(context.Background(), addSecurityGroupNetworkInterfaceOptions)
-}
-
-// AddSecurityGroupNetworkInterfaceWithContext is an alternate form of the AddSecurityGroupNetworkInterface method which supports a Context parameter
-func (vpc *VpcV1) AddSecurityGroupNetworkInterfaceWithContext(ctx context.Context, addSecurityGroupNetworkInterfaceOptions *AddSecurityGroupNetworkInterfaceOptions) (result *NetworkInterface, response *core.DetailedResponse, err error) {
- err = core.ValidateNotNil(addSecurityGroupNetworkInterfaceOptions, "addSecurityGroupNetworkInterfaceOptions cannot be nil")
- if err != nil {
- return
- }
- err = core.ValidateStruct(addSecurityGroupNetworkInterfaceOptions, "addSecurityGroupNetworkInterfaceOptions")
- if err != nil {
- return
- }
-
- pathParamsMap := map[string]string{
- "security_group_id": *addSecurityGroupNetworkInterfaceOptions.SecurityGroupID,
- "id": *addSecurityGroupNetworkInterfaceOptions.ID,
- }
-
- builder := core.NewRequestBuilder(core.PUT)
- builder = builder.WithContext(ctx)
- builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
- _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/network_interfaces/{id}`, pathParamsMap)
- if err != nil {
- return
- }
-
- for headerName, headerValue := range addSecurityGroupNetworkInterfaceOptions.Headers {
- builder.AddHeader(headerName, headerValue)
- }
-
- sdkHeaders := common.GetSdkHeaders("vpc", "V1", "AddSecurityGroupNetworkInterface")
- for headerName, headerValue := range sdkHeaders {
- builder.AddHeader(headerName, headerValue)
- }
- builder.AddHeader("Accept", "application/json")
-
- builder.AddQuery("version", fmt.Sprint(*vpc.Version))
- builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
-
- request, err := builder.Build()
- if err != nil {
- return
- }
-
- var rawResponse map[string]json.RawMessage
- response, err = vpc.Service.Request(request, &rawResponse)
- if err != nil {
- return
- }
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterface)
- if err != nil {
- return
- }
- response.Result = result
return
}
@@ -10780,11 +13727,13 @@ func (vpc *VpcV1) ListSecurityGroupRulesWithContext(ctx context.Context, listSec
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupRuleCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupRuleCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -10793,7 +13742,7 @@ func (vpc *VpcV1) ListSecurityGroupRulesWithContext(ctx context.Context, listSec
// This request creates a new security group rule from a security group rule prototype object. The prototype object is
// structured in the same way as a retrieved security group rule and contains the information necessary to create the
// rule. As part of creating a new rule in a security group, the rule is applied to all the networking interfaces in the
-// security group. Rules specify which IP traffic a security group should allow. Security group rules are stateful, such
+// security group. Rules specify which IP traffic a security group will allow. Security group rules are stateful, such
// that reverse traffic in response to allowed traffic is automatically permitted. A rule allowing inbound TCP traffic
// on port 80 also allows outbound TCP traffic on port 80 without the need for an additional rule.
func (vpc *VpcV1) CreateSecurityGroupRule(createSecurityGroupRuleOptions *CreateSecurityGroupRuleOptions) (result SecurityGroupRuleIntf, response *core.DetailedResponse, err error) {
@@ -10852,11 +13801,13 @@ func (vpc *VpcV1) CreateSecurityGroupRuleWithContext(ctx context.Context, create
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupRule)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupRule)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -10967,11 +13918,13 @@ func (vpc *VpcV1) GetSecurityGroupRuleWithContext(ctx context.Context, getSecuri
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupRule)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupRule)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -11037,11 +13990,13 @@ func (vpc *VpcV1) UpdateSecurityGroupRuleWithContext(ctx context.Context, update
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupRule)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupRule)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -11105,21 +14060,24 @@ func (vpc *VpcV1) ListSecurityGroupTargetsWithContext(ctx context.Context, listS
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupTargetCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupTargetCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
// DeleteSecurityGroupTargetBinding : Remove a target from a security group
// This request removes a target from a security group. For this request to succeed, the target must be attached to at
-// least one other security group. The supplied target identifier can be:
+// least one other security group. The specified target identifier can be:
//
// - A network interface identifier
// - An application load balancer identifier
+// - An endpoint gateway identifier
//
// Security groups are stateful, so any changes to a target's security groups are applied to new connections. Existing
// connections are not affected.
@@ -11227,23 +14185,26 @@ func (vpc *VpcV1) GetSecurityGroupTargetWithContext(ctx context.Context, getSecu
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupTargetReference)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupTargetReference)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
// CreateSecurityGroupTargetBinding : Add a target to a security group
-// This request adds a resource to an existing security group. The supplied target identifier can be:
+// This request adds a resource to an existing security group. The specified target identifier can be:
//
// - A network interface identifier
// - An application load balancer identifier
+// - An endpoint gateway identifier
//
// When a target is added to a security group, the security group rules are applied to the target. A request body is not
-// required, and if supplied, is ignored.
+// required, and if provided, is ignored.
func (vpc *VpcV1) CreateSecurityGroupTargetBinding(createSecurityGroupTargetBindingOptions *CreateSecurityGroupTargetBindingOptions) (result SecurityGroupTargetReferenceIntf, response *core.DetailedResponse, err error) {
return vpc.CreateSecurityGroupTargetBindingWithContext(context.Background(), createSecurityGroupTargetBindingOptions)
}
@@ -11295,11 +14256,13 @@ func (vpc *VpcV1) CreateSecurityGroupTargetBindingWithContext(ctx context.Contex
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupTargetReference)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupTargetReference)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -11354,11 +14317,13 @@ func (vpc *VpcV1) ListIkePoliciesWithContext(ctx context.Context, listIkePolicie
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIkePolicyCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIkePolicyCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -11439,17 +14404,20 @@ func (vpc *VpcV1) CreateIkePolicyWithContext(ctx context.Context, createIkePolic
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIkePolicy)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIkePolicy)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
// DeleteIkePolicy : Delete an IKE policy
-// This request deletes an IKE policy. This operation cannot be reversed.
+// This request deletes an IKE policy. This operation cannot be reversed. For this request to succeed, there must not be
+// any VPN gateway connections using this policy.
func (vpc *VpcV1) DeleteIkePolicy(deleteIkePolicyOptions *DeleteIkePolicyOptions) (response *core.DetailedResponse, err error) {
return vpc.DeleteIkePolicyWithContext(context.Background(), deleteIkePolicyOptions)
}
@@ -11551,11 +14519,13 @@ func (vpc *VpcV1) GetIkePolicyWithContext(ctx context.Context, getIkePolicyOptio
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIkePolicy)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIkePolicy)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -11618,11 +14588,13 @@ func (vpc *VpcV1) UpdateIkePolicyWithContext(ctx context.Context, updateIkePolic
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIkePolicy)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIkePolicy)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -11679,11 +14651,13 @@ func (vpc *VpcV1) ListIkePolicyConnectionsWithContext(ctx context.Context, listI
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -11738,11 +14712,13 @@ func (vpc *VpcV1) ListIpsecPoliciesWithContext(ctx context.Context, listIpsecPol
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIPsecPolicyCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIPsecPolicyCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -11820,17 +14796,20 @@ func (vpc *VpcV1) CreateIpsecPolicyWithContext(ctx context.Context, createIpsecP
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIPsecPolicy)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIPsecPolicy)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
// DeleteIpsecPolicy : Delete an IPsec policy
-// This request deletes an IPsec policy. This operation cannot be reversed.
+// This request deletes an IPsec policy. This operation cannot be reversed. For this request to succeed, there must not
+// be any VPN gateway connections using this policy.
func (vpc *VpcV1) DeleteIpsecPolicy(deleteIpsecPolicyOptions *DeleteIpsecPolicyOptions) (response *core.DetailedResponse, err error) {
return vpc.DeleteIpsecPolicyWithContext(context.Background(), deleteIpsecPolicyOptions)
}
@@ -11932,11 +14911,13 @@ func (vpc *VpcV1) GetIpsecPolicyWithContext(ctx context.Context, getIpsecPolicyO
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIPsecPolicy)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIPsecPolicy)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -11999,11 +14980,13 @@ func (vpc *VpcV1) UpdateIpsecPolicyWithContext(ctx context.Context, updateIpsecP
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIPsecPolicy)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIPsecPolicy)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -12060,11 +15043,13 @@ func (vpc *VpcV1) ListIpsecPolicyConnectionsWithContext(ctx context.Context, lis
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -12125,11 +15110,13 @@ func (vpc *VpcV1) ListVPNGatewaysWithContext(ctx context.Context, listVPNGateway
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -12188,18 +15175,21 @@ func (vpc *VpcV1) CreateVPNGatewayWithContext(ctx context.Context, createVPNGate
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGateway)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGateway)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
// DeleteVPNGateway : Delete a VPN gateway
-// This request deletes a VPN gateway. A VPN gateway with a `status` of `pending` cannot be deleted. This operation
-// deletes all VPN gateway connections associated with this VPN gateway. This operation cannot be reversed.
+// This request deletes a VPN gateway. This operation cannot be reversed. For this request to succeed, the VPN gateway
+// must not have a `status` of `pending`, and there must not be any VPC routes using the VPN gateway's connections as a
+// next hop.
func (vpc *VpcV1) DeleteVPNGateway(deleteVPNGatewayOptions *DeleteVPNGatewayOptions) (response *core.DetailedResponse, err error) {
return vpc.DeleteVPNGatewayWithContext(context.Background(), deleteVPNGatewayOptions)
}
@@ -12301,11 +15291,13 @@ func (vpc *VpcV1) GetVPNGatewayWithContext(ctx context.Context, getVPNGatewayOpt
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGateway)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGateway)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -12368,11 +15360,13 @@ func (vpc *VpcV1) UpdateVPNGatewayWithContext(ctx context.Context, updateVPNGate
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGateway)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGateway)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -12432,11 +15426,13 @@ func (vpc *VpcV1) ListVPNGatewayConnectionsWithContext(ctx context.Context, list
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -12499,17 +15495,20 @@ func (vpc *VpcV1) CreateVPNGatewayConnectionWithContext(ctx context.Context, cre
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
// DeleteVPNGatewayConnection : Delete a VPN gateway connection
-// This request deletes a VPN gateway connection. This operation cannot be reversed.
+// This request deletes a VPN gateway connection. This operation cannot be reversed. For this request to succeed, there
+// must not be VPC routes using this VPN connection as a next hop.
func (vpc *VpcV1) DeleteVPNGatewayConnection(deleteVPNGatewayConnectionOptions *DeleteVPNGatewayConnectionOptions) (response *core.DetailedResponse, err error) {
return vpc.DeleteVPNGatewayConnectionWithContext(context.Background(), deleteVPNGatewayConnectionOptions)
}
@@ -12613,11 +15612,13 @@ func (vpc *VpcV1) GetVPNGatewayConnectionWithContext(ctx context.Context, getVPN
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -12681,11 +15682,13 @@ func (vpc *VpcV1) UpdateVPNGatewayConnectionWithContext(ctx context.Context, upd
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -12743,11 +15746,13 @@ func (vpc *VpcV1) ListVPNGatewayConnectionLocalCIDRsWithContext(ctx context.Cont
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionLocalCIDRs)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionLocalCIDRs)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -12862,7 +15867,7 @@ func (vpc *VpcV1) CheckVPNGatewayConnectionLocalCIDRWithContext(ctx context.Cont
// AddVPNGatewayConnectionLocalCIDR : Set a local CIDR on a VPN gateway connection
// This request adds the specified CIDR to the specified VPN gateway connection. A request body is not required, and if
-// supplied, is ignored. This request succeeds if the CIDR already exists on the specified VPN gateway connection.
+// provided, is ignored. This request succeeds if the CIDR already exists on the specified VPN gateway connection.
func (vpc *VpcV1) AddVPNGatewayConnectionLocalCIDR(addVPNGatewayConnectionLocalCIDROptions *AddVPNGatewayConnectionLocalCIDROptions) (response *core.DetailedResponse, err error) {
return vpc.AddVPNGatewayConnectionLocalCIDRWithContext(context.Background(), addVPNGatewayConnectionLocalCIDROptions)
}
@@ -12968,11 +15973,13 @@ func (vpc *VpcV1) ListVPNGatewayConnectionPeerCIDRsWithContext(ctx context.Conte
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionPeerCIDRs)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionPeerCIDRs)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -13087,7 +16094,7 @@ func (vpc *VpcV1) CheckVPNGatewayConnectionPeerCIDRWithContext(ctx context.Conte
// AddVPNGatewayConnectionPeerCIDR : Set a peer CIDR on a VPN gateway connection
// This request adds the specified CIDR to the specified VPN gateway connection. A request body is not required, and if
-// supplied, is ignored. This request succeeds if the CIDR already exists on the specified VPN gateway connection.
+// provided, is ignored. This request succeeds if the CIDR already exists on the specified VPN gateway connection.
func (vpc *VpcV1) AddVPNGatewayConnectionPeerCIDR(addVPNGatewayConnectionPeerCIDROptions *AddVPNGatewayConnectionPeerCIDROptions) (response *core.DetailedResponse, err error) {
return vpc.AddVPNGatewayConnectionPeerCIDRWithContext(context.Background(), addVPNGatewayConnectionPeerCIDROptions)
}
@@ -13191,11 +16198,13 @@ func (vpc *VpcV1) ListLoadBalancerProfilesWithContext(ctx context.Context, listL
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerProfileCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerProfileCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -13252,11 +16261,13 @@ func (vpc *VpcV1) GetLoadBalancerProfileWithContext(ctx context.Context, getLoad
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerProfile)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerProfile)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -13294,6 +16305,12 @@ func (vpc *VpcV1) ListLoadBalancersWithContext(ctx context.Context, listLoadBala
builder.AddQuery("version", fmt.Sprint(*vpc.Version))
builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
+ if listLoadBalancersOptions.Start != nil {
+ builder.AddQuery("start", fmt.Sprint(*listLoadBalancersOptions.Start))
+ }
+ if listLoadBalancersOptions.Limit != nil {
+ builder.AddQuery("limit", fmt.Sprint(*listLoadBalancersOptions.Limit))
+ }
request, err := builder.Build()
if err != nil {
@@ -13305,11 +16322,13 @@ func (vpc *VpcV1) ListLoadBalancersWithContext(ctx context.Context, listLoadBala
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -13378,6 +16397,9 @@ func (vpc *VpcV1) CreateLoadBalancerWithContext(ctx context.Context, createLoadB
if createLoadBalancerOptions.ResourceGroup != nil {
body["resource_group"] = createLoadBalancerOptions.ResourceGroup
}
+ if createLoadBalancerOptions.RouteMode != nil {
+ body["route_mode"] = createLoadBalancerOptions.RouteMode
+ }
if createLoadBalancerOptions.SecurityGroups != nil {
body["security_groups"] = createLoadBalancerOptions.SecurityGroups
}
@@ -13396,17 +16418,20 @@ func (vpc *VpcV1) CreateLoadBalancerWithContext(ctx context.Context, createLoadB
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancer)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancer)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
// DeleteLoadBalancer : Delete a load balancer
-// This request deletes a load balancer. This operation cannot be reversed.
+// This request deletes a load balancer. This operation cannot be reversed. A load balancer cannot be deleted if its
+// `provisioning_status` is `delete_pending`.
func (vpc *VpcV1) DeleteLoadBalancer(deleteLoadBalancerOptions *DeleteLoadBalancerOptions) (response *core.DetailedResponse, err error) {
return vpc.DeleteLoadBalancerWithContext(context.Background(), deleteLoadBalancerOptions)
}
@@ -13508,11 +16533,13 @@ func (vpc *VpcV1) GetLoadBalancerWithContext(ctx context.Context, getLoadBalance
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancer)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancer)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -13575,11 +16602,13 @@ func (vpc *VpcV1) UpdateLoadBalancerWithContext(ctx context.Context, updateLoadB
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancer)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancer)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -13636,11 +16665,13 @@ func (vpc *VpcV1) GetLoadBalancerStatisticsWithContext(ctx context.Context, getL
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerStatistics)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerStatistics)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -13697,11 +16728,13 @@ func (vpc *VpcV1) ListLoadBalancerListenersWithContext(ctx context.Context, list
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -13750,9 +16783,6 @@ func (vpc *VpcV1) CreateLoadBalancerListenerWithContext(ctx context.Context, cre
builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
body := make(map[string]interface{})
- if createLoadBalancerListenerOptions.Port != nil {
- body["port"] = createLoadBalancerListenerOptions.Port
- }
if createLoadBalancerListenerOptions.Protocol != nil {
body["protocol"] = createLoadBalancerListenerOptions.Protocol
}
@@ -13768,9 +16798,21 @@ func (vpc *VpcV1) CreateLoadBalancerListenerWithContext(ctx context.Context, cre
if createLoadBalancerListenerOptions.DefaultPool != nil {
body["default_pool"] = createLoadBalancerListenerOptions.DefaultPool
}
+ if createLoadBalancerListenerOptions.HTTPSRedirect != nil {
+ body["https_redirect"] = createLoadBalancerListenerOptions.HTTPSRedirect
+ }
if createLoadBalancerListenerOptions.Policies != nil {
body["policies"] = createLoadBalancerListenerOptions.Policies
}
+ if createLoadBalancerListenerOptions.Port != nil {
+ body["port"] = createLoadBalancerListenerOptions.Port
+ }
+ if createLoadBalancerListenerOptions.PortMax != nil {
+ body["port_max"] = createLoadBalancerListenerOptions.PortMax
+ }
+ if createLoadBalancerListenerOptions.PortMin != nil {
+ body["port_min"] = createLoadBalancerListenerOptions.PortMin
+ }
_, err = builder.SetBodyContentJSON(body)
if err != nil {
return
@@ -13786,17 +16828,20 @@ func (vpc *VpcV1) CreateLoadBalancerListenerWithContext(ctx context.Context, cre
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListener)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListener)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
// DeleteLoadBalancerListener : Delete a load balancer listener
-// This request deletes a load balancer listener. This operation cannot be reversed.
+// This request deletes a load balancer listener. This operation cannot be reversed. For this operation to succeed, the
+// listener must not be the target of another load balancer listener.
func (vpc *VpcV1) DeleteLoadBalancerListener(deleteLoadBalancerListenerOptions *DeleteLoadBalancerListenerOptions) (response *core.DetailedResponse, err error) {
return vpc.DeleteLoadBalancerListenerWithContext(context.Background(), deleteLoadBalancerListenerOptions)
}
@@ -13900,11 +16945,13 @@ func (vpc *VpcV1) GetLoadBalancerListenerWithContext(ctx context.Context, getLoa
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListener)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListener)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -13968,11 +17015,13 @@ func (vpc *VpcV1) UpdateLoadBalancerListenerWithContext(ctx context.Context, upd
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListener)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListener)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -14030,11 +17079,13 @@ func (vpc *VpcV1) ListLoadBalancerListenerPoliciesWithContext(ctx context.Contex
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicyCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicyCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -14114,11 +17165,13 @@ func (vpc *VpcV1) CreateLoadBalancerListenerPolicyWithContext(ctx context.Contex
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicy)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicy)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -14230,11 +17283,13 @@ func (vpc *VpcV1) GetLoadBalancerListenerPolicyWithContext(ctx context.Context,
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicy)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicy)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -14299,11 +17354,13 @@ func (vpc *VpcV1) UpdateLoadBalancerListenerPolicyWithContext(ctx context.Contex
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicy)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicy)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -14362,11 +17419,13 @@ func (vpc *VpcV1) ListLoadBalancerListenerPolicyRulesWithContext(ctx context.Con
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicyRuleCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicyRuleCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -14444,11 +17503,13 @@ func (vpc *VpcV1) CreateLoadBalancerListenerPolicyRuleWithContext(ctx context.Co
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicyRule)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicyRule)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -14562,11 +17623,13 @@ func (vpc *VpcV1) GetLoadBalancerListenerPolicyRuleWithContext(ctx context.Conte
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicyRule)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicyRule)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -14632,11 +17695,13 @@ func (vpc *VpcV1) UpdateLoadBalancerListenerPolicyRuleWithContext(ctx context.Co
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicyRule)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicyRule)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -14693,11 +17758,13 @@ func (vpc *VpcV1) ListLoadBalancerPoolsWithContext(ctx context.Context, listLoad
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPoolCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPoolCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -14782,11 +17849,13 @@ func (vpc *VpcV1) CreateLoadBalancerPoolWithContext(ctx context.Context, createL
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPool)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPool)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -14897,11 +17966,13 @@ func (vpc *VpcV1) GetLoadBalancerPoolWithContext(ctx context.Context, getLoadBal
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPool)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPool)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -14965,11 +18036,13 @@ func (vpc *VpcV1) UpdateLoadBalancerPoolWithContext(ctx context.Context, updateL
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPool)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPool)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -15027,11 +18100,13 @@ func (vpc *VpcV1) ListLoadBalancerPoolMembersWithContext(ctx context.Context, li
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPoolMemberCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPoolMemberCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -15105,11 +18180,13 @@ func (vpc *VpcV1) CreateLoadBalancerPoolMemberWithContext(ctx context.Context, c
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPoolMember)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPoolMember)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -15178,11 +18255,13 @@ func (vpc *VpcV1) ReplaceLoadBalancerPoolMembersWithContext(ctx context.Context,
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPoolMemberCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPoolMemberCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -15294,11 +18373,13 @@ func (vpc *VpcV1) GetLoadBalancerPoolMemberWithContext(ctx context.Context, getL
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPoolMember)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPoolMember)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -15363,11 +18444,13 @@ func (vpc *VpcV1) UpdateLoadBalancerPoolMemberWithContext(ctx context.Context, u
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPoolMember)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPoolMember)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -15429,11 +18512,13 @@ func (vpc *VpcV1) ListEndpointGatewaysWithContext(ctx context.Context, listEndpo
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalEndpointGatewayCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalEndpointGatewayCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -15494,6 +18579,9 @@ func (vpc *VpcV1) CreateEndpointGatewayWithContext(ctx context.Context, createEn
if createEndpointGatewayOptions.ResourceGroup != nil {
body["resource_group"] = createEndpointGatewayOptions.ResourceGroup
}
+ if createEndpointGatewayOptions.SecurityGroups != nil {
+ body["security_groups"] = createEndpointGatewayOptions.SecurityGroups
+ }
_, err = builder.SetBodyContentJSON(body)
if err != nil {
return
@@ -15509,11 +18597,13 @@ func (vpc *VpcV1) CreateEndpointGatewayWithContext(ctx context.Context, createEn
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalEndpointGateway)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalEndpointGateway)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -15579,11 +18669,13 @@ func (vpc *VpcV1) ListEndpointGatewayIpsWithContext(ctx context.Context, listEnd
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIPCollectionEndpointGatewayContext)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIPCollectionEndpointGatewayContext)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -15695,11 +18787,13 @@ func (vpc *VpcV1) GetEndpointGatewayIPWithContext(ctx context.Context, getEndpoi
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIP)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIP)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -15760,11 +18854,13 @@ func (vpc *VpcV1) AddEndpointGatewayIPWithContext(ctx context.Context, addEndpoi
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIP)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIP)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -15875,11 +18971,13 @@ func (vpc *VpcV1) GetEndpointGatewayWithContext(ctx context.Context, getEndpoint
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalEndpointGateway)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalEndpointGateway)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -15942,11 +19040,13 @@ func (vpc *VpcV1) UpdateEndpointGatewayWithContext(ctx context.Context, updateEn
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalEndpointGateway)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalEndpointGateway)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -16023,11 +19123,13 @@ func (vpc *VpcV1) ListFlowLogCollectorsWithContext(ctx context.Context, listFlow
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFlowLogCollectorCollection)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFlowLogCollectorCollection)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -16104,18 +19206,21 @@ func (vpc *VpcV1) CreateFlowLogCollectorWithContext(ctx context.Context, createF
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFlowLogCollector)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFlowLogCollector)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
// DeleteFlowLogCollector : Delete a flow log collector
-// This request stops and deletes a flow log collector. Collected flow logs remain available within the flow log
-// collector's bucket.
+// This request stops and deletes a flow log collector. This operation cannot be reversed.
+//
+// Collected flow logs remain available within the flow log collector's Cloud Object Storage bucket.
func (vpc *VpcV1) DeleteFlowLogCollector(deleteFlowLogCollectorOptions *DeleteFlowLogCollectorOptions) (response *core.DetailedResponse, err error) {
return vpc.DeleteFlowLogCollectorWithContext(context.Background(), deleteFlowLogCollectorOptions)
}
@@ -16217,11 +19322,13 @@ func (vpc *VpcV1) GetFlowLogCollectorWithContext(ctx context.Context, getFlowLog
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFlowLogCollector)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFlowLogCollector)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
@@ -16286,22 +19393,72 @@ func (vpc *VpcV1) UpdateFlowLogCollectorWithContext(ctx context.Context, updateF
if err != nil {
return
}
- err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFlowLogCollector)
- if err != nil {
- return
+ if rawResponse != nil {
+ err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFlowLogCollector)
+ if err != nil {
+ return
+ }
+ response.Result = result
}
- response.Result = result
return
}
+// AddBareMetalServerNetworkInterfaceFloatingIPOptions : The AddBareMetalServerNetworkInterfaceFloatingIP options.
+type AddBareMetalServerNetworkInterfaceFloatingIPOptions struct {
+ // The bare metal server identifier.
+ BareMetalServerID *string `json:"bare_metal_server_id" validate:"required,ne="`
+
+ // The network interface identifier.
+ NetworkInterfaceID *string `json:"network_interface_id" validate:"required,ne="`
+
+ // The floating IP identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewAddBareMetalServerNetworkInterfaceFloatingIPOptions : Instantiate AddBareMetalServerNetworkInterfaceFloatingIPOptions
+func (*VpcV1) NewAddBareMetalServerNetworkInterfaceFloatingIPOptions(bareMetalServerID string, networkInterfaceID string, id string) *AddBareMetalServerNetworkInterfaceFloatingIPOptions {
+ return &AddBareMetalServerNetworkInterfaceFloatingIPOptions{
+ BareMetalServerID: core.StringPtr(bareMetalServerID),
+ NetworkInterfaceID: core.StringPtr(networkInterfaceID),
+ ID: core.StringPtr(id),
+ }
+}
+
+// SetBareMetalServerID : Allow user to set BareMetalServerID
+func (_options *AddBareMetalServerNetworkInterfaceFloatingIPOptions) SetBareMetalServerID(bareMetalServerID string) *AddBareMetalServerNetworkInterfaceFloatingIPOptions {
+ _options.BareMetalServerID = core.StringPtr(bareMetalServerID)
+ return _options
+}
+
+// SetNetworkInterfaceID : Allow user to set NetworkInterfaceID
+func (_options *AddBareMetalServerNetworkInterfaceFloatingIPOptions) SetNetworkInterfaceID(networkInterfaceID string) *AddBareMetalServerNetworkInterfaceFloatingIPOptions {
+ _options.NetworkInterfaceID = core.StringPtr(networkInterfaceID)
+ return _options
+}
+
+// SetID : Allow user to set ID
+func (_options *AddBareMetalServerNetworkInterfaceFloatingIPOptions) SetID(id string) *AddBareMetalServerNetworkInterfaceFloatingIPOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *AddBareMetalServerNetworkInterfaceFloatingIPOptions) SetHeaders(param map[string]string) *AddBareMetalServerNetworkInterfaceFloatingIPOptions {
+ options.Headers = param
+ return options
+}
+
// AddEndpointGatewayIPOptions : The AddEndpointGatewayIP options.
type AddEndpointGatewayIPOptions struct {
// The endpoint gateway identifier.
- EndpointGatewayID *string `validate:"required,ne="`
+ EndpointGatewayID *string `json:"endpoint_gateway_id" validate:"required,ne="`
// The reserved IP identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -16316,15 +19473,15 @@ func (*VpcV1) NewAddEndpointGatewayIPOptions(endpointGatewayID string, id string
}
// SetEndpointGatewayID : Allow user to set EndpointGatewayID
-func (options *AddEndpointGatewayIPOptions) SetEndpointGatewayID(endpointGatewayID string) *AddEndpointGatewayIPOptions {
- options.EndpointGatewayID = core.StringPtr(endpointGatewayID)
- return options
+func (_options *AddEndpointGatewayIPOptions) SetEndpointGatewayID(endpointGatewayID string) *AddEndpointGatewayIPOptions {
+ _options.EndpointGatewayID = core.StringPtr(endpointGatewayID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *AddEndpointGatewayIPOptions) SetID(id string) *AddEndpointGatewayIPOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *AddEndpointGatewayIPOptions) SetID(id string) *AddEndpointGatewayIPOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -16336,13 +19493,13 @@ func (options *AddEndpointGatewayIPOptions) SetHeaders(param map[string]string)
// AddInstanceNetworkInterfaceFloatingIPOptions : The AddInstanceNetworkInterfaceFloatingIP options.
type AddInstanceNetworkInterfaceFloatingIPOptions struct {
// The instance identifier.
- InstanceID *string `validate:"required,ne="`
+ InstanceID *string `json:"instance_id" validate:"required,ne="`
// The network interface identifier.
- NetworkInterfaceID *string `validate:"required,ne="`
+ NetworkInterfaceID *string `json:"network_interface_id" validate:"required,ne="`
// The floating IP identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -16358,21 +19515,21 @@ func (*VpcV1) NewAddInstanceNetworkInterfaceFloatingIPOptions(instanceID string,
}
// SetInstanceID : Allow user to set InstanceID
-func (options *AddInstanceNetworkInterfaceFloatingIPOptions) SetInstanceID(instanceID string) *AddInstanceNetworkInterfaceFloatingIPOptions {
- options.InstanceID = core.StringPtr(instanceID)
- return options
+func (_options *AddInstanceNetworkInterfaceFloatingIPOptions) SetInstanceID(instanceID string) *AddInstanceNetworkInterfaceFloatingIPOptions {
+ _options.InstanceID = core.StringPtr(instanceID)
+ return _options
}
// SetNetworkInterfaceID : Allow user to set NetworkInterfaceID
-func (options *AddInstanceNetworkInterfaceFloatingIPOptions) SetNetworkInterfaceID(networkInterfaceID string) *AddInstanceNetworkInterfaceFloatingIPOptions {
- options.NetworkInterfaceID = core.StringPtr(networkInterfaceID)
- return options
+func (_options *AddInstanceNetworkInterfaceFloatingIPOptions) SetNetworkInterfaceID(networkInterfaceID string) *AddInstanceNetworkInterfaceFloatingIPOptions {
+ _options.NetworkInterfaceID = core.StringPtr(networkInterfaceID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *AddInstanceNetworkInterfaceFloatingIPOptions) SetID(id string) *AddInstanceNetworkInterfaceFloatingIPOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *AddInstanceNetworkInterfaceFloatingIPOptions) SetID(id string) *AddInstanceNetworkInterfaceFloatingIPOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -16381,57 +19538,19 @@ func (options *AddInstanceNetworkInterfaceFloatingIPOptions) SetHeaders(param ma
return options
}
-// AddSecurityGroupNetworkInterfaceOptions : The AddSecurityGroupNetworkInterface options.
-type AddSecurityGroupNetworkInterfaceOptions struct {
- // The security group identifier.
- SecurityGroupID *string `validate:"required,ne="`
-
- // The network interface identifier.
- ID *string `validate:"required,ne="`
-
- // Allows users to set headers on API requests
- Headers map[string]string
-}
-
-// NewAddSecurityGroupNetworkInterfaceOptions : Instantiate AddSecurityGroupNetworkInterfaceOptions
-func (*VpcV1) NewAddSecurityGroupNetworkInterfaceOptions(securityGroupID string, id string) *AddSecurityGroupNetworkInterfaceOptions {
- return &AddSecurityGroupNetworkInterfaceOptions{
- SecurityGroupID: core.StringPtr(securityGroupID),
- ID: core.StringPtr(id),
- }
-}
-
-// SetSecurityGroupID : Allow user to set SecurityGroupID
-func (options *AddSecurityGroupNetworkInterfaceOptions) SetSecurityGroupID(securityGroupID string) *AddSecurityGroupNetworkInterfaceOptions {
- options.SecurityGroupID = core.StringPtr(securityGroupID)
- return options
-}
-
-// SetID : Allow user to set ID
-func (options *AddSecurityGroupNetworkInterfaceOptions) SetID(id string) *AddSecurityGroupNetworkInterfaceOptions {
- options.ID = core.StringPtr(id)
- return options
-}
-
-// SetHeaders : Allow user to set Headers
-func (options *AddSecurityGroupNetworkInterfaceOptions) SetHeaders(param map[string]string) *AddSecurityGroupNetworkInterfaceOptions {
- options.Headers = param
- return options
-}
-
// AddVPNGatewayConnectionLocalCIDROptions : The AddVPNGatewayConnectionLocalCIDR options.
type AddVPNGatewayConnectionLocalCIDROptions struct {
// The VPN gateway identifier.
- VPNGatewayID *string `validate:"required,ne="`
+ VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="`
// The VPN gateway connection identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The address prefix part of the CIDR.
- CIDRPrefix *string `validate:"required,ne="`
+ CIDRPrefix *string `json:"cidr_prefix" validate:"required,ne="`
// The prefix length part of the CIDR.
- PrefixLength *string `validate:"required,ne="`
+ PrefixLength *string `json:"prefix_length" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -16448,27 +19567,27 @@ func (*VpcV1) NewAddVPNGatewayConnectionLocalCIDROptions(vpnGatewayID string, id
}
// SetVPNGatewayID : Allow user to set VPNGatewayID
-func (options *AddVPNGatewayConnectionLocalCIDROptions) SetVPNGatewayID(vpnGatewayID string) *AddVPNGatewayConnectionLocalCIDROptions {
- options.VPNGatewayID = core.StringPtr(vpnGatewayID)
- return options
+func (_options *AddVPNGatewayConnectionLocalCIDROptions) SetVPNGatewayID(vpnGatewayID string) *AddVPNGatewayConnectionLocalCIDROptions {
+ _options.VPNGatewayID = core.StringPtr(vpnGatewayID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *AddVPNGatewayConnectionLocalCIDROptions) SetID(id string) *AddVPNGatewayConnectionLocalCIDROptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *AddVPNGatewayConnectionLocalCIDROptions) SetID(id string) *AddVPNGatewayConnectionLocalCIDROptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetCIDRPrefix : Allow user to set CIDRPrefix
-func (options *AddVPNGatewayConnectionLocalCIDROptions) SetCIDRPrefix(cidrPrefix string) *AddVPNGatewayConnectionLocalCIDROptions {
- options.CIDRPrefix = core.StringPtr(cidrPrefix)
- return options
+func (_options *AddVPNGatewayConnectionLocalCIDROptions) SetCIDRPrefix(cidrPrefix string) *AddVPNGatewayConnectionLocalCIDROptions {
+ _options.CIDRPrefix = core.StringPtr(cidrPrefix)
+ return _options
}
// SetPrefixLength : Allow user to set PrefixLength
-func (options *AddVPNGatewayConnectionLocalCIDROptions) SetPrefixLength(prefixLength string) *AddVPNGatewayConnectionLocalCIDROptions {
- options.PrefixLength = core.StringPtr(prefixLength)
- return options
+func (_options *AddVPNGatewayConnectionLocalCIDROptions) SetPrefixLength(prefixLength string) *AddVPNGatewayConnectionLocalCIDROptions {
+ _options.PrefixLength = core.StringPtr(prefixLength)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -16480,16 +19599,16 @@ func (options *AddVPNGatewayConnectionLocalCIDROptions) SetHeaders(param map[str
// AddVPNGatewayConnectionPeerCIDROptions : The AddVPNGatewayConnectionPeerCIDR options.
type AddVPNGatewayConnectionPeerCIDROptions struct {
// The VPN gateway identifier.
- VPNGatewayID *string `validate:"required,ne="`
+ VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="`
// The VPN gateway connection identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The address prefix part of the CIDR.
- CIDRPrefix *string `validate:"required,ne="`
+ CIDRPrefix *string `json:"cidr_prefix" validate:"required,ne="`
// The prefix length part of the CIDR.
- PrefixLength *string `validate:"required,ne="`
+ PrefixLength *string `json:"prefix_length" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -16506,27 +19625,27 @@ func (*VpcV1) NewAddVPNGatewayConnectionPeerCIDROptions(vpnGatewayID string, id
}
// SetVPNGatewayID : Allow user to set VPNGatewayID
-func (options *AddVPNGatewayConnectionPeerCIDROptions) SetVPNGatewayID(vpnGatewayID string) *AddVPNGatewayConnectionPeerCIDROptions {
- options.VPNGatewayID = core.StringPtr(vpnGatewayID)
- return options
+func (_options *AddVPNGatewayConnectionPeerCIDROptions) SetVPNGatewayID(vpnGatewayID string) *AddVPNGatewayConnectionPeerCIDROptions {
+ _options.VPNGatewayID = core.StringPtr(vpnGatewayID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *AddVPNGatewayConnectionPeerCIDROptions) SetID(id string) *AddVPNGatewayConnectionPeerCIDROptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *AddVPNGatewayConnectionPeerCIDROptions) SetID(id string) *AddVPNGatewayConnectionPeerCIDROptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetCIDRPrefix : Allow user to set CIDRPrefix
-func (options *AddVPNGatewayConnectionPeerCIDROptions) SetCIDRPrefix(cidrPrefix string) *AddVPNGatewayConnectionPeerCIDROptions {
- options.CIDRPrefix = core.StringPtr(cidrPrefix)
- return options
+func (_options *AddVPNGatewayConnectionPeerCIDROptions) SetCIDRPrefix(cidrPrefix string) *AddVPNGatewayConnectionPeerCIDROptions {
+ _options.CIDRPrefix = core.StringPtr(cidrPrefix)
+ return _options
}
// SetPrefixLength : Allow user to set PrefixLength
-func (options *AddVPNGatewayConnectionPeerCIDROptions) SetPrefixLength(prefixLength string) *AddVPNGatewayConnectionPeerCIDROptions {
- options.PrefixLength = core.StringPtr(prefixLength)
- return options
+func (_options *AddVPNGatewayConnectionPeerCIDROptions) SetPrefixLength(prefixLength string) *AddVPNGatewayConnectionPeerCIDROptions {
+ _options.PrefixLength = core.StringPtr(prefixLength)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -16649,6 +19768,18 @@ func UnmarshalAddressPrefixCollection(m map[string]json.RawMessage, result inter
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *AddressPrefixCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// AddressPrefixCollectionFirst : A link to the first page of resources.
type AddressPrefixCollectionFirst struct {
// The URL for a page of resources.
@@ -16710,15 +19841,2302 @@ func UnmarshalAddressPrefixPatch(m map[string]json.RawMessage, result interface{
}
// AsPatch returns a generic map representation of the AddressPrefixPatch
-func (addressPrefixPatch *AddressPrefixPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (addressPrefixPatch *AddressPrefixPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(addressPrefixPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
+// BareMetalServer : BareMetalServer struct
+type BareMetalServer struct {
+ // The total bandwidth (in megabits per second) shared across the bare metal server's network interfaces.
+ Bandwidth *int64 `json:"bandwidth" validate:"required"`
+
+ // The possible resource types for this property are expected to expand in the future.
+ BootTarget BareMetalServerBootTargetIntf `json:"boot_target" validate:"required"`
+
+ // The bare metal server CPU configuration.
+ Cpu *BareMetalServerCpu `json:"cpu" validate:"required"`
+
+ // The date and time that the bare metal server was created.
+ CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
+
+ // The CRN for this bare metal server.
+ CRN *string `json:"crn" validate:"required"`
+
+ // The disks for this bare metal server, including any disks that are associated with the
+ // `boot_target`.
+ Disks []BareMetalServerDisk `json:"disks" validate:"required"`
+
+ // Indicates whether secure boot is enabled. If enabled, the image must support secure boot or the server will fail to
+ // boot.
+ EnableSecureBoot *bool `json:"enable_secure_boot" validate:"required"`
+
+ // The URL for this bare metal server.
+ Href *string `json:"href" validate:"required"`
+
+ // The unique identifier for this bare metal server.
+ ID *string `json:"id" validate:"required"`
+
+ // The amount of memory, truncated to whole gibibytes.
+ Memory *int64 `json:"memory" validate:"required"`
+
+ // The user-defined name for this bare metal server (and default system hostname).
+ Name *string `json:"name" validate:"required"`
+
+ // The network interfaces for this bare metal server, including the primary network interface.
+ NetworkInterfaces []NetworkInterfaceBareMetalServerContextReference `json:"network_interfaces" validate:"required"`
+
+ // Primary network interface.
+ PrimaryNetworkInterface *NetworkInterfaceBareMetalServerContextReference `json:"primary_network_interface" validate:"required"`
+
+ // The profile this bare metal server uses.
+ Profile *BareMetalServerProfileReference `json:"profile" validate:"required"`
+
+ // The resource group for this bare metal server.
+ ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+
+ // The status of the bare metal server.
+ Status *string `json:"status" validate:"required"`
+
+ // The reasons for the current status (if any).
+ //
+ // The enumerated reason code values for this property will expand in the future. When processing this property, check
+ // for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
+ // unexpected reason code was encountered.
+ StatusReasons []BareMetalServerStatusReason `json:"status_reasons" validate:"required"`
+
+ TrustedPlatformModule *BareMetalServerTrustedPlatformModule `json:"trusted_platform_module" validate:"required"`
+
+ // The VPC this bare metal server resides in.
+ VPC *VPCReference `json:"vpc" validate:"required"`
+
+ // The zone this bare metal server resides in.
+ Zone *ZoneReference `json:"zone" validate:"required"`
+}
+
+// Constants associated with the BareMetalServer.ResourceType property.
+// The resource type.
+const (
+ BareMetalServerResourceTypeBareMetalServerConst = "bare_metal_server"
+)
+
+// Constants associated with the BareMetalServer.Status property.
+// The status of the bare metal server.
+const (
+ BareMetalServerStatusFailedConst = "failed"
+ BareMetalServerStatusMaintenanceConst = "maintenance"
+ BareMetalServerStatusPendingConst = "pending"
+ BareMetalServerStatusRestartingConst = "restarting"
+ BareMetalServerStatusRunningConst = "running"
+ BareMetalServerStatusStartingConst = "starting"
+ BareMetalServerStatusStoppedConst = "stopped"
+ BareMetalServerStatusStoppingConst = "stopping"
+)
+
+// UnmarshalBareMetalServer unmarshals an instance of BareMetalServer from the specified map of raw messages.
+func UnmarshalBareMetalServer(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServer)
+ err = core.UnmarshalPrimitive(m, "bandwidth", &obj.Bandwidth)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "boot_target", &obj.BootTarget, UnmarshalBareMetalServerBootTarget)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "cpu", &obj.Cpu, UnmarshalBareMetalServerCpu)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "disks", &obj.Disks, UnmarshalBareMetalServerDisk)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "enable_secure_boot", &obj.EnableSecureBoot)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "memory", &obj.Memory)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfaceBareMetalServerContextReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfaceBareMetalServerContextReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalBareMetalServerProfileReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "status", &obj.Status)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "status_reasons", &obj.StatusReasons, UnmarshalBareMetalServerStatusReason)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "trusted_platform_module", &obj.TrustedPlatformModule, UnmarshalBareMetalServerTrustedPlatformModule)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerBootTarget : The possible resource types for this property are expected to expand in the future.
+// Models which "extend" this model:
+// - BareMetalServerBootTargetBareMetalServerDiskReference
+type BareMetalServerBootTarget struct {
+ // If present, this property indicates the referenced resource has been deleted and provides
+ // some supplementary information.
+ Deleted *BareMetalServerDiskReferenceDeleted `json:"deleted,omitempty"`
+
+ // The URL for this bare metal server disk.
+ Href *string `json:"href,omitempty"`
+
+ // The unique identifier for this bare metal server disk.
+ ID *string `json:"id,omitempty"`
+
+ // The user-defined name for this disk.
+ Name *string `json:"name,omitempty"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type,omitempty"`
+}
+
+// Constants associated with the BareMetalServerBootTarget.ResourceType property.
+// The resource type.
+const (
+ BareMetalServerBootTargetResourceTypeBareMetalServerDiskConst = "bare_metal_server_disk"
+)
+
+func (*BareMetalServerBootTarget) isaBareMetalServerBootTarget() bool {
+ return true
+}
+
+type BareMetalServerBootTargetIntf interface {
+ isaBareMetalServerBootTarget() bool
+}
+
+// UnmarshalBareMetalServerBootTarget unmarshals an instance of BareMetalServerBootTarget from the specified map of raw messages.
+func UnmarshalBareMetalServerBootTarget(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerBootTarget)
+ err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalBareMetalServerDiskReferenceDeleted)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerCpu : The bare metal server CPU configuration.
+type BareMetalServerCpu struct {
+ // The CPU architecture.
+ Architecture *string `json:"architecture" validate:"required"`
+
+ // The total number of cores.
+ CoreCount *int64 `json:"core_count" validate:"required"`
+
+ // The total number of CPU sockets.
+ SocketCount *int64 `json:"socket_count" validate:"required"`
+
+ // The total number of hardware threads per core.
+ ThreadsPerCore *int64 `json:"threads_per_core" validate:"required"`
+}
+
+// UnmarshalBareMetalServerCpu unmarshals an instance of BareMetalServerCpu from the specified map of raw messages.
+func UnmarshalBareMetalServerCpu(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerCpu)
+ err = core.UnmarshalPrimitive(m, "architecture", &obj.Architecture)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "core_count", &obj.CoreCount)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "socket_count", &obj.SocketCount)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "threads_per_core", &obj.ThreadsPerCore)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerCollection : BareMetalServerCollection struct
+type BareMetalServerCollection struct {
+ // Collection of bare metal servers.
+ BareMetalServers []BareMetalServer `json:"bare_metal_servers" validate:"required"`
+
+ // A link to the first page of resources.
+ First *BareMetalServerCollectionFirst `json:"first" validate:"required"`
+
+ // The maximum number of resources that can be returned by the request.
+ Limit *int64 `json:"limit" validate:"required"`
+
+ // A link to the next page of resources. This property is present for all pages
+ // except the last page.
+ Next *BareMetalServerCollectionNext `json:"next,omitempty"`
+
+ // The total number of resources across all pages.
+ TotalCount *int64 `json:"total_count" validate:"required"`
+}
+
+// UnmarshalBareMetalServerCollection unmarshals an instance of BareMetalServerCollection from the specified map of raw messages.
+func UnmarshalBareMetalServerCollection(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerCollection)
+ err = core.UnmarshalModel(m, "bare_metal_servers", &obj.BareMetalServers, UnmarshalBareMetalServer)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalBareMetalServerCollectionFirst)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalBareMetalServerCollectionNext)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *BareMetalServerCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
+// BareMetalServerCollectionFirst : A link to the first page of resources.
+type BareMetalServerCollectionFirst struct {
+ // The URL for a page of resources.
+ Href *string `json:"href" validate:"required"`
+}
+
+// UnmarshalBareMetalServerCollectionFirst unmarshals an instance of BareMetalServerCollectionFirst from the specified map of raw messages.
+func UnmarshalBareMetalServerCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerCollectionFirst)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
+type BareMetalServerCollectionNext struct {
+ // The URL for a page of resources.
+ Href *string `json:"href" validate:"required"`
+}
+
+// UnmarshalBareMetalServerCollectionNext unmarshals an instance of BareMetalServerCollectionNext from the specified map of raw messages.
+func UnmarshalBareMetalServerCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerCollectionNext)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerConsoleAccessToken : The bare metal server console access token information.
+type BareMetalServerConsoleAccessToken struct {
+ // A URL safe single-use token used to access the console WebSocket.
+ AccessToken *string `json:"access_token" validate:"required"`
+
+ // The bare metal server console type for which this token may be used.
+ ConsoleType *string `json:"console_type" validate:"required"`
+
+ // The date and time that the access token was created.
+ CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
+
+ // The date and time that the access token will expire.
+ ExpiresAt *strfmt.DateTime `json:"expires_at" validate:"required"`
+
+ // Indicates whether to disconnect an existing serial console session as the serial console cannot be shared. This has
+ // no effect on VNC consoles.
+ Force *bool `json:"force" validate:"required"`
+
+ // The URL to access this bare metal server console.
+ Href *string `json:"href" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerConsoleAccessToken.ConsoleType property.
+// The bare metal server console type for which this token may be used.
+const (
+ BareMetalServerConsoleAccessTokenConsoleTypeSerialConst = "serial"
+ BareMetalServerConsoleAccessTokenConsoleTypeVncConst = "vnc"
+)
+
+// UnmarshalBareMetalServerConsoleAccessToken unmarshals an instance of BareMetalServerConsoleAccessToken from the specified map of raw messages.
+func UnmarshalBareMetalServerConsoleAccessToken(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerConsoleAccessToken)
+ err = core.UnmarshalPrimitive(m, "access_token", &obj.AccessToken)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "console_type", &obj.ConsoleType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "expires_at", &obj.ExpiresAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "force", &obj.Force)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerDisk : BareMetalServerDisk struct
+type BareMetalServerDisk struct {
+ // The date and time that the disk was created.
+ CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
+
+ // The URL for this bare metal server disk.
+ Href *string `json:"href" validate:"required"`
+
+ // The unique identifier for this bare metal server disk.
+ ID *string `json:"id" validate:"required"`
+
+ // The disk interface used for attaching the disk.
+ //
+ // The enumerated values for this property are expected to expand in the future. When processing this property, check
+ // for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
+ // unexpected property value was encountered.
+ InterfaceType *string `json:"interface_type" validate:"required"`
+
+ // The user-defined name for this disk.
+ Name *string `json:"name" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+
+ // The size of the disk in GB (gigabytes).
+ Size *int64 `json:"size" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerDisk.InterfaceType property.
+// The disk interface used for attaching the disk.
+//
+// The enumerated values for this property are expected to expand in the future. When processing this property, check
+// for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
+// unexpected property value was encountered.
+const (
+ BareMetalServerDiskInterfaceTypeNvmeConst = "nvme"
+ BareMetalServerDiskInterfaceTypeSataConst = "sata"
+)
+
+// Constants associated with the BareMetalServerDisk.ResourceType property.
+// The resource type.
+const (
+ BareMetalServerDiskResourceTypeBareMetalServerDiskConst = "bare_metal_server_disk"
+)
+
+// UnmarshalBareMetalServerDisk unmarshals an instance of BareMetalServerDisk from the specified map of raw messages.
+func UnmarshalBareMetalServerDisk(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerDisk)
+ err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "size", &obj.Size)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerDiskCollection : BareMetalServerDiskCollection struct
+type BareMetalServerDiskCollection struct {
+ // Collection of the bare metal server's disks.
+ Disks []BareMetalServerDisk `json:"disks" validate:"required"`
+}
+
+// UnmarshalBareMetalServerDiskCollection unmarshals an instance of BareMetalServerDiskCollection from the specified map of raw messages.
+func UnmarshalBareMetalServerDiskCollection(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerDiskCollection)
+ err = core.UnmarshalModel(m, "disks", &obj.Disks, UnmarshalBareMetalServerDisk)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerDiskPatch : BareMetalServerDiskPatch struct
+type BareMetalServerDiskPatch struct {
+ // The user-defined name for this disk.
+ Name *string `json:"name,omitempty"`
+}
+
+// UnmarshalBareMetalServerDiskPatch unmarshals an instance of BareMetalServerDiskPatch from the specified map of raw messages.
+func UnmarshalBareMetalServerDiskPatch(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerDiskPatch)
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// AsPatch returns a generic map representation of the BareMetalServerDiskPatch
+func (bareMetalServerDiskPatch *BareMetalServerDiskPatch) AsPatch() (_patch map[string]interface{}, err error) {
+ var jsonData []byte
+ jsonData, err = json.Marshal(bareMetalServerDiskPatch)
+ if err == nil {
+ err = json.Unmarshal(jsonData, &_patch)
+ }
+ return
+}
+
+// BareMetalServerDiskReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
+// information.
+type BareMetalServerDiskReferenceDeleted struct {
+ // Link to documentation about deleted resources.
+ MoreInfo *string `json:"more_info" validate:"required"`
+}
+
+// UnmarshalBareMetalServerDiskReferenceDeleted unmarshals an instance of BareMetalServerDiskReferenceDeleted from the specified map of raw messages.
+func UnmarshalBareMetalServerDiskReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerDiskReferenceDeleted)
+ err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerInitialization : BareMetalServerInitialization struct
+type BareMetalServerInitialization struct {
+ // The image the bare metal server was provisioned from.
+ Image *ImageReference `json:"image" validate:"required"`
+
+ // The public SSH keys used at initialization.
+ Keys []KeyReference `json:"keys" validate:"required"`
+
+ // The user accounts that are created at initialization. There can be multiple account types distinguished by the
+ // `resource_type` property.
+ UserAccounts []BareMetalServerInitializationUserAccountIntf `json:"user_accounts" validate:"required"`
+}
+
+// UnmarshalBareMetalServerInitialization unmarshals an instance of BareMetalServerInitialization from the specified map of raw messages.
+func UnmarshalBareMetalServerInitialization(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerInitialization)
+ err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "user_accounts", &obj.UserAccounts, UnmarshalBareMetalServerInitializationUserAccount)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerInitializationPrototype : BareMetalServerInitializationPrototype struct
+type BareMetalServerInitializationPrototype struct {
+ // The image to be used when provisioning the bare metal server.
+ Image ImageIdentityIntf `json:"image" validate:"required"`
+
+ // The public SSH keys to install on the bare metal server. Keys will be made available to the bare metal server as
+ // cloud-init vendor data. For cloud-init enabled images, these keys will also be added as SSH authorized keys for the
+ // administrative user.
+ //
+ // For Windows images, at least one key must be specified, and one will be chosen to encrypt the administrator
+ // password. Keys are optional for other images, but if no keys are specified, the instance will be inaccessible unless
+ // the specified image provides another means of access.
+ Keys []KeyIdentityIntf `json:"keys" validate:"required"`
+
+ // User data to be made available when initializing the bare metal server.
+ UserData *string `json:"user_data,omitempty"`
+}
+
+// NewBareMetalServerInitializationPrototype : Instantiate BareMetalServerInitializationPrototype (Generic Model Constructor)
+func (*VpcV1) NewBareMetalServerInitializationPrototype(image ImageIdentityIntf, keys []KeyIdentityIntf) (_model *BareMetalServerInitializationPrototype, err error) {
+ _model = &BareMetalServerInitializationPrototype{
+ Image: image,
+ Keys: keys,
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+// UnmarshalBareMetalServerInitializationPrototype unmarshals an instance of BareMetalServerInitializationPrototype from the specified map of raw messages.
+func UnmarshalBareMetalServerInitializationPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerInitializationPrototype)
+ err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerInitializationUserAccount : BareMetalServerInitializationUserAccount struct
+// Models which "extend" this model:
+// - BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount
+type BareMetalServerInitializationUserAccount struct {
+ // The password at initialization, encrypted using `encryption_key`, and returned base64-encoded.
+ EncryptedPassword *[]byte `json:"encrypted_password,omitempty"`
+
+ // The public SSH key used to encrypt the password.
+ EncryptionKey *KeyReference `json:"encryption_key,omitempty"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type,omitempty"`
+
+ // The username for the account created at initialization.
+ Username *string `json:"username,omitempty"`
+}
+
+// Constants associated with the BareMetalServerInitializationUserAccount.ResourceType property.
+// The resource type.
+const (
+ BareMetalServerInitializationUserAccountResourceTypeHostUserAccountConst = "host_user_account"
+)
+
+func (*BareMetalServerInitializationUserAccount) isaBareMetalServerInitializationUserAccount() bool {
+ return true
+}
+
+type BareMetalServerInitializationUserAccountIntf interface {
+ isaBareMetalServerInitializationUserAccount() bool
+}
+
+// UnmarshalBareMetalServerInitializationUserAccount unmarshals an instance of BareMetalServerInitializationUserAccount from the specified map of raw messages.
+func UnmarshalBareMetalServerInitializationUserAccount(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerInitializationUserAccount)
+ err = core.UnmarshalPrimitive(m, "encrypted_password", &obj.EncryptedPassword)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalKeyReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "username", &obj.Username)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerNetworkInterface : BareMetalServerNetworkInterface struct
+// Models which "extend" this model:
+// - BareMetalServerNetworkInterfaceByPci
+// - BareMetalServerNetworkInterfaceByVlan
+type BareMetalServerNetworkInterface struct {
+ // Indicates whether source IP spoofing is allowed on this interface. If false, source IP spoofing is prevented on this
+ // interface. If true, source IP spoofing is allowed on this interface.
+ AllowIPSpoofing *bool `json:"allow_ip_spoofing" validate:"required"`
+
+ // The date and time that the network interface was created.
+ CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
+
+ // If `true`:
+ // - The VPC infrastructure performs any needed NAT operations.
+ // - A single floating IP can be assigned to the network interface.
+ //
+ // If `false`:
+ // - Packets are passed unmodified to/from the network interface,
+ // allowing the workload to perform any needed NAT operations.
+ // - Multiple floating IPs can be assigned to the network interface.
+ // - `allow_ip_spoofing` must be set to `false`.
+ EnableInfrastructureNat *bool `json:"enable_infrastructure_nat" validate:"required"`
+
+ // The floating IPs associated with this network interface.
+ FloatingIps []FloatingIPReference `json:"floating_ips,omitempty"`
+
+ // The URL for this network interface.
+ Href *string `json:"href" validate:"required"`
+
+ // The unique identifier for this network interface.
+ ID *string `json:"id" validate:"required"`
+
+ // The network interface type:
+ // - `pci`: a physical PCI device which can only be created or deleted when the bare metal
+ // server is stopped
+ // - Has an `allowed_vlans` property which controls the VLANs that will be permitted
+ // to use the PCI interface
+ // - Cannot directly use an IEEE 802.1q VLAN tag.
+ // - `vlan`: a virtual device, used through a `pci` device that has the `vlan` in its
+ // array of `allowed_vlans`.
+ // - Must use an IEEE 802.1q tag.
+ // - Has its own security groups and does not inherit those of the PCI device through
+ // which traffic flows.
+ InterfaceType *string `json:"interface_type" validate:"required"`
+
+ // The MAC address of the interface. If absent, the value is not known.
+ MacAddress *string `json:"mac_address" validate:"required"`
+
+ // The user-defined name for this network interface.
+ Name *string `json:"name" validate:"required"`
+
+ // The network interface port speed in Mbps.
+ PortSpeed *int64 `json:"port_speed" validate:"required"`
+
+ PrimaryIP *ReservedIPReference `json:"primary_ip" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+
+ // The security groups targeting this network interface.
+ SecurityGroups []SecurityGroupReference `json:"security_groups" validate:"required"`
+
+ // The status of the network interface.
+ Status *string `json:"status" validate:"required"`
+
+ // The associated subnet.
+ Subnet *SubnetReference `json:"subnet" validate:"required"`
+
+ // The type of this bare metal server network interface.
+ Type *string `json:"type" validate:"required"`
+
+ // Indicates what VLAN IDs (for VLAN type only) can use this physical (PCI type) interface. A given VLAN can only be
+ // in the `allowed_vlans` array for one PCI type adapter per bare metal server.
+ AllowedVlans []int64 `json:"allowed_vlans,omitempty"`
+
+ // Indicates if the interface can float to any other server within the same
+ // `resource_group`. The interface will float automatically if the network detects a GARP or RARP on another bare metal
+ // server in the resource group. Applies only to `vlan` type interfaces.
+ AllowInterfaceToFloat *bool `json:"allow_interface_to_float,omitempty"`
+
+ // Indicates the 802.1Q VLAN ID tag that must be used for all traffic on this interface.
+ Vlan *int64 `json:"vlan,omitempty"`
+}
+
+// Constants associated with the BareMetalServerNetworkInterface.InterfaceType property.
+// The network interface type:
+// - `pci`: a physical PCI device which can only be created or deleted when the bare metal
+// server is stopped
+// - Has an `allowed_vlans` property which controls the VLANs that will be permitted
+// to use the PCI interface
+// - Cannot directly use an IEEE 802.1q VLAN tag.
+// - `vlan`: a virtual device, used through a `pci` device that has the `vlan` in its
+// array of `allowed_vlans`.
+// - Must use an IEEE 802.1q tag.
+// - Has its own security groups and does not inherit those of the PCI device through
+// which traffic flows.
+const (
+ BareMetalServerNetworkInterfaceInterfaceTypePciConst = "pci"
+ BareMetalServerNetworkInterfaceInterfaceTypeVlanConst = "vlan"
+)
+
+// Constants associated with the BareMetalServerNetworkInterface.ResourceType property.
+// The resource type.
+const (
+ BareMetalServerNetworkInterfaceResourceTypeNetworkInterfaceConst = "network_interface"
+)
+
+// Constants associated with the BareMetalServerNetworkInterface.Status property.
+// The status of the network interface.
+const (
+ BareMetalServerNetworkInterfaceStatusAvailableConst = "available"
+ BareMetalServerNetworkInterfaceStatusDeletingConst = "deleting"
+ BareMetalServerNetworkInterfaceStatusFailedConst = "failed"
+ BareMetalServerNetworkInterfaceStatusPendingConst = "pending"
+)
+
+// Constants associated with the BareMetalServerNetworkInterface.Type property.
+// The type of this bare metal server network interface.
+const (
+ BareMetalServerNetworkInterfaceTypePrimaryConst = "primary"
+ BareMetalServerNetworkInterfaceTypeSecondaryConst = "secondary"
+)
+
+func (*BareMetalServerNetworkInterface) isaBareMetalServerNetworkInterface() bool {
+ return true
+}
+
+type BareMetalServerNetworkInterfaceIntf interface {
+ isaBareMetalServerNetworkInterface() bool
+}
+
+// UnmarshalBareMetalServerNetworkInterface unmarshals an instance of BareMetalServerNetworkInterface from the specified map of raw messages.
+func UnmarshalBareMetalServerNetworkInterface(m map[string]json.RawMessage, result interface{}) (err error) {
+ // Retrieve discriminator value to determine correct "subclass".
+ var discValue string
+ err = core.UnmarshalPrimitive(m, "interface_type", &discValue)
+ if err != nil {
+ err = fmt.Errorf("error unmarshalling discriminator property 'interface_type': %s", err.Error())
+ return
+ }
+ if discValue == "" {
+ err = fmt.Errorf("required discriminator property 'interface_type' not found in JSON object")
+ return
+ }
+ if discValue == "pci" {
+ err = core.UnmarshalModel(m, "", result, UnmarshalBareMetalServerNetworkInterfaceByPci)
+ } else if discValue == "vlan" {
+ err = core.UnmarshalModel(m, "", result, UnmarshalBareMetalServerNetworkInterfaceByVlan)
+ } else {
+ err = fmt.Errorf("unrecognized value for discriminator property 'interface_type': %s", discValue)
+ }
+ return
+}
+
+// BareMetalServerNetworkInterfaceCollection : BareMetalServerNetworkInterfaceCollection struct
+type BareMetalServerNetworkInterfaceCollection struct {
+ // A link to the first page of resources.
+ First *BareMetalServerNetworkInterfaceCollectionFirst `json:"first" validate:"required"`
+
+ // The maximum number of resources that can be returned by the request.
+ Limit *int64 `json:"limit" validate:"required"`
+
+ // Collection of network interfaces.
+ NetworkInterfaces []BareMetalServerNetworkInterfaceIntf `json:"network_interfaces" validate:"required"`
+
+ // A link to the next page of resources. This property is present for all pages
+ // except the last page.
+ Next *BareMetalServerNetworkInterfaceCollectionNext `json:"next,omitempty"`
+
+ // The total number of resources across all pages.
+ TotalCount *int64 `json:"total_count" validate:"required"`
+}
+
+// UnmarshalBareMetalServerNetworkInterfaceCollection unmarshals an instance of BareMetalServerNetworkInterfaceCollection from the specified map of raw messages.
+func UnmarshalBareMetalServerNetworkInterfaceCollection(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerNetworkInterfaceCollection)
+ err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalBareMetalServerNetworkInterfaceCollectionFirst)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalBareMetalServerNetworkInterface)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalBareMetalServerNetworkInterfaceCollectionNext)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *BareMetalServerNetworkInterfaceCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
+// BareMetalServerNetworkInterfaceCollectionFirst : A link to the first page of resources.
+type BareMetalServerNetworkInterfaceCollectionFirst struct {
+ // The URL for a page of resources.
+ Href *string `json:"href" validate:"required"`
+}
+
+// UnmarshalBareMetalServerNetworkInterfaceCollectionFirst unmarshals an instance of BareMetalServerNetworkInterfaceCollectionFirst from the specified map of raw messages.
+func UnmarshalBareMetalServerNetworkInterfaceCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerNetworkInterfaceCollectionFirst)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerNetworkInterfaceCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
+type BareMetalServerNetworkInterfaceCollectionNext struct {
+ // The URL for a page of resources.
+ Href *string `json:"href" validate:"required"`
+}
+
+// UnmarshalBareMetalServerNetworkInterfaceCollectionNext unmarshals an instance of BareMetalServerNetworkInterfaceCollectionNext from the specified map of raw messages.
+func UnmarshalBareMetalServerNetworkInterfaceCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerNetworkInterfaceCollectionNext)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerNetworkInterfacePatch : BareMetalServerNetworkInterfacePatch struct
+type BareMetalServerNetworkInterfacePatch struct {
+ // Indicates whether source IP spoofing is allowed on this interface. If false, source IP spoofing is prevented on this
+ // interface. If true, source IP spoofing is allowed on this interface.
+ AllowIPSpoofing *bool `json:"allow_ip_spoofing,omitempty"`
+
+ // Indicates what VLAN IDs (for VLAN type only) can use this physical (PCI type) interface. A given VLAN can only be
+ // in the `allowed_vlans` array for one PCI type adapter per bare metal server.
+ AllowedVlans []int64 `json:"allowed_vlans,omitempty"`
+
+ // If `true`:
+ // - The VPC infrastructure performs any needed NAT operations.
+ // - A single floating IP can be assigned to the network interface.
+ //
+ // If `false`:
+ // - Packets are passed unmodified to/from the network interface,
+ // allowing the workload to perform any needed NAT operations.
+ // - Multiple floating IPs can be assigned to the network interface.
+ // - `allow_ip_spoofing` must be set to `false`.
+ EnableInfrastructureNat *bool `json:"enable_infrastructure_nat,omitempty"`
+
+ // The user-defined name for network interface. Names must be unique within the instance the network interface resides
+ // in.
+ Name *string `json:"name,omitempty"`
+}
+
+// UnmarshalBareMetalServerNetworkInterfacePatch unmarshals an instance of BareMetalServerNetworkInterfacePatch from the specified map of raw messages.
+func UnmarshalBareMetalServerNetworkInterfacePatch(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerNetworkInterfacePatch)
+ err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "allowed_vlans", &obj.AllowedVlans)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// AsPatch returns a generic map representation of the BareMetalServerNetworkInterfacePatch
+func (bareMetalServerNetworkInterfacePatch *BareMetalServerNetworkInterfacePatch) AsPatch() (_patch map[string]interface{}, err error) {
+ var jsonData []byte
+ jsonData, err = json.Marshal(bareMetalServerNetworkInterfacePatch)
+ if err == nil {
+ err = json.Unmarshal(jsonData, &_patch)
+ }
+ return
+}
+
+// BareMetalServerNetworkInterfacePrototype : BareMetalServerNetworkInterfacePrototype struct
+// Models which "extend" this model:
+// - BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype
+// - BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype
+type BareMetalServerNetworkInterfacePrototype struct {
+ // Indicates whether source IP spoofing is allowed on this interface. If false, source IP spoofing is prevented on this
+ // interface. If true, source IP spoofing is allowed on this interface.
+ AllowIPSpoofing *bool `json:"allow_ip_spoofing,omitempty"`
+
+ // If `true`:
+ // - The VPC infrastructure performs any needed NAT operations.
+ // - A single floating IP can be assigned to the network interface.
+ //
+ // If `false`:
+ // - Packets are passed unmodified to/from the network interface,
+ // allowing the workload to perform any needed NAT operations.
+ // - Multiple floating IPs can be assigned to the network interface.
+ // - `allow_ip_spoofing` must be set to `false`.
+ EnableInfrastructureNat *bool `json:"enable_infrastructure_nat,omitempty"`
+
+ // The network interface type:
+ // - `pci`: a physical PCI device which can only be created or deleted when the bare metal
+ // server is stopped
+ // - Has an `allowed_vlans` property which controls the VLANs that will be permitted
+ // to use the PCI interface
+ // - Cannot directly use an IEEE 802.1q VLAN tag.
+ // - `vlan`: a virtual device, used through a `pci` device that has the `vlan` in its
+ // array of `allowed_vlans`.
+ // - Must use an IEEE 802.1q tag.
+ // - Has its own security groups and does not inherit those of the PCI device through
+ // which traffic flows.
+ InterfaceType *string `json:"interface_type" validate:"required"`
+
+ // The user-defined name for network interface. Names must be unique within the instance the network interface resides
+ // in. If unspecified, the name will be a hyphenated list of randomly-selected words.
+ Name *string `json:"name,omitempty"`
+
+ // The primary IP address to bind to the network interface. This can be specified using
+ // an existing reserved IP, or a prototype object for a new reserved IP.
+ //
+ // If an existing reserved IP or a prototype object with an address is specified, it must
+ // be available on the network interface's subnet. Otherwise, an available address on the
+ // subnet will be automatically selected and reserved.
+ PrimaryIP NetworkInterfaceIPPrototypeIntf `json:"primary_ip,omitempty"`
+
+ // The security groups to use for this network interface. If unspecified, the VPC's default security group is used.
+ SecurityGroups []SecurityGroupIdentityIntf `json:"security_groups,omitempty"`
+
+ // The associated subnet.
+ Subnet SubnetIdentityIntf `json:"subnet" validate:"required"`
+
+ // Indicates what VLAN IDs (for VLAN type only) can use this physical (PCI type) interface. A given VLAN can only be
+ // in the `allowed_vlans` array for one PCI type adapter per bare metal server.
+ AllowedVlans []int64 `json:"allowed_vlans,omitempty"`
+
+ // Indicates if the interface can float to any other server within the same
+ // `resource_group`. The interface will float automatically if the network detects a GARP or RARP on another bare metal
+ // server in the resource group. Applies only to `vlan` type interfaces.
+ AllowInterfaceToFloat *bool `json:"allow_interface_to_float,omitempty"`
+
+ // Indicates the 802.1Q VLAN ID tag that must be used for all traffic on this interface.
+ Vlan *int64 `json:"vlan,omitempty"`
+}
+
+// Constants associated with the BareMetalServerNetworkInterfacePrototype.InterfaceType property.
+// The network interface type:
+// - `pci`: a physical PCI device which can only be created or deleted when the bare metal
+// server is stopped
+// - Has an `allowed_vlans` property which controls the VLANs that will be permitted
+// to use the PCI interface
+// - Cannot directly use an IEEE 802.1q VLAN tag.
+// - `vlan`: a virtual device, used through a `pci` device that has the `vlan` in its
+// array of `allowed_vlans`.
+// - Must use an IEEE 802.1q tag.
+// - Has its own security groups and does not inherit those of the PCI device through
+// which traffic flows.
+const (
+ BareMetalServerNetworkInterfacePrototypeInterfaceTypePciConst = "pci"
+ BareMetalServerNetworkInterfacePrototypeInterfaceTypeVlanConst = "vlan"
+)
+
+func (*BareMetalServerNetworkInterfacePrototype) isaBareMetalServerNetworkInterfacePrototype() bool {
+ return true
+}
+
+type BareMetalServerNetworkInterfacePrototypeIntf interface {
+ isaBareMetalServerNetworkInterfacePrototype() bool
+}
+
+// UnmarshalBareMetalServerNetworkInterfacePrototype unmarshals an instance of BareMetalServerNetworkInterfacePrototype from the specified map of raw messages.
+func UnmarshalBareMetalServerNetworkInterfacePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
+ // Retrieve discriminator value to determine correct "subclass".
+ var discValue string
+ err = core.UnmarshalPrimitive(m, "interface_type", &discValue)
+ if err != nil {
+ err = fmt.Errorf("error unmarshalling discriminator property 'interface_type': %s", err.Error())
+ return
+ }
+ if discValue == "" {
+ err = fmt.Errorf("required discriminator property 'interface_type' not found in JSON object")
+ return
+ }
+ if discValue == "pci" {
+ err = core.UnmarshalModel(m, "", result, UnmarshalBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype)
+ } else if discValue == "vlan" {
+ err = core.UnmarshalModel(m, "", result, UnmarshalBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype)
+ } else {
+ err = fmt.Errorf("unrecognized value for discriminator property 'interface_type': %s", discValue)
+ }
+ return
+}
+
+// BareMetalServerPatch : BareMetalServerPatch struct
+type BareMetalServerPatch struct {
+ // The user-defined name for this bare metal server (and default system hostname).
+ Name *string `json:"name,omitempty"`
+}
+
+// UnmarshalBareMetalServerPatch unmarshals an instance of BareMetalServerPatch from the specified map of raw messages.
+func UnmarshalBareMetalServerPatch(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerPatch)
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// AsPatch returns a generic map representation of the BareMetalServerPatch
+func (bareMetalServerPatch *BareMetalServerPatch) AsPatch() (_patch map[string]interface{}, err error) {
+ var jsonData []byte
+ jsonData, err = json.Marshal(bareMetalServerPatch)
+ if err == nil {
+ err = json.Unmarshal(jsonData, &_patch)
+ }
+ return
+}
+
+// BareMetalServerPrimaryNetworkInterfacePrototype : BareMetalServerPrimaryNetworkInterfacePrototype struct
+type BareMetalServerPrimaryNetworkInterfacePrototype struct {
+ // Indicates whether source IP spoofing is allowed on this interface. If false, source IP spoofing is prevented on this
+ // interface. If true, source IP spoofing is allowed on this interface.
+ AllowIPSpoofing *bool `json:"allow_ip_spoofing,omitempty"`
+
+ // Indicates what VLAN IDs (for VLAN type only) can use this physical (PCI type) interface. A given VLAN can only be
+ // in the `allowed_vlans` array for one PCI type adapter per bare metal server.
+ AllowedVlans []int64 `json:"allowed_vlans,omitempty"`
+
+ // If `true`:
+ // - The VPC infrastructure performs any needed NAT operations.
+ // - A single floating IP can be assigned to the network interface.
+ //
+ // If `false`:
+ // - Packets are passed unmodified to/from the network interface,
+ // allowing the workload to perform any needed NAT operations.
+ // - Multiple floating IPs can be assigned to the network interface.
+ // - `allow_ip_spoofing` must be set to `false`.
+ EnableInfrastructureNat *bool `json:"enable_infrastructure_nat,omitempty"`
+
+ // The network interface type:
+ // - `pci`: a physical PCI device which can only be created or deleted when the bare metal
+ // server is stopped
+ // - Has an `allowed_vlans` property which controls the VLANs that will be permitted
+ // to use the PCI interface
+ // - Cannot directly use an IEEE 802.1q VLAN tag.
+ InterfaceType *string `json:"interface_type,omitempty"`
+
+ // The user-defined name for network interface. Names must be unique within the instance the network interface resides
+ // in. If unspecified, the name will be a hyphenated list of randomly-selected words.
+ Name *string `json:"name,omitempty"`
+
+ // The primary IP address to bind to the network interface. This can be specified using
+ // an existing reserved IP, or a prototype object for a new reserved IP.
+ //
+ // If an existing reserved IP or a prototype object with an address is specified, it must
+ // be available on the network interface's subnet. Otherwise, an available address on the
+ // subnet will be automatically selected and reserved.
+ PrimaryIP NetworkInterfaceIPPrototypeIntf `json:"primary_ip,omitempty"`
+
+ // The security groups to use for this network interface. If unspecified, the VPC's default security group is used.
+ SecurityGroups []SecurityGroupIdentityIntf `json:"security_groups,omitempty"`
+
+ // The associated subnet.
+ Subnet SubnetIdentityIntf `json:"subnet" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerPrimaryNetworkInterfacePrototype.InterfaceType property.
+// The network interface type:
+// - `pci`: a physical PCI device which can only be created or deleted when the bare metal
+// server is stopped
+// - Has an `allowed_vlans` property which controls the VLANs that will be permitted
+// to use the PCI interface
+// - Cannot directly use an IEEE 802.1q VLAN tag.
+const (
+ BareMetalServerPrimaryNetworkInterfacePrototypeInterfaceTypePciConst = "pci"
+)
+
+// NewBareMetalServerPrimaryNetworkInterfacePrototype : Instantiate BareMetalServerPrimaryNetworkInterfacePrototype (Generic Model Constructor)
+func (*VpcV1) NewBareMetalServerPrimaryNetworkInterfacePrototype(subnet SubnetIdentityIntf) (_model *BareMetalServerPrimaryNetworkInterfacePrototype, err error) {
+ _model = &BareMetalServerPrimaryNetworkInterfacePrototype{
+ Subnet: subnet,
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+// UnmarshalBareMetalServerPrimaryNetworkInterfacePrototype unmarshals an instance of BareMetalServerPrimaryNetworkInterfacePrototype from the specified map of raw messages.
+func UnmarshalBareMetalServerPrimaryNetworkInterfacePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerPrimaryNetworkInterfacePrototype)
+ err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "allowed_vlans", &obj.AllowedVlans)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalNetworkInterfaceIPPrototype)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfile : BareMetalServerProfile struct
+type BareMetalServerProfile struct {
+ Bandwidth BareMetalServerProfileBandwidthIntf `json:"bandwidth" validate:"required"`
+
+ CpuArchitecture *BareMetalServerProfileCpuArchitecture `json:"cpu_architecture" validate:"required"`
+
+ CpuCoreCount BareMetalServerProfileCpuCoreCountIntf `json:"cpu_core_count" validate:"required"`
+
+ CpuSocketCount BareMetalServerProfileCpuSocketCountIntf `json:"cpu_socket_count" validate:"required"`
+
+ // Collection of the bare metal server profile's disks.
+ Disks []BareMetalServerProfileDisk `json:"disks" validate:"required"`
+
+ // The product family this bare metal server profile belongs to.
+ Family *string `json:"family" validate:"required"`
+
+ // The URL for this bare metal server profile.
+ Href *string `json:"href" validate:"required"`
+
+ Memory BareMetalServerProfileMemoryIntf `json:"memory" validate:"required"`
+
+ // The name for this bare metal server profile.
+ Name *string `json:"name" validate:"required"`
+
+ OsArchitecture *BareMetalServerProfileOsArchitecture `json:"os_architecture" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+
+ // The supported trusted platform module (TPM) modes for this bare metal server profile.
+ SupportedTrustedPlatformModuleModes *BareMetalServerProfileSupportedTrustedPlatformModuleModes `json:"supported_trusted_platform_module_modes" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfile.ResourceType property.
+// The resource type.
+const (
+ BareMetalServerProfileResourceTypeBareMetalServerProfileConst = "bare_metal_server_profile"
+)
+
+// UnmarshalBareMetalServerProfile unmarshals an instance of BareMetalServerProfile from the specified map of raw messages.
+func UnmarshalBareMetalServerProfile(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfile)
+ err = core.UnmarshalModel(m, "bandwidth", &obj.Bandwidth, UnmarshalBareMetalServerProfileBandwidth)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "cpu_architecture", &obj.CpuArchitecture, UnmarshalBareMetalServerProfileCpuArchitecture)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "cpu_core_count", &obj.CpuCoreCount, UnmarshalBareMetalServerProfileCpuCoreCount)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "cpu_socket_count", &obj.CpuSocketCount, UnmarshalBareMetalServerProfileCpuSocketCount)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "disks", &obj.Disks, UnmarshalBareMetalServerProfileDisk)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "family", &obj.Family)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "memory", &obj.Memory, UnmarshalBareMetalServerProfileMemory)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "os_architecture", &obj.OsArchitecture, UnmarshalBareMetalServerProfileOsArchitecture)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "supported_trusted_platform_module_modes", &obj.SupportedTrustedPlatformModuleModes, UnmarshalBareMetalServerProfileSupportedTrustedPlatformModuleModes)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileBandwidth : BareMetalServerProfileBandwidth struct
+// Models which "extend" this model:
+// - BareMetalServerProfileBandwidthFixed
+// - BareMetalServerProfileBandwidthRange
+// - BareMetalServerProfileBandwidthEnum
+// - BareMetalServerProfileBandwidthDependent
+type BareMetalServerProfileBandwidth struct {
+ // The type for this profile field.
+ Type *string `json:"type,omitempty"`
+
+ // The value for this profile field.
+ Value *int64 `json:"value,omitempty"`
+
+ // The default value for this profile field.
+ Default *int64 `json:"default,omitempty"`
+
+ // The maximum value for this profile field.
+ Max *int64 `json:"max,omitempty"`
+
+ // The minimum value for this profile field.
+ Min *int64 `json:"min,omitempty"`
+
+ // The increment step value for this profile field.
+ Step *int64 `json:"step,omitempty"`
+
+ // The permitted values for this profile field.
+ Values []int64 `json:"values,omitempty"`
+}
+
+// Constants associated with the BareMetalServerProfileBandwidth.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileBandwidthTypeFixedConst = "fixed"
+)
+
+func (*BareMetalServerProfileBandwidth) isaBareMetalServerProfileBandwidth() bool {
+ return true
+}
+
+type BareMetalServerProfileBandwidthIntf interface {
+ isaBareMetalServerProfileBandwidth() bool
+}
+
+// UnmarshalBareMetalServerProfileBandwidth unmarshals an instance of BareMetalServerProfileBandwidth from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileBandwidth(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileBandwidth)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "value", &obj.Value)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "max", &obj.Max)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min", &obj.Min)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "step", &obj.Step)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "values", &obj.Values)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileCpuArchitecture : BareMetalServerProfileCpuArchitecture struct
+type BareMetalServerProfileCpuArchitecture struct {
+ // The default CPU architecture for a bare metal server with this profile.
+ Default *string `json:"default,omitempty"`
+
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The CPU architecture for a bare metal server with this profile.
+ Value *string `json:"value" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileCpuArchitecture.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileCpuArchitectureTypeFixedConst = "fixed"
+)
+
+// UnmarshalBareMetalServerProfileCpuArchitecture unmarshals an instance of BareMetalServerProfileCpuArchitecture from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileCpuArchitecture(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileCpuArchitecture)
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "value", &obj.Value)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileCpuCoreCount : BareMetalServerProfileCpuCoreCount struct
+// Models which "extend" this model:
+// - BareMetalServerProfileCpuCoreCountFixed
+// - BareMetalServerProfileCpuCoreCountRange
+// - BareMetalServerProfileCpuCoreCountEnum
+// - BareMetalServerProfileCpuCoreCountDependent
+type BareMetalServerProfileCpuCoreCount struct {
+ // The type for this profile field.
+ Type *string `json:"type,omitempty"`
+
+ // The value for this profile field.
+ Value *int64 `json:"value,omitempty"`
+
+ // The default value for this profile field.
+ Default *int64 `json:"default,omitempty"`
+
+ // The maximum value for this profile field.
+ Max *int64 `json:"max,omitempty"`
+
+ // The minimum value for this profile field.
+ Min *int64 `json:"min,omitempty"`
+
+ // The increment step value for this profile field.
+ Step *int64 `json:"step,omitempty"`
+
+ // The permitted values for this profile field.
+ Values []int64 `json:"values,omitempty"`
+}
+
+// Constants associated with the BareMetalServerProfileCpuCoreCount.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileCpuCoreCountTypeFixedConst = "fixed"
+)
+
+func (*BareMetalServerProfileCpuCoreCount) isaBareMetalServerProfileCpuCoreCount() bool {
+ return true
+}
+
+type BareMetalServerProfileCpuCoreCountIntf interface {
+ isaBareMetalServerProfileCpuCoreCount() bool
+}
+
+// UnmarshalBareMetalServerProfileCpuCoreCount unmarshals an instance of BareMetalServerProfileCpuCoreCount from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileCpuCoreCount(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileCpuCoreCount)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "value", &obj.Value)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "max", &obj.Max)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min", &obj.Min)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "step", &obj.Step)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "values", &obj.Values)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileCpuSocketCount : BareMetalServerProfileCpuSocketCount struct
+// Models which "extend" this model:
+// - BareMetalServerProfileCpuSocketCountFixed
+// - BareMetalServerProfileCpuSocketCountRange
+// - BareMetalServerProfileCpuSocketCountEnum
+// - BareMetalServerProfileCpuSocketCountDependent
+type BareMetalServerProfileCpuSocketCount struct {
+ // The type for this profile field.
+ Type *string `json:"type,omitempty"`
+
+ // The value for this profile field.
+ Value *int64 `json:"value,omitempty"`
+
+ // The default value for this profile field.
+ Default *int64 `json:"default,omitempty"`
+
+ // The maximum value for this profile field.
+ Max *int64 `json:"max,omitempty"`
+
+ // The minimum value for this profile field.
+ Min *int64 `json:"min,omitempty"`
+
+ // The increment step value for this profile field.
+ Step *int64 `json:"step,omitempty"`
+
+ // The permitted values for this profile field.
+ Values []int64 `json:"values,omitempty"`
+}
+
+// Constants associated with the BareMetalServerProfileCpuSocketCount.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileCpuSocketCountTypeFixedConst = "fixed"
+)
+
+func (*BareMetalServerProfileCpuSocketCount) isaBareMetalServerProfileCpuSocketCount() bool {
+ return true
+}
+
+type BareMetalServerProfileCpuSocketCountIntf interface {
+ isaBareMetalServerProfileCpuSocketCount() bool
+}
+
+// UnmarshalBareMetalServerProfileCpuSocketCount unmarshals an instance of BareMetalServerProfileCpuSocketCount from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileCpuSocketCount(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileCpuSocketCount)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "value", &obj.Value)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "max", &obj.Max)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min", &obj.Min)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "step", &obj.Step)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "values", &obj.Values)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileCollection : BareMetalServerProfileCollection struct
+type BareMetalServerProfileCollection struct {
+ // A link to the first page of resources.
+ First *BareMetalServerProfileCollectionFirst `json:"first" validate:"required"`
+
+ // The maximum number of resources that can be returned by the request.
+ Limit *int64 `json:"limit" validate:"required"`
+
+ // A link to the next page of resources. This property is present for all pages
+ // except the last page.
+ Next *BareMetalServerProfileCollectionNext `json:"next,omitempty"`
+
+ // Collection of bare metal server profiles.
+ Profiles []BareMetalServerProfile `json:"profiles" validate:"required"`
+
+ // The total number of resources across all pages.
+ TotalCount *int64 `json:"total_count" validate:"required"`
+}
+
+// UnmarshalBareMetalServerProfileCollection unmarshals an instance of BareMetalServerProfileCollection from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileCollection(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileCollection)
+ err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalBareMetalServerProfileCollectionFirst)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalBareMetalServerProfileCollectionNext)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "profiles", &obj.Profiles, UnmarshalBareMetalServerProfile)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *BareMetalServerProfileCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
+// BareMetalServerProfileCollectionFirst : A link to the first page of resources.
+type BareMetalServerProfileCollectionFirst struct {
+ // The URL for a page of resources.
+ Href *string `json:"href" validate:"required"`
+}
+
+// UnmarshalBareMetalServerProfileCollectionFirst unmarshals an instance of BareMetalServerProfileCollectionFirst from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileCollectionFirst)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
+type BareMetalServerProfileCollectionNext struct {
+ // The URL for a page of resources.
+ Href *string `json:"href" validate:"required"`
+}
+
+// UnmarshalBareMetalServerProfileCollectionNext unmarshals an instance of BareMetalServerProfileCollectionNext from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileCollectionNext)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileDisk : Disks provided by this profile.
+type BareMetalServerProfileDisk struct {
+ Quantity BareMetalServerProfileDiskQuantityIntf `json:"quantity" validate:"required"`
+
+ Size BareMetalServerProfileDiskSizeIntf `json:"size" validate:"required"`
+
+ SupportedInterfaceTypes *BareMetalServerProfileDiskSupportedInterfaces `json:"supported_interface_types" validate:"required"`
+}
+
+// UnmarshalBareMetalServerProfileDisk unmarshals an instance of BareMetalServerProfileDisk from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileDisk(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileDisk)
+ err = core.UnmarshalModel(m, "quantity", &obj.Quantity, UnmarshalBareMetalServerProfileDiskQuantity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "size", &obj.Size, UnmarshalBareMetalServerProfileDiskSize)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "supported_interface_types", &obj.SupportedInterfaceTypes, UnmarshalBareMetalServerProfileDiskSupportedInterfaces)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileDiskQuantity : BareMetalServerProfileDiskQuantity struct
+// Models which "extend" this model:
+// - BareMetalServerProfileDiskQuantityFixed
+// - BareMetalServerProfileDiskQuantityRange
+// - BareMetalServerProfileDiskQuantityEnum
+// - BareMetalServerProfileDiskQuantityDependent
+type BareMetalServerProfileDiskQuantity struct {
+ // The type for this profile field.
+ Type *string `json:"type,omitempty"`
+
+ // The value for this profile field.
+ Value *int64 `json:"value,omitempty"`
+
+ // The default value for this profile field.
+ Default *int64 `json:"default,omitempty"`
+
+ // The maximum value for this profile field.
+ Max *int64 `json:"max,omitempty"`
+
+ // The minimum value for this profile field.
+ Min *int64 `json:"min,omitempty"`
+
+ // The increment step value for this profile field.
+ Step *int64 `json:"step,omitempty"`
+
+ // The permitted values for this profile field.
+ Values []int64 `json:"values,omitempty"`
+}
+
+// Constants associated with the BareMetalServerProfileDiskQuantity.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileDiskQuantityTypeFixedConst = "fixed"
+)
+
+func (*BareMetalServerProfileDiskQuantity) isaBareMetalServerProfileDiskQuantity() bool {
+ return true
+}
+
+type BareMetalServerProfileDiskQuantityIntf interface {
+ isaBareMetalServerProfileDiskQuantity() bool
+}
+
+// UnmarshalBareMetalServerProfileDiskQuantity unmarshals an instance of BareMetalServerProfileDiskQuantity from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileDiskQuantity(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileDiskQuantity)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "value", &obj.Value)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "max", &obj.Max)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min", &obj.Min)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "step", &obj.Step)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "values", &obj.Values)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileDiskSize : BareMetalServerProfileDiskSize struct
+// Models which "extend" this model:
+// - BareMetalServerProfileDiskSizeFixed
+// - BareMetalServerProfileDiskSizeRange
+// - BareMetalServerProfileDiskSizeEnum
+// - BareMetalServerProfileDiskSizeDependent
+type BareMetalServerProfileDiskSize struct {
+ // The type for this profile field.
+ Type *string `json:"type,omitempty"`
+
+ // The value for this profile field.
+ Value *int64 `json:"value,omitempty"`
+
+ // The default value for this profile field.
+ Default *int64 `json:"default,omitempty"`
+
+ // The maximum value for this profile field.
+ Max *int64 `json:"max,omitempty"`
+
+ // The minimum value for this profile field.
+ Min *int64 `json:"min,omitempty"`
+
+ // The increment step value for this profile field.
+ Step *int64 `json:"step,omitempty"`
+
+ // The permitted values for this profile field.
+ Values []int64 `json:"values,omitempty"`
+}
+
+// Constants associated with the BareMetalServerProfileDiskSize.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileDiskSizeTypeFixedConst = "fixed"
+)
+
+func (*BareMetalServerProfileDiskSize) isaBareMetalServerProfileDiskSize() bool {
+ return true
+}
+
+type BareMetalServerProfileDiskSizeIntf interface {
+ isaBareMetalServerProfileDiskSize() bool
+}
+
+// UnmarshalBareMetalServerProfileDiskSize unmarshals an instance of BareMetalServerProfileDiskSize from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileDiskSize(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileDiskSize)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "value", &obj.Value)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "max", &obj.Max)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min", &obj.Min)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "step", &obj.Step)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "values", &obj.Values)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileDiskSupportedInterfaces : BareMetalServerProfileDiskSupportedInterfaces struct
+type BareMetalServerProfileDiskSupportedInterfaces struct {
+ // The disk interface used for attaching the disk.
+ //
+ // The enumerated values for this property are expected to expand in the future. When processing this property, check
+ // for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
+ // unexpected property value was encountered.
+ Default *string `json:"default" validate:"required"`
+
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The supported disk interfaces used for attaching the disk.
+ Values []string `json:"values" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileDiskSupportedInterfaces.Default property.
+// The disk interface used for attaching the disk.
+//
+// The enumerated values for this property are expected to expand in the future. When processing this property, check
+// for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
+// unexpected property value was encountered.
+const (
+ BareMetalServerProfileDiskSupportedInterfacesDefaultNvmeConst = "nvme"
+ BareMetalServerProfileDiskSupportedInterfacesDefaultSataConst = "sata"
+)
+
+// Constants associated with the BareMetalServerProfileDiskSupportedInterfaces.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileDiskSupportedInterfacesTypeEnumConst = "enum"
+)
+
+// Constants associated with the BareMetalServerProfileDiskSupportedInterfaces.Values property.
+// The disk interface used for attaching the disk.
+//
+// The enumerated values for this property are expected to expand in the future. When processing this property, check
+// for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
+// unexpected property value was encountered.
+const (
+ BareMetalServerProfileDiskSupportedInterfacesValuesNvmeConst = "nvme"
+ BareMetalServerProfileDiskSupportedInterfacesValuesSataConst = "sata"
+)
+
+// UnmarshalBareMetalServerProfileDiskSupportedInterfaces unmarshals an instance of BareMetalServerProfileDiskSupportedInterfaces from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileDiskSupportedInterfaces(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileDiskSupportedInterfaces)
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "values", &obj.Values)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileIdentity : Identifies a bare metal server profile by a unique property.
+// Models which "extend" this model:
+// - BareMetalServerProfileIdentityByName
+// - BareMetalServerProfileIdentityByHref
+type BareMetalServerProfileIdentity struct {
+ // The name for this bare metal server profile.
+ Name *string `json:"name,omitempty"`
+
+ // The URL for this bare metal server profile.
+ Href *string `json:"href,omitempty"`
+}
+
+func (*BareMetalServerProfileIdentity) isaBareMetalServerProfileIdentity() bool {
+ return true
+}
+
+type BareMetalServerProfileIdentityIntf interface {
+ isaBareMetalServerProfileIdentity() bool
+}
+
+// UnmarshalBareMetalServerProfileIdentity unmarshals an instance of BareMetalServerProfileIdentity from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileIdentity)
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileMemory : BareMetalServerProfileMemory struct
+// Models which "extend" this model:
+// - BareMetalServerProfileMemoryFixed
+// - BareMetalServerProfileMemoryRange
+// - BareMetalServerProfileMemoryEnum
+// - BareMetalServerProfileMemoryDependent
+type BareMetalServerProfileMemory struct {
+ // The type for this profile field.
+ Type *string `json:"type,omitempty"`
+
+ // The value for this profile field.
+ Value *int64 `json:"value,omitempty"`
+
+ // The default value for this profile field.
+ Default *int64 `json:"default,omitempty"`
+
+ // The maximum value for this profile field.
+ Max *int64 `json:"max,omitempty"`
+
+ // The minimum value for this profile field.
+ Min *int64 `json:"min,omitempty"`
+
+ // The increment step value for this profile field.
+ Step *int64 `json:"step,omitempty"`
+
+ // The permitted values for this profile field.
+ Values []int64 `json:"values,omitempty"`
+}
+
+// Constants associated with the BareMetalServerProfileMemory.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileMemoryTypeFixedConst = "fixed"
+)
+
+func (*BareMetalServerProfileMemory) isaBareMetalServerProfileMemory() bool {
+ return true
+}
+
+type BareMetalServerProfileMemoryIntf interface {
+ isaBareMetalServerProfileMemory() bool
+}
+
+// UnmarshalBareMetalServerProfileMemory unmarshals an instance of BareMetalServerProfileMemory from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileMemory(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileMemory)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "value", &obj.Value)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "max", &obj.Max)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min", &obj.Min)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "step", &obj.Step)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "values", &obj.Values)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileOsArchitecture : BareMetalServerProfileOsArchitecture struct
+type BareMetalServerProfileOsArchitecture struct {
+ // The default OS architecture for a bare metal server with this profile.
+ Default *string `json:"default" validate:"required"`
+
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The supported OS architecture(s) for a bare metal server with this profile.
+ Values []string `json:"values" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileOsArchitecture.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileOsArchitectureTypeEnumConst = "enum"
+)
+
+// UnmarshalBareMetalServerProfileOsArchitecture unmarshals an instance of BareMetalServerProfileOsArchitecture from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileOsArchitecture(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileOsArchitecture)
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "values", &obj.Values)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileReference : BareMetalServerProfileReference struct
+type BareMetalServerProfileReference struct {
+ // The URL for this bare metal server profile.
+ Href *string `json:"href" validate:"required"`
+
+ // The name for this bare metal server profile.
+ Name *string `json:"name" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileReference.ResourceType property.
+// The resource type.
+const (
+ BareMetalServerProfileReferenceResourceTypeBareMetalServerProfileConst = "bare_metal_server_profile"
+)
+
+// UnmarshalBareMetalServerProfileReference unmarshals an instance of BareMetalServerProfileReference from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileReference(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileReference)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileSupportedTrustedPlatformModuleModes : The supported trusted platform module (TPM) modes for this bare metal server profile.
+type BareMetalServerProfileSupportedTrustedPlatformModuleModes struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The supported trusted platform module (TPM) modes.
+ Values []string `json:"values" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileSupportedTrustedPlatformModuleModes.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileSupportedTrustedPlatformModuleModesTypeEnumConst = "enum"
+)
+
+// Constants associated with the BareMetalServerProfileSupportedTrustedPlatformModuleModes.Values property.
+// The mode for the trusted platform module (TPM):
+// - `tpm_2`: Standard TPM 2 capabilities
+// - `tpm_2_with_txt`: Standard TPM 2 with Intel Trusted Execution Technology (TXT)
+//
+// The enumerated values for this property are expected to expand in the future. When processing this property, check
+// for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
+// unexpected property value was encountered.
+const (
+ BareMetalServerProfileSupportedTrustedPlatformModuleModesValuesTpm2Const = "tpm_2"
+ BareMetalServerProfileSupportedTrustedPlatformModuleModesValuesTpm2WithTxtConst = "tpm_2_with_txt"
+)
+
+// UnmarshalBareMetalServerProfileSupportedTrustedPlatformModuleModes unmarshals an instance of BareMetalServerProfileSupportedTrustedPlatformModuleModes from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileSupportedTrustedPlatformModuleModes(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileSupportedTrustedPlatformModuleModes)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "values", &obj.Values)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerStatusReason : BareMetalServerStatusReason struct
+type BareMetalServerStatusReason struct {
+ // The status reason code:
+ // - `cannot_start`: Failed to start due to an internal error
+ // - `cannot_start_capacity`: Insufficient capacity within the selected zone
+ // - `cannot_start_compute`: An error occurred while allocating compute resources
+ // - `cannot_start_ip_address`: An error occurred while allocating an IP address
+ // - `cannot_start_network`: An error occurred while allocating network resources.
+ Code *string `json:"code" validate:"required"`
+
+ // An explanation of the status reason.
+ Message *string `json:"message" validate:"required"`
+
+ // Link to documentation about this status reason.
+ MoreInfo *string `json:"more_info,omitempty"`
+}
+
+// Constants associated with the BareMetalServerStatusReason.Code property.
+// The status reason code:
+// - `cannot_start`: Failed to start due to an internal error
+// - `cannot_start_capacity`: Insufficient capacity within the selected zone
+// - `cannot_start_compute`: An error occurred while allocating compute resources
+// - `cannot_start_ip_address`: An error occurred while allocating an IP address
+// - `cannot_start_network`: An error occurred while allocating network resources.
+const (
+ BareMetalServerStatusReasonCodeCannotStartConst = "cannot_start"
+ BareMetalServerStatusReasonCodeCannotStartCapacityConst = "cannot_start_capacity"
+ BareMetalServerStatusReasonCodeCannotStartComputeConst = "cannot_start_compute"
+ BareMetalServerStatusReasonCodeCannotStartIPAddressConst = "cannot_start_ip_address"
+ BareMetalServerStatusReasonCodeCannotStartNetworkConst = "cannot_start_network"
+)
+
+// UnmarshalBareMetalServerStatusReason unmarshals an instance of BareMetalServerStatusReason from the specified map of raw messages.
+func UnmarshalBareMetalServerStatusReason(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerStatusReason)
+ err = core.UnmarshalPrimitive(m, "code", &obj.Code)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "message", &obj.Message)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerTrustedPlatformModule : BareMetalServerTrustedPlatformModule struct
+type BareMetalServerTrustedPlatformModule struct {
+ // Indicates whether the trusted platform module (TPM) is enabled. If enabled, `mode` will also be set.
+ Enabled *bool `json:"enabled" validate:"required"`
+
+ // The mode for the trusted platform module (TPM):
+ // - `tpm_2`: Standard TPM 2 capabilities
+ // - `tpm_2_with_txt`: Standard TPM 2 with Intel Trusted Execution Technology (TXT)
+ //
+ // The enumerated values for this property are expected to expand in the future. When processing this property, check
+ // for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
+ // unexpected property value was encountered.
+ Mode *string `json:"mode,omitempty"`
+}
+
+// Constants associated with the BareMetalServerTrustedPlatformModule.Mode property.
+// The mode for the trusted platform module (TPM):
+// - `tpm_2`: Standard TPM 2 capabilities
+// - `tpm_2_with_txt`: Standard TPM 2 with Intel Trusted Execution Technology (TXT)
+//
+// The enumerated values for this property are expected to expand in the future. When processing this property, check
+// for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
+// unexpected property value was encountered.
+const (
+ BareMetalServerTrustedPlatformModuleModeTpm2Const = "tpm_2"
+ BareMetalServerTrustedPlatformModuleModeTpm2WithTxtConst = "tpm_2_with_txt"
+)
+
+// UnmarshalBareMetalServerTrustedPlatformModule unmarshals an instance of BareMetalServerTrustedPlatformModule from the specified map of raw messages.
+func UnmarshalBareMetalServerTrustedPlatformModule(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerTrustedPlatformModule)
+ err = core.UnmarshalPrimitive(m, "enabled", &obj.Enabled)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "mode", &obj.Mode)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// CertificateInstanceIdentity : Identifies a certificate instance by a unique property.
// Models which "extend" this model:
// - CertificateInstanceIdentityByCRN
@@ -16766,16 +22184,16 @@ func UnmarshalCertificateInstanceReference(m map[string]json.RawMessage, result
// CheckVPNGatewayConnectionLocalCIDROptions : The CheckVPNGatewayConnectionLocalCIDR options.
type CheckVPNGatewayConnectionLocalCIDROptions struct {
// The VPN gateway identifier.
- VPNGatewayID *string `validate:"required,ne="`
+ VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="`
// The VPN gateway connection identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The address prefix part of the CIDR.
- CIDRPrefix *string `validate:"required,ne="`
+ CIDRPrefix *string `json:"cidr_prefix" validate:"required,ne="`
// The prefix length part of the CIDR.
- PrefixLength *string `validate:"required,ne="`
+ PrefixLength *string `json:"prefix_length" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -16792,27 +22210,27 @@ func (*VpcV1) NewCheckVPNGatewayConnectionLocalCIDROptions(vpnGatewayID string,
}
// SetVPNGatewayID : Allow user to set VPNGatewayID
-func (options *CheckVPNGatewayConnectionLocalCIDROptions) SetVPNGatewayID(vpnGatewayID string) *CheckVPNGatewayConnectionLocalCIDROptions {
- options.VPNGatewayID = core.StringPtr(vpnGatewayID)
- return options
+func (_options *CheckVPNGatewayConnectionLocalCIDROptions) SetVPNGatewayID(vpnGatewayID string) *CheckVPNGatewayConnectionLocalCIDROptions {
+ _options.VPNGatewayID = core.StringPtr(vpnGatewayID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *CheckVPNGatewayConnectionLocalCIDROptions) SetID(id string) *CheckVPNGatewayConnectionLocalCIDROptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *CheckVPNGatewayConnectionLocalCIDROptions) SetID(id string) *CheckVPNGatewayConnectionLocalCIDROptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetCIDRPrefix : Allow user to set CIDRPrefix
-func (options *CheckVPNGatewayConnectionLocalCIDROptions) SetCIDRPrefix(cidrPrefix string) *CheckVPNGatewayConnectionLocalCIDROptions {
- options.CIDRPrefix = core.StringPtr(cidrPrefix)
- return options
+func (_options *CheckVPNGatewayConnectionLocalCIDROptions) SetCIDRPrefix(cidrPrefix string) *CheckVPNGatewayConnectionLocalCIDROptions {
+ _options.CIDRPrefix = core.StringPtr(cidrPrefix)
+ return _options
}
// SetPrefixLength : Allow user to set PrefixLength
-func (options *CheckVPNGatewayConnectionLocalCIDROptions) SetPrefixLength(prefixLength string) *CheckVPNGatewayConnectionLocalCIDROptions {
- options.PrefixLength = core.StringPtr(prefixLength)
- return options
+func (_options *CheckVPNGatewayConnectionLocalCIDROptions) SetPrefixLength(prefixLength string) *CheckVPNGatewayConnectionLocalCIDROptions {
+ _options.PrefixLength = core.StringPtr(prefixLength)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -16824,16 +22242,16 @@ func (options *CheckVPNGatewayConnectionLocalCIDROptions) SetHeaders(param map[s
// CheckVPNGatewayConnectionPeerCIDROptions : The CheckVPNGatewayConnectionPeerCIDR options.
type CheckVPNGatewayConnectionPeerCIDROptions struct {
// The VPN gateway identifier.
- VPNGatewayID *string `validate:"required,ne="`
+ VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="`
// The VPN gateway connection identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The address prefix part of the CIDR.
- CIDRPrefix *string `validate:"required,ne="`
+ CIDRPrefix *string `json:"cidr_prefix" validate:"required,ne="`
// The prefix length part of the CIDR.
- PrefixLength *string `validate:"required,ne="`
+ PrefixLength *string `json:"prefix_length" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -16850,27 +22268,27 @@ func (*VpcV1) NewCheckVPNGatewayConnectionPeerCIDROptions(vpnGatewayID string, i
}
// SetVPNGatewayID : Allow user to set VPNGatewayID
-func (options *CheckVPNGatewayConnectionPeerCIDROptions) SetVPNGatewayID(vpnGatewayID string) *CheckVPNGatewayConnectionPeerCIDROptions {
- options.VPNGatewayID = core.StringPtr(vpnGatewayID)
- return options
+func (_options *CheckVPNGatewayConnectionPeerCIDROptions) SetVPNGatewayID(vpnGatewayID string) *CheckVPNGatewayConnectionPeerCIDROptions {
+ _options.VPNGatewayID = core.StringPtr(vpnGatewayID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *CheckVPNGatewayConnectionPeerCIDROptions) SetID(id string) *CheckVPNGatewayConnectionPeerCIDROptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *CheckVPNGatewayConnectionPeerCIDROptions) SetID(id string) *CheckVPNGatewayConnectionPeerCIDROptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetCIDRPrefix : Allow user to set CIDRPrefix
-func (options *CheckVPNGatewayConnectionPeerCIDROptions) SetCIDRPrefix(cidrPrefix string) *CheckVPNGatewayConnectionPeerCIDROptions {
- options.CIDRPrefix = core.StringPtr(cidrPrefix)
- return options
+func (_options *CheckVPNGatewayConnectionPeerCIDROptions) SetCIDRPrefix(cidrPrefix string) *CheckVPNGatewayConnectionPeerCIDROptions {
+ _options.CIDRPrefix = core.StringPtr(cidrPrefix)
+ return _options
}
// SetPrefixLength : Allow user to set PrefixLength
-func (options *CheckVPNGatewayConnectionPeerCIDROptions) SetPrefixLength(prefixLength string) *CheckVPNGatewayConnectionPeerCIDROptions {
- options.PrefixLength = core.StringPtr(prefixLength)
- return options
+func (_options *CheckVPNGatewayConnectionPeerCIDROptions) SetPrefixLength(prefixLength string) *CheckVPNGatewayConnectionPeerCIDROptions {
+ _options.PrefixLength = core.StringPtr(prefixLength)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -16879,68 +22297,213 @@ func (options *CheckVPNGatewayConnectionPeerCIDROptions) SetHeaders(param map[st
return options
}
-// CloudObjectStorageBucketIdentity : Identifies a Cloud Object Storage bucket by a unique property.
-// Models which "extend" this model:
-// - CloudObjectStorageBucketIdentityByName
-type CloudObjectStorageBucketIdentity struct {
- // The globally unique name of this COS bucket.
+// CreateBareMetalServerConsoleAccessTokenOptions : The CreateBareMetalServerConsoleAccessToken options.
+type CreateBareMetalServerConsoleAccessTokenOptions struct {
+ // The bare metal server identifier.
+ BareMetalServerID *string `json:"bare_metal_server_id" validate:"required,ne="`
+
+ // The bare metal server console type for which this token may be used.
+ ConsoleType *string `json:"console_type" validate:"required"`
+
+ // Indicates whether to disconnect an existing serial console session as the serial console cannot be shared. This has
+ // no effect on VNC consoles.
+ Force *bool `json:"force,omitempty"`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// Constants associated with the CreateBareMetalServerConsoleAccessTokenOptions.ConsoleType property.
+// The bare metal server console type for which this token may be used.
+const (
+ CreateBareMetalServerConsoleAccessTokenOptionsConsoleTypeSerialConst = "serial"
+ CreateBareMetalServerConsoleAccessTokenOptionsConsoleTypeVncConst = "vnc"
+)
+
+// NewCreateBareMetalServerConsoleAccessTokenOptions : Instantiate CreateBareMetalServerConsoleAccessTokenOptions
+func (*VpcV1) NewCreateBareMetalServerConsoleAccessTokenOptions(bareMetalServerID string, consoleType string) *CreateBareMetalServerConsoleAccessTokenOptions {
+ return &CreateBareMetalServerConsoleAccessTokenOptions{
+ BareMetalServerID: core.StringPtr(bareMetalServerID),
+ ConsoleType: core.StringPtr(consoleType),
+ }
+}
+
+// SetBareMetalServerID : Allow user to set BareMetalServerID
+func (_options *CreateBareMetalServerConsoleAccessTokenOptions) SetBareMetalServerID(bareMetalServerID string) *CreateBareMetalServerConsoleAccessTokenOptions {
+ _options.BareMetalServerID = core.StringPtr(bareMetalServerID)
+ return _options
+}
+
+// SetConsoleType : Allow user to set ConsoleType
+func (_options *CreateBareMetalServerConsoleAccessTokenOptions) SetConsoleType(consoleType string) *CreateBareMetalServerConsoleAccessTokenOptions {
+ _options.ConsoleType = core.StringPtr(consoleType)
+ return _options
+}
+
+// SetForce : Allow user to set Force
+func (_options *CreateBareMetalServerConsoleAccessTokenOptions) SetForce(force bool) *CreateBareMetalServerConsoleAccessTokenOptions {
+ _options.Force = core.BoolPtr(force)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *CreateBareMetalServerConsoleAccessTokenOptions) SetHeaders(param map[string]string) *CreateBareMetalServerConsoleAccessTokenOptions {
+ options.Headers = param
+ return options
+}
+
+// CreateBareMetalServerNetworkInterfaceOptions : The CreateBareMetalServerNetworkInterface options.
+type CreateBareMetalServerNetworkInterfaceOptions struct {
+ // The bare metal server identifier.
+ BareMetalServerID *string `json:"bare_metal_server_id" validate:"required,ne="`
+
+ // The network interface prototype object.
+ BareMetalServerNetworkInterfacePrototype BareMetalServerNetworkInterfacePrototypeIntf `json:"BareMetalServerNetworkInterfacePrototype" validate:"required"`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewCreateBareMetalServerNetworkInterfaceOptions : Instantiate CreateBareMetalServerNetworkInterfaceOptions
+func (*VpcV1) NewCreateBareMetalServerNetworkInterfaceOptions(bareMetalServerID string, bareMetalServerNetworkInterfacePrototype BareMetalServerNetworkInterfacePrototypeIntf) *CreateBareMetalServerNetworkInterfaceOptions {
+ return &CreateBareMetalServerNetworkInterfaceOptions{
+ BareMetalServerID: core.StringPtr(bareMetalServerID),
+ BareMetalServerNetworkInterfacePrototype: bareMetalServerNetworkInterfacePrototype,
+ }
+}
+
+// SetBareMetalServerID : Allow user to set BareMetalServerID
+func (_options *CreateBareMetalServerNetworkInterfaceOptions) SetBareMetalServerID(bareMetalServerID string) *CreateBareMetalServerNetworkInterfaceOptions {
+ _options.BareMetalServerID = core.StringPtr(bareMetalServerID)
+ return _options
+}
+
+// SetBareMetalServerNetworkInterfacePrototype : Allow user to set BareMetalServerNetworkInterfacePrototype
+func (_options *CreateBareMetalServerNetworkInterfaceOptions) SetBareMetalServerNetworkInterfacePrototype(bareMetalServerNetworkInterfacePrototype BareMetalServerNetworkInterfacePrototypeIntf) *CreateBareMetalServerNetworkInterfaceOptions {
+ _options.BareMetalServerNetworkInterfacePrototype = bareMetalServerNetworkInterfacePrototype
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *CreateBareMetalServerNetworkInterfaceOptions) SetHeaders(param map[string]string) *CreateBareMetalServerNetworkInterfaceOptions {
+ options.Headers = param
+ return options
+}
+
+// CreateBareMetalServerOptions : The CreateBareMetalServer options.
+type CreateBareMetalServerOptions struct {
+ Initialization *BareMetalServerInitializationPrototype `json:"initialization" validate:"required"`
+
+ // Primary network interface for the bare metal server.
+ PrimaryNetworkInterface *BareMetalServerPrimaryNetworkInterfacePrototype `json:"primary_network_interface" validate:"required"`
+
+ // The profile to use for this bare metal server.
+ Profile BareMetalServerProfileIdentityIntf `json:"profile" validate:"required"`
+
+ // The zone this bare metal server will reside in.
+ Zone ZoneIdentityIntf `json:"zone" validate:"required"`
+
+ // The unique user-defined name for this bare metal server (and default system hostname). If unspecified, the name will
+ // be a hyphenated list of randomly-selected words.
Name *string `json:"name,omitempty"`
+
+ // The additional network interfaces to create for the bare metal server.
+ NetworkInterfaces []BareMetalServerNetworkInterfacePrototypeIntf `json:"network_interfaces,omitempty"`
+
+ // The resource group to use. If unspecified, the account's [default resource
+ // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
+ ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
+
+ // The VPC the bare metal server is to be a part of. If specified, it must match the
+ // VPC referenced by the subnets of the server's network interfaces.
+ VPC VPCIdentityIntf `json:"vpc,omitempty"`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
}
-func (*CloudObjectStorageBucketIdentity) isaCloudObjectStorageBucketIdentity() bool {
- return true
-}
-
-type CloudObjectStorageBucketIdentityIntf interface {
- isaCloudObjectStorageBucketIdentity() bool
-}
-
-// UnmarshalCloudObjectStorageBucketIdentity unmarshals an instance of CloudObjectStorageBucketIdentity from the specified map of raw messages.
-func UnmarshalCloudObjectStorageBucketIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(CloudObjectStorageBucketIdentity)
- err = core.UnmarshalPrimitive(m, "name", &obj.Name)
- if err != nil {
- return
+// NewCreateBareMetalServerOptions : Instantiate CreateBareMetalServerOptions
+func (*VpcV1) NewCreateBareMetalServerOptions(initialization *BareMetalServerInitializationPrototype, primaryNetworkInterface *BareMetalServerPrimaryNetworkInterfacePrototype, profile BareMetalServerProfileIdentityIntf, zone ZoneIdentityIntf) *CreateBareMetalServerOptions {
+ return &CreateBareMetalServerOptions{
+ Initialization: initialization,
+ PrimaryNetworkInterface: primaryNetworkInterface,
+ Profile: profile,
+ Zone: zone,
}
- reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
- return
}
-// CloudObjectStorageBucketReference : CloudObjectStorageBucketReference struct
-type CloudObjectStorageBucketReference struct {
- // The globally unique name of this COS bucket.
- Name *string `json:"name" validate:"required"`
+// SetInitialization : Allow user to set Initialization
+func (_options *CreateBareMetalServerOptions) SetInitialization(initialization *BareMetalServerInitializationPrototype) *CreateBareMetalServerOptions {
+ _options.Initialization = initialization
+ return _options
}
-// UnmarshalCloudObjectStorageBucketReference unmarshals an instance of CloudObjectStorageBucketReference from the specified map of raw messages.
-func UnmarshalCloudObjectStorageBucketReference(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(CloudObjectStorageBucketReference)
- err = core.UnmarshalPrimitive(m, "name", &obj.Name)
- if err != nil {
- return
- }
- reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
- return
+// SetPrimaryNetworkInterface : Allow user to set PrimaryNetworkInterface
+func (_options *CreateBareMetalServerOptions) SetPrimaryNetworkInterface(primaryNetworkInterface *BareMetalServerPrimaryNetworkInterfacePrototype) *CreateBareMetalServerOptions {
+ _options.PrimaryNetworkInterface = primaryNetworkInterface
+ return _options
+}
+
+// SetProfile : Allow user to set Profile
+func (_options *CreateBareMetalServerOptions) SetProfile(profile BareMetalServerProfileIdentityIntf) *CreateBareMetalServerOptions {
+ _options.Profile = profile
+ return _options
+}
+
+// SetZone : Allow user to set Zone
+func (_options *CreateBareMetalServerOptions) SetZone(zone ZoneIdentityIntf) *CreateBareMetalServerOptions {
+ _options.Zone = zone
+ return _options
+}
+
+// SetName : Allow user to set Name
+func (_options *CreateBareMetalServerOptions) SetName(name string) *CreateBareMetalServerOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
+}
+
+// SetNetworkInterfaces : Allow user to set NetworkInterfaces
+func (_options *CreateBareMetalServerOptions) SetNetworkInterfaces(networkInterfaces []BareMetalServerNetworkInterfacePrototypeIntf) *CreateBareMetalServerOptions {
+ _options.NetworkInterfaces = networkInterfaces
+ return _options
+}
+
+// SetResourceGroup : Allow user to set ResourceGroup
+func (_options *CreateBareMetalServerOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateBareMetalServerOptions {
+ _options.ResourceGroup = resourceGroup
+ return _options
+}
+
+// SetVPC : Allow user to set VPC
+func (_options *CreateBareMetalServerOptions) SetVPC(vpc VPCIdentityIntf) *CreateBareMetalServerOptions {
+ _options.VPC = vpc
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *CreateBareMetalServerOptions) SetHeaders(param map[string]string) *CreateBareMetalServerOptions {
+ options.Headers = param
+ return options
}
// CreateDedicatedHostGroupOptions : The CreateDedicatedHostGroup options.
type CreateDedicatedHostGroupOptions struct {
// The dedicated host profile class for hosts in this group.
- Class *string
+ Class *string `json:"class,omitempty"`
// The dedicated host profile family for hosts in this group.
- Family *string
+ Family *string `json:"family,omitempty"`
// The unique user-defined name for this dedicated host group. If unspecified, the name will be a hyphenated list of
// randomly-selected words.
- Name *string
+ Name *string `json:"name,omitempty"`
// The resource group to use. If unspecified, the account's [default resource
// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
- ResourceGroup ResourceGroupIdentityIntf
+ ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
// The zone this dedicated host group will reside in.
- Zone ZoneIdentityIntf
+ Zone ZoneIdentityIntf `json:"zone,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -16960,33 +22523,33 @@ func (*VpcV1) NewCreateDedicatedHostGroupOptions() *CreateDedicatedHostGroupOpti
}
// SetClass : Allow user to set Class
-func (options *CreateDedicatedHostGroupOptions) SetClass(class string) *CreateDedicatedHostGroupOptions {
- options.Class = core.StringPtr(class)
- return options
+func (_options *CreateDedicatedHostGroupOptions) SetClass(class string) *CreateDedicatedHostGroupOptions {
+ _options.Class = core.StringPtr(class)
+ return _options
}
// SetFamily : Allow user to set Family
-func (options *CreateDedicatedHostGroupOptions) SetFamily(family string) *CreateDedicatedHostGroupOptions {
- options.Family = core.StringPtr(family)
- return options
+func (_options *CreateDedicatedHostGroupOptions) SetFamily(family string) *CreateDedicatedHostGroupOptions {
+ _options.Family = core.StringPtr(family)
+ return _options
}
// SetName : Allow user to set Name
-func (options *CreateDedicatedHostGroupOptions) SetName(name string) *CreateDedicatedHostGroupOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *CreateDedicatedHostGroupOptions) SetName(name string) *CreateDedicatedHostGroupOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetResourceGroup : Allow user to set ResourceGroup
-func (options *CreateDedicatedHostGroupOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateDedicatedHostGroupOptions {
- options.ResourceGroup = resourceGroup
- return options
+func (_options *CreateDedicatedHostGroupOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateDedicatedHostGroupOptions {
+ _options.ResourceGroup = resourceGroup
+ return _options
}
// SetZone : Allow user to set Zone
-func (options *CreateDedicatedHostGroupOptions) SetZone(zone ZoneIdentityIntf) *CreateDedicatedHostGroupOptions {
- options.Zone = zone
- return options
+func (_options *CreateDedicatedHostGroupOptions) SetZone(zone ZoneIdentityIntf) *CreateDedicatedHostGroupOptions {
+ _options.Zone = zone
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -16998,7 +22561,7 @@ func (options *CreateDedicatedHostGroupOptions) SetHeaders(param map[string]stri
// CreateDedicatedHostOptions : The CreateDedicatedHost options.
type CreateDedicatedHostOptions struct {
// The dedicated host prototype object.
- DedicatedHostPrototype DedicatedHostPrototypeIntf `validate:"required"`
+ DedicatedHostPrototype DedicatedHostPrototypeIntf `json:"DedicatedHostPrototype" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -17012,9 +22575,9 @@ func (*VpcV1) NewCreateDedicatedHostOptions(dedicatedHostPrototype DedicatedHost
}
// SetDedicatedHostPrototype : Allow user to set DedicatedHostPrototype
-func (options *CreateDedicatedHostOptions) SetDedicatedHostPrototype(dedicatedHostPrototype DedicatedHostPrototypeIntf) *CreateDedicatedHostOptions {
- options.DedicatedHostPrototype = dedicatedHostPrototype
- return options
+func (_options *CreateDedicatedHostOptions) SetDedicatedHostPrototype(dedicatedHostPrototype DedicatedHostPrototypeIntf) *CreateDedicatedHostOptions {
+ _options.DedicatedHostPrototype = dedicatedHostPrototype
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -17026,21 +22589,24 @@ func (options *CreateDedicatedHostOptions) SetHeaders(param map[string]string) *
// CreateEndpointGatewayOptions : The CreateEndpointGateway options.
type CreateEndpointGatewayOptions struct {
// The target for this endpoint gateway.
- Target EndpointGatewayTargetPrototypeIntf `validate:"required"`
+ Target EndpointGatewayTargetPrototypeIntf `json:"target" validate:"required"`
// The VPC this endpoint gateway will serve.
- VPC VPCIdentityIntf `validate:"required"`
+ VPC VPCIdentityIntf `json:"vpc" validate:"required"`
- // An array of reserved IPs to bind to this endpoint gateway. At most one reserved IP per zone is allowed.
- Ips []EndpointGatewayReservedIPIntf
+ // The reserved IPs to bind to this endpoint gateway. At most one reserved IP per zone is allowed.
+ Ips []EndpointGatewayReservedIPIntf `json:"ips,omitempty"`
// The user-defined name for this endpoint gateway. If unspecified, the name will be a hyphenated list of
// randomly-selected words. Names must be unique within the VPC this endpoint gateway is serving.
- Name *string
+ Name *string `json:"name,omitempty"`
// The resource group to use. If unspecified, the account's [default resource
// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
- ResourceGroup ResourceGroupIdentityIntf
+ ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
+
+ // The security groups to use for this endpoint gateway. If unspecified, the VPC's default security group is used.
+ SecurityGroups []SecurityGroupIdentityIntf `json:"security_groups,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -17055,33 +22621,39 @@ func (*VpcV1) NewCreateEndpointGatewayOptions(target EndpointGatewayTargetProtot
}
// SetTarget : Allow user to set Target
-func (options *CreateEndpointGatewayOptions) SetTarget(target EndpointGatewayTargetPrototypeIntf) *CreateEndpointGatewayOptions {
- options.Target = target
- return options
+func (_options *CreateEndpointGatewayOptions) SetTarget(target EndpointGatewayTargetPrototypeIntf) *CreateEndpointGatewayOptions {
+ _options.Target = target
+ return _options
}
// SetVPC : Allow user to set VPC
-func (options *CreateEndpointGatewayOptions) SetVPC(vpc VPCIdentityIntf) *CreateEndpointGatewayOptions {
- options.VPC = vpc
- return options
+func (_options *CreateEndpointGatewayOptions) SetVPC(vpc VPCIdentityIntf) *CreateEndpointGatewayOptions {
+ _options.VPC = vpc
+ return _options
}
// SetIps : Allow user to set Ips
-func (options *CreateEndpointGatewayOptions) SetIps(ips []EndpointGatewayReservedIPIntf) *CreateEndpointGatewayOptions {
- options.Ips = ips
- return options
+func (_options *CreateEndpointGatewayOptions) SetIps(ips []EndpointGatewayReservedIPIntf) *CreateEndpointGatewayOptions {
+ _options.Ips = ips
+ return _options
}
// SetName : Allow user to set Name
-func (options *CreateEndpointGatewayOptions) SetName(name string) *CreateEndpointGatewayOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *CreateEndpointGatewayOptions) SetName(name string) *CreateEndpointGatewayOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetResourceGroup : Allow user to set ResourceGroup
-func (options *CreateEndpointGatewayOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateEndpointGatewayOptions {
- options.ResourceGroup = resourceGroup
- return options
+func (_options *CreateEndpointGatewayOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateEndpointGatewayOptions {
+ _options.ResourceGroup = resourceGroup
+ return _options
+}
+
+// SetSecurityGroups : Allow user to set SecurityGroups
+func (_options *CreateEndpointGatewayOptions) SetSecurityGroups(securityGroups []SecurityGroupIdentityIntf) *CreateEndpointGatewayOptions {
+ _options.SecurityGroups = securityGroups
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -17093,7 +22665,7 @@ func (options *CreateEndpointGatewayOptions) SetHeaders(param map[string]string)
// CreateFloatingIPOptions : The CreateFloatingIP options.
type CreateFloatingIPOptions struct {
// The floating IP prototype object.
- FloatingIPPrototype FloatingIPPrototypeIntf `validate:"required"`
+ FloatingIPPrototype FloatingIPPrototypeIntf `json:"FloatingIPPrototype" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -17107,9 +22679,9 @@ func (*VpcV1) NewCreateFloatingIPOptions(floatingIPPrototype FloatingIPPrototype
}
// SetFloatingIPPrototype : Allow user to set FloatingIPPrototype
-func (options *CreateFloatingIPOptions) SetFloatingIPPrototype(floatingIPPrototype FloatingIPPrototypeIntf) *CreateFloatingIPOptions {
- options.FloatingIPPrototype = floatingIPPrototype
- return options
+func (_options *CreateFloatingIPOptions) SetFloatingIPPrototype(floatingIPPrototype FloatingIPPrototypeIntf) *CreateFloatingIPOptions {
+ _options.FloatingIPPrototype = floatingIPPrototype
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -17124,30 +22696,30 @@ type CreateFlowLogCollectorOptions struct {
// The bucket must exist and an IAM service authorization must grant
// `IBM Cloud Flow Logs` resources of `VPC Infrastructure Services` writer
// access to the bucket.
- StorageBucket CloudObjectStorageBucketIdentityIntf `validate:"required"`
+ StorageBucket LegacyCloudObjectStorageBucketIdentityIntf `json:"storage_bucket" validate:"required"`
// The target this collector will collect flow logs for. If the target is an instance,
// subnet, or VPC, flow logs will not be collected for any network interfaces within the
// target that are themselves the target of a more specific flow log collector.
- Target FlowLogCollectorTargetPrototypeIntf `validate:"required"`
+ Target FlowLogCollectorTargetPrototypeIntf `json:"target" validate:"required"`
// Indicates whether this collector will be active upon creation.
- Active *bool
+ Active *bool `json:"active,omitempty"`
// The unique user-defined name for this flow log collector. If unspecified, the name will be a hyphenated list of
// randomly-selected words.
- Name *string
+ Name *string `json:"name,omitempty"`
// The resource group to use. If unspecified, the account's [default resource
// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
- ResourceGroup ResourceGroupIdentityIntf
+ ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
}
// NewCreateFlowLogCollectorOptions : Instantiate CreateFlowLogCollectorOptions
-func (*VpcV1) NewCreateFlowLogCollectorOptions(storageBucket CloudObjectStorageBucketIdentityIntf, target FlowLogCollectorTargetPrototypeIntf) *CreateFlowLogCollectorOptions {
+func (*VpcV1) NewCreateFlowLogCollectorOptions(storageBucket LegacyCloudObjectStorageBucketIdentityIntf, target FlowLogCollectorTargetPrototypeIntf) *CreateFlowLogCollectorOptions {
return &CreateFlowLogCollectorOptions{
StorageBucket: storageBucket,
Target: target,
@@ -17155,33 +22727,33 @@ func (*VpcV1) NewCreateFlowLogCollectorOptions(storageBucket CloudObjectStorageB
}
// SetStorageBucket : Allow user to set StorageBucket
-func (options *CreateFlowLogCollectorOptions) SetStorageBucket(storageBucket CloudObjectStorageBucketIdentityIntf) *CreateFlowLogCollectorOptions {
- options.StorageBucket = storageBucket
- return options
+func (_options *CreateFlowLogCollectorOptions) SetStorageBucket(storageBucket LegacyCloudObjectStorageBucketIdentityIntf) *CreateFlowLogCollectorOptions {
+ _options.StorageBucket = storageBucket
+ return _options
}
// SetTarget : Allow user to set Target
-func (options *CreateFlowLogCollectorOptions) SetTarget(target FlowLogCollectorTargetPrototypeIntf) *CreateFlowLogCollectorOptions {
- options.Target = target
- return options
+func (_options *CreateFlowLogCollectorOptions) SetTarget(target FlowLogCollectorTargetPrototypeIntf) *CreateFlowLogCollectorOptions {
+ _options.Target = target
+ return _options
}
// SetActive : Allow user to set Active
-func (options *CreateFlowLogCollectorOptions) SetActive(active bool) *CreateFlowLogCollectorOptions {
- options.Active = core.BoolPtr(active)
- return options
+func (_options *CreateFlowLogCollectorOptions) SetActive(active bool) *CreateFlowLogCollectorOptions {
+ _options.Active = core.BoolPtr(active)
+ return _options
}
// SetName : Allow user to set Name
-func (options *CreateFlowLogCollectorOptions) SetName(name string) *CreateFlowLogCollectorOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *CreateFlowLogCollectorOptions) SetName(name string) *CreateFlowLogCollectorOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetResourceGroup : Allow user to set ResourceGroup
-func (options *CreateFlowLogCollectorOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateFlowLogCollectorOptions {
- options.ResourceGroup = resourceGroup
- return options
+func (_options *CreateFlowLogCollectorOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateFlowLogCollectorOptions {
+ _options.ResourceGroup = resourceGroup
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -17193,26 +22765,26 @@ func (options *CreateFlowLogCollectorOptions) SetHeaders(param map[string]string
// CreateIkePolicyOptions : The CreateIkePolicy options.
type CreateIkePolicyOptions struct {
// The authentication algorithm.
- AuthenticationAlgorithm *string `validate:"required"`
+ AuthenticationAlgorithm *string `json:"authentication_algorithm" validate:"required"`
// The Diffie-Hellman group.
- DhGroup *int64 `validate:"required"`
+ DhGroup *int64 `json:"dh_group" validate:"required"`
// The encryption algorithm.
- EncryptionAlgorithm *string `validate:"required"`
+ EncryptionAlgorithm *string `json:"encryption_algorithm" validate:"required"`
// The IKE protocol version.
- IkeVersion *int64 `validate:"required"`
+ IkeVersion *int64 `json:"ike_version" validate:"required"`
// The key lifetime in seconds.
- KeyLifetime *int64
+ KeyLifetime *int64 `json:"key_lifetime,omitempty"`
// The user-defined name for this IKE policy.
- Name *string
+ Name *string `json:"name,omitempty"`
// The resource group to use. If unspecified, the account's [default resource
// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
- ResourceGroup ResourceGroupIdentityIntf
+ ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -17246,45 +22818,45 @@ func (*VpcV1) NewCreateIkePolicyOptions(authenticationAlgorithm string, dhGroup
}
// SetAuthenticationAlgorithm : Allow user to set AuthenticationAlgorithm
-func (options *CreateIkePolicyOptions) SetAuthenticationAlgorithm(authenticationAlgorithm string) *CreateIkePolicyOptions {
- options.AuthenticationAlgorithm = core.StringPtr(authenticationAlgorithm)
- return options
+func (_options *CreateIkePolicyOptions) SetAuthenticationAlgorithm(authenticationAlgorithm string) *CreateIkePolicyOptions {
+ _options.AuthenticationAlgorithm = core.StringPtr(authenticationAlgorithm)
+ return _options
}
// SetDhGroup : Allow user to set DhGroup
-func (options *CreateIkePolicyOptions) SetDhGroup(dhGroup int64) *CreateIkePolicyOptions {
- options.DhGroup = core.Int64Ptr(dhGroup)
- return options
+func (_options *CreateIkePolicyOptions) SetDhGroup(dhGroup int64) *CreateIkePolicyOptions {
+ _options.DhGroup = core.Int64Ptr(dhGroup)
+ return _options
}
// SetEncryptionAlgorithm : Allow user to set EncryptionAlgorithm
-func (options *CreateIkePolicyOptions) SetEncryptionAlgorithm(encryptionAlgorithm string) *CreateIkePolicyOptions {
- options.EncryptionAlgorithm = core.StringPtr(encryptionAlgorithm)
- return options
+func (_options *CreateIkePolicyOptions) SetEncryptionAlgorithm(encryptionAlgorithm string) *CreateIkePolicyOptions {
+ _options.EncryptionAlgorithm = core.StringPtr(encryptionAlgorithm)
+ return _options
}
// SetIkeVersion : Allow user to set IkeVersion
-func (options *CreateIkePolicyOptions) SetIkeVersion(ikeVersion int64) *CreateIkePolicyOptions {
- options.IkeVersion = core.Int64Ptr(ikeVersion)
- return options
+func (_options *CreateIkePolicyOptions) SetIkeVersion(ikeVersion int64) *CreateIkePolicyOptions {
+ _options.IkeVersion = core.Int64Ptr(ikeVersion)
+ return _options
}
// SetKeyLifetime : Allow user to set KeyLifetime
-func (options *CreateIkePolicyOptions) SetKeyLifetime(keyLifetime int64) *CreateIkePolicyOptions {
- options.KeyLifetime = core.Int64Ptr(keyLifetime)
- return options
+func (_options *CreateIkePolicyOptions) SetKeyLifetime(keyLifetime int64) *CreateIkePolicyOptions {
+ _options.KeyLifetime = core.Int64Ptr(keyLifetime)
+ return _options
}
// SetName : Allow user to set Name
-func (options *CreateIkePolicyOptions) SetName(name string) *CreateIkePolicyOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *CreateIkePolicyOptions) SetName(name string) *CreateIkePolicyOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetResourceGroup : Allow user to set ResourceGroup
-func (options *CreateIkePolicyOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateIkePolicyOptions {
- options.ResourceGroup = resourceGroup
- return options
+func (_options *CreateIkePolicyOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateIkePolicyOptions {
+ _options.ResourceGroup = resourceGroup
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -17296,7 +22868,7 @@ func (options *CreateIkePolicyOptions) SetHeaders(param map[string]string) *Crea
// CreateImageOptions : The CreateImage options.
type CreateImageOptions struct {
// The image prototype object.
- ImagePrototype ImagePrototypeIntf `validate:"required"`
+ ImagePrototype ImagePrototypeIntf `json:"ImagePrototype" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -17310,9 +22882,9 @@ func (*VpcV1) NewCreateImageOptions(imagePrototype ImagePrototypeIntf) *CreateIm
}
// SetImagePrototype : Allow user to set ImagePrototype
-func (options *CreateImageOptions) SetImagePrototype(imagePrototype ImagePrototypeIntf) *CreateImageOptions {
- options.ImagePrototype = imagePrototype
- return options
+func (_options *CreateImageOptions) SetImagePrototype(imagePrototype ImagePrototypeIntf) *CreateImageOptions {
+ _options.ImagePrototype = imagePrototype
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -17324,13 +22896,13 @@ func (options *CreateImageOptions) SetHeaders(param map[string]string) *CreateIm
// CreateInstanceActionOptions : The CreateInstanceAction options.
type CreateInstanceActionOptions struct {
// The instance identifier.
- InstanceID *string `validate:"required,ne="`
+ InstanceID *string `json:"instance_id" validate:"required,ne="`
// The type of action.
- Type *string `validate:"required"`
+ Type *string `json:"type" validate:"required"`
// If set to true, the action will be forced immediately, and all queued actions deleted. Ignored for the start action.
- Force *bool
+ Force *bool `json:"force,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -17353,21 +22925,21 @@ func (*VpcV1) NewCreateInstanceActionOptions(instanceID string, typeVar string)
}
// SetInstanceID : Allow user to set InstanceID
-func (options *CreateInstanceActionOptions) SetInstanceID(instanceID string) *CreateInstanceActionOptions {
- options.InstanceID = core.StringPtr(instanceID)
- return options
+func (_options *CreateInstanceActionOptions) SetInstanceID(instanceID string) *CreateInstanceActionOptions {
+ _options.InstanceID = core.StringPtr(instanceID)
+ return _options
}
// SetType : Allow user to set Type
-func (options *CreateInstanceActionOptions) SetType(typeVar string) *CreateInstanceActionOptions {
- options.Type = core.StringPtr(typeVar)
- return options
+func (_options *CreateInstanceActionOptions) SetType(typeVar string) *CreateInstanceActionOptions {
+ _options.Type = core.StringPtr(typeVar)
+ return _options
}
// SetForce : Allow user to set Force
-func (options *CreateInstanceActionOptions) SetForce(force bool) *CreateInstanceActionOptions {
- options.Force = core.BoolPtr(force)
- return options
+func (_options *CreateInstanceActionOptions) SetForce(force bool) *CreateInstanceActionOptions {
+ _options.Force = core.BoolPtr(force)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -17379,14 +22951,14 @@ func (options *CreateInstanceActionOptions) SetHeaders(param map[string]string)
// CreateInstanceConsoleAccessTokenOptions : The CreateInstanceConsoleAccessToken options.
type CreateInstanceConsoleAccessTokenOptions struct {
// The instance identifier.
- InstanceID *string `validate:"required,ne="`
+ InstanceID *string `json:"instance_id" validate:"required,ne="`
// The instance console type for which this token may be used.
- ConsoleType *string `validate:"required"`
+ ConsoleType *string `json:"console_type" validate:"required"`
// Indicates whether to disconnect an existing serial console session as the serial console cannot be shared. This has
// no effect on VNC consoles.
- Force *bool
+ Force *bool `json:"force,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -17408,21 +22980,21 @@ func (*VpcV1) NewCreateInstanceConsoleAccessTokenOptions(instanceID string, cons
}
// SetInstanceID : Allow user to set InstanceID
-func (options *CreateInstanceConsoleAccessTokenOptions) SetInstanceID(instanceID string) *CreateInstanceConsoleAccessTokenOptions {
- options.InstanceID = core.StringPtr(instanceID)
- return options
+func (_options *CreateInstanceConsoleAccessTokenOptions) SetInstanceID(instanceID string) *CreateInstanceConsoleAccessTokenOptions {
+ _options.InstanceID = core.StringPtr(instanceID)
+ return _options
}
// SetConsoleType : Allow user to set ConsoleType
-func (options *CreateInstanceConsoleAccessTokenOptions) SetConsoleType(consoleType string) *CreateInstanceConsoleAccessTokenOptions {
- options.ConsoleType = core.StringPtr(consoleType)
- return options
+func (_options *CreateInstanceConsoleAccessTokenOptions) SetConsoleType(consoleType string) *CreateInstanceConsoleAccessTokenOptions {
+ _options.ConsoleType = core.StringPtr(consoleType)
+ return _options
}
// SetForce : Allow user to set Force
-func (options *CreateInstanceConsoleAccessTokenOptions) SetForce(force bool) *CreateInstanceConsoleAccessTokenOptions {
- options.Force = core.BoolPtr(force)
- return options
+func (_options *CreateInstanceConsoleAccessTokenOptions) SetForce(force bool) *CreateInstanceConsoleAccessTokenOptions {
+ _options.Force = core.BoolPtr(force)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -17431,13 +23003,61 @@ func (options *CreateInstanceConsoleAccessTokenOptions) SetHeaders(param map[str
return options
}
+// CreateInstanceGroupManagerActionOptions : The CreateInstanceGroupManagerAction options.
+type CreateInstanceGroupManagerActionOptions struct {
+ // The instance group identifier.
+ InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="`
+
+ // The instance group manager identifier.
+ InstanceGroupManagerID *string `json:"instance_group_manager_id" validate:"required,ne="`
+
+ // The instance group manager action prototype object.
+ InstanceGroupManagerActionPrototype InstanceGroupManagerActionPrototypeIntf `json:"InstanceGroupManagerActionPrototype" validate:"required"`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewCreateInstanceGroupManagerActionOptions : Instantiate CreateInstanceGroupManagerActionOptions
+func (*VpcV1) NewCreateInstanceGroupManagerActionOptions(instanceGroupID string, instanceGroupManagerID string, instanceGroupManagerActionPrototype InstanceGroupManagerActionPrototypeIntf) *CreateInstanceGroupManagerActionOptions {
+ return &CreateInstanceGroupManagerActionOptions{
+ InstanceGroupID: core.StringPtr(instanceGroupID),
+ InstanceGroupManagerID: core.StringPtr(instanceGroupManagerID),
+ InstanceGroupManagerActionPrototype: instanceGroupManagerActionPrototype,
+ }
+}
+
+// SetInstanceGroupID : Allow user to set InstanceGroupID
+func (_options *CreateInstanceGroupManagerActionOptions) SetInstanceGroupID(instanceGroupID string) *CreateInstanceGroupManagerActionOptions {
+ _options.InstanceGroupID = core.StringPtr(instanceGroupID)
+ return _options
+}
+
+// SetInstanceGroupManagerID : Allow user to set InstanceGroupManagerID
+func (_options *CreateInstanceGroupManagerActionOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *CreateInstanceGroupManagerActionOptions {
+ _options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
+ return _options
+}
+
+// SetInstanceGroupManagerActionPrototype : Allow user to set InstanceGroupManagerActionPrototype
+func (_options *CreateInstanceGroupManagerActionOptions) SetInstanceGroupManagerActionPrototype(instanceGroupManagerActionPrototype InstanceGroupManagerActionPrototypeIntf) *CreateInstanceGroupManagerActionOptions {
+ _options.InstanceGroupManagerActionPrototype = instanceGroupManagerActionPrototype
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *CreateInstanceGroupManagerActionOptions) SetHeaders(param map[string]string) *CreateInstanceGroupManagerActionOptions {
+ options.Headers = param
+ return options
+}
+
// CreateInstanceGroupManagerOptions : The CreateInstanceGroupManager options.
type CreateInstanceGroupManagerOptions struct {
// The instance group identifier.
- InstanceGroupID *string `validate:"required,ne="`
+ InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="`
// The instance group manager prototype object.
- InstanceGroupManagerPrototype InstanceGroupManagerPrototypeIntf `validate:"required"`
+ InstanceGroupManagerPrototype InstanceGroupManagerPrototypeIntf `json:"InstanceGroupManagerPrototype" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -17452,15 +23072,15 @@ func (*VpcV1) NewCreateInstanceGroupManagerOptions(instanceGroupID string, insta
}
// SetInstanceGroupID : Allow user to set InstanceGroupID
-func (options *CreateInstanceGroupManagerOptions) SetInstanceGroupID(instanceGroupID string) *CreateInstanceGroupManagerOptions {
- options.InstanceGroupID = core.StringPtr(instanceGroupID)
- return options
+func (_options *CreateInstanceGroupManagerOptions) SetInstanceGroupID(instanceGroupID string) *CreateInstanceGroupManagerOptions {
+ _options.InstanceGroupID = core.StringPtr(instanceGroupID)
+ return _options
}
// SetInstanceGroupManagerPrototype : Allow user to set InstanceGroupManagerPrototype
-func (options *CreateInstanceGroupManagerOptions) SetInstanceGroupManagerPrototype(instanceGroupManagerPrototype InstanceGroupManagerPrototypeIntf) *CreateInstanceGroupManagerOptions {
- options.InstanceGroupManagerPrototype = instanceGroupManagerPrototype
- return options
+func (_options *CreateInstanceGroupManagerOptions) SetInstanceGroupManagerPrototype(instanceGroupManagerPrototype InstanceGroupManagerPrototypeIntf) *CreateInstanceGroupManagerOptions {
+ _options.InstanceGroupManagerPrototype = instanceGroupManagerPrototype
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -17472,13 +23092,13 @@ func (options *CreateInstanceGroupManagerOptions) SetHeaders(param map[string]st
// CreateInstanceGroupManagerPolicyOptions : The CreateInstanceGroupManagerPolicy options.
type CreateInstanceGroupManagerPolicyOptions struct {
// The instance group identifier.
- InstanceGroupID *string `validate:"required,ne="`
+ InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="`
// The instance group manager identifier.
- InstanceGroupManagerID *string `validate:"required,ne="`
+ InstanceGroupManagerID *string `json:"instance_group_manager_id" validate:"required,ne="`
// The instance group manager policy prototype object.
- InstanceGroupManagerPolicyPrototype InstanceGroupManagerPolicyPrototypeIntf `validate:"required"`
+ InstanceGroupManagerPolicyPrototype InstanceGroupManagerPolicyPrototypeIntf `json:"InstanceGroupManagerPolicyPrototype" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -17494,21 +23114,21 @@ func (*VpcV1) NewCreateInstanceGroupManagerPolicyOptions(instanceGroupID string,
}
// SetInstanceGroupID : Allow user to set InstanceGroupID
-func (options *CreateInstanceGroupManagerPolicyOptions) SetInstanceGroupID(instanceGroupID string) *CreateInstanceGroupManagerPolicyOptions {
- options.InstanceGroupID = core.StringPtr(instanceGroupID)
- return options
+func (_options *CreateInstanceGroupManagerPolicyOptions) SetInstanceGroupID(instanceGroupID string) *CreateInstanceGroupManagerPolicyOptions {
+ _options.InstanceGroupID = core.StringPtr(instanceGroupID)
+ return _options
}
// SetInstanceGroupManagerID : Allow user to set InstanceGroupManagerID
-func (options *CreateInstanceGroupManagerPolicyOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *CreateInstanceGroupManagerPolicyOptions {
- options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
- return options
+func (_options *CreateInstanceGroupManagerPolicyOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *CreateInstanceGroupManagerPolicyOptions {
+ _options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
+ return _options
}
// SetInstanceGroupManagerPolicyPrototype : Allow user to set InstanceGroupManagerPolicyPrototype
-func (options *CreateInstanceGroupManagerPolicyOptions) SetInstanceGroupManagerPolicyPrototype(instanceGroupManagerPolicyPrototype InstanceGroupManagerPolicyPrototypeIntf) *CreateInstanceGroupManagerPolicyOptions {
- options.InstanceGroupManagerPolicyPrototype = instanceGroupManagerPolicyPrototype
- return options
+func (_options *CreateInstanceGroupManagerPolicyOptions) SetInstanceGroupManagerPolicyPrototype(instanceGroupManagerPolicyPrototype InstanceGroupManagerPolicyPrototypeIntf) *CreateInstanceGroupManagerPolicyOptions {
+ _options.InstanceGroupManagerPolicyPrototype = instanceGroupManagerPolicyPrototype
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -17520,34 +23140,38 @@ func (options *CreateInstanceGroupManagerPolicyOptions) SetHeaders(param map[str
// CreateInstanceGroupOptions : The CreateInstanceGroup options.
type CreateInstanceGroupOptions struct {
// Instance template to use when creating new instances.
- InstanceTemplate InstanceTemplateIdentityIntf `validate:"required"`
+ //
+ // Instance groups are not compatible with instance templates that specify `true` for
+ // `default_trusted_profile.auto_link`.
+ InstanceTemplate InstanceTemplateIdentityIntf `json:"instance_template" validate:"required"`
- // Array of identities to subnets to use when creating new instances.
- Subnets []SubnetIdentityIntf `validate:"required"`
+ // The subnets to use when creating new instances.
+ Subnets []SubnetIdentityIntf `json:"subnets" validate:"required"`
// Required if specifying a load balancer pool only. Used by the instance group when scaling up instances to supply the
// port for the load balancer pool member.
- ApplicationPort *int64
+ ApplicationPort *int64 `json:"application_port,omitempty"`
// The load balancer that the load balancer pool used by this group
- // is in. Must be supplied when using a load balancer pool.
- LoadBalancer LoadBalancerIdentityIntf
+ // is in. Required when using a load balancer pool.
+ LoadBalancer LoadBalancerIdentityIntf `json:"load_balancer,omitempty"`
- // When specified, the load balancer pool will be managed by this
+ // If specified, the load balancer pool will be managed by this
// group. Instances created by this group will have a new load
// balancer pool member in that pool created. Must be used with
// `application_port`.
- LoadBalancerPool LoadBalancerPoolIdentityIntf
+ LoadBalancerPool LoadBalancerPoolIdentityIntf `json:"load_balancer_pool,omitempty"`
// The number of instances in the instance group.
- MembershipCount *int64
+ MembershipCount *int64 `json:"membership_count,omitempty"`
- // The user-defined name for this instance group.
- Name *string
+ // The unique user-defined name for this instance group. If unspecified, the name will be a hyphenated list of
+ // randomly-selected words.
+ Name *string `json:"name,omitempty"`
// The resource group to use. If unspecified, the account's [default resource
// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
- ResourceGroup ResourceGroupIdentityIntf
+ ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -17562,51 +23186,51 @@ func (*VpcV1) NewCreateInstanceGroupOptions(instanceTemplate InstanceTemplateIde
}
// SetInstanceTemplate : Allow user to set InstanceTemplate
-func (options *CreateInstanceGroupOptions) SetInstanceTemplate(instanceTemplate InstanceTemplateIdentityIntf) *CreateInstanceGroupOptions {
- options.InstanceTemplate = instanceTemplate
- return options
+func (_options *CreateInstanceGroupOptions) SetInstanceTemplate(instanceTemplate InstanceTemplateIdentityIntf) *CreateInstanceGroupOptions {
+ _options.InstanceTemplate = instanceTemplate
+ return _options
}
// SetSubnets : Allow user to set Subnets
-func (options *CreateInstanceGroupOptions) SetSubnets(subnets []SubnetIdentityIntf) *CreateInstanceGroupOptions {
- options.Subnets = subnets
- return options
+func (_options *CreateInstanceGroupOptions) SetSubnets(subnets []SubnetIdentityIntf) *CreateInstanceGroupOptions {
+ _options.Subnets = subnets
+ return _options
}
// SetApplicationPort : Allow user to set ApplicationPort
-func (options *CreateInstanceGroupOptions) SetApplicationPort(applicationPort int64) *CreateInstanceGroupOptions {
- options.ApplicationPort = core.Int64Ptr(applicationPort)
- return options
+func (_options *CreateInstanceGroupOptions) SetApplicationPort(applicationPort int64) *CreateInstanceGroupOptions {
+ _options.ApplicationPort = core.Int64Ptr(applicationPort)
+ return _options
}
// SetLoadBalancer : Allow user to set LoadBalancer
-func (options *CreateInstanceGroupOptions) SetLoadBalancer(loadBalancer LoadBalancerIdentityIntf) *CreateInstanceGroupOptions {
- options.LoadBalancer = loadBalancer
- return options
+func (_options *CreateInstanceGroupOptions) SetLoadBalancer(loadBalancer LoadBalancerIdentityIntf) *CreateInstanceGroupOptions {
+ _options.LoadBalancer = loadBalancer
+ return _options
}
// SetLoadBalancerPool : Allow user to set LoadBalancerPool
-func (options *CreateInstanceGroupOptions) SetLoadBalancerPool(loadBalancerPool LoadBalancerPoolIdentityIntf) *CreateInstanceGroupOptions {
- options.LoadBalancerPool = loadBalancerPool
- return options
+func (_options *CreateInstanceGroupOptions) SetLoadBalancerPool(loadBalancerPool LoadBalancerPoolIdentityIntf) *CreateInstanceGroupOptions {
+ _options.LoadBalancerPool = loadBalancerPool
+ return _options
}
// SetMembershipCount : Allow user to set MembershipCount
-func (options *CreateInstanceGroupOptions) SetMembershipCount(membershipCount int64) *CreateInstanceGroupOptions {
- options.MembershipCount = core.Int64Ptr(membershipCount)
- return options
+func (_options *CreateInstanceGroupOptions) SetMembershipCount(membershipCount int64) *CreateInstanceGroupOptions {
+ _options.MembershipCount = core.Int64Ptr(membershipCount)
+ return _options
}
// SetName : Allow user to set Name
-func (options *CreateInstanceGroupOptions) SetName(name string) *CreateInstanceGroupOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *CreateInstanceGroupOptions) SetName(name string) *CreateInstanceGroupOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetResourceGroup : Allow user to set ResourceGroup
-func (options *CreateInstanceGroupOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateInstanceGroupOptions {
- options.ResourceGroup = resourceGroup
- return options
+func (_options *CreateInstanceGroupOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateInstanceGroupOptions {
+ _options.ResourceGroup = resourceGroup
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -17618,25 +23242,29 @@ func (options *CreateInstanceGroupOptions) SetHeaders(param map[string]string) *
// CreateInstanceNetworkInterfaceOptions : The CreateInstanceNetworkInterface options.
type CreateInstanceNetworkInterfaceOptions struct {
// The instance identifier.
- InstanceID *string `validate:"required,ne="`
+ InstanceID *string `json:"instance_id" validate:"required,ne="`
// The associated subnet.
- Subnet SubnetIdentityIntf `validate:"required"`
+ Subnet SubnetIdentityIntf `json:"subnet" validate:"required"`
// Indicates whether source IP spoofing is allowed on this interface. If false, source IP spoofing is prevented on this
// interface. If true, source IP spoofing is allowed on this interface.
- AllowIPSpoofing *bool
+ AllowIPSpoofing *bool `json:"allow_ip_spoofing,omitempty"`
- // The user-defined name for this network interface. If unspecified, the name will be a hyphenated list of
- // randomly-selected words.
- Name *string
+ // The user-defined name for network interface. Names must be unique within the instance the network interface resides
+ // in. If unspecified, the name will be a hyphenated list of randomly-selected words.
+ Name *string `json:"name,omitempty"`
- // The primary IPv4 address. If specified, it must be an available address on the network interface's subnet. If
- // unspecified, an available address on the subnet will be automatically selected.
- PrimaryIpv4Address *string
+ // The primary IP address to bind to the network interface. This can be specified using
+ // an existing reserved IP, or a prototype object for a new reserved IP.
+ //
+ // If an existing reserved IP or a prototype object with an address is specified, it must
+ // be available on the network interface's subnet. Otherwise, an available address on the
+ // subnet will be automatically selected and reserved.
+ PrimaryIP NetworkInterfaceIPPrototypeIntf `json:"primary_ip,omitempty"`
- // Collection of security groups.
- SecurityGroups []SecurityGroupIdentityIntf
+ // The security groups to use for this network interface. If unspecified, the VPC's default security group is used.
+ SecurityGroups []SecurityGroupIdentityIntf `json:"security_groups,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -17651,39 +23279,39 @@ func (*VpcV1) NewCreateInstanceNetworkInterfaceOptions(instanceID string, subnet
}
// SetInstanceID : Allow user to set InstanceID
-func (options *CreateInstanceNetworkInterfaceOptions) SetInstanceID(instanceID string) *CreateInstanceNetworkInterfaceOptions {
- options.InstanceID = core.StringPtr(instanceID)
- return options
+func (_options *CreateInstanceNetworkInterfaceOptions) SetInstanceID(instanceID string) *CreateInstanceNetworkInterfaceOptions {
+ _options.InstanceID = core.StringPtr(instanceID)
+ return _options
}
// SetSubnet : Allow user to set Subnet
-func (options *CreateInstanceNetworkInterfaceOptions) SetSubnet(subnet SubnetIdentityIntf) *CreateInstanceNetworkInterfaceOptions {
- options.Subnet = subnet
- return options
+func (_options *CreateInstanceNetworkInterfaceOptions) SetSubnet(subnet SubnetIdentityIntf) *CreateInstanceNetworkInterfaceOptions {
+ _options.Subnet = subnet
+ return _options
}
// SetAllowIPSpoofing : Allow user to set AllowIPSpoofing
-func (options *CreateInstanceNetworkInterfaceOptions) SetAllowIPSpoofing(allowIPSpoofing bool) *CreateInstanceNetworkInterfaceOptions {
- options.AllowIPSpoofing = core.BoolPtr(allowIPSpoofing)
- return options
+func (_options *CreateInstanceNetworkInterfaceOptions) SetAllowIPSpoofing(allowIPSpoofing bool) *CreateInstanceNetworkInterfaceOptions {
+ _options.AllowIPSpoofing = core.BoolPtr(allowIPSpoofing)
+ return _options
}
// SetName : Allow user to set Name
-func (options *CreateInstanceNetworkInterfaceOptions) SetName(name string) *CreateInstanceNetworkInterfaceOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *CreateInstanceNetworkInterfaceOptions) SetName(name string) *CreateInstanceNetworkInterfaceOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
-// SetPrimaryIpv4Address : Allow user to set PrimaryIpv4Address
-func (options *CreateInstanceNetworkInterfaceOptions) SetPrimaryIpv4Address(primaryIpv4Address string) *CreateInstanceNetworkInterfaceOptions {
- options.PrimaryIpv4Address = core.StringPtr(primaryIpv4Address)
- return options
+// SetPrimaryIP : Allow user to set PrimaryIP
+func (_options *CreateInstanceNetworkInterfaceOptions) SetPrimaryIP(primaryIP NetworkInterfaceIPPrototypeIntf) *CreateInstanceNetworkInterfaceOptions {
+ _options.PrimaryIP = primaryIP
+ return _options
}
// SetSecurityGroups : Allow user to set SecurityGroups
-func (options *CreateInstanceNetworkInterfaceOptions) SetSecurityGroups(securityGroups []SecurityGroupIdentityIntf) *CreateInstanceNetworkInterfaceOptions {
- options.SecurityGroups = securityGroups
- return options
+func (_options *CreateInstanceNetworkInterfaceOptions) SetSecurityGroups(securityGroups []SecurityGroupIdentityIntf) *CreateInstanceNetworkInterfaceOptions {
+ _options.SecurityGroups = securityGroups
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -17695,7 +23323,7 @@ func (options *CreateInstanceNetworkInterfaceOptions) SetHeaders(param map[strin
// CreateInstanceOptions : The CreateInstance options.
type CreateInstanceOptions struct {
// The instance prototype object.
- InstancePrototype InstancePrototypeIntf `validate:"required"`
+ InstancePrototype InstancePrototypeIntf `json:"InstancePrototype" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -17709,9 +23337,9 @@ func (*VpcV1) NewCreateInstanceOptions(instancePrototype InstancePrototypeIntf)
}
// SetInstancePrototype : Allow user to set InstancePrototype
-func (options *CreateInstanceOptions) SetInstancePrototype(instancePrototype InstancePrototypeIntf) *CreateInstanceOptions {
- options.InstancePrototype = instancePrototype
- return options
+func (_options *CreateInstanceOptions) SetInstancePrototype(instancePrototype InstancePrototypeIntf) *CreateInstanceOptions {
+ _options.InstancePrototype = instancePrototype
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -17723,7 +23351,7 @@ func (options *CreateInstanceOptions) SetHeaders(param map[string]string) *Creat
// CreateInstanceTemplateOptions : The CreateInstanceTemplate options.
type CreateInstanceTemplateOptions struct {
// The instance template prototype object.
- InstanceTemplatePrototype InstanceTemplatePrototypeIntf `validate:"required"`
+ InstanceTemplatePrototype InstanceTemplatePrototypeIntf `json:"InstanceTemplatePrototype" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -17737,9 +23365,9 @@ func (*VpcV1) NewCreateInstanceTemplateOptions(instanceTemplatePrototype Instanc
}
// SetInstanceTemplatePrototype : Allow user to set InstanceTemplatePrototype
-func (options *CreateInstanceTemplateOptions) SetInstanceTemplatePrototype(instanceTemplatePrototype InstanceTemplatePrototypeIntf) *CreateInstanceTemplateOptions {
- options.InstanceTemplatePrototype = instanceTemplatePrototype
- return options
+func (_options *CreateInstanceTemplateOptions) SetInstanceTemplatePrototype(instanceTemplatePrototype InstanceTemplatePrototypeIntf) *CreateInstanceTemplateOptions {
+ _options.InstanceTemplatePrototype = instanceTemplatePrototype
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -17751,24 +23379,24 @@ func (options *CreateInstanceTemplateOptions) SetHeaders(param map[string]string
// CreateInstanceVolumeAttachmentOptions : The CreateInstanceVolumeAttachment options.
type CreateInstanceVolumeAttachmentOptions struct {
// The instance identifier.
- InstanceID *string `validate:"required,ne="`
+ InstanceID *string `json:"instance_id" validate:"required,ne="`
- // The identity of the volume to attach to the instance.
- Volume VolumeIdentityIntf `validate:"required"`
+ // An existing volume to attach to the instance, or a prototype object for a new volume.
+ Volume VolumeAttachmentPrototypeVolumeIntf `json:"volume" validate:"required"`
// If set to true, when deleting the instance the volume will also be deleted.
- DeleteVolumeOnInstanceDelete *bool
+ DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"`
- // The user-defined name for this volume attachment. If unspecified, the name will be a hyphenated list of
- // randomly-selected words.
- Name *string
+ // The user-defined name for this volume attachment. Names must be unique within the instance the volume attachment
+ // resides in. If unspecified, the name will be a hyphenated list of randomly-selected words.
+ Name *string `json:"name,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
}
// NewCreateInstanceVolumeAttachmentOptions : Instantiate CreateInstanceVolumeAttachmentOptions
-func (*VpcV1) NewCreateInstanceVolumeAttachmentOptions(instanceID string, volume VolumeIdentityIntf) *CreateInstanceVolumeAttachmentOptions {
+func (*VpcV1) NewCreateInstanceVolumeAttachmentOptions(instanceID string, volume VolumeAttachmentPrototypeVolumeIntf) *CreateInstanceVolumeAttachmentOptions {
return &CreateInstanceVolumeAttachmentOptions{
InstanceID: core.StringPtr(instanceID),
Volume: volume,
@@ -17776,27 +23404,27 @@ func (*VpcV1) NewCreateInstanceVolumeAttachmentOptions(instanceID string, volume
}
// SetInstanceID : Allow user to set InstanceID
-func (options *CreateInstanceVolumeAttachmentOptions) SetInstanceID(instanceID string) *CreateInstanceVolumeAttachmentOptions {
- options.InstanceID = core.StringPtr(instanceID)
- return options
+func (_options *CreateInstanceVolumeAttachmentOptions) SetInstanceID(instanceID string) *CreateInstanceVolumeAttachmentOptions {
+ _options.InstanceID = core.StringPtr(instanceID)
+ return _options
}
// SetVolume : Allow user to set Volume
-func (options *CreateInstanceVolumeAttachmentOptions) SetVolume(volume VolumeIdentityIntf) *CreateInstanceVolumeAttachmentOptions {
- options.Volume = volume
- return options
+func (_options *CreateInstanceVolumeAttachmentOptions) SetVolume(volume VolumeAttachmentPrototypeVolumeIntf) *CreateInstanceVolumeAttachmentOptions {
+ _options.Volume = volume
+ return _options
}
// SetDeleteVolumeOnInstanceDelete : Allow user to set DeleteVolumeOnInstanceDelete
-func (options *CreateInstanceVolumeAttachmentOptions) SetDeleteVolumeOnInstanceDelete(deleteVolumeOnInstanceDelete bool) *CreateInstanceVolumeAttachmentOptions {
- options.DeleteVolumeOnInstanceDelete = core.BoolPtr(deleteVolumeOnInstanceDelete)
- return options
+func (_options *CreateInstanceVolumeAttachmentOptions) SetDeleteVolumeOnInstanceDelete(deleteVolumeOnInstanceDelete bool) *CreateInstanceVolumeAttachmentOptions {
+ _options.DeleteVolumeOnInstanceDelete = core.BoolPtr(deleteVolumeOnInstanceDelete)
+ return _options
}
// SetName : Allow user to set Name
-func (options *CreateInstanceVolumeAttachmentOptions) SetName(name string) *CreateInstanceVolumeAttachmentOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *CreateInstanceVolumeAttachmentOptions) SetName(name string) *CreateInstanceVolumeAttachmentOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -17808,23 +23436,23 @@ func (options *CreateInstanceVolumeAttachmentOptions) SetHeaders(param map[strin
// CreateIpsecPolicyOptions : The CreateIpsecPolicy options.
type CreateIpsecPolicyOptions struct {
// The authentication algorithm.
- AuthenticationAlgorithm *string `validate:"required"`
+ AuthenticationAlgorithm *string `json:"authentication_algorithm" validate:"required"`
// The encryption algorithm.
- EncryptionAlgorithm *string `validate:"required"`
+ EncryptionAlgorithm *string `json:"encryption_algorithm" validate:"required"`
// Perfect Forward Secrecy.
- Pfs *string `validate:"required"`
+ Pfs *string `json:"pfs" validate:"required"`
// The key lifetime in seconds.
- KeyLifetime *int64
+ KeyLifetime *int64 `json:"key_lifetime,omitempty"`
// The user-defined name for this IPsec policy.
- Name *string
+ Name *string `json:"name,omitempty"`
// The resource group to use. If unspecified, the account's [default resource
// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
- ResourceGroup ResourceGroupIdentityIntf
+ ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -17867,39 +23495,39 @@ func (*VpcV1) NewCreateIpsecPolicyOptions(authenticationAlgorithm string, encryp
}
// SetAuthenticationAlgorithm : Allow user to set AuthenticationAlgorithm
-func (options *CreateIpsecPolicyOptions) SetAuthenticationAlgorithm(authenticationAlgorithm string) *CreateIpsecPolicyOptions {
- options.AuthenticationAlgorithm = core.StringPtr(authenticationAlgorithm)
- return options
+func (_options *CreateIpsecPolicyOptions) SetAuthenticationAlgorithm(authenticationAlgorithm string) *CreateIpsecPolicyOptions {
+ _options.AuthenticationAlgorithm = core.StringPtr(authenticationAlgorithm)
+ return _options
}
// SetEncryptionAlgorithm : Allow user to set EncryptionAlgorithm
-func (options *CreateIpsecPolicyOptions) SetEncryptionAlgorithm(encryptionAlgorithm string) *CreateIpsecPolicyOptions {
- options.EncryptionAlgorithm = core.StringPtr(encryptionAlgorithm)
- return options
+func (_options *CreateIpsecPolicyOptions) SetEncryptionAlgorithm(encryptionAlgorithm string) *CreateIpsecPolicyOptions {
+ _options.EncryptionAlgorithm = core.StringPtr(encryptionAlgorithm)
+ return _options
}
// SetPfs : Allow user to set Pfs
-func (options *CreateIpsecPolicyOptions) SetPfs(pfs string) *CreateIpsecPolicyOptions {
- options.Pfs = core.StringPtr(pfs)
- return options
+func (_options *CreateIpsecPolicyOptions) SetPfs(pfs string) *CreateIpsecPolicyOptions {
+ _options.Pfs = core.StringPtr(pfs)
+ return _options
}
// SetKeyLifetime : Allow user to set KeyLifetime
-func (options *CreateIpsecPolicyOptions) SetKeyLifetime(keyLifetime int64) *CreateIpsecPolicyOptions {
- options.KeyLifetime = core.Int64Ptr(keyLifetime)
- return options
+func (_options *CreateIpsecPolicyOptions) SetKeyLifetime(keyLifetime int64) *CreateIpsecPolicyOptions {
+ _options.KeyLifetime = core.Int64Ptr(keyLifetime)
+ return _options
}
// SetName : Allow user to set Name
-func (options *CreateIpsecPolicyOptions) SetName(name string) *CreateIpsecPolicyOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *CreateIpsecPolicyOptions) SetName(name string) *CreateIpsecPolicyOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetResourceGroup : Allow user to set ResourceGroup
-func (options *CreateIpsecPolicyOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateIpsecPolicyOptions {
- options.ResourceGroup = resourceGroup
- return options
+func (_options *CreateIpsecPolicyOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateIpsecPolicyOptions {
+ _options.ResourceGroup = resourceGroup
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -17910,20 +23538,21 @@ func (options *CreateIpsecPolicyOptions) SetHeaders(param map[string]string) *Cr
// CreateKeyOptions : The CreateKey options.
type CreateKeyOptions struct {
- // A unique public SSH key to import, encoded in PEM format. The key (prior to encoding) must be either 2048 or 4096
- // bits long.
- PublicKey *string `validate:"required"`
+ // A unique public SSH key to import, in OpenSSH format (consisting of three space-separated fields: the algorithm
+ // name, base64-encoded key, and a comment). The algorithm and comment fields may be omitted, as only the key field is
+ // imported.
+ PublicKey *string `json:"public_key" validate:"required"`
// The unique user-defined name for this key. If unspecified, the name will be a hyphenated list of randomly-selected
// words.
- Name *string
+ Name *string `json:"name,omitempty"`
// The resource group to use. If unspecified, the account's [default resource
// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
- ResourceGroup ResourceGroupIdentityIntf
+ ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
// The crypto-system used by this key.
- Type *string
+ Type *string `json:"type,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -17943,27 +23572,27 @@ func (*VpcV1) NewCreateKeyOptions(publicKey string) *CreateKeyOptions {
}
// SetPublicKey : Allow user to set PublicKey
-func (options *CreateKeyOptions) SetPublicKey(publicKey string) *CreateKeyOptions {
- options.PublicKey = core.StringPtr(publicKey)
- return options
+func (_options *CreateKeyOptions) SetPublicKey(publicKey string) *CreateKeyOptions {
+ _options.PublicKey = core.StringPtr(publicKey)
+ return _options
}
// SetName : Allow user to set Name
-func (options *CreateKeyOptions) SetName(name string) *CreateKeyOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *CreateKeyOptions) SetName(name string) *CreateKeyOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetResourceGroup : Allow user to set ResourceGroup
-func (options *CreateKeyOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateKeyOptions {
- options.ResourceGroup = resourceGroup
- return options
+func (_options *CreateKeyOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateKeyOptions {
+ _options.ResourceGroup = resourceGroup
+ return _options
}
// SetType : Allow user to set Type
-func (options *CreateKeyOptions) SetType(typeVar string) *CreateKeyOptions {
- options.Type = core.StringPtr(typeVar)
- return options
+func (_options *CreateKeyOptions) SetType(typeVar string) *CreateKeyOptions {
+ _options.Type = core.StringPtr(typeVar)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -17975,107 +23604,162 @@ func (options *CreateKeyOptions) SetHeaders(param map[string]string) *CreateKeyO
// CreateLoadBalancerListenerOptions : The CreateLoadBalancerListener options.
type CreateLoadBalancerListenerOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
- // The listener port number. Each listener in the load balancer must have a unique
- // `port` and `protocol` combination.
- Port *int64 `validate:"required"`
-
- // The listener protocol. Load balancers in the `network` family support `tcp`. Load balancers in the `application`
- // family support `tcp`, `http`, and `https`. Each listener in the load balancer must have a unique `port` and
- // `protocol` combination.
- Protocol *string `validate:"required"`
+ // The listener protocol. Each listener in the load balancer must have a unique `port` and `protocol` combination.
+ // Additional restrictions:
+ // - If this load balancer is in the `network` family:
+ // - The protocol must be `tcp` or `udp` (if `udp_supported` is `true`).
+ // - If `default_pool` is set, the pool protocol must match.
+ // - If `https_redirect` is set, the protocol must be `http`.
+ Protocol *string `json:"protocol" validate:"required"`
// If set to `true`, this listener will accept and forward PROXY protocol information. Supported by load balancers in
- // the `application` family (otherwise always `false`).
- AcceptProxyProtocol *bool
+ // the `application` family (otherwise always `false`). Additional restrictions:
+ // - If this listener has `https_redirect` specified, its `accept_proxy_protocol` value must
+ // match the `accept_proxy_protocol` value of the `https_redirect` listener.
+ // - If this listener is the target of another listener's `https_redirect`, its
+ // `accept_proxy_protocol` value must match that listener's `accept_proxy_protocol` value.
+ AcceptProxyProtocol *bool `json:"accept_proxy_protocol,omitempty"`
// The certificate instance used for SSL termination. It is applicable only to `https`
// protocol.
- CertificateInstance CertificateInstanceIdentityIntf
+ CertificateInstance CertificateInstanceIdentityIntf `json:"certificate_instance,omitempty"`
// The connection limit of the listener.
- ConnectionLimit *int64
+ ConnectionLimit *int64 `json:"connection_limit,omitempty"`
- // The default pool associated with the listener. The specified pool must:
+ // The default pool for this listener. The specified pool must:
//
// - Belong to this load balancer
- // - Have the same `protocol` as this listener
- // - Not already be the default pool for another listener.
- DefaultPool LoadBalancerPoolIdentityIntf
+ // - Have the same `protocol` as this listener, or have a compatible protocol.
+ // At present, the compatible protocols are `http` and `https`.
+ // - Not already be the `default_pool` for another listener.
+ DefaultPool LoadBalancerPoolIdentityIntf `json:"default_pool,omitempty"`
- // An array of policies for this listener.
- Policies []LoadBalancerListenerPolicyPrototype
+ // The target listener that requests will be redirected to. This listener must have a
+ // `protocol` of `http`, and the target listener must have a `protocol` of `https`.
+ HTTPSRedirect *LoadBalancerListenerHTTPSRedirectPrototype `json:"https_redirect,omitempty"`
+
+ // The policy prototype objects for this listener.
+ Policies []LoadBalancerListenerPolicyPrototype `json:"policies,omitempty"`
+
+ // The listener port number, or the inclusive lower bound of the port range. Each listener in the load balancer must
+ // have a unique `port` and `protocol` combination.
+ //
+ // Not supported for load balancers operating with route mode enabled.
+ Port *int64 `json:"port,omitempty"`
+
+ // The inclusive upper bound of the range of ports used by this listener. Must not be less than `port_min`.
+ //
+ // At present, only load balancers operating with route mode enabled, and public load balancers in the `network` family
+ // support different values for `port_min` and
+ // `port_max`. When route mode is enabled, the value `65535` must be specified.
+ //
+ // The specified port range must not overlap with port ranges used by other listeners for this load balancer using the
+ // same protocol.
+ PortMax *int64 `json:"port_max,omitempty"`
+
+ // The inclusive lower bound of the range of ports used by this listener. Must not be greater than `port_max`.
+ //
+ // At present, only load balancers operating with route mode enabled, and public load balancers in the `network` family
+ // support different values for `port_min` and
+ // `port_max`. When route mode is enabled, the value `1` must be specified.
+ //
+ // The specified port range must not overlap with port ranges used by other listeners for this load balancer using the
+ // same protocol.
+ PortMin *int64 `json:"port_min,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
}
// Constants associated with the CreateLoadBalancerListenerOptions.Protocol property.
-// The listener protocol. Load balancers in the `network` family support `tcp`. Load balancers in the `application`
-// family support `tcp`, `http`, and `https`. Each listener in the load balancer must have a unique `port` and
-// `protocol` combination.
+// The listener protocol. Each listener in the load balancer must have a unique `port` and `protocol` combination.
+// Additional restrictions:
+// - If this load balancer is in the `network` family:
+// - The protocol must be `tcp` or `udp` (if `udp_supported` is `true`).
+// - If `default_pool` is set, the pool protocol must match.
+// - If `https_redirect` is set, the protocol must be `http`.
const (
CreateLoadBalancerListenerOptionsProtocolHTTPConst = "http"
CreateLoadBalancerListenerOptionsProtocolHTTPSConst = "https"
CreateLoadBalancerListenerOptionsProtocolTCPConst = "tcp"
+ CreateLoadBalancerListenerOptionsProtocolUDPConst = "udp"
)
// NewCreateLoadBalancerListenerOptions : Instantiate CreateLoadBalancerListenerOptions
-func (*VpcV1) NewCreateLoadBalancerListenerOptions(loadBalancerID string, port int64, protocol string) *CreateLoadBalancerListenerOptions {
+func (*VpcV1) NewCreateLoadBalancerListenerOptions(loadBalancerID string, protocol string) *CreateLoadBalancerListenerOptions {
return &CreateLoadBalancerListenerOptions{
LoadBalancerID: core.StringPtr(loadBalancerID),
- Port: core.Int64Ptr(port),
Protocol: core.StringPtr(protocol),
}
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *CreateLoadBalancerListenerOptions) SetLoadBalancerID(loadBalancerID string) *CreateLoadBalancerListenerOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
-}
-
-// SetPort : Allow user to set Port
-func (options *CreateLoadBalancerListenerOptions) SetPort(port int64) *CreateLoadBalancerListenerOptions {
- options.Port = core.Int64Ptr(port)
- return options
+func (_options *CreateLoadBalancerListenerOptions) SetLoadBalancerID(loadBalancerID string) *CreateLoadBalancerListenerOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetProtocol : Allow user to set Protocol
-func (options *CreateLoadBalancerListenerOptions) SetProtocol(protocol string) *CreateLoadBalancerListenerOptions {
- options.Protocol = core.StringPtr(protocol)
- return options
+func (_options *CreateLoadBalancerListenerOptions) SetProtocol(protocol string) *CreateLoadBalancerListenerOptions {
+ _options.Protocol = core.StringPtr(protocol)
+ return _options
}
// SetAcceptProxyProtocol : Allow user to set AcceptProxyProtocol
-func (options *CreateLoadBalancerListenerOptions) SetAcceptProxyProtocol(acceptProxyProtocol bool) *CreateLoadBalancerListenerOptions {
- options.AcceptProxyProtocol = core.BoolPtr(acceptProxyProtocol)
- return options
+func (_options *CreateLoadBalancerListenerOptions) SetAcceptProxyProtocol(acceptProxyProtocol bool) *CreateLoadBalancerListenerOptions {
+ _options.AcceptProxyProtocol = core.BoolPtr(acceptProxyProtocol)
+ return _options
}
// SetCertificateInstance : Allow user to set CertificateInstance
-func (options *CreateLoadBalancerListenerOptions) SetCertificateInstance(certificateInstance CertificateInstanceIdentityIntf) *CreateLoadBalancerListenerOptions {
- options.CertificateInstance = certificateInstance
- return options
+func (_options *CreateLoadBalancerListenerOptions) SetCertificateInstance(certificateInstance CertificateInstanceIdentityIntf) *CreateLoadBalancerListenerOptions {
+ _options.CertificateInstance = certificateInstance
+ return _options
}
// SetConnectionLimit : Allow user to set ConnectionLimit
-func (options *CreateLoadBalancerListenerOptions) SetConnectionLimit(connectionLimit int64) *CreateLoadBalancerListenerOptions {
- options.ConnectionLimit = core.Int64Ptr(connectionLimit)
- return options
+func (_options *CreateLoadBalancerListenerOptions) SetConnectionLimit(connectionLimit int64) *CreateLoadBalancerListenerOptions {
+ _options.ConnectionLimit = core.Int64Ptr(connectionLimit)
+ return _options
}
// SetDefaultPool : Allow user to set DefaultPool
-func (options *CreateLoadBalancerListenerOptions) SetDefaultPool(defaultPool LoadBalancerPoolIdentityIntf) *CreateLoadBalancerListenerOptions {
- options.DefaultPool = defaultPool
- return options
+func (_options *CreateLoadBalancerListenerOptions) SetDefaultPool(defaultPool LoadBalancerPoolIdentityIntf) *CreateLoadBalancerListenerOptions {
+ _options.DefaultPool = defaultPool
+ return _options
+}
+
+// SetHTTPSRedirect : Allow user to set HTTPSRedirect
+func (_options *CreateLoadBalancerListenerOptions) SetHTTPSRedirect(httpsRedirect *LoadBalancerListenerHTTPSRedirectPrototype) *CreateLoadBalancerListenerOptions {
+ _options.HTTPSRedirect = httpsRedirect
+ return _options
}
// SetPolicies : Allow user to set Policies
-func (options *CreateLoadBalancerListenerOptions) SetPolicies(policies []LoadBalancerListenerPolicyPrototype) *CreateLoadBalancerListenerOptions {
- options.Policies = policies
- return options
+func (_options *CreateLoadBalancerListenerOptions) SetPolicies(policies []LoadBalancerListenerPolicyPrototype) *CreateLoadBalancerListenerOptions {
+ _options.Policies = policies
+ return _options
+}
+
+// SetPort : Allow user to set Port
+func (_options *CreateLoadBalancerListenerOptions) SetPort(port int64) *CreateLoadBalancerListenerOptions {
+ _options.Port = core.Int64Ptr(port)
+ return _options
+}
+
+// SetPortMax : Allow user to set PortMax
+func (_options *CreateLoadBalancerListenerOptions) SetPortMax(portMax int64) *CreateLoadBalancerListenerOptions {
+ _options.PortMax = core.Int64Ptr(portMax)
+ return _options
+}
+
+// SetPortMin : Allow user to set PortMin
+func (_options *CreateLoadBalancerListenerOptions) SetPortMin(portMin int64) *CreateLoadBalancerListenerOptions {
+ _options.PortMin = core.Int64Ptr(portMin)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -18087,28 +23771,32 @@ func (options *CreateLoadBalancerListenerOptions) SetHeaders(param map[string]st
// CreateLoadBalancerListenerPolicyOptions : The CreateLoadBalancerListenerPolicy options.
type CreateLoadBalancerListenerPolicyOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// The listener identifier.
- ListenerID *string `validate:"required,ne="`
+ ListenerID *string `json:"listener_id" validate:"required,ne="`
// The policy action.
- Action *string `validate:"required"`
+ //
+ // The enumerated values for this property are expected to expand in the future. When processing this property, check
+ // for and log unknown values. Optionally halt processing and surface the error, or bypass the policy on which the
+ // unexpected property value was encountered.
+ Action *string `json:"action" validate:"required"`
// Priority of the policy. Lower value indicates higher priority.
- Priority *int64 `validate:"required"`
+ Priority *int64 `json:"priority" validate:"required"`
// The user-defined name for this policy. Names must be unique within the load balancer listener the policy resides in.
- Name *string
+ Name *string `json:"name,omitempty"`
- // An array of rules for this policy.
- Rules []LoadBalancerListenerPolicyRulePrototype
+ // The rule prototype objects for this policy.
+ Rules []LoadBalancerListenerPolicyRulePrototype `json:"rules,omitempty"`
- // When `action` is `forward`, `LoadBalancerPoolIdentity` is required to specify which
- // pool the load balancer forwards the traffic to. When `action` is `redirect`,
- // `LoadBalancerListenerPolicyRedirectURLPrototype` is required to specify the url and
- // http status code used in the redirect response.
- Target LoadBalancerListenerPolicyTargetPrototypeIntf
+ // - If `action` is `forward`, specify a `LoadBalancerPoolIdentity`.
+ // - If `action` is `redirect`, specify a `LoadBalancerListenerPolicyRedirectURLPrototype`.
+ // - If `action` is `https_redirect`, specify a
+ // `LoadBalancerListenerPolicyHTTPSRedirectPrototype`.
+ Target LoadBalancerListenerPolicyTargetPrototypeIntf `json:"target,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -18116,10 +23804,15 @@ type CreateLoadBalancerListenerPolicyOptions struct {
// Constants associated with the CreateLoadBalancerListenerPolicyOptions.Action property.
// The policy action.
+//
+// The enumerated values for this property are expected to expand in the future. When processing this property, check
+// for and log unknown values. Optionally halt processing and surface the error, or bypass the policy on which the
+// unexpected property value was encountered.
const (
- CreateLoadBalancerListenerPolicyOptionsActionForwardConst = "forward"
- CreateLoadBalancerListenerPolicyOptionsActionRedirectConst = "redirect"
- CreateLoadBalancerListenerPolicyOptionsActionRejectConst = "reject"
+ CreateLoadBalancerListenerPolicyOptionsActionForwardConst = "forward"
+ CreateLoadBalancerListenerPolicyOptionsActionHTTPSRedirectConst = "https_redirect"
+ CreateLoadBalancerListenerPolicyOptionsActionRedirectConst = "redirect"
+ CreateLoadBalancerListenerPolicyOptionsActionRejectConst = "reject"
)
// NewCreateLoadBalancerListenerPolicyOptions : Instantiate CreateLoadBalancerListenerPolicyOptions
@@ -18133,45 +23826,45 @@ func (*VpcV1) NewCreateLoadBalancerListenerPolicyOptions(loadBalancerID string,
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *CreateLoadBalancerListenerPolicyOptions) SetLoadBalancerID(loadBalancerID string) *CreateLoadBalancerListenerPolicyOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *CreateLoadBalancerListenerPolicyOptions) SetLoadBalancerID(loadBalancerID string) *CreateLoadBalancerListenerPolicyOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetListenerID : Allow user to set ListenerID
-func (options *CreateLoadBalancerListenerPolicyOptions) SetListenerID(listenerID string) *CreateLoadBalancerListenerPolicyOptions {
- options.ListenerID = core.StringPtr(listenerID)
- return options
+func (_options *CreateLoadBalancerListenerPolicyOptions) SetListenerID(listenerID string) *CreateLoadBalancerListenerPolicyOptions {
+ _options.ListenerID = core.StringPtr(listenerID)
+ return _options
}
// SetAction : Allow user to set Action
-func (options *CreateLoadBalancerListenerPolicyOptions) SetAction(action string) *CreateLoadBalancerListenerPolicyOptions {
- options.Action = core.StringPtr(action)
- return options
+func (_options *CreateLoadBalancerListenerPolicyOptions) SetAction(action string) *CreateLoadBalancerListenerPolicyOptions {
+ _options.Action = core.StringPtr(action)
+ return _options
}
// SetPriority : Allow user to set Priority
-func (options *CreateLoadBalancerListenerPolicyOptions) SetPriority(priority int64) *CreateLoadBalancerListenerPolicyOptions {
- options.Priority = core.Int64Ptr(priority)
- return options
+func (_options *CreateLoadBalancerListenerPolicyOptions) SetPriority(priority int64) *CreateLoadBalancerListenerPolicyOptions {
+ _options.Priority = core.Int64Ptr(priority)
+ return _options
}
// SetName : Allow user to set Name
-func (options *CreateLoadBalancerListenerPolicyOptions) SetName(name string) *CreateLoadBalancerListenerPolicyOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *CreateLoadBalancerListenerPolicyOptions) SetName(name string) *CreateLoadBalancerListenerPolicyOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetRules : Allow user to set Rules
-func (options *CreateLoadBalancerListenerPolicyOptions) SetRules(rules []LoadBalancerListenerPolicyRulePrototype) *CreateLoadBalancerListenerPolicyOptions {
- options.Rules = rules
- return options
+func (_options *CreateLoadBalancerListenerPolicyOptions) SetRules(rules []LoadBalancerListenerPolicyRulePrototype) *CreateLoadBalancerListenerPolicyOptions {
+ _options.Rules = rules
+ return _options
}
// SetTarget : Allow user to set Target
-func (options *CreateLoadBalancerListenerPolicyOptions) SetTarget(target LoadBalancerListenerPolicyTargetPrototypeIntf) *CreateLoadBalancerListenerPolicyOptions {
- options.Target = target
- return options
+func (_options *CreateLoadBalancerListenerPolicyOptions) SetTarget(target LoadBalancerListenerPolicyTargetPrototypeIntf) *CreateLoadBalancerListenerPolicyOptions {
+ _options.Target = target
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -18183,36 +23876,36 @@ func (options *CreateLoadBalancerListenerPolicyOptions) SetHeaders(param map[str
// CreateLoadBalancerListenerPolicyRuleOptions : The CreateLoadBalancerListenerPolicyRule options.
type CreateLoadBalancerListenerPolicyRuleOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// The listener identifier.
- ListenerID *string `validate:"required,ne="`
+ ListenerID *string `json:"listener_id" validate:"required,ne="`
// The policy identifier.
- PolicyID *string `validate:"required,ne="`
+ PolicyID *string `json:"policy_id" validate:"required,ne="`
// The condition of the rule.
- Condition *string `validate:"required"`
+ Condition *string `json:"condition" validate:"required"`
// The type of the rule.
//
// Body rules are applied to form-encoded request bodies using the `UTF-8` character set.
- Type *string `validate:"required"`
+ Type *string `json:"type" validate:"required"`
// Value to be matched for rule condition.
//
// If the rule type is `query` and the rule condition is not `matches_regex`, the value must be percent-encoded.
- Value *string `validate:"required"`
+ Value *string `json:"value" validate:"required"`
// The field. This is applicable to `header`, `query`, and `body` rule types.
//
- // If the rule type is `header`, this field is required.
+ // If the rule type is `header`, this property is required.
//
// If the rule type is `query`, this is optional. If specified and the rule condition is not
// `matches_regex`, the value must be percent-encoded.
//
// If the rule type is `body`, this is optional.
- Field *string
+ Field *string `json:"field,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -18251,45 +23944,45 @@ func (*VpcV1) NewCreateLoadBalancerListenerPolicyRuleOptions(loadBalancerID stri
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *CreateLoadBalancerListenerPolicyRuleOptions) SetLoadBalancerID(loadBalancerID string) *CreateLoadBalancerListenerPolicyRuleOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *CreateLoadBalancerListenerPolicyRuleOptions) SetLoadBalancerID(loadBalancerID string) *CreateLoadBalancerListenerPolicyRuleOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetListenerID : Allow user to set ListenerID
-func (options *CreateLoadBalancerListenerPolicyRuleOptions) SetListenerID(listenerID string) *CreateLoadBalancerListenerPolicyRuleOptions {
- options.ListenerID = core.StringPtr(listenerID)
- return options
+func (_options *CreateLoadBalancerListenerPolicyRuleOptions) SetListenerID(listenerID string) *CreateLoadBalancerListenerPolicyRuleOptions {
+ _options.ListenerID = core.StringPtr(listenerID)
+ return _options
}
// SetPolicyID : Allow user to set PolicyID
-func (options *CreateLoadBalancerListenerPolicyRuleOptions) SetPolicyID(policyID string) *CreateLoadBalancerListenerPolicyRuleOptions {
- options.PolicyID = core.StringPtr(policyID)
- return options
+func (_options *CreateLoadBalancerListenerPolicyRuleOptions) SetPolicyID(policyID string) *CreateLoadBalancerListenerPolicyRuleOptions {
+ _options.PolicyID = core.StringPtr(policyID)
+ return _options
}
// SetCondition : Allow user to set Condition
-func (options *CreateLoadBalancerListenerPolicyRuleOptions) SetCondition(condition string) *CreateLoadBalancerListenerPolicyRuleOptions {
- options.Condition = core.StringPtr(condition)
- return options
+func (_options *CreateLoadBalancerListenerPolicyRuleOptions) SetCondition(condition string) *CreateLoadBalancerListenerPolicyRuleOptions {
+ _options.Condition = core.StringPtr(condition)
+ return _options
}
// SetType : Allow user to set Type
-func (options *CreateLoadBalancerListenerPolicyRuleOptions) SetType(typeVar string) *CreateLoadBalancerListenerPolicyRuleOptions {
- options.Type = core.StringPtr(typeVar)
- return options
+func (_options *CreateLoadBalancerListenerPolicyRuleOptions) SetType(typeVar string) *CreateLoadBalancerListenerPolicyRuleOptions {
+ _options.Type = core.StringPtr(typeVar)
+ return _options
}
// SetValue : Allow user to set Value
-func (options *CreateLoadBalancerListenerPolicyRuleOptions) SetValue(value string) *CreateLoadBalancerListenerPolicyRuleOptions {
- options.Value = core.StringPtr(value)
- return options
+func (_options *CreateLoadBalancerListenerPolicyRuleOptions) SetValue(value string) *CreateLoadBalancerListenerPolicyRuleOptions {
+ _options.Value = core.StringPtr(value)
+ return _options
}
// SetField : Allow user to set Field
-func (options *CreateLoadBalancerListenerPolicyRuleOptions) SetField(field string) *CreateLoadBalancerListenerPolicyRuleOptions {
- options.Field = core.StringPtr(field)
- return options
+func (_options *CreateLoadBalancerListenerPolicyRuleOptions) SetField(field string) *CreateLoadBalancerListenerPolicyRuleOptions {
+ _options.Field = core.StringPtr(field)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -18301,13 +23994,18 @@ func (options *CreateLoadBalancerListenerPolicyRuleOptions) SetHeaders(param map
// CreateLoadBalancerOptions : The CreateLoadBalancer options.
type CreateLoadBalancerOptions struct {
// Indicates whether this load balancer is public or private.
- IsPublic *bool `validate:"required"`
+ //
+ // At present, if route mode is enabled, the load balancer must be private.
+ IsPublic *bool `json:"is_public" validate:"required"`
- // The subnets to provision this load balancer.
- Subnets []SubnetIdentityIntf `validate:"required"`
+ // The subnets to provision this load balancer in. The load balancer's availability will depend on the availability of
+ // the zones the specified subnets reside in.
+ //
+ // Load balancers in the `network` family allow only one subnet to be specified.
+ Subnets []SubnetIdentityIntf `json:"subnets" validate:"required"`
// The listeners of this load balancer.
- Listeners []LoadBalancerListenerPrototypeLoadBalancerContext
+ Listeners []LoadBalancerListenerPrototypeLoadBalancerContext `json:"listeners,omitempty"`
// The logging configuration to use for this load balancer. See [VPC Datapath
// Logging](https://cloud.ibm.com/docs/vpc?topic=vpc-datapath-logging)
@@ -18315,26 +24013,33 @@ type CreateLoadBalancerOptions struct {
//
// To activate logging, the load balancer profile must support the specified logging
// type.
- Logging *LoadBalancerLogging
+ Logging *LoadBalancerLogging `json:"logging,omitempty"`
// The user-defined name for this load balancer. If unspecified, the name will be a hyphenated list of
// randomly-selected words.
- Name *string
+ Name *string `json:"name,omitempty"`
// The pools of this load balancer.
- Pools []LoadBalancerPoolPrototype
+ Pools []LoadBalancerPoolPrototype `json:"pools,omitempty"`
- // The profile to use for this load balancer.
- Profile LoadBalancerProfileIdentityIntf
+ // The profile to use for this load balancer
+ //
+ // If unspecified, `application` will be used.
+ Profile LoadBalancerProfileIdentityIntf `json:"profile,omitempty"`
// The resource group to use. If unspecified, the account's [default resource
// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
- ResourceGroup ResourceGroupIdentityIntf
+ ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
- // The security groups to use for this load balancer.
+ // Indicates whether route mode is enabled for this load balancer.
+ //
+ // At present, public load balancers are not supported with route mode enabled.
+ RouteMode *bool `json:"route_mode,omitempty"`
+
+ // The security groups to use for this load balancer. If unspecified, the VPC's default security group is used.
//
// The load balancer profile must support security groups.
- SecurityGroups []SecurityGroupIdentityIntf
+ SecurityGroups []SecurityGroupIdentityIntf `json:"security_groups,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -18349,57 +24054,63 @@ func (*VpcV1) NewCreateLoadBalancerOptions(isPublic bool, subnets []SubnetIdenti
}
// SetIsPublic : Allow user to set IsPublic
-func (options *CreateLoadBalancerOptions) SetIsPublic(isPublic bool) *CreateLoadBalancerOptions {
- options.IsPublic = core.BoolPtr(isPublic)
- return options
+func (_options *CreateLoadBalancerOptions) SetIsPublic(isPublic bool) *CreateLoadBalancerOptions {
+ _options.IsPublic = core.BoolPtr(isPublic)
+ return _options
}
// SetSubnets : Allow user to set Subnets
-func (options *CreateLoadBalancerOptions) SetSubnets(subnets []SubnetIdentityIntf) *CreateLoadBalancerOptions {
- options.Subnets = subnets
- return options
+func (_options *CreateLoadBalancerOptions) SetSubnets(subnets []SubnetIdentityIntf) *CreateLoadBalancerOptions {
+ _options.Subnets = subnets
+ return _options
}
// SetListeners : Allow user to set Listeners
-func (options *CreateLoadBalancerOptions) SetListeners(listeners []LoadBalancerListenerPrototypeLoadBalancerContext) *CreateLoadBalancerOptions {
- options.Listeners = listeners
- return options
+func (_options *CreateLoadBalancerOptions) SetListeners(listeners []LoadBalancerListenerPrototypeLoadBalancerContext) *CreateLoadBalancerOptions {
+ _options.Listeners = listeners
+ return _options
}
// SetLogging : Allow user to set Logging
-func (options *CreateLoadBalancerOptions) SetLogging(logging *LoadBalancerLogging) *CreateLoadBalancerOptions {
- options.Logging = logging
- return options
+func (_options *CreateLoadBalancerOptions) SetLogging(logging *LoadBalancerLogging) *CreateLoadBalancerOptions {
+ _options.Logging = logging
+ return _options
}
// SetName : Allow user to set Name
-func (options *CreateLoadBalancerOptions) SetName(name string) *CreateLoadBalancerOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *CreateLoadBalancerOptions) SetName(name string) *CreateLoadBalancerOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetPools : Allow user to set Pools
-func (options *CreateLoadBalancerOptions) SetPools(pools []LoadBalancerPoolPrototype) *CreateLoadBalancerOptions {
- options.Pools = pools
- return options
+func (_options *CreateLoadBalancerOptions) SetPools(pools []LoadBalancerPoolPrototype) *CreateLoadBalancerOptions {
+ _options.Pools = pools
+ return _options
}
// SetProfile : Allow user to set Profile
-func (options *CreateLoadBalancerOptions) SetProfile(profile LoadBalancerProfileIdentityIntf) *CreateLoadBalancerOptions {
- options.Profile = profile
- return options
+func (_options *CreateLoadBalancerOptions) SetProfile(profile LoadBalancerProfileIdentityIntf) *CreateLoadBalancerOptions {
+ _options.Profile = profile
+ return _options
}
// SetResourceGroup : Allow user to set ResourceGroup
-func (options *CreateLoadBalancerOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateLoadBalancerOptions {
- options.ResourceGroup = resourceGroup
- return options
+func (_options *CreateLoadBalancerOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateLoadBalancerOptions {
+ _options.ResourceGroup = resourceGroup
+ return _options
+}
+
+// SetRouteMode : Allow user to set RouteMode
+func (_options *CreateLoadBalancerOptions) SetRouteMode(routeMode bool) *CreateLoadBalancerOptions {
+ _options.RouteMode = core.BoolPtr(routeMode)
+ return _options
}
// SetSecurityGroups : Allow user to set SecurityGroups
-func (options *CreateLoadBalancerOptions) SetSecurityGroups(securityGroups []SecurityGroupIdentityIntf) *CreateLoadBalancerOptions {
- options.SecurityGroups = securityGroups
- return options
+func (_options *CreateLoadBalancerOptions) SetSecurityGroups(securityGroups []SecurityGroupIdentityIntf) *CreateLoadBalancerOptions {
+ _options.SecurityGroups = securityGroups
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -18411,21 +24122,30 @@ func (options *CreateLoadBalancerOptions) SetHeaders(param map[string]string) *C
// CreateLoadBalancerPoolMemberOptions : The CreateLoadBalancerPoolMember options.
type CreateLoadBalancerPoolMemberOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// The pool identifier.
- PoolID *string `validate:"required,ne="`
+ PoolID *string `json:"pool_id" validate:"required,ne="`
- // The port number of the application running in the server member.
- Port *int64 `validate:"required"`
+ // The port the member will receive load balancer traffic on. Applies only to load balancer traffic received on a
+ // listener with a single port. (If the traffic is received on a listener with a port range, the member will receive
+ // the traffic on the same port the listener received it on.)
+ //
+ // This port will also be used for health checks unless the `port` property of
+ // `health_monitor` property is specified.
+ //
+ // The port must be unique across all members for all pools associated with this pool's listener.
+ Port *int64 `json:"port" validate:"required"`
// The pool member target. Load balancers in the `network` family support virtual server
- // instances. Load balancers in the `application` family support IP addresses.
- Target LoadBalancerPoolMemberTargetPrototypeIntf `validate:"required"`
+ // instances in the same zone as the load balancer's subnet. Load balancers in the
+ // `application` family support any IP address in the VPC. If the load balancer has
+ // `route mode` enabled, the member must be in a zone the load balancer has a subnet in.
+ Target LoadBalancerPoolMemberTargetPrototypeIntf `json:"target" validate:"required"`
// Weight of the server member. Applicable only if the pool algorithm is
// `weighted_round_robin`.
- Weight *int64
+ Weight *int64 `json:"weight,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -18442,33 +24162,33 @@ func (*VpcV1) NewCreateLoadBalancerPoolMemberOptions(loadBalancerID string, pool
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *CreateLoadBalancerPoolMemberOptions) SetLoadBalancerID(loadBalancerID string) *CreateLoadBalancerPoolMemberOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *CreateLoadBalancerPoolMemberOptions) SetLoadBalancerID(loadBalancerID string) *CreateLoadBalancerPoolMemberOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetPoolID : Allow user to set PoolID
-func (options *CreateLoadBalancerPoolMemberOptions) SetPoolID(poolID string) *CreateLoadBalancerPoolMemberOptions {
- options.PoolID = core.StringPtr(poolID)
- return options
+func (_options *CreateLoadBalancerPoolMemberOptions) SetPoolID(poolID string) *CreateLoadBalancerPoolMemberOptions {
+ _options.PoolID = core.StringPtr(poolID)
+ return _options
}
// SetPort : Allow user to set Port
-func (options *CreateLoadBalancerPoolMemberOptions) SetPort(port int64) *CreateLoadBalancerPoolMemberOptions {
- options.Port = core.Int64Ptr(port)
- return options
+func (_options *CreateLoadBalancerPoolMemberOptions) SetPort(port int64) *CreateLoadBalancerPoolMemberOptions {
+ _options.Port = core.Int64Ptr(port)
+ return _options
}
// SetTarget : Allow user to set Target
-func (options *CreateLoadBalancerPoolMemberOptions) SetTarget(target LoadBalancerPoolMemberTargetPrototypeIntf) *CreateLoadBalancerPoolMemberOptions {
- options.Target = target
- return options
+func (_options *CreateLoadBalancerPoolMemberOptions) SetTarget(target LoadBalancerPoolMemberTargetPrototypeIntf) *CreateLoadBalancerPoolMemberOptions {
+ _options.Target = target
+ return _options
}
// SetWeight : Allow user to set Weight
-func (options *CreateLoadBalancerPoolMemberOptions) SetWeight(weight int64) *CreateLoadBalancerPoolMemberOptions {
- options.Weight = core.Int64Ptr(weight)
- return options
+func (_options *CreateLoadBalancerPoolMemberOptions) SetWeight(weight int64) *CreateLoadBalancerPoolMemberOptions {
+ _options.Weight = core.Int64Ptr(weight)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -18480,26 +24200,26 @@ func (options *CreateLoadBalancerPoolMemberOptions) SetHeaders(param map[string]
// CreateLoadBalancerPoolOptions : The CreateLoadBalancerPool options.
type CreateLoadBalancerPoolOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// The load balancing algorithm.
- Algorithm *string `validate:"required"`
+ Algorithm *string `json:"algorithm" validate:"required"`
// The health monitor of this pool.
- HealthMonitor *LoadBalancerPoolHealthMonitorPrototype `validate:"required"`
+ HealthMonitor *LoadBalancerPoolHealthMonitorPrototype `json:"health_monitor" validate:"required"`
- // The protocol used for this load balancer pool. Load balancers in the `network` family support `tcp`. Load balancers
- // in the `application` family support `tcp`, `http`, and
- // `https`.
- Protocol *string `validate:"required"`
+ // The protocol used for this load balancer pool. Load balancers in the `network` family support `tcp` and `udp` (if
+ // `udp_supported` is `true`). Load balancers in the
+ // `application` family support `tcp`, `http`, and `https`.
+ Protocol *string `json:"protocol" validate:"required"`
// The members for this load balancer pool. For load balancers in the `network` family, the same `port` and `target`
// tuple cannot be shared by a pool member of any other load balancer in the same VPC.
- Members []LoadBalancerPoolMemberPrototype
+ Members []LoadBalancerPoolMemberPrototype `json:"members,omitempty"`
// The user-defined name for this load balancer pool. If unspecified, the name will be a hyphenated list of
// randomly-selected words.
- Name *string
+ Name *string `json:"name,omitempty"`
// The PROXY protocol setting for this pool:
// - `v1`: Enabled with version 1 (human-readable header format)
@@ -18507,10 +24227,10 @@ type CreateLoadBalancerPoolOptions struct {
// - `disabled`: Disabled
//
// Supported by load balancers in the `application` family (otherwise always `disabled`).
- ProxyProtocol *string
+ ProxyProtocol *string `json:"proxy_protocol,omitempty"`
// The session persistence of this pool.
- SessionPersistence *LoadBalancerPoolSessionPersistencePrototype
+ SessionPersistence *LoadBalancerPoolSessionPersistencePrototype `json:"session_persistence,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -18525,13 +24245,14 @@ const (
)
// Constants associated with the CreateLoadBalancerPoolOptions.Protocol property.
-// The protocol used for this load balancer pool. Load balancers in the `network` family support `tcp`. Load balancers
-// in the `application` family support `tcp`, `http`, and
-// `https`.
+// The protocol used for this load balancer pool. Load balancers in the `network` family support `tcp` and `udp` (if
+// `udp_supported` is `true`). Load balancers in the
+// `application` family support `tcp`, `http`, and `https`.
const (
CreateLoadBalancerPoolOptionsProtocolHTTPConst = "http"
CreateLoadBalancerPoolOptionsProtocolHTTPSConst = "https"
CreateLoadBalancerPoolOptionsProtocolTCPConst = "tcp"
+ CreateLoadBalancerPoolOptionsProtocolUDPConst = "udp"
)
// Constants associated with the CreateLoadBalancerPoolOptions.ProxyProtocol property.
@@ -18558,51 +24279,51 @@ func (*VpcV1) NewCreateLoadBalancerPoolOptions(loadBalancerID string, algorithm
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *CreateLoadBalancerPoolOptions) SetLoadBalancerID(loadBalancerID string) *CreateLoadBalancerPoolOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *CreateLoadBalancerPoolOptions) SetLoadBalancerID(loadBalancerID string) *CreateLoadBalancerPoolOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetAlgorithm : Allow user to set Algorithm
-func (options *CreateLoadBalancerPoolOptions) SetAlgorithm(algorithm string) *CreateLoadBalancerPoolOptions {
- options.Algorithm = core.StringPtr(algorithm)
- return options
+func (_options *CreateLoadBalancerPoolOptions) SetAlgorithm(algorithm string) *CreateLoadBalancerPoolOptions {
+ _options.Algorithm = core.StringPtr(algorithm)
+ return _options
}
// SetHealthMonitor : Allow user to set HealthMonitor
-func (options *CreateLoadBalancerPoolOptions) SetHealthMonitor(healthMonitor *LoadBalancerPoolHealthMonitorPrototype) *CreateLoadBalancerPoolOptions {
- options.HealthMonitor = healthMonitor
- return options
+func (_options *CreateLoadBalancerPoolOptions) SetHealthMonitor(healthMonitor *LoadBalancerPoolHealthMonitorPrototype) *CreateLoadBalancerPoolOptions {
+ _options.HealthMonitor = healthMonitor
+ return _options
}
// SetProtocol : Allow user to set Protocol
-func (options *CreateLoadBalancerPoolOptions) SetProtocol(protocol string) *CreateLoadBalancerPoolOptions {
- options.Protocol = core.StringPtr(protocol)
- return options
+func (_options *CreateLoadBalancerPoolOptions) SetProtocol(protocol string) *CreateLoadBalancerPoolOptions {
+ _options.Protocol = core.StringPtr(protocol)
+ return _options
}
// SetMembers : Allow user to set Members
-func (options *CreateLoadBalancerPoolOptions) SetMembers(members []LoadBalancerPoolMemberPrototype) *CreateLoadBalancerPoolOptions {
- options.Members = members
- return options
+func (_options *CreateLoadBalancerPoolOptions) SetMembers(members []LoadBalancerPoolMemberPrototype) *CreateLoadBalancerPoolOptions {
+ _options.Members = members
+ return _options
}
// SetName : Allow user to set Name
-func (options *CreateLoadBalancerPoolOptions) SetName(name string) *CreateLoadBalancerPoolOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *CreateLoadBalancerPoolOptions) SetName(name string) *CreateLoadBalancerPoolOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetProxyProtocol : Allow user to set ProxyProtocol
-func (options *CreateLoadBalancerPoolOptions) SetProxyProtocol(proxyProtocol string) *CreateLoadBalancerPoolOptions {
- options.ProxyProtocol = core.StringPtr(proxyProtocol)
- return options
+func (_options *CreateLoadBalancerPoolOptions) SetProxyProtocol(proxyProtocol string) *CreateLoadBalancerPoolOptions {
+ _options.ProxyProtocol = core.StringPtr(proxyProtocol)
+ return _options
}
// SetSessionPersistence : Allow user to set SessionPersistence
-func (options *CreateLoadBalancerPoolOptions) SetSessionPersistence(sessionPersistence *LoadBalancerPoolSessionPersistencePrototype) *CreateLoadBalancerPoolOptions {
- options.SessionPersistence = sessionPersistence
- return options
+func (_options *CreateLoadBalancerPoolOptions) SetSessionPersistence(sessionPersistence *LoadBalancerPoolSessionPersistencePrototype) *CreateLoadBalancerPoolOptions {
+ _options.SessionPersistence = sessionPersistence
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -18614,7 +24335,7 @@ func (options *CreateLoadBalancerPoolOptions) SetHeaders(param map[string]string
// CreateNetworkACLOptions : The CreateNetworkACL options.
type CreateNetworkACLOptions struct {
// The network ACL prototype object.
- NetworkACLPrototype NetworkACLPrototypeIntf
+ NetworkACLPrototype NetworkACLPrototypeIntf `json:"NetworkACLPrototype,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -18626,9 +24347,9 @@ func (*VpcV1) NewCreateNetworkACLOptions() *CreateNetworkACLOptions {
}
// SetNetworkACLPrototype : Allow user to set NetworkACLPrototype
-func (options *CreateNetworkACLOptions) SetNetworkACLPrototype(networkACLPrototype NetworkACLPrototypeIntf) *CreateNetworkACLOptions {
- options.NetworkACLPrototype = networkACLPrototype
- return options
+func (_options *CreateNetworkACLOptions) SetNetworkACLPrototype(networkACLPrototype NetworkACLPrototypeIntf) *CreateNetworkACLOptions {
+ _options.NetworkACLPrototype = networkACLPrototype
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -18640,10 +24361,10 @@ func (options *CreateNetworkACLOptions) SetHeaders(param map[string]string) *Cre
// CreateNetworkACLRuleOptions : The CreateNetworkACLRule options.
type CreateNetworkACLRuleOptions struct {
// The network ACL identifier.
- NetworkACLID *string `validate:"required,ne="`
+ NetworkACLID *string `json:"network_acl_id" validate:"required,ne="`
// The network ACL rule prototype object.
- NetworkACLRulePrototype NetworkACLRulePrototypeIntf `validate:"required"`
+ NetworkACLRulePrototype NetworkACLRulePrototypeIntf `json:"NetworkACLRulePrototype" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -18658,15 +24379,15 @@ func (*VpcV1) NewCreateNetworkACLRuleOptions(networkACLID string, networkACLRule
}
// SetNetworkACLID : Allow user to set NetworkACLID
-func (options *CreateNetworkACLRuleOptions) SetNetworkACLID(networkACLID string) *CreateNetworkACLRuleOptions {
- options.NetworkACLID = core.StringPtr(networkACLID)
- return options
+func (_options *CreateNetworkACLRuleOptions) SetNetworkACLID(networkACLID string) *CreateNetworkACLRuleOptions {
+ _options.NetworkACLID = core.StringPtr(networkACLID)
+ return _options
}
// SetNetworkACLRulePrototype : Allow user to set NetworkACLRulePrototype
-func (options *CreateNetworkACLRuleOptions) SetNetworkACLRulePrototype(networkACLRulePrototype NetworkACLRulePrototypeIntf) *CreateNetworkACLRuleOptions {
- options.NetworkACLRulePrototype = networkACLRulePrototype
- return options
+func (_options *CreateNetworkACLRuleOptions) SetNetworkACLRulePrototype(networkACLRulePrototype NetworkACLRulePrototypeIntf) *CreateNetworkACLRuleOptions {
+ _options.NetworkACLRulePrototype = networkACLRulePrototype
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -18675,23 +24396,90 @@ func (options *CreateNetworkACLRuleOptions) SetHeaders(param map[string]string)
return options
}
-// CreatePublicGatewayOptions : The CreatePublicGateway options.
-type CreatePublicGatewayOptions struct {
- // The VPC this public gateway will serve.
- VPC VPCIdentityIntf `validate:"required"`
+// CreatePlacementGroupOptions : The CreatePlacementGroup options.
+type CreatePlacementGroupOptions struct {
+ // The strategy for this placement group
+ // - `host_spread`: place on different compute hosts
+ // - `power_spread`: place on compute hosts that use different power sources
+ //
+ // The enumerated values for this property may expand in the future. When processing this property, check for and log
+ // unknown values. Optionally halt processing and surface the error, or bypass the placement group on which the
+ // unexpected strategy was encountered.
+ Strategy *string `json:"strategy" validate:"required"`
- // The zone this public gateway will reside in.
- Zone ZoneIdentityIntf `validate:"required"`
-
- FloatingIP PublicGatewayFloatingIPPrototypeIntf
-
- // The user-defined name for this public gateway. Names must be unique within the VPC the public gateway resides in. If
- // unspecified, the name will be a hyphenated list of randomly-selected words.
- Name *string
+ // The unique user-defined name for this placement group. If unspecified, the name will be a hyphenated list of
+ // randomly-selected words.
+ Name *string `json:"name,omitempty"`
// The resource group to use. If unspecified, the account's [default resource
// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
- ResourceGroup ResourceGroupIdentityIntf
+ ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// Constants associated with the CreatePlacementGroupOptions.Strategy property.
+// The strategy for this placement group
+// - `host_spread`: place on different compute hosts
+// - `power_spread`: place on compute hosts that use different power sources
+//
+// The enumerated values for this property may expand in the future. When processing this property, check for and log
+// unknown values. Optionally halt processing and surface the error, or bypass the placement group on which the
+// unexpected strategy was encountered.
+const (
+ CreatePlacementGroupOptionsStrategyHostSpreadConst = "host_spread"
+ CreatePlacementGroupOptionsStrategyPowerSpreadConst = "power_spread"
+)
+
+// NewCreatePlacementGroupOptions : Instantiate CreatePlacementGroupOptions
+func (*VpcV1) NewCreatePlacementGroupOptions(strategy string) *CreatePlacementGroupOptions {
+ return &CreatePlacementGroupOptions{
+ Strategy: core.StringPtr(strategy),
+ }
+}
+
+// SetStrategy : Allow user to set Strategy
+func (_options *CreatePlacementGroupOptions) SetStrategy(strategy string) *CreatePlacementGroupOptions {
+ _options.Strategy = core.StringPtr(strategy)
+ return _options
+}
+
+// SetName : Allow user to set Name
+func (_options *CreatePlacementGroupOptions) SetName(name string) *CreatePlacementGroupOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
+}
+
+// SetResourceGroup : Allow user to set ResourceGroup
+func (_options *CreatePlacementGroupOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreatePlacementGroupOptions {
+ _options.ResourceGroup = resourceGroup
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *CreatePlacementGroupOptions) SetHeaders(param map[string]string) *CreatePlacementGroupOptions {
+ options.Headers = param
+ return options
+}
+
+// CreatePublicGatewayOptions : The CreatePublicGateway options.
+type CreatePublicGatewayOptions struct {
+ // The VPC this public gateway will serve.
+ VPC VPCIdentityIntf `json:"vpc" validate:"required"`
+
+ // The zone this public gateway will reside in.
+ Zone ZoneIdentityIntf `json:"zone" validate:"required"`
+
+ FloatingIP PublicGatewayFloatingIPPrototypeIntf `json:"floating_ip,omitempty"`
+
+ // The user-defined name for this public gateway. Names must be unique within the VPC the public gateway resides in. If
+ // unspecified, the name will be a hyphenated list of randomly-selected words.
+ Name *string `json:"name,omitempty"`
+
+ // The resource group to use. If unspecified, the account's [default resource
+ // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
+ ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -18706,33 +24494,33 @@ func (*VpcV1) NewCreatePublicGatewayOptions(vpc VPCIdentityIntf, zone ZoneIdenti
}
// SetVPC : Allow user to set VPC
-func (options *CreatePublicGatewayOptions) SetVPC(vpc VPCIdentityIntf) *CreatePublicGatewayOptions {
- options.VPC = vpc
- return options
+func (_options *CreatePublicGatewayOptions) SetVPC(vpc VPCIdentityIntf) *CreatePublicGatewayOptions {
+ _options.VPC = vpc
+ return _options
}
// SetZone : Allow user to set Zone
-func (options *CreatePublicGatewayOptions) SetZone(zone ZoneIdentityIntf) *CreatePublicGatewayOptions {
- options.Zone = zone
- return options
+func (_options *CreatePublicGatewayOptions) SetZone(zone ZoneIdentityIntf) *CreatePublicGatewayOptions {
+ _options.Zone = zone
+ return _options
}
// SetFloatingIP : Allow user to set FloatingIP
-func (options *CreatePublicGatewayOptions) SetFloatingIP(floatingIP PublicGatewayFloatingIPPrototypeIntf) *CreatePublicGatewayOptions {
- options.FloatingIP = floatingIP
- return options
+func (_options *CreatePublicGatewayOptions) SetFloatingIP(floatingIP PublicGatewayFloatingIPPrototypeIntf) *CreatePublicGatewayOptions {
+ _options.FloatingIP = floatingIP
+ return _options
}
// SetName : Allow user to set Name
-func (options *CreatePublicGatewayOptions) SetName(name string) *CreatePublicGatewayOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *CreatePublicGatewayOptions) SetName(name string) *CreatePublicGatewayOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetResourceGroup : Allow user to set ResourceGroup
-func (options *CreatePublicGatewayOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreatePublicGatewayOptions {
- options.ResourceGroup = resourceGroup
- return options
+func (_options *CreatePublicGatewayOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreatePublicGatewayOptions {
+ _options.ResourceGroup = resourceGroup
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -18744,19 +24532,19 @@ func (options *CreatePublicGatewayOptions) SetHeaders(param map[string]string) *
// CreateSecurityGroupOptions : The CreateSecurityGroup options.
type CreateSecurityGroupOptions struct {
// The VPC this security group is to be a part of.
- VPC VPCIdentityIntf `validate:"required"`
+ VPC VPCIdentityIntf `json:"vpc" validate:"required"`
// The user-defined name for this security group. If unspecified, the name will be a hyphenated list of
// randomly-selected words. Names must be unique within the VPC the security group resides in.
- Name *string
+ Name *string `json:"name,omitempty"`
// The resource group to use. If unspecified, the account's [default resource
// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
- ResourceGroup ResourceGroupIdentityIntf
+ ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
- // Array of rule prototype objects for rules to be created for this security group. If unspecified, no rules will be
- // created, resulting in all traffic being denied.
- Rules []SecurityGroupRulePrototypeIntf
+ // The prototype objects for rules to be created for this security group. If unspecified, no rules will be created,
+ // resulting in all traffic being denied.
+ Rules []SecurityGroupRulePrototypeIntf `json:"rules,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -18770,27 +24558,27 @@ func (*VpcV1) NewCreateSecurityGroupOptions(vpc VPCIdentityIntf) *CreateSecurity
}
// SetVPC : Allow user to set VPC
-func (options *CreateSecurityGroupOptions) SetVPC(vpc VPCIdentityIntf) *CreateSecurityGroupOptions {
- options.VPC = vpc
- return options
+func (_options *CreateSecurityGroupOptions) SetVPC(vpc VPCIdentityIntf) *CreateSecurityGroupOptions {
+ _options.VPC = vpc
+ return _options
}
// SetName : Allow user to set Name
-func (options *CreateSecurityGroupOptions) SetName(name string) *CreateSecurityGroupOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *CreateSecurityGroupOptions) SetName(name string) *CreateSecurityGroupOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetResourceGroup : Allow user to set ResourceGroup
-func (options *CreateSecurityGroupOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateSecurityGroupOptions {
- options.ResourceGroup = resourceGroup
- return options
+func (_options *CreateSecurityGroupOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateSecurityGroupOptions {
+ _options.ResourceGroup = resourceGroup
+ return _options
}
// SetRules : Allow user to set Rules
-func (options *CreateSecurityGroupOptions) SetRules(rules []SecurityGroupRulePrototypeIntf) *CreateSecurityGroupOptions {
- options.Rules = rules
- return options
+func (_options *CreateSecurityGroupOptions) SetRules(rules []SecurityGroupRulePrototypeIntf) *CreateSecurityGroupOptions {
+ _options.Rules = rules
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -18802,10 +24590,10 @@ func (options *CreateSecurityGroupOptions) SetHeaders(param map[string]string) *
// CreateSecurityGroupRuleOptions : The CreateSecurityGroupRule options.
type CreateSecurityGroupRuleOptions struct {
// The security group identifier.
- SecurityGroupID *string `validate:"required,ne="`
+ SecurityGroupID *string `json:"security_group_id" validate:"required,ne="`
// The properties of the security group rule to be created.
- SecurityGroupRulePrototype SecurityGroupRulePrototypeIntf `validate:"required"`
+ SecurityGroupRulePrototype SecurityGroupRulePrototypeIntf `json:"SecurityGroupRulePrototype" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -18820,15 +24608,15 @@ func (*VpcV1) NewCreateSecurityGroupRuleOptions(securityGroupID string, security
}
// SetSecurityGroupID : Allow user to set SecurityGroupID
-func (options *CreateSecurityGroupRuleOptions) SetSecurityGroupID(securityGroupID string) *CreateSecurityGroupRuleOptions {
- options.SecurityGroupID = core.StringPtr(securityGroupID)
- return options
+func (_options *CreateSecurityGroupRuleOptions) SetSecurityGroupID(securityGroupID string) *CreateSecurityGroupRuleOptions {
+ _options.SecurityGroupID = core.StringPtr(securityGroupID)
+ return _options
}
// SetSecurityGroupRulePrototype : Allow user to set SecurityGroupRulePrototype
-func (options *CreateSecurityGroupRuleOptions) SetSecurityGroupRulePrototype(securityGroupRulePrototype SecurityGroupRulePrototypeIntf) *CreateSecurityGroupRuleOptions {
- options.SecurityGroupRulePrototype = securityGroupRulePrototype
- return options
+func (_options *CreateSecurityGroupRuleOptions) SetSecurityGroupRulePrototype(securityGroupRulePrototype SecurityGroupRulePrototypeIntf) *CreateSecurityGroupRuleOptions {
+ _options.SecurityGroupRulePrototype = securityGroupRulePrototype
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -18840,10 +24628,10 @@ func (options *CreateSecurityGroupRuleOptions) SetHeaders(param map[string]strin
// CreateSecurityGroupTargetBindingOptions : The CreateSecurityGroupTargetBinding options.
type CreateSecurityGroupTargetBindingOptions struct {
// The security group identifier.
- SecurityGroupID *string `validate:"required,ne="`
+ SecurityGroupID *string `json:"security_group_id" validate:"required,ne="`
// The security group target identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -18858,15 +24646,15 @@ func (*VpcV1) NewCreateSecurityGroupTargetBindingOptions(securityGroupID string,
}
// SetSecurityGroupID : Allow user to set SecurityGroupID
-func (options *CreateSecurityGroupTargetBindingOptions) SetSecurityGroupID(securityGroupID string) *CreateSecurityGroupTargetBindingOptions {
- options.SecurityGroupID = core.StringPtr(securityGroupID)
- return options
+func (_options *CreateSecurityGroupTargetBindingOptions) SetSecurityGroupID(securityGroupID string) *CreateSecurityGroupTargetBindingOptions {
+ _options.SecurityGroupID = core.StringPtr(securityGroupID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *CreateSecurityGroupTargetBindingOptions) SetID(id string) *CreateSecurityGroupTargetBindingOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *CreateSecurityGroupTargetBindingOptions) SetID(id string) *CreateSecurityGroupTargetBindingOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -18875,10 +24663,38 @@ func (options *CreateSecurityGroupTargetBindingOptions) SetHeaders(param map[str
return options
}
+// CreateSnapshotOptions : The CreateSnapshot options.
+type CreateSnapshotOptions struct {
+ // The snapshot prototype object.
+ SnapshotPrototype SnapshotPrototypeIntf `json:"SnapshotPrototype" validate:"required"`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewCreateSnapshotOptions : Instantiate CreateSnapshotOptions
+func (*VpcV1) NewCreateSnapshotOptions(snapshotPrototype SnapshotPrototypeIntf) *CreateSnapshotOptions {
+ return &CreateSnapshotOptions{
+ SnapshotPrototype: snapshotPrototype,
+ }
+}
+
+// SetSnapshotPrototype : Allow user to set SnapshotPrototype
+func (_options *CreateSnapshotOptions) SetSnapshotPrototype(snapshotPrototype SnapshotPrototypeIntf) *CreateSnapshotOptions {
+ _options.SnapshotPrototype = snapshotPrototype
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *CreateSnapshotOptions) SetHeaders(param map[string]string) *CreateSnapshotOptions {
+ options.Headers = param
+ return options
+}
+
// CreateSubnetOptions : The CreateSubnet options.
type CreateSubnetOptions struct {
// The subnet prototype object.
- SubnetPrototype SubnetPrototypeIntf `validate:"required"`
+ SubnetPrototype SubnetPrototypeIntf `json:"SubnetPrototype" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -18892,9 +24708,9 @@ func (*VpcV1) NewCreateSubnetOptions(subnetPrototype SubnetPrototypeIntf) *Creat
}
// SetSubnetPrototype : Allow user to set SubnetPrototype
-func (options *CreateSubnetOptions) SetSubnetPrototype(subnetPrototype SubnetPrototypeIntf) *CreateSubnetOptions {
- options.SubnetPrototype = subnetPrototype
- return options
+func (_options *CreateSubnetOptions) SetSubnetPrototype(subnetPrototype SubnetPrototypeIntf) *CreateSubnetOptions {
+ _options.SubnetPrototype = subnetPrototype
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -18906,19 +24722,25 @@ func (options *CreateSubnetOptions) SetHeaders(param map[string]string) *CreateS
// CreateSubnetReservedIPOptions : The CreateSubnetReservedIP options.
type CreateSubnetReservedIPOptions struct {
// The subnet identifier.
- SubnetID *string `validate:"required,ne="`
+ SubnetID *string `json:"subnet_id" validate:"required,ne="`
- // If set to `true`, this reserved IP will be automatically deleted when the target is deleted or when the reserved IP
- // is unbound. The value cannot be set to `true` if the reserved IP is unbound.
- AutoDelete *bool
+ // The IP address to reserve, which must not already be reserved on the subnet.
+ //
+ // If unspecified, an available address on the subnet will automatically be selected.
+ Address *string `json:"address,omitempty"`
- // The user-defined name for this reserved IP. If not specified, the name will be a hyphenated list of
- // randomly-selected words. Names must be unique within the subnet the reserved IP resides in. Names beginning with
- // `ibm-` are reserved for provider-owned resources.
- Name *string
+ // Indicates whether this reserved IP member will be automatically deleted when either
+ // `target` is deleted, or the reserved IP is unbound. Must be `false` if the reserved IP is unbound.
+ AutoDelete *bool `json:"auto_delete,omitempty"`
- // The target this reserved IP is to be bound to.
- Target ReservedIPTargetPrototypeIntf
+ // The user-defined name for this reserved IP. If unspecified, the name will be a hyphenated list of randomly-selected
+ // words. Names must be unique within the subnet the reserved IP resides in. Names beginning with `ibm-` are reserved
+ // for provider-owned resources.
+ Name *string `json:"name,omitempty"`
+
+ // The target this reserved IP is to be bound to. The target must be an endpoint gateway not
+ // already bound to a reserved IP in the subnet's zone.
+ Target ReservedIPTargetPrototypeIntf `json:"target,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -18932,27 +24754,33 @@ func (*VpcV1) NewCreateSubnetReservedIPOptions(subnetID string) *CreateSubnetRes
}
// SetSubnetID : Allow user to set SubnetID
-func (options *CreateSubnetReservedIPOptions) SetSubnetID(subnetID string) *CreateSubnetReservedIPOptions {
- options.SubnetID = core.StringPtr(subnetID)
- return options
+func (_options *CreateSubnetReservedIPOptions) SetSubnetID(subnetID string) *CreateSubnetReservedIPOptions {
+ _options.SubnetID = core.StringPtr(subnetID)
+ return _options
+}
+
+// SetAddress : Allow user to set Address
+func (_options *CreateSubnetReservedIPOptions) SetAddress(address string) *CreateSubnetReservedIPOptions {
+ _options.Address = core.StringPtr(address)
+ return _options
}
// SetAutoDelete : Allow user to set AutoDelete
-func (options *CreateSubnetReservedIPOptions) SetAutoDelete(autoDelete bool) *CreateSubnetReservedIPOptions {
- options.AutoDelete = core.BoolPtr(autoDelete)
- return options
+func (_options *CreateSubnetReservedIPOptions) SetAutoDelete(autoDelete bool) *CreateSubnetReservedIPOptions {
+ _options.AutoDelete = core.BoolPtr(autoDelete)
+ return _options
}
// SetName : Allow user to set Name
-func (options *CreateSubnetReservedIPOptions) SetName(name string) *CreateSubnetReservedIPOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *CreateSubnetReservedIPOptions) SetName(name string) *CreateSubnetReservedIPOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetTarget : Allow user to set Target
-func (options *CreateSubnetReservedIPOptions) SetTarget(target ReservedIPTargetPrototypeIntf) *CreateSubnetReservedIPOptions {
- options.Target = target
- return options
+func (_options *CreateSubnetReservedIPOptions) SetTarget(target ReservedIPTargetPrototypeIntf) *CreateSubnetReservedIPOptions {
+ _options.Target = target
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -18964,7 +24792,7 @@ func (options *CreateSubnetReservedIPOptions) SetHeaders(param map[string]string
// CreateVolumeOptions : The CreateVolume options.
type CreateVolumeOptions struct {
// The volume prototype object.
- VolumePrototype VolumePrototypeIntf `validate:"required"`
+ VolumePrototype VolumePrototypeIntf `json:"VolumePrototype" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -18978,9 +24806,9 @@ func (*VpcV1) NewCreateVolumeOptions(volumePrototype VolumePrototypeIntf) *Creat
}
// SetVolumePrototype : Allow user to set VolumePrototype
-func (options *CreateVolumeOptions) SetVolumePrototype(volumePrototype VolumePrototypeIntf) *CreateVolumeOptions {
- options.VolumePrototype = volumePrototype
- return options
+func (_options *CreateVolumeOptions) SetVolumePrototype(volumePrototype VolumePrototypeIntf) *CreateVolumeOptions {
+ _options.VolumePrototype = volumePrototype
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -18992,7 +24820,7 @@ func (options *CreateVolumeOptions) SetHeaders(param map[string]string) *CreateV
// CreateVPCAddressPrefixOptions : The CreateVPCAddressPrefix options.
type CreateVPCAddressPrefixOptions struct {
// The VPC identifier.
- VPCID *string `validate:"required,ne="`
+ VPCID *string `json:"vpc_id" validate:"required,ne="`
// The IPv4 range of the address prefix, expressed in CIDR format. The request must not overlap with any existing
// address prefixes in the VPC or any of the following reserved address ranges:
@@ -19003,18 +24831,18 @@ type CreateVPCAddressPrefixOptions struct {
// - `224.0.0.0/4` (IPv4 multicast addresses)
//
// The prefix length of the address prefix's CIDR must be between `/9` (8,388,608 addresses) and `/29` (8 addresses).
- CIDR *string `validate:"required"`
+ CIDR *string `json:"cidr" validate:"required"`
// The zone this address prefix will reside in.
- Zone ZoneIdentityIntf `validate:"required"`
+ Zone ZoneIdentityIntf `json:"zone" validate:"required"`
- // Indicates whether this is the default prefix for this zone in this VPC. If true, this prefix will become the default
- // prefix for this zone in this VPC. This fails if the VPC currently has a default address prefix for this zone.
- IsDefault *bool
+ // Indicates whether this will be the default address prefix for this zone in this VPC. If `true`, the VPC must not
+ // have a default address prefix for this zone.
+ IsDefault *bool `json:"is_default,omitempty"`
// The user-defined name for this address prefix. Names must be unique within the VPC the address prefix resides in. If
// unspecified, the name will be a hyphenated list of randomly-selected words.
- Name *string
+ Name *string `json:"name,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -19030,33 +24858,33 @@ func (*VpcV1) NewCreateVPCAddressPrefixOptions(vpcID string, cidr string, zone Z
}
// SetVPCID : Allow user to set VPCID
-func (options *CreateVPCAddressPrefixOptions) SetVPCID(vpcID string) *CreateVPCAddressPrefixOptions {
- options.VPCID = core.StringPtr(vpcID)
- return options
+func (_options *CreateVPCAddressPrefixOptions) SetVPCID(vpcID string) *CreateVPCAddressPrefixOptions {
+ _options.VPCID = core.StringPtr(vpcID)
+ return _options
}
// SetCIDR : Allow user to set CIDR
-func (options *CreateVPCAddressPrefixOptions) SetCIDR(cidr string) *CreateVPCAddressPrefixOptions {
- options.CIDR = core.StringPtr(cidr)
- return options
+func (_options *CreateVPCAddressPrefixOptions) SetCIDR(cidr string) *CreateVPCAddressPrefixOptions {
+ _options.CIDR = core.StringPtr(cidr)
+ return _options
}
// SetZone : Allow user to set Zone
-func (options *CreateVPCAddressPrefixOptions) SetZone(zone ZoneIdentityIntf) *CreateVPCAddressPrefixOptions {
- options.Zone = zone
- return options
+func (_options *CreateVPCAddressPrefixOptions) SetZone(zone ZoneIdentityIntf) *CreateVPCAddressPrefixOptions {
+ _options.Zone = zone
+ return _options
}
// SetIsDefault : Allow user to set IsDefault
-func (options *CreateVPCAddressPrefixOptions) SetIsDefault(isDefault bool) *CreateVPCAddressPrefixOptions {
- options.IsDefault = core.BoolPtr(isDefault)
- return options
+func (_options *CreateVPCAddressPrefixOptions) SetIsDefault(isDefault bool) *CreateVPCAddressPrefixOptions {
+ _options.IsDefault = core.BoolPtr(isDefault)
+ return _options
}
// SetName : Allow user to set Name
-func (options *CreateVPCAddressPrefixOptions) SetName(name string) *CreateVPCAddressPrefixOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *CreateVPCAddressPrefixOptions) SetName(name string) *CreateVPCAddressPrefixOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -19067,30 +24895,36 @@ func (options *CreateVPCAddressPrefixOptions) SetHeaders(param map[string]string
// CreateVPCOptions : The CreateVPC options.
type CreateVPCOptions struct {
- // Indicates whether a default address prefix should be automatically created for each zone in this VPC. If `manual`,
+ // Indicates whether a default address prefix will be automatically created for each zone in this VPC. If `manual`,
// this VPC will be created with no default address prefixes.
- AddressPrefixManagement *string
+ //
+ // Since address prefixes are managed identically regardless of whether they were automatically created, the value is
+ // not preserved as a VPC property.
+ AddressPrefixManagement *string `json:"address_prefix_management,omitempty"`
- // Indicates whether this VPC should be connected to Classic Infrastructure. If true, this VPC's resources will have
+ // Indicates whether this VPC will be connected to Classic Infrastructure. If true, this VPC's resources will have
// private network connectivity to the account's Classic Infrastructure resources. Only one VPC, per region, may be
// connected in this way. This value is set at creation and subsequently immutable.
- ClassicAccess *bool
+ ClassicAccess *bool `json:"classic_access,omitempty"`
// The unique user-defined name for this VPC. If unspecified, the name will be a hyphenated list of randomly-selected
// words.
- Name *string
+ Name *string `json:"name,omitempty"`
// The resource group to use. If unspecified, the account's [default resource
// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
- ResourceGroup ResourceGroupIdentityIntf
+ ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
}
// Constants associated with the CreateVPCOptions.AddressPrefixManagement property.
-// Indicates whether a default address prefix should be automatically created for each zone in this VPC. If `manual`,
-// this VPC will be created with no default address prefixes.
+// Indicates whether a default address prefix will be automatically created for each zone in this VPC. If `manual`, this
+// VPC will be created with no default address prefixes.
+//
+// Since address prefixes are managed identically regardless of whether they were automatically created, the value is
+// not preserved as a VPC property.
const (
CreateVPCOptionsAddressPrefixManagementAutoConst = "auto"
CreateVPCOptionsAddressPrefixManagementManualConst = "manual"
@@ -19102,27 +24936,27 @@ func (*VpcV1) NewCreateVPCOptions() *CreateVPCOptions {
}
// SetAddressPrefixManagement : Allow user to set AddressPrefixManagement
-func (options *CreateVPCOptions) SetAddressPrefixManagement(addressPrefixManagement string) *CreateVPCOptions {
- options.AddressPrefixManagement = core.StringPtr(addressPrefixManagement)
- return options
+func (_options *CreateVPCOptions) SetAddressPrefixManagement(addressPrefixManagement string) *CreateVPCOptions {
+ _options.AddressPrefixManagement = core.StringPtr(addressPrefixManagement)
+ return _options
}
// SetClassicAccess : Allow user to set ClassicAccess
-func (options *CreateVPCOptions) SetClassicAccess(classicAccess bool) *CreateVPCOptions {
- options.ClassicAccess = core.BoolPtr(classicAccess)
- return options
+func (_options *CreateVPCOptions) SetClassicAccess(classicAccess bool) *CreateVPCOptions {
+ _options.ClassicAccess = core.BoolPtr(classicAccess)
+ return _options
}
// SetName : Allow user to set Name
-func (options *CreateVPCOptions) SetName(name string) *CreateVPCOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *CreateVPCOptions) SetName(name string) *CreateVPCOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetResourceGroup : Allow user to set ResourceGroup
-func (options *CreateVPCOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateVPCOptions {
- options.ResourceGroup = resourceGroup
- return options
+func (_options *CreateVPCOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateVPCOptions {
+ _options.ResourceGroup = resourceGroup
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -19134,16 +24968,16 @@ func (options *CreateVPCOptions) SetHeaders(param map[string]string) *CreateVPCO
// CreateVPCRouteOptions : The CreateVPCRoute options.
type CreateVPCRouteOptions struct {
// The VPC identifier.
- VPCID *string `validate:"required,ne="`
+ VPCID *string `json:"vpc_id" validate:"required,ne="`
// The destination of the route. At most two routes per `zone` in a table can have the same destination, and only if
// both routes have an `action` of `deliver` and the
// `next_hop` is an IP address.
- Destination *string `validate:"required"`
+ Destination *string `json:"destination" validate:"required"`
// The zone to apply the route to. (Traffic from subnets in this zone will be
// subject to this route.).
- Zone ZoneIdentityIntf `validate:"required"`
+ Zone ZoneIdentityIntf `json:"zone" validate:"required"`
// The action to perform with a packet matching the route:
// - `delegate`: delegate to the system's built-in routes
@@ -19151,15 +24985,15 @@ type CreateVPCRouteOptions struct {
// routes
// - `deliver`: deliver the packet to the specified `next_hop`
// - `drop`: drop the packet.
- Action *string
+ Action *string `json:"action,omitempty"`
// The user-defined name for this route. If unspecified, the name will be a hyphenated list of randomly-selected words.
// Names must be unique within the VPC routing table the route resides in.
- Name *string
+ Name *string `json:"name,omitempty"`
// If `action` is `deliver`, the next hop that packets will be delivered to. For
// other `action` values, it must be omitted or specified as `0.0.0.0`.
- NextHop RouteNextHopPrototypeIntf
+ NextHop RouteNextHopPrototypeIntf `json:"next_hop,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -19189,39 +25023,39 @@ func (*VpcV1) NewCreateVPCRouteOptions(vpcID string, destination string, zone Zo
}
// SetVPCID : Allow user to set VPCID
-func (options *CreateVPCRouteOptions) SetVPCID(vpcID string) *CreateVPCRouteOptions {
- options.VPCID = core.StringPtr(vpcID)
- return options
+func (_options *CreateVPCRouteOptions) SetVPCID(vpcID string) *CreateVPCRouteOptions {
+ _options.VPCID = core.StringPtr(vpcID)
+ return _options
}
// SetDestination : Allow user to set Destination
-func (options *CreateVPCRouteOptions) SetDestination(destination string) *CreateVPCRouteOptions {
- options.Destination = core.StringPtr(destination)
- return options
+func (_options *CreateVPCRouteOptions) SetDestination(destination string) *CreateVPCRouteOptions {
+ _options.Destination = core.StringPtr(destination)
+ return _options
}
// SetZone : Allow user to set Zone
-func (options *CreateVPCRouteOptions) SetZone(zone ZoneIdentityIntf) *CreateVPCRouteOptions {
- options.Zone = zone
- return options
+func (_options *CreateVPCRouteOptions) SetZone(zone ZoneIdentityIntf) *CreateVPCRouteOptions {
+ _options.Zone = zone
+ return _options
}
// SetAction : Allow user to set Action
-func (options *CreateVPCRouteOptions) SetAction(action string) *CreateVPCRouteOptions {
- options.Action = core.StringPtr(action)
- return options
+func (_options *CreateVPCRouteOptions) SetAction(action string) *CreateVPCRouteOptions {
+ _options.Action = core.StringPtr(action)
+ return _options
}
// SetName : Allow user to set Name
-func (options *CreateVPCRouteOptions) SetName(name string) *CreateVPCRouteOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *CreateVPCRouteOptions) SetName(name string) *CreateVPCRouteOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetNextHop : Allow user to set NextHop
-func (options *CreateVPCRouteOptions) SetNextHop(nextHop RouteNextHopPrototypeIntf) *CreateVPCRouteOptions {
- options.NextHop = nextHop
- return options
+func (_options *CreateVPCRouteOptions) SetNextHop(nextHop RouteNextHopPrototypeIntf) *CreateVPCRouteOptions {
+ _options.NextHop = nextHop
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -19233,35 +25067,35 @@ func (options *CreateVPCRouteOptions) SetHeaders(param map[string]string) *Creat
// CreateVPCRoutingTableOptions : The CreateVPCRoutingTable options.
type CreateVPCRoutingTableOptions struct {
// The VPC identifier.
- VPCID *string `validate:"required,ne="`
+ VPCID *string `json:"vpc_id" validate:"required,ne="`
// The user-defined name for this routing table. Names must be unique within the VPC the routing table resides in. If
// unspecified, the name will be a hyphenated list of randomly-selected words.
- Name *string
+ Name *string `json:"name,omitempty"`
// If set to `true`, this routing table will be used to route traffic that originates from [Direct
// Link](https://cloud.ibm.com/docs/dl/) to this VPC. For this to succeed, the VPC must not already have a routing
// table with this property set to `true`.
//
// Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
- // `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.
- // Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP address or a VPN gateway
- // connection, the packet will be dropped.
- RouteDirectLinkIngress *bool
+ // `deliver` are treated as `drop` unless the `next_hop` is an IP address bound to a network interface on a subnet in
+ // the route's `zone`. Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP
+ // address or a VPN gateway connection, the packet will be dropped.
+ RouteDirectLinkIngress *bool `json:"route_direct_link_ingress,omitempty"`
// If set to `true`, this routing table will be used to route traffic that originates from [Transit
// Gateway](https://cloud.ibm.com/cloud/transit-gateway/) to this VPC. For this to succeed, the VPC must not already
// have a routing table with this property set to `true`.
//
// Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
- // `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.
- // Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP address or a VPN gateway
- // connection, the packet will be dropped.
+ // `deliver` are treated as `drop` unless the `next_hop` is an IP address bound to a network interface on a subnet in
+ // the route's `zone`. Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP
+ // address or a VPN gateway connection, the packet will be dropped.
//
// If [Classic Access](https://cloud.ibm.com/docs/vpc?topic=vpc-setting-up-access-to-classic-infrastructure) is enabled
// for this VPC, and this property is set to `true`, its incoming traffic will also be routed according to this routing
// table.
- RouteTransitGatewayIngress *bool
+ RouteTransitGatewayIngress *bool `json:"route_transit_gateway_ingress,omitempty"`
// If set to `true`, this routing table will be used to route traffic that originates from subnets in other zones in
// this VPC. For this to succeed, the VPC must not already have a routing table with this property set to `true`.
@@ -19270,11 +25104,11 @@ type CreateVPCRoutingTableOptions struct {
// `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.
// Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP address or a VPN gateway
// connection, the packet will be dropped.
- RouteVPCZoneIngress *bool
+ RouteVPCZoneIngress *bool `json:"route_vpc_zone_ingress,omitempty"`
- // Array of route prototype objects for routes to create for this routing table. If unspecified, the routing table will
- // be created with no routes.
- Routes []RoutePrototype
+ // The prototype objects for routes to create for this routing table. If unspecified, the routing table will be created
+ // with no routes.
+ Routes []RoutePrototype `json:"routes,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -19288,39 +25122,39 @@ func (*VpcV1) NewCreateVPCRoutingTableOptions(vpcID string) *CreateVPCRoutingTab
}
// SetVPCID : Allow user to set VPCID
-func (options *CreateVPCRoutingTableOptions) SetVPCID(vpcID string) *CreateVPCRoutingTableOptions {
- options.VPCID = core.StringPtr(vpcID)
- return options
+func (_options *CreateVPCRoutingTableOptions) SetVPCID(vpcID string) *CreateVPCRoutingTableOptions {
+ _options.VPCID = core.StringPtr(vpcID)
+ return _options
}
// SetName : Allow user to set Name
-func (options *CreateVPCRoutingTableOptions) SetName(name string) *CreateVPCRoutingTableOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *CreateVPCRoutingTableOptions) SetName(name string) *CreateVPCRoutingTableOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetRouteDirectLinkIngress : Allow user to set RouteDirectLinkIngress
-func (options *CreateVPCRoutingTableOptions) SetRouteDirectLinkIngress(routeDirectLinkIngress bool) *CreateVPCRoutingTableOptions {
- options.RouteDirectLinkIngress = core.BoolPtr(routeDirectLinkIngress)
- return options
+func (_options *CreateVPCRoutingTableOptions) SetRouteDirectLinkIngress(routeDirectLinkIngress bool) *CreateVPCRoutingTableOptions {
+ _options.RouteDirectLinkIngress = core.BoolPtr(routeDirectLinkIngress)
+ return _options
}
// SetRouteTransitGatewayIngress : Allow user to set RouteTransitGatewayIngress
-func (options *CreateVPCRoutingTableOptions) SetRouteTransitGatewayIngress(routeTransitGatewayIngress bool) *CreateVPCRoutingTableOptions {
- options.RouteTransitGatewayIngress = core.BoolPtr(routeTransitGatewayIngress)
- return options
+func (_options *CreateVPCRoutingTableOptions) SetRouteTransitGatewayIngress(routeTransitGatewayIngress bool) *CreateVPCRoutingTableOptions {
+ _options.RouteTransitGatewayIngress = core.BoolPtr(routeTransitGatewayIngress)
+ return _options
}
// SetRouteVPCZoneIngress : Allow user to set RouteVPCZoneIngress
-func (options *CreateVPCRoutingTableOptions) SetRouteVPCZoneIngress(routeVPCZoneIngress bool) *CreateVPCRoutingTableOptions {
- options.RouteVPCZoneIngress = core.BoolPtr(routeVPCZoneIngress)
- return options
+func (_options *CreateVPCRoutingTableOptions) SetRouteVPCZoneIngress(routeVPCZoneIngress bool) *CreateVPCRoutingTableOptions {
+ _options.RouteVPCZoneIngress = core.BoolPtr(routeVPCZoneIngress)
+ return _options
}
// SetRoutes : Allow user to set Routes
-func (options *CreateVPCRoutingTableOptions) SetRoutes(routes []RoutePrototype) *CreateVPCRoutingTableOptions {
- options.Routes = routes
- return options
+func (_options *CreateVPCRoutingTableOptions) SetRoutes(routes []RoutePrototype) *CreateVPCRoutingTableOptions {
+ _options.Routes = routes
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -19332,19 +25166,19 @@ func (options *CreateVPCRoutingTableOptions) SetHeaders(param map[string]string)
// CreateVPCRoutingTableRouteOptions : The CreateVPCRoutingTableRoute options.
type CreateVPCRoutingTableRouteOptions struct {
// The VPC identifier.
- VPCID *string `validate:"required,ne="`
+ VPCID *string `json:"vpc_id" validate:"required,ne="`
// The routing table identifier.
- RoutingTableID *string `validate:"required,ne="`
+ RoutingTableID *string `json:"routing_table_id" validate:"required,ne="`
// The destination of the route. At most two routes per `zone` in a table can have the same destination, and only if
// both routes have an `action` of `deliver` and the
// `next_hop` is an IP address.
- Destination *string `validate:"required"`
+ Destination *string `json:"destination" validate:"required"`
// The zone to apply the route to. (Traffic from subnets in this zone will be
// subject to this route.).
- Zone ZoneIdentityIntf `validate:"required"`
+ Zone ZoneIdentityIntf `json:"zone" validate:"required"`
// The action to perform with a packet matching the route:
// - `delegate`: delegate to the system's built-in routes
@@ -19352,15 +25186,15 @@ type CreateVPCRoutingTableRouteOptions struct {
// routes
// - `deliver`: deliver the packet to the specified `next_hop`
// - `drop`: drop the packet.
- Action *string
+ Action *string `json:"action,omitempty"`
// The user-defined name for this route. If unspecified, the name will be a hyphenated list of randomly-selected words.
// Names must be unique within the VPC routing table the route resides in.
- Name *string
+ Name *string `json:"name,omitempty"`
// If `action` is `deliver`, the next hop that packets will be delivered to. For
// other `action` values, it must be omitted or specified as `0.0.0.0`.
- NextHop RouteNextHopPrototypeIntf
+ NextHop RouteNextHopPrototypeIntf `json:"next_hop,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -19391,45 +25225,45 @@ func (*VpcV1) NewCreateVPCRoutingTableRouteOptions(vpcID string, routingTableID
}
// SetVPCID : Allow user to set VPCID
-func (options *CreateVPCRoutingTableRouteOptions) SetVPCID(vpcID string) *CreateVPCRoutingTableRouteOptions {
- options.VPCID = core.StringPtr(vpcID)
- return options
+func (_options *CreateVPCRoutingTableRouteOptions) SetVPCID(vpcID string) *CreateVPCRoutingTableRouteOptions {
+ _options.VPCID = core.StringPtr(vpcID)
+ return _options
}
// SetRoutingTableID : Allow user to set RoutingTableID
-func (options *CreateVPCRoutingTableRouteOptions) SetRoutingTableID(routingTableID string) *CreateVPCRoutingTableRouteOptions {
- options.RoutingTableID = core.StringPtr(routingTableID)
- return options
+func (_options *CreateVPCRoutingTableRouteOptions) SetRoutingTableID(routingTableID string) *CreateVPCRoutingTableRouteOptions {
+ _options.RoutingTableID = core.StringPtr(routingTableID)
+ return _options
}
// SetDestination : Allow user to set Destination
-func (options *CreateVPCRoutingTableRouteOptions) SetDestination(destination string) *CreateVPCRoutingTableRouteOptions {
- options.Destination = core.StringPtr(destination)
- return options
+func (_options *CreateVPCRoutingTableRouteOptions) SetDestination(destination string) *CreateVPCRoutingTableRouteOptions {
+ _options.Destination = core.StringPtr(destination)
+ return _options
}
// SetZone : Allow user to set Zone
-func (options *CreateVPCRoutingTableRouteOptions) SetZone(zone ZoneIdentityIntf) *CreateVPCRoutingTableRouteOptions {
- options.Zone = zone
- return options
+func (_options *CreateVPCRoutingTableRouteOptions) SetZone(zone ZoneIdentityIntf) *CreateVPCRoutingTableRouteOptions {
+ _options.Zone = zone
+ return _options
}
// SetAction : Allow user to set Action
-func (options *CreateVPCRoutingTableRouteOptions) SetAction(action string) *CreateVPCRoutingTableRouteOptions {
- options.Action = core.StringPtr(action)
- return options
+func (_options *CreateVPCRoutingTableRouteOptions) SetAction(action string) *CreateVPCRoutingTableRouteOptions {
+ _options.Action = core.StringPtr(action)
+ return _options
}
// SetName : Allow user to set Name
-func (options *CreateVPCRoutingTableRouteOptions) SetName(name string) *CreateVPCRoutingTableRouteOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *CreateVPCRoutingTableRouteOptions) SetName(name string) *CreateVPCRoutingTableRouteOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetNextHop : Allow user to set NextHop
-func (options *CreateVPCRoutingTableRouteOptions) SetNextHop(nextHop RouteNextHopPrototypeIntf) *CreateVPCRoutingTableRouteOptions {
- options.NextHop = nextHop
- return options
+func (_options *CreateVPCRoutingTableRouteOptions) SetNextHop(nextHop RouteNextHopPrototypeIntf) *CreateVPCRoutingTableRouteOptions {
+ _options.NextHop = nextHop
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -19441,10 +25275,10 @@ func (options *CreateVPCRoutingTableRouteOptions) SetHeaders(param map[string]st
// CreateVPNGatewayConnectionOptions : The CreateVPNGatewayConnection options.
type CreateVPNGatewayConnectionOptions struct {
// The VPN gateway identifier.
- VPNGatewayID *string `validate:"required,ne="`
+ VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="`
// The VPN gateway connection prototype object.
- VPNGatewayConnectionPrototype VPNGatewayConnectionPrototypeIntf `validate:"required"`
+ VPNGatewayConnectionPrototype VPNGatewayConnectionPrototypeIntf `json:"VPNGatewayConnectionPrototype" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -19459,15 +25293,15 @@ func (*VpcV1) NewCreateVPNGatewayConnectionOptions(vpnGatewayID string, vpnGatew
}
// SetVPNGatewayID : Allow user to set VPNGatewayID
-func (options *CreateVPNGatewayConnectionOptions) SetVPNGatewayID(vpnGatewayID string) *CreateVPNGatewayConnectionOptions {
- options.VPNGatewayID = core.StringPtr(vpnGatewayID)
- return options
+func (_options *CreateVPNGatewayConnectionOptions) SetVPNGatewayID(vpnGatewayID string) *CreateVPNGatewayConnectionOptions {
+ _options.VPNGatewayID = core.StringPtr(vpnGatewayID)
+ return _options
}
// SetVPNGatewayConnectionPrototype : Allow user to set VPNGatewayConnectionPrototype
-func (options *CreateVPNGatewayConnectionOptions) SetVPNGatewayConnectionPrototype(vpnGatewayConnectionPrototype VPNGatewayConnectionPrototypeIntf) *CreateVPNGatewayConnectionOptions {
- options.VPNGatewayConnectionPrototype = vpnGatewayConnectionPrototype
- return options
+func (_options *CreateVPNGatewayConnectionOptions) SetVPNGatewayConnectionPrototype(vpnGatewayConnectionPrototype VPNGatewayConnectionPrototypeIntf) *CreateVPNGatewayConnectionOptions {
+ _options.VPNGatewayConnectionPrototype = vpnGatewayConnectionPrototype
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -19479,7 +25313,7 @@ func (options *CreateVPNGatewayConnectionOptions) SetHeaders(param map[string]st
// CreateVPNGatewayOptions : The CreateVPNGateway options.
type CreateVPNGatewayOptions struct {
// The VPN gateway prototype object.
- VPNGatewayPrototype VPNGatewayPrototypeIntf `validate:"required"`
+ VPNGatewayPrototype VPNGatewayPrototypeIntf `json:"VPNGatewayPrototype" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -19493,9 +25327,9 @@ func (*VpcV1) NewCreateVPNGatewayOptions(vpnGatewayPrototype VPNGatewayPrototype
}
// SetVPNGatewayPrototype : Allow user to set VPNGatewayPrototype
-func (options *CreateVPNGatewayOptions) SetVPNGatewayPrototype(vpnGatewayPrototype VPNGatewayPrototypeIntf) *CreateVPNGatewayOptions {
- options.VPNGatewayPrototype = vpnGatewayPrototype
- return options
+func (_options *CreateVPNGatewayOptions) SetVPNGatewayPrototype(vpnGatewayPrototype VPNGatewayPrototypeIntf) *CreateVPNGatewayOptions {
+ _options.VPNGatewayPrototype = vpnGatewayPrototype
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -19533,17 +25367,16 @@ type DedicatedHost struct {
// If set to true, instances can be placed on this dedicated host.
InstancePlacementEnabled *bool `json:"instance_placement_enabled" validate:"required"`
- // Array of instances that are allocated to this dedicated host.
+ // The instances that are allocated to this dedicated host.
Instances []InstanceReference `json:"instances" validate:"required"`
- // The lifecycle state of the dedicated host resource.
+ // The lifecycle state of the dedicated host.
LifecycleState *string `json:"lifecycle_state" validate:"required"`
// The total amount of memory in gibibytes for this host.
Memory *int64 `json:"memory" validate:"required"`
- // The unique user-defined name for this dedicated host. If unspecified, the name will be a hyphenated list of
- // randomly-selected words.
+ // The unique user-defined name for this dedicated host.
Name *string `json:"name" validate:"required"`
// The profile this dedicated host uses.
@@ -19555,7 +25388,7 @@ type DedicatedHost struct {
// The resource group for this dedicated host.
ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`
- // The type of resource referenced.
+ // The resource type.
ResourceType *string `json:"resource_type" validate:"required"`
// The total number of sockets for this host.
@@ -19568,7 +25401,7 @@ type DedicatedHost struct {
// the unexpected property value was encountered.
State *string `json:"state" validate:"required"`
- // Array of instance profiles that can be used by instances placed on this dedicated host.
+ // The instance profiles usable by instances placed on this dedicated host.
SupportedInstanceProfiles []InstanceProfileReference `json:"supported_instance_profiles" validate:"required"`
// The total VCPU of the dedicated host.
@@ -19579,9 +25412,8 @@ type DedicatedHost struct {
}
// Constants associated with the DedicatedHost.LifecycleState property.
-// The lifecycle state of the dedicated host resource.
+// The lifecycle state of the dedicated host.
const (
- DedicatedHostLifecycleStateDeletedConst = "deleted"
DedicatedHostLifecycleStateDeletingConst = "deleting"
DedicatedHostLifecycleStateFailedConst = "failed"
DedicatedHostLifecycleStatePendingConst = "pending"
@@ -19592,7 +25424,7 @@ const (
)
// Constants associated with the DedicatedHost.ResourceType property.
-// The type of resource referenced.
+// The resource type.
const (
DedicatedHostResourceTypeDedicatedHostConst = "dedicated_host"
)
@@ -19751,6 +25583,18 @@ func UnmarshalDedicatedHostCollection(m map[string]json.RawMessage, result inter
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *DedicatedHostCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// DedicatedHostCollectionFirst : A link to the first page of resources.
type DedicatedHostCollectionFirst struct {
// The URL for a page of resources.
@@ -19818,7 +25662,7 @@ type DedicatedHostDisk struct {
// Indicates whether this dedicated host disk is available for instance disk creation.
Provisionable *bool `json:"provisionable" validate:"required"`
- // The type of resource referenced.
+ // The resource type.
ResourceType *string `json:"resource_type" validate:"required"`
// The size of the disk in GB (gigabytes).
@@ -19841,7 +25685,6 @@ const (
// Constants associated with the DedicatedHostDisk.LifecycleState property.
// The lifecycle state of this dedicated host disk.
const (
- DedicatedHostDiskLifecycleStateDeletedConst = "deleted"
DedicatedHostDiskLifecycleStateDeletingConst = "deleting"
DedicatedHostDiskLifecycleStateFailedConst = "failed"
DedicatedHostDiskLifecycleStatePendingConst = "pending"
@@ -19852,7 +25695,7 @@ const (
)
// Constants associated with the DedicatedHostDisk.ResourceType property.
-// The type of resource referenced.
+// The resource type.
const (
DedicatedHostDiskResourceTypeDedicatedHostDiskConst = "dedicated_host_disk"
)
@@ -19958,11 +25801,11 @@ func UnmarshalDedicatedHostDiskPatch(m map[string]json.RawMessage, result interf
}
// AsPatch returns a generic map representation of the DedicatedHostDiskPatch
-func (dedicatedHostDiskPatch *DedicatedHostDiskPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (dedicatedHostDiskPatch *DedicatedHostDiskPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(dedicatedHostDiskPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -19990,17 +25833,16 @@ type DedicatedHostGroup struct {
// The unique identifier for this dedicated host group.
ID *string `json:"id" validate:"required"`
- // The unique user-defined name for this dedicated host group. If unspecified, the name will be a hyphenated list of
- // randomly-selected words.
+ // The unique user-defined name for this dedicated host group.
Name *string `json:"name" validate:"required"`
// The resource group for this dedicated host group.
ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`
- // The type of resource referenced.
+ // The resource type.
ResourceType *string `json:"resource_type" validate:"required"`
- // Array of instance profiles that can be used by instances placed on this dedicated host group.
+ // The instance profiles usable by instances placed on this dedicated host group.
SupportedInstanceProfiles []InstanceProfileReference `json:"supported_instance_profiles" validate:"required"`
// The zone this dedicated host group resides in.
@@ -20016,7 +25858,7 @@ const (
)
// Constants associated with the DedicatedHostGroup.ResourceType property.
-// The type of resource referenced.
+// The resource type.
const (
DedicatedHostGroupResourceTypeDedicatedHostGroupConst = "dedicated_host_group"
)
@@ -20122,6 +25964,18 @@ func UnmarshalDedicatedHostGroupCollection(m map[string]json.RawMessage, result
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *DedicatedHostGroupCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// DedicatedHostGroupCollectionFirst : A link to the first page of resources.
type DedicatedHostGroupCollectionFirst struct {
// The URL for a page of resources.
@@ -20201,8 +26055,7 @@ func UnmarshalDedicatedHostGroupIdentity(m map[string]json.RawMessage, result in
// DedicatedHostGroupPatch : DedicatedHostGroupPatch struct
type DedicatedHostGroupPatch struct {
- // The unique user-defined name for this dedicated host group. If unspecified, the name will be a hyphenated list of
- // randomly-selected words.
+ // The unique user-defined name for this dedicated host group.
Name *string `json:"name,omitempty"`
}
@@ -20218,19 +26071,18 @@ func UnmarshalDedicatedHostGroupPatch(m map[string]json.RawMessage, result inter
}
// AsPatch returns a generic map representation of the DedicatedHostGroupPatch
-func (dedicatedHostGroupPatch *DedicatedHostGroupPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (dedicatedHostGroupPatch *DedicatedHostGroupPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(dedicatedHostGroupPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
// DedicatedHostGroupPrototypeDedicatedHostByZoneContext : DedicatedHostGroupPrototypeDedicatedHostByZoneContext struct
type DedicatedHostGroupPrototypeDedicatedHostByZoneContext struct {
- // The unique user-defined name for this dedicated host group. If unspecified, the name will be a hyphenated list of
- // randomly-selected words.
+ // The unique user-defined name for this dedicated host group.
Name *string `json:"name,omitempty"`
// The resource group to use. If unspecified, the host's resource group is used.
@@ -20267,16 +26119,15 @@ type DedicatedHostGroupReference struct {
// The unique identifier for this dedicated host group.
ID *string `json:"id" validate:"required"`
- // The unique user-defined name for this dedicated host group. If unspecified, the name will be a hyphenated list of
- // randomly-selected words.
+ // The unique user-defined name for this dedicated host group.
Name *string `json:"name" validate:"required"`
- // The type of resource referenced.
+ // The resource type.
ResourceType *string `json:"resource_type" validate:"required"`
}
// Constants associated with the DedicatedHostGroupReference.ResourceType property.
-// The type of resource referenced.
+// The resource type.
const (
DedicatedHostGroupReferenceResourceTypeDedicatedHostGroupConst = "dedicated_host_group"
)
@@ -20335,8 +26186,7 @@ type DedicatedHostPatch struct {
// If set to true, instances can be placed on this dedicated host.
InstancePlacementEnabled *bool `json:"instance_placement_enabled,omitempty"`
- // The unique user-defined name for this dedicated host. If unspecified, the name will be a hyphenated list of
- // randomly-selected words.
+ // The unique user-defined name for this dedicated host.
Name *string `json:"name,omitempty"`
}
@@ -20356,11 +26206,11 @@ func UnmarshalDedicatedHostPatch(m map[string]json.RawMessage, result interface{
}
// AsPatch returns a generic map representation of the DedicatedHostPatch
-func (dedicatedHostPatch *DedicatedHostPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (dedicatedHostPatch *DedicatedHostPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(dedicatedHostPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -20390,7 +26240,7 @@ type DedicatedHostProfile struct {
SocketCount DedicatedHostProfileSocketIntf `json:"socket_count" validate:"required"`
- // Array of instance profiles that can be used by instances placed on dedicated hosts with this profile.
+ // The instance profiles usable by instances placed on dedicated hosts with this profile.
SupportedInstanceProfiles []InstanceProfileReference `json:"supported_instance_profiles" validate:"required"`
VcpuArchitecture *DedicatedHostProfileVcpuArchitecture `json:"vcpu_architecture" validate:"required"`
@@ -20503,6 +26353,18 @@ func UnmarshalDedicatedHostProfileCollection(m map[string]json.RawMessage, resul
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *DedicatedHostProfileCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// DedicatedHostProfileCollectionFirst : A link to the first page of resources.
type DedicatedHostProfileCollectionFirst struct {
// The URL for a page of resources.
@@ -21121,16 +26983,15 @@ type DedicatedHostReference struct {
// The unique identifier for this dedicated host.
ID *string `json:"id" validate:"required"`
- // The unique user-defined name for this dedicated host. If unspecified, the name will be a hyphenated list of
- // randomly-selected words.
+ // The unique user-defined name for this dedicated host.
Name *string `json:"name" validate:"required"`
- // The type of resource referenced.
+ // The resource type.
ResourceType *string `json:"resource_type" validate:"required"`
}
// Constants associated with the DedicatedHostReference.ResourceType property.
-// The type of resource referenced.
+// The resource type.
const (
DedicatedHostReferenceResourceTypeDedicatedHostConst = "dedicated_host"
)
@@ -21206,8 +27067,8 @@ type DefaultNetworkACL struct {
// resource group at creation.
ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`
- // The ordered rules for the default network ACL for a VPC. Defaults to two rules which allow all inbound and outbound
- // traffic, respectively. Rules for the default network ACL may be changed, added, or removed.
+ // The ordered rules for the default network ACL for a VPC. Defaults to two rules which allow all inbound and outbound
+ // traffic, respectively. Rules for the default network ACL may be changed, added, or removed.
Rules []NetworkACLRuleItemIntf `json:"rules" validate:"required"`
// The subnets to which this network ACL is attached.
@@ -21288,27 +27149,27 @@ type DefaultRoutingTable struct {
// [Direct Link](https://cloud.ibm.com/docs/dl/) to this VPC.
//
// Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
- // `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.
- // Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP address or a VPN gateway
- // connection, the packet will be dropped.
+ // `deliver` are treated as `drop` unless the `next_hop` is an IP address bound to a network interface on a subnet in
+ // the route's `zone`. Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP
+ // address or a VPN gateway connection, the packet will be dropped.
RouteDirectLinkIngress *bool `json:"route_direct_link_ingress" validate:"required"`
// Indicates whether this routing table is used to route traffic that originates from from [Transit
// Gateway](https://cloud.ibm.com/cloud/transit-gateway/) to this VPC.
//
// Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
- // `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.
- // Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP address or a VPN gateway
- // connection, the packet will be dropped.
+ // `deliver` are treated as `drop` unless the `next_hop` is an IP address bound to a network interface on a subnet in
+ // the route's `zone`. Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP
+ // address or a VPN gateway connection, the packet will be dropped.
RouteTransitGatewayIngress *bool `json:"route_transit_gateway_ingress" validate:"required"`
// Indicates whether this routing table is used to route traffic that originates from subnets in other zones in this
// VPC.
//
// Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
- // `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.
- // Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP address or a VPN gateway
- // connection, the packet will be dropped.
+ // `deliver` are treated as `drop` unless the `next_hop` is an IP address bound to a network interface on a subnet in
+ // the route's `zone`. Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP
+ // address or a VPN gateway connection, the packet will be dropped.
RouteVPCZoneIngress *bool `json:"route_vpc_zone_ingress" validate:"required"`
// The routes for the default routing table for this VPC. The table is created with no routes, but routes may be added,
@@ -21322,7 +27183,6 @@ type DefaultRoutingTable struct {
// Constants associated with the DefaultRoutingTable.LifecycleState property.
// The lifecycle state of the routing table.
const (
- DefaultRoutingTableLifecycleStateDeletedConst = "deleted"
DefaultRoutingTableLifecycleStateDeletingConst = "deleting"
DefaultRoutingTableLifecycleStateFailedConst = "failed"
DefaultRoutingTableLifecycleStatePendingConst = "pending"
@@ -21414,11 +27274,14 @@ type DefaultSecurityGroup struct {
// The resource group for this security group.
ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`
- // Array of rules for the default security group for a VPC. Defaults to allowing all outbound traffic, and allowing all
- // inbound traffic from other interfaces in the VPC's default security group. Rules in the default security group may
+ // The rules for the default security group for a VPC. Defaults to allowing all outbound traffic, and allowing all
+ // inbound traffic from other interfaces in the VPC's default security group. Rules for the default security group may
// be changed, added or removed.
Rules []SecurityGroupRuleIntf `json:"rules" validate:"required"`
+ // The targets for this security group.
+ Targets []SecurityGroupTargetReferenceIntf `json:"targets" validate:"required"`
+
// The VPC this security group is a part of.
VPC *VPCReference `json:"vpc" validate:"required"`
}
@@ -21454,6 +27317,10 @@ func UnmarshalDefaultSecurityGroup(m map[string]json.RawMessage, result interfac
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "targets", &obj.Targets, UnmarshalSecurityGroupTargetReference)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference)
if err != nil {
return
@@ -21462,10 +27329,76 @@ func UnmarshalDefaultSecurityGroup(m map[string]json.RawMessage, result interfac
return
}
+// DeleteBareMetalServerNetworkInterfaceOptions : The DeleteBareMetalServerNetworkInterface options.
+type DeleteBareMetalServerNetworkInterfaceOptions struct {
+ // The bare metal server identifier.
+ BareMetalServerID *string `json:"bare_metal_server_id" validate:"required,ne="`
+
+ // The network interface identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewDeleteBareMetalServerNetworkInterfaceOptions : Instantiate DeleteBareMetalServerNetworkInterfaceOptions
+func (*VpcV1) NewDeleteBareMetalServerNetworkInterfaceOptions(bareMetalServerID string, id string) *DeleteBareMetalServerNetworkInterfaceOptions {
+ return &DeleteBareMetalServerNetworkInterfaceOptions{
+ BareMetalServerID: core.StringPtr(bareMetalServerID),
+ ID: core.StringPtr(id),
+ }
+}
+
+// SetBareMetalServerID : Allow user to set BareMetalServerID
+func (_options *DeleteBareMetalServerNetworkInterfaceOptions) SetBareMetalServerID(bareMetalServerID string) *DeleteBareMetalServerNetworkInterfaceOptions {
+ _options.BareMetalServerID = core.StringPtr(bareMetalServerID)
+ return _options
+}
+
+// SetID : Allow user to set ID
+func (_options *DeleteBareMetalServerNetworkInterfaceOptions) SetID(id string) *DeleteBareMetalServerNetworkInterfaceOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *DeleteBareMetalServerNetworkInterfaceOptions) SetHeaders(param map[string]string) *DeleteBareMetalServerNetworkInterfaceOptions {
+ options.Headers = param
+ return options
+}
+
+// DeleteBareMetalServerOptions : The DeleteBareMetalServer options.
+type DeleteBareMetalServerOptions struct {
+ // The bare metal server identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewDeleteBareMetalServerOptions : Instantiate DeleteBareMetalServerOptions
+func (*VpcV1) NewDeleteBareMetalServerOptions(id string) *DeleteBareMetalServerOptions {
+ return &DeleteBareMetalServerOptions{
+ ID: core.StringPtr(id),
+ }
+}
+
+// SetID : Allow user to set ID
+func (_options *DeleteBareMetalServerOptions) SetID(id string) *DeleteBareMetalServerOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *DeleteBareMetalServerOptions) SetHeaders(param map[string]string) *DeleteBareMetalServerOptions {
+ options.Headers = param
+ return options
+}
+
// DeleteDedicatedHostGroupOptions : The DeleteDedicatedHostGroup options.
type DeleteDedicatedHostGroupOptions struct {
// The dedicated host group identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -21479,9 +27412,9 @@ func (*VpcV1) NewDeleteDedicatedHostGroupOptions(id string) *DeleteDedicatedHost
}
// SetID : Allow user to set ID
-func (options *DeleteDedicatedHostGroupOptions) SetID(id string) *DeleteDedicatedHostGroupOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteDedicatedHostGroupOptions) SetID(id string) *DeleteDedicatedHostGroupOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -21493,7 +27426,7 @@ func (options *DeleteDedicatedHostGroupOptions) SetHeaders(param map[string]stri
// DeleteDedicatedHostOptions : The DeleteDedicatedHost options.
type DeleteDedicatedHostOptions struct {
// The dedicated host identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -21507,9 +27440,9 @@ func (*VpcV1) NewDeleteDedicatedHostOptions(id string) *DeleteDedicatedHostOptio
}
// SetID : Allow user to set ID
-func (options *DeleteDedicatedHostOptions) SetID(id string) *DeleteDedicatedHostOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteDedicatedHostOptions) SetID(id string) *DeleteDedicatedHostOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -21521,7 +27454,7 @@ func (options *DeleteDedicatedHostOptions) SetHeaders(param map[string]string) *
// DeleteEndpointGatewayOptions : The DeleteEndpointGateway options.
type DeleteEndpointGatewayOptions struct {
// The endpoint gateway identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -21535,9 +27468,9 @@ func (*VpcV1) NewDeleteEndpointGatewayOptions(id string) *DeleteEndpointGatewayO
}
// SetID : Allow user to set ID
-func (options *DeleteEndpointGatewayOptions) SetID(id string) *DeleteEndpointGatewayOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteEndpointGatewayOptions) SetID(id string) *DeleteEndpointGatewayOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -21549,7 +27482,7 @@ func (options *DeleteEndpointGatewayOptions) SetHeaders(param map[string]string)
// DeleteFloatingIPOptions : The DeleteFloatingIP options.
type DeleteFloatingIPOptions struct {
// The floating IP identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -21563,9 +27496,9 @@ func (*VpcV1) NewDeleteFloatingIPOptions(id string) *DeleteFloatingIPOptions {
}
// SetID : Allow user to set ID
-func (options *DeleteFloatingIPOptions) SetID(id string) *DeleteFloatingIPOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteFloatingIPOptions) SetID(id string) *DeleteFloatingIPOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -21577,7 +27510,7 @@ func (options *DeleteFloatingIPOptions) SetHeaders(param map[string]string) *Del
// DeleteFlowLogCollectorOptions : The DeleteFlowLogCollector options.
type DeleteFlowLogCollectorOptions struct {
// The flow log collector identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -21591,9 +27524,9 @@ func (*VpcV1) NewDeleteFlowLogCollectorOptions(id string) *DeleteFlowLogCollecto
}
// SetID : Allow user to set ID
-func (options *DeleteFlowLogCollectorOptions) SetID(id string) *DeleteFlowLogCollectorOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteFlowLogCollectorOptions) SetID(id string) *DeleteFlowLogCollectorOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -21605,7 +27538,7 @@ func (options *DeleteFlowLogCollectorOptions) SetHeaders(param map[string]string
// DeleteIkePolicyOptions : The DeleteIkePolicy options.
type DeleteIkePolicyOptions struct {
// The IKE policy identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -21619,9 +27552,9 @@ func (*VpcV1) NewDeleteIkePolicyOptions(id string) *DeleteIkePolicyOptions {
}
// SetID : Allow user to set ID
-func (options *DeleteIkePolicyOptions) SetID(id string) *DeleteIkePolicyOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteIkePolicyOptions) SetID(id string) *DeleteIkePolicyOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -21633,7 +27566,7 @@ func (options *DeleteIkePolicyOptions) SetHeaders(param map[string]string) *Dele
// DeleteImageOptions : The DeleteImage options.
type DeleteImageOptions struct {
// The image identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -21647,9 +27580,9 @@ func (*VpcV1) NewDeleteImageOptions(id string) *DeleteImageOptions {
}
// SetID : Allow user to set ID
-func (options *DeleteImageOptions) SetID(id string) *DeleteImageOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteImageOptions) SetID(id string) *DeleteImageOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -21661,7 +27594,7 @@ func (options *DeleteImageOptions) SetHeaders(param map[string]string) *DeleteIm
// DeleteInstanceGroupLoadBalancerOptions : The DeleteInstanceGroupLoadBalancer options.
type DeleteInstanceGroupLoadBalancerOptions struct {
// The instance group identifier.
- InstanceGroupID *string `validate:"required,ne="`
+ InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -21675,9 +27608,9 @@ func (*VpcV1) NewDeleteInstanceGroupLoadBalancerOptions(instanceGroupID string)
}
// SetInstanceGroupID : Allow user to set InstanceGroupID
-func (options *DeleteInstanceGroupLoadBalancerOptions) SetInstanceGroupID(instanceGroupID string) *DeleteInstanceGroupLoadBalancerOptions {
- options.InstanceGroupID = core.StringPtr(instanceGroupID)
- return options
+func (_options *DeleteInstanceGroupLoadBalancerOptions) SetInstanceGroupID(instanceGroupID string) *DeleteInstanceGroupLoadBalancerOptions {
+ _options.InstanceGroupID = core.StringPtr(instanceGroupID)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -21686,13 +27619,61 @@ func (options *DeleteInstanceGroupLoadBalancerOptions) SetHeaders(param map[stri
return options
}
+// DeleteInstanceGroupManagerActionOptions : The DeleteInstanceGroupManagerAction options.
+type DeleteInstanceGroupManagerActionOptions struct {
+ // The instance group identifier.
+ InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="`
+
+ // The instance group manager identifier.
+ InstanceGroupManagerID *string `json:"instance_group_manager_id" validate:"required,ne="`
+
+ // The instance group manager action identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewDeleteInstanceGroupManagerActionOptions : Instantiate DeleteInstanceGroupManagerActionOptions
+func (*VpcV1) NewDeleteInstanceGroupManagerActionOptions(instanceGroupID string, instanceGroupManagerID string, id string) *DeleteInstanceGroupManagerActionOptions {
+ return &DeleteInstanceGroupManagerActionOptions{
+ InstanceGroupID: core.StringPtr(instanceGroupID),
+ InstanceGroupManagerID: core.StringPtr(instanceGroupManagerID),
+ ID: core.StringPtr(id),
+ }
+}
+
+// SetInstanceGroupID : Allow user to set InstanceGroupID
+func (_options *DeleteInstanceGroupManagerActionOptions) SetInstanceGroupID(instanceGroupID string) *DeleteInstanceGroupManagerActionOptions {
+ _options.InstanceGroupID = core.StringPtr(instanceGroupID)
+ return _options
+}
+
+// SetInstanceGroupManagerID : Allow user to set InstanceGroupManagerID
+func (_options *DeleteInstanceGroupManagerActionOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *DeleteInstanceGroupManagerActionOptions {
+ _options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
+ return _options
+}
+
+// SetID : Allow user to set ID
+func (_options *DeleteInstanceGroupManagerActionOptions) SetID(id string) *DeleteInstanceGroupManagerActionOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *DeleteInstanceGroupManagerActionOptions) SetHeaders(param map[string]string) *DeleteInstanceGroupManagerActionOptions {
+ options.Headers = param
+ return options
+}
+
// DeleteInstanceGroupManagerOptions : The DeleteInstanceGroupManager options.
type DeleteInstanceGroupManagerOptions struct {
// The instance group identifier.
- InstanceGroupID *string `validate:"required,ne="`
+ InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="`
// The instance group manager identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -21707,15 +27688,15 @@ func (*VpcV1) NewDeleteInstanceGroupManagerOptions(instanceGroupID string, id st
}
// SetInstanceGroupID : Allow user to set InstanceGroupID
-func (options *DeleteInstanceGroupManagerOptions) SetInstanceGroupID(instanceGroupID string) *DeleteInstanceGroupManagerOptions {
- options.InstanceGroupID = core.StringPtr(instanceGroupID)
- return options
+func (_options *DeleteInstanceGroupManagerOptions) SetInstanceGroupID(instanceGroupID string) *DeleteInstanceGroupManagerOptions {
+ _options.InstanceGroupID = core.StringPtr(instanceGroupID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *DeleteInstanceGroupManagerOptions) SetID(id string) *DeleteInstanceGroupManagerOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteInstanceGroupManagerOptions) SetID(id string) *DeleteInstanceGroupManagerOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -21727,13 +27708,13 @@ func (options *DeleteInstanceGroupManagerOptions) SetHeaders(param map[string]st
// DeleteInstanceGroupManagerPolicyOptions : The DeleteInstanceGroupManagerPolicy options.
type DeleteInstanceGroupManagerPolicyOptions struct {
// The instance group identifier.
- InstanceGroupID *string `validate:"required,ne="`
+ InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="`
// The instance group manager identifier.
- InstanceGroupManagerID *string `validate:"required,ne="`
+ InstanceGroupManagerID *string `json:"instance_group_manager_id" validate:"required,ne="`
// The instance group manager policy identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -21749,21 +27730,21 @@ func (*VpcV1) NewDeleteInstanceGroupManagerPolicyOptions(instanceGroupID string,
}
// SetInstanceGroupID : Allow user to set InstanceGroupID
-func (options *DeleteInstanceGroupManagerPolicyOptions) SetInstanceGroupID(instanceGroupID string) *DeleteInstanceGroupManagerPolicyOptions {
- options.InstanceGroupID = core.StringPtr(instanceGroupID)
- return options
+func (_options *DeleteInstanceGroupManagerPolicyOptions) SetInstanceGroupID(instanceGroupID string) *DeleteInstanceGroupManagerPolicyOptions {
+ _options.InstanceGroupID = core.StringPtr(instanceGroupID)
+ return _options
}
// SetInstanceGroupManagerID : Allow user to set InstanceGroupManagerID
-func (options *DeleteInstanceGroupManagerPolicyOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *DeleteInstanceGroupManagerPolicyOptions {
- options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
- return options
+func (_options *DeleteInstanceGroupManagerPolicyOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *DeleteInstanceGroupManagerPolicyOptions {
+ _options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *DeleteInstanceGroupManagerPolicyOptions) SetID(id string) *DeleteInstanceGroupManagerPolicyOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteInstanceGroupManagerPolicyOptions) SetID(id string) *DeleteInstanceGroupManagerPolicyOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -21775,10 +27756,10 @@ func (options *DeleteInstanceGroupManagerPolicyOptions) SetHeaders(param map[str
// DeleteInstanceGroupMembershipOptions : The DeleteInstanceGroupMembership options.
type DeleteInstanceGroupMembershipOptions struct {
// The instance group identifier.
- InstanceGroupID *string `validate:"required,ne="`
+ InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="`
// The instance group membership identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -21793,15 +27774,15 @@ func (*VpcV1) NewDeleteInstanceGroupMembershipOptions(instanceGroupID string, id
}
// SetInstanceGroupID : Allow user to set InstanceGroupID
-func (options *DeleteInstanceGroupMembershipOptions) SetInstanceGroupID(instanceGroupID string) *DeleteInstanceGroupMembershipOptions {
- options.InstanceGroupID = core.StringPtr(instanceGroupID)
- return options
+func (_options *DeleteInstanceGroupMembershipOptions) SetInstanceGroupID(instanceGroupID string) *DeleteInstanceGroupMembershipOptions {
+ _options.InstanceGroupID = core.StringPtr(instanceGroupID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *DeleteInstanceGroupMembershipOptions) SetID(id string) *DeleteInstanceGroupMembershipOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteInstanceGroupMembershipOptions) SetID(id string) *DeleteInstanceGroupMembershipOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -21813,7 +27794,7 @@ func (options *DeleteInstanceGroupMembershipOptions) SetHeaders(param map[string
// DeleteInstanceGroupMembershipsOptions : The DeleteInstanceGroupMemberships options.
type DeleteInstanceGroupMembershipsOptions struct {
// The instance group identifier.
- InstanceGroupID *string `validate:"required,ne="`
+ InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -21827,9 +27808,9 @@ func (*VpcV1) NewDeleteInstanceGroupMembershipsOptions(instanceGroupID string) *
}
// SetInstanceGroupID : Allow user to set InstanceGroupID
-func (options *DeleteInstanceGroupMembershipsOptions) SetInstanceGroupID(instanceGroupID string) *DeleteInstanceGroupMembershipsOptions {
- options.InstanceGroupID = core.StringPtr(instanceGroupID)
- return options
+func (_options *DeleteInstanceGroupMembershipsOptions) SetInstanceGroupID(instanceGroupID string) *DeleteInstanceGroupMembershipsOptions {
+ _options.InstanceGroupID = core.StringPtr(instanceGroupID)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -21841,7 +27822,7 @@ func (options *DeleteInstanceGroupMembershipsOptions) SetHeaders(param map[strin
// DeleteInstanceGroupOptions : The DeleteInstanceGroup options.
type DeleteInstanceGroupOptions struct {
// The instance group identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -21855,9 +27836,9 @@ func (*VpcV1) NewDeleteInstanceGroupOptions(id string) *DeleteInstanceGroupOptio
}
// SetID : Allow user to set ID
-func (options *DeleteInstanceGroupOptions) SetID(id string) *DeleteInstanceGroupOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteInstanceGroupOptions) SetID(id string) *DeleteInstanceGroupOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -21869,10 +27850,10 @@ func (options *DeleteInstanceGroupOptions) SetHeaders(param map[string]string) *
// DeleteInstanceNetworkInterfaceOptions : The DeleteInstanceNetworkInterface options.
type DeleteInstanceNetworkInterfaceOptions struct {
// The instance identifier.
- InstanceID *string `validate:"required,ne="`
+ InstanceID *string `json:"instance_id" validate:"required,ne="`
// The network interface identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -21887,15 +27868,15 @@ func (*VpcV1) NewDeleteInstanceNetworkInterfaceOptions(instanceID string, id str
}
// SetInstanceID : Allow user to set InstanceID
-func (options *DeleteInstanceNetworkInterfaceOptions) SetInstanceID(instanceID string) *DeleteInstanceNetworkInterfaceOptions {
- options.InstanceID = core.StringPtr(instanceID)
- return options
+func (_options *DeleteInstanceNetworkInterfaceOptions) SetInstanceID(instanceID string) *DeleteInstanceNetworkInterfaceOptions {
+ _options.InstanceID = core.StringPtr(instanceID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *DeleteInstanceNetworkInterfaceOptions) SetID(id string) *DeleteInstanceNetworkInterfaceOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteInstanceNetworkInterfaceOptions) SetID(id string) *DeleteInstanceNetworkInterfaceOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -21907,7 +27888,7 @@ func (options *DeleteInstanceNetworkInterfaceOptions) SetHeaders(param map[strin
// DeleteInstanceOptions : The DeleteInstance options.
type DeleteInstanceOptions struct {
// The instance identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -21921,9 +27902,9 @@ func (*VpcV1) NewDeleteInstanceOptions(id string) *DeleteInstanceOptions {
}
// SetID : Allow user to set ID
-func (options *DeleteInstanceOptions) SetID(id string) *DeleteInstanceOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteInstanceOptions) SetID(id string) *DeleteInstanceOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -21935,7 +27916,7 @@ func (options *DeleteInstanceOptions) SetHeaders(param map[string]string) *Delet
// DeleteInstanceTemplateOptions : The DeleteInstanceTemplate options.
type DeleteInstanceTemplateOptions struct {
// The instance template identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -21949,9 +27930,9 @@ func (*VpcV1) NewDeleteInstanceTemplateOptions(id string) *DeleteInstanceTemplat
}
// SetID : Allow user to set ID
-func (options *DeleteInstanceTemplateOptions) SetID(id string) *DeleteInstanceTemplateOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteInstanceTemplateOptions) SetID(id string) *DeleteInstanceTemplateOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -21963,10 +27944,10 @@ func (options *DeleteInstanceTemplateOptions) SetHeaders(param map[string]string
// DeleteInstanceVolumeAttachmentOptions : The DeleteInstanceVolumeAttachment options.
type DeleteInstanceVolumeAttachmentOptions struct {
// The instance identifier.
- InstanceID *string `validate:"required,ne="`
+ InstanceID *string `json:"instance_id" validate:"required,ne="`
// The volume attachment identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -21981,15 +27962,15 @@ func (*VpcV1) NewDeleteInstanceVolumeAttachmentOptions(instanceID string, id str
}
// SetInstanceID : Allow user to set InstanceID
-func (options *DeleteInstanceVolumeAttachmentOptions) SetInstanceID(instanceID string) *DeleteInstanceVolumeAttachmentOptions {
- options.InstanceID = core.StringPtr(instanceID)
- return options
+func (_options *DeleteInstanceVolumeAttachmentOptions) SetInstanceID(instanceID string) *DeleteInstanceVolumeAttachmentOptions {
+ _options.InstanceID = core.StringPtr(instanceID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *DeleteInstanceVolumeAttachmentOptions) SetID(id string) *DeleteInstanceVolumeAttachmentOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteInstanceVolumeAttachmentOptions) SetID(id string) *DeleteInstanceVolumeAttachmentOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22001,7 +27982,7 @@ func (options *DeleteInstanceVolumeAttachmentOptions) SetHeaders(param map[strin
// DeleteIpsecPolicyOptions : The DeleteIpsecPolicy options.
type DeleteIpsecPolicyOptions struct {
// The IPsec policy identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -22015,9 +27996,9 @@ func (*VpcV1) NewDeleteIpsecPolicyOptions(id string) *DeleteIpsecPolicyOptions {
}
// SetID : Allow user to set ID
-func (options *DeleteIpsecPolicyOptions) SetID(id string) *DeleteIpsecPolicyOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteIpsecPolicyOptions) SetID(id string) *DeleteIpsecPolicyOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22029,7 +28010,7 @@ func (options *DeleteIpsecPolicyOptions) SetHeaders(param map[string]string) *De
// DeleteKeyOptions : The DeleteKey options.
type DeleteKeyOptions struct {
// The key identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -22043,9 +28024,9 @@ func (*VpcV1) NewDeleteKeyOptions(id string) *DeleteKeyOptions {
}
// SetID : Allow user to set ID
-func (options *DeleteKeyOptions) SetID(id string) *DeleteKeyOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteKeyOptions) SetID(id string) *DeleteKeyOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22057,10 +28038,10 @@ func (options *DeleteKeyOptions) SetHeaders(param map[string]string) *DeleteKeyO
// DeleteLoadBalancerListenerOptions : The DeleteLoadBalancerListener options.
type DeleteLoadBalancerListenerOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// The listener identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -22075,15 +28056,15 @@ func (*VpcV1) NewDeleteLoadBalancerListenerOptions(loadBalancerID string, id str
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *DeleteLoadBalancerListenerOptions) SetLoadBalancerID(loadBalancerID string) *DeleteLoadBalancerListenerOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *DeleteLoadBalancerListenerOptions) SetLoadBalancerID(loadBalancerID string) *DeleteLoadBalancerListenerOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *DeleteLoadBalancerListenerOptions) SetID(id string) *DeleteLoadBalancerListenerOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteLoadBalancerListenerOptions) SetID(id string) *DeleteLoadBalancerListenerOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22095,13 +28076,13 @@ func (options *DeleteLoadBalancerListenerOptions) SetHeaders(param map[string]st
// DeleteLoadBalancerListenerPolicyOptions : The DeleteLoadBalancerListenerPolicy options.
type DeleteLoadBalancerListenerPolicyOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// The listener identifier.
- ListenerID *string `validate:"required,ne="`
+ ListenerID *string `json:"listener_id" validate:"required,ne="`
// The policy identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -22117,21 +28098,21 @@ func (*VpcV1) NewDeleteLoadBalancerListenerPolicyOptions(loadBalancerID string,
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *DeleteLoadBalancerListenerPolicyOptions) SetLoadBalancerID(loadBalancerID string) *DeleteLoadBalancerListenerPolicyOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *DeleteLoadBalancerListenerPolicyOptions) SetLoadBalancerID(loadBalancerID string) *DeleteLoadBalancerListenerPolicyOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetListenerID : Allow user to set ListenerID
-func (options *DeleteLoadBalancerListenerPolicyOptions) SetListenerID(listenerID string) *DeleteLoadBalancerListenerPolicyOptions {
- options.ListenerID = core.StringPtr(listenerID)
- return options
+func (_options *DeleteLoadBalancerListenerPolicyOptions) SetListenerID(listenerID string) *DeleteLoadBalancerListenerPolicyOptions {
+ _options.ListenerID = core.StringPtr(listenerID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *DeleteLoadBalancerListenerPolicyOptions) SetID(id string) *DeleteLoadBalancerListenerPolicyOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteLoadBalancerListenerPolicyOptions) SetID(id string) *DeleteLoadBalancerListenerPolicyOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22143,16 +28124,16 @@ func (options *DeleteLoadBalancerListenerPolicyOptions) SetHeaders(param map[str
// DeleteLoadBalancerListenerPolicyRuleOptions : The DeleteLoadBalancerListenerPolicyRule options.
type DeleteLoadBalancerListenerPolicyRuleOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// The listener identifier.
- ListenerID *string `validate:"required,ne="`
+ ListenerID *string `json:"listener_id" validate:"required,ne="`
// The policy identifier.
- PolicyID *string `validate:"required,ne="`
+ PolicyID *string `json:"policy_id" validate:"required,ne="`
// The rule identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -22169,27 +28150,27 @@ func (*VpcV1) NewDeleteLoadBalancerListenerPolicyRuleOptions(loadBalancerID stri
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *DeleteLoadBalancerListenerPolicyRuleOptions) SetLoadBalancerID(loadBalancerID string) *DeleteLoadBalancerListenerPolicyRuleOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *DeleteLoadBalancerListenerPolicyRuleOptions) SetLoadBalancerID(loadBalancerID string) *DeleteLoadBalancerListenerPolicyRuleOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetListenerID : Allow user to set ListenerID
-func (options *DeleteLoadBalancerListenerPolicyRuleOptions) SetListenerID(listenerID string) *DeleteLoadBalancerListenerPolicyRuleOptions {
- options.ListenerID = core.StringPtr(listenerID)
- return options
+func (_options *DeleteLoadBalancerListenerPolicyRuleOptions) SetListenerID(listenerID string) *DeleteLoadBalancerListenerPolicyRuleOptions {
+ _options.ListenerID = core.StringPtr(listenerID)
+ return _options
}
// SetPolicyID : Allow user to set PolicyID
-func (options *DeleteLoadBalancerListenerPolicyRuleOptions) SetPolicyID(policyID string) *DeleteLoadBalancerListenerPolicyRuleOptions {
- options.PolicyID = core.StringPtr(policyID)
- return options
+func (_options *DeleteLoadBalancerListenerPolicyRuleOptions) SetPolicyID(policyID string) *DeleteLoadBalancerListenerPolicyRuleOptions {
+ _options.PolicyID = core.StringPtr(policyID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *DeleteLoadBalancerListenerPolicyRuleOptions) SetID(id string) *DeleteLoadBalancerListenerPolicyRuleOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteLoadBalancerListenerPolicyRuleOptions) SetID(id string) *DeleteLoadBalancerListenerPolicyRuleOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22201,7 +28182,7 @@ func (options *DeleteLoadBalancerListenerPolicyRuleOptions) SetHeaders(param map
// DeleteLoadBalancerOptions : The DeleteLoadBalancer options.
type DeleteLoadBalancerOptions struct {
// The load balancer identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -22215,9 +28196,9 @@ func (*VpcV1) NewDeleteLoadBalancerOptions(id string) *DeleteLoadBalancerOptions
}
// SetID : Allow user to set ID
-func (options *DeleteLoadBalancerOptions) SetID(id string) *DeleteLoadBalancerOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteLoadBalancerOptions) SetID(id string) *DeleteLoadBalancerOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22229,13 +28210,13 @@ func (options *DeleteLoadBalancerOptions) SetHeaders(param map[string]string) *D
// DeleteLoadBalancerPoolMemberOptions : The DeleteLoadBalancerPoolMember options.
type DeleteLoadBalancerPoolMemberOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// The pool identifier.
- PoolID *string `validate:"required,ne="`
+ PoolID *string `json:"pool_id" validate:"required,ne="`
// The member identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -22251,21 +28232,21 @@ func (*VpcV1) NewDeleteLoadBalancerPoolMemberOptions(loadBalancerID string, pool
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *DeleteLoadBalancerPoolMemberOptions) SetLoadBalancerID(loadBalancerID string) *DeleteLoadBalancerPoolMemberOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *DeleteLoadBalancerPoolMemberOptions) SetLoadBalancerID(loadBalancerID string) *DeleteLoadBalancerPoolMemberOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetPoolID : Allow user to set PoolID
-func (options *DeleteLoadBalancerPoolMemberOptions) SetPoolID(poolID string) *DeleteLoadBalancerPoolMemberOptions {
- options.PoolID = core.StringPtr(poolID)
- return options
+func (_options *DeleteLoadBalancerPoolMemberOptions) SetPoolID(poolID string) *DeleteLoadBalancerPoolMemberOptions {
+ _options.PoolID = core.StringPtr(poolID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *DeleteLoadBalancerPoolMemberOptions) SetID(id string) *DeleteLoadBalancerPoolMemberOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteLoadBalancerPoolMemberOptions) SetID(id string) *DeleteLoadBalancerPoolMemberOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22277,10 +28258,10 @@ func (options *DeleteLoadBalancerPoolMemberOptions) SetHeaders(param map[string]
// DeleteLoadBalancerPoolOptions : The DeleteLoadBalancerPool options.
type DeleteLoadBalancerPoolOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// The pool identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -22295,15 +28276,15 @@ func (*VpcV1) NewDeleteLoadBalancerPoolOptions(loadBalancerID string, id string)
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *DeleteLoadBalancerPoolOptions) SetLoadBalancerID(loadBalancerID string) *DeleteLoadBalancerPoolOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *DeleteLoadBalancerPoolOptions) SetLoadBalancerID(loadBalancerID string) *DeleteLoadBalancerPoolOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *DeleteLoadBalancerPoolOptions) SetID(id string) *DeleteLoadBalancerPoolOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteLoadBalancerPoolOptions) SetID(id string) *DeleteLoadBalancerPoolOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22315,7 +28296,7 @@ func (options *DeleteLoadBalancerPoolOptions) SetHeaders(param map[string]string
// DeleteNetworkACLOptions : The DeleteNetworkACL options.
type DeleteNetworkACLOptions struct {
// The network ACL identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -22329,9 +28310,9 @@ func (*VpcV1) NewDeleteNetworkACLOptions(id string) *DeleteNetworkACLOptions {
}
// SetID : Allow user to set ID
-func (options *DeleteNetworkACLOptions) SetID(id string) *DeleteNetworkACLOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteNetworkACLOptions) SetID(id string) *DeleteNetworkACLOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22343,10 +28324,10 @@ func (options *DeleteNetworkACLOptions) SetHeaders(param map[string]string) *Del
// DeleteNetworkACLRuleOptions : The DeleteNetworkACLRule options.
type DeleteNetworkACLRuleOptions struct {
// The network ACL identifier.
- NetworkACLID *string `validate:"required,ne="`
+ NetworkACLID *string `json:"network_acl_id" validate:"required,ne="`
// The rule identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -22361,15 +28342,15 @@ func (*VpcV1) NewDeleteNetworkACLRuleOptions(networkACLID string, id string) *De
}
// SetNetworkACLID : Allow user to set NetworkACLID
-func (options *DeleteNetworkACLRuleOptions) SetNetworkACLID(networkACLID string) *DeleteNetworkACLRuleOptions {
- options.NetworkACLID = core.StringPtr(networkACLID)
- return options
+func (_options *DeleteNetworkACLRuleOptions) SetNetworkACLID(networkACLID string) *DeleteNetworkACLRuleOptions {
+ _options.NetworkACLID = core.StringPtr(networkACLID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *DeleteNetworkACLRuleOptions) SetID(id string) *DeleteNetworkACLRuleOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteNetworkACLRuleOptions) SetID(id string) *DeleteNetworkACLRuleOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22378,10 +28359,38 @@ func (options *DeleteNetworkACLRuleOptions) SetHeaders(param map[string]string)
return options
}
+// DeletePlacementGroupOptions : The DeletePlacementGroup options.
+type DeletePlacementGroupOptions struct {
+ // The placement group identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewDeletePlacementGroupOptions : Instantiate DeletePlacementGroupOptions
+func (*VpcV1) NewDeletePlacementGroupOptions(id string) *DeletePlacementGroupOptions {
+ return &DeletePlacementGroupOptions{
+ ID: core.StringPtr(id),
+ }
+}
+
+// SetID : Allow user to set ID
+func (_options *DeletePlacementGroupOptions) SetID(id string) *DeletePlacementGroupOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *DeletePlacementGroupOptions) SetHeaders(param map[string]string) *DeletePlacementGroupOptions {
+ options.Headers = param
+ return options
+}
+
// DeletePublicGatewayOptions : The DeletePublicGateway options.
type DeletePublicGatewayOptions struct {
// The public gateway identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -22395,9 +28404,9 @@ func (*VpcV1) NewDeletePublicGatewayOptions(id string) *DeletePublicGatewayOptio
}
// SetID : Allow user to set ID
-func (options *DeletePublicGatewayOptions) SetID(id string) *DeletePublicGatewayOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeletePublicGatewayOptions) SetID(id string) *DeletePublicGatewayOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22409,7 +28418,7 @@ func (options *DeletePublicGatewayOptions) SetHeaders(param map[string]string) *
// DeleteSecurityGroupOptions : The DeleteSecurityGroup options.
type DeleteSecurityGroupOptions struct {
// The security group identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -22423,9 +28432,9 @@ func (*VpcV1) NewDeleteSecurityGroupOptions(id string) *DeleteSecurityGroupOptio
}
// SetID : Allow user to set ID
-func (options *DeleteSecurityGroupOptions) SetID(id string) *DeleteSecurityGroupOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteSecurityGroupOptions) SetID(id string) *DeleteSecurityGroupOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22437,10 +28446,10 @@ func (options *DeleteSecurityGroupOptions) SetHeaders(param map[string]string) *
// DeleteSecurityGroupRuleOptions : The DeleteSecurityGroupRule options.
type DeleteSecurityGroupRuleOptions struct {
// The security group identifier.
- SecurityGroupID *string `validate:"required,ne="`
+ SecurityGroupID *string `json:"security_group_id" validate:"required,ne="`
// The rule identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -22455,15 +28464,15 @@ func (*VpcV1) NewDeleteSecurityGroupRuleOptions(securityGroupID string, id strin
}
// SetSecurityGroupID : Allow user to set SecurityGroupID
-func (options *DeleteSecurityGroupRuleOptions) SetSecurityGroupID(securityGroupID string) *DeleteSecurityGroupRuleOptions {
- options.SecurityGroupID = core.StringPtr(securityGroupID)
- return options
+func (_options *DeleteSecurityGroupRuleOptions) SetSecurityGroupID(securityGroupID string) *DeleteSecurityGroupRuleOptions {
+ _options.SecurityGroupID = core.StringPtr(securityGroupID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *DeleteSecurityGroupRuleOptions) SetID(id string) *DeleteSecurityGroupRuleOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteSecurityGroupRuleOptions) SetID(id string) *DeleteSecurityGroupRuleOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22475,10 +28484,10 @@ func (options *DeleteSecurityGroupRuleOptions) SetHeaders(param map[string]strin
// DeleteSecurityGroupTargetBindingOptions : The DeleteSecurityGroupTargetBinding options.
type DeleteSecurityGroupTargetBindingOptions struct {
// The security group identifier.
- SecurityGroupID *string `validate:"required,ne="`
+ SecurityGroupID *string `json:"security_group_id" validate:"required,ne="`
// The security group target identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -22493,15 +28502,15 @@ func (*VpcV1) NewDeleteSecurityGroupTargetBindingOptions(securityGroupID string,
}
// SetSecurityGroupID : Allow user to set SecurityGroupID
-func (options *DeleteSecurityGroupTargetBindingOptions) SetSecurityGroupID(securityGroupID string) *DeleteSecurityGroupTargetBindingOptions {
- options.SecurityGroupID = core.StringPtr(securityGroupID)
- return options
+func (_options *DeleteSecurityGroupTargetBindingOptions) SetSecurityGroupID(securityGroupID string) *DeleteSecurityGroupTargetBindingOptions {
+ _options.SecurityGroupID = core.StringPtr(securityGroupID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *DeleteSecurityGroupTargetBindingOptions) SetID(id string) *DeleteSecurityGroupTargetBindingOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteSecurityGroupTargetBindingOptions) SetID(id string) *DeleteSecurityGroupTargetBindingOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22510,10 +28519,75 @@ func (options *DeleteSecurityGroupTargetBindingOptions) SetHeaders(param map[str
return options
}
+// DeleteSnapshotOptions : The DeleteSnapshot options.
+type DeleteSnapshotOptions struct {
+ // The snapshot identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // If present, the request will fail if the specified ETag value does not match the resource's current ETag value.
+ IfMatch *string `json:"If-Match,omitempty"`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewDeleteSnapshotOptions : Instantiate DeleteSnapshotOptions
+func (*VpcV1) NewDeleteSnapshotOptions(id string) *DeleteSnapshotOptions {
+ return &DeleteSnapshotOptions{
+ ID: core.StringPtr(id),
+ }
+}
+
+// SetID : Allow user to set ID
+func (_options *DeleteSnapshotOptions) SetID(id string) *DeleteSnapshotOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetIfMatch : Allow user to set IfMatch
+func (_options *DeleteSnapshotOptions) SetIfMatch(ifMatch string) *DeleteSnapshotOptions {
+ _options.IfMatch = core.StringPtr(ifMatch)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *DeleteSnapshotOptions) SetHeaders(param map[string]string) *DeleteSnapshotOptions {
+ options.Headers = param
+ return options
+}
+
+// DeleteSnapshotsOptions : The DeleteSnapshots options.
+type DeleteSnapshotsOptions struct {
+ // Filters the collection to resources with the source volume with the specified identifier.
+ SourceVolumeID *string `json:"source_volume.id" validate:"required"`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewDeleteSnapshotsOptions : Instantiate DeleteSnapshotsOptions
+func (*VpcV1) NewDeleteSnapshotsOptions(sourceVolumeID string) *DeleteSnapshotsOptions {
+ return &DeleteSnapshotsOptions{
+ SourceVolumeID: core.StringPtr(sourceVolumeID),
+ }
+}
+
+// SetSourceVolumeID : Allow user to set SourceVolumeID
+func (_options *DeleteSnapshotsOptions) SetSourceVolumeID(sourceVolumeID string) *DeleteSnapshotsOptions {
+ _options.SourceVolumeID = core.StringPtr(sourceVolumeID)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *DeleteSnapshotsOptions) SetHeaders(param map[string]string) *DeleteSnapshotsOptions {
+ options.Headers = param
+ return options
+}
+
// DeleteSubnetOptions : The DeleteSubnet options.
type DeleteSubnetOptions struct {
// The subnet identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -22527,9 +28601,9 @@ func (*VpcV1) NewDeleteSubnetOptions(id string) *DeleteSubnetOptions {
}
// SetID : Allow user to set ID
-func (options *DeleteSubnetOptions) SetID(id string) *DeleteSubnetOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteSubnetOptions) SetID(id string) *DeleteSubnetOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22541,10 +28615,10 @@ func (options *DeleteSubnetOptions) SetHeaders(param map[string]string) *DeleteS
// DeleteSubnetReservedIPOptions : The DeleteSubnetReservedIP options.
type DeleteSubnetReservedIPOptions struct {
// The subnet identifier.
- SubnetID *string `validate:"required,ne="`
+ SubnetID *string `json:"subnet_id" validate:"required,ne="`
// The reserved IP identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -22559,15 +28633,15 @@ func (*VpcV1) NewDeleteSubnetReservedIPOptions(subnetID string, id string) *Dele
}
// SetSubnetID : Allow user to set SubnetID
-func (options *DeleteSubnetReservedIPOptions) SetSubnetID(subnetID string) *DeleteSubnetReservedIPOptions {
- options.SubnetID = core.StringPtr(subnetID)
- return options
+func (_options *DeleteSubnetReservedIPOptions) SetSubnetID(subnetID string) *DeleteSubnetReservedIPOptions {
+ _options.SubnetID = core.StringPtr(subnetID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *DeleteSubnetReservedIPOptions) SetID(id string) *DeleteSubnetReservedIPOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteSubnetReservedIPOptions) SetID(id string) *DeleteSubnetReservedIPOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22579,7 +28653,10 @@ func (options *DeleteSubnetReservedIPOptions) SetHeaders(param map[string]string
// DeleteVolumeOptions : The DeleteVolume options.
type DeleteVolumeOptions struct {
// The volume identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
+
+ // If present, the request will fail if the specified ETag value does not match the resource's current ETag value.
+ IfMatch *string `json:"If-Match,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -22593,9 +28670,15 @@ func (*VpcV1) NewDeleteVolumeOptions(id string) *DeleteVolumeOptions {
}
// SetID : Allow user to set ID
-func (options *DeleteVolumeOptions) SetID(id string) *DeleteVolumeOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteVolumeOptions) SetID(id string) *DeleteVolumeOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetIfMatch : Allow user to set IfMatch
+func (_options *DeleteVolumeOptions) SetIfMatch(ifMatch string) *DeleteVolumeOptions {
+ _options.IfMatch = core.StringPtr(ifMatch)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22607,10 +28690,10 @@ func (options *DeleteVolumeOptions) SetHeaders(param map[string]string) *DeleteV
// DeleteVPCAddressPrefixOptions : The DeleteVPCAddressPrefix options.
type DeleteVPCAddressPrefixOptions struct {
// The VPC identifier.
- VPCID *string `validate:"required,ne="`
+ VPCID *string `json:"vpc_id" validate:"required,ne="`
// The prefix identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -22625,15 +28708,15 @@ func (*VpcV1) NewDeleteVPCAddressPrefixOptions(vpcID string, id string) *DeleteV
}
// SetVPCID : Allow user to set VPCID
-func (options *DeleteVPCAddressPrefixOptions) SetVPCID(vpcID string) *DeleteVPCAddressPrefixOptions {
- options.VPCID = core.StringPtr(vpcID)
- return options
+func (_options *DeleteVPCAddressPrefixOptions) SetVPCID(vpcID string) *DeleteVPCAddressPrefixOptions {
+ _options.VPCID = core.StringPtr(vpcID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *DeleteVPCAddressPrefixOptions) SetID(id string) *DeleteVPCAddressPrefixOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteVPCAddressPrefixOptions) SetID(id string) *DeleteVPCAddressPrefixOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22645,7 +28728,7 @@ func (options *DeleteVPCAddressPrefixOptions) SetHeaders(param map[string]string
// DeleteVPCOptions : The DeleteVPC options.
type DeleteVPCOptions struct {
// The VPC identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -22659,9 +28742,9 @@ func (*VpcV1) NewDeleteVPCOptions(id string) *DeleteVPCOptions {
}
// SetID : Allow user to set ID
-func (options *DeleteVPCOptions) SetID(id string) *DeleteVPCOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteVPCOptions) SetID(id string) *DeleteVPCOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22673,10 +28756,10 @@ func (options *DeleteVPCOptions) SetHeaders(param map[string]string) *DeleteVPCO
// DeleteVPCRouteOptions : The DeleteVPCRoute options.
type DeleteVPCRouteOptions struct {
// The VPC identifier.
- VPCID *string `validate:"required,ne="`
+ VPCID *string `json:"vpc_id" validate:"required,ne="`
// The route identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -22691,15 +28774,15 @@ func (*VpcV1) NewDeleteVPCRouteOptions(vpcID string, id string) *DeleteVPCRouteO
}
// SetVPCID : Allow user to set VPCID
-func (options *DeleteVPCRouteOptions) SetVPCID(vpcID string) *DeleteVPCRouteOptions {
- options.VPCID = core.StringPtr(vpcID)
- return options
+func (_options *DeleteVPCRouteOptions) SetVPCID(vpcID string) *DeleteVPCRouteOptions {
+ _options.VPCID = core.StringPtr(vpcID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *DeleteVPCRouteOptions) SetID(id string) *DeleteVPCRouteOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteVPCRouteOptions) SetID(id string) *DeleteVPCRouteOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22711,10 +28794,10 @@ func (options *DeleteVPCRouteOptions) SetHeaders(param map[string]string) *Delet
// DeleteVPCRoutingTableOptions : The DeleteVPCRoutingTable options.
type DeleteVPCRoutingTableOptions struct {
// The VPC identifier.
- VPCID *string `validate:"required,ne="`
+ VPCID *string `json:"vpc_id" validate:"required,ne="`
// The routing table identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -22729,15 +28812,15 @@ func (*VpcV1) NewDeleteVPCRoutingTableOptions(vpcID string, id string) *DeleteVP
}
// SetVPCID : Allow user to set VPCID
-func (options *DeleteVPCRoutingTableOptions) SetVPCID(vpcID string) *DeleteVPCRoutingTableOptions {
- options.VPCID = core.StringPtr(vpcID)
- return options
+func (_options *DeleteVPCRoutingTableOptions) SetVPCID(vpcID string) *DeleteVPCRoutingTableOptions {
+ _options.VPCID = core.StringPtr(vpcID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *DeleteVPCRoutingTableOptions) SetID(id string) *DeleteVPCRoutingTableOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteVPCRoutingTableOptions) SetID(id string) *DeleteVPCRoutingTableOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22749,13 +28832,13 @@ func (options *DeleteVPCRoutingTableOptions) SetHeaders(param map[string]string)
// DeleteVPCRoutingTableRouteOptions : The DeleteVPCRoutingTableRoute options.
type DeleteVPCRoutingTableRouteOptions struct {
// The VPC identifier.
- VPCID *string `validate:"required,ne="`
+ VPCID *string `json:"vpc_id" validate:"required,ne="`
// The routing table identifier.
- RoutingTableID *string `validate:"required,ne="`
+ RoutingTableID *string `json:"routing_table_id" validate:"required,ne="`
// The VPC routing table route identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -22771,21 +28854,21 @@ func (*VpcV1) NewDeleteVPCRoutingTableRouteOptions(vpcID string, routingTableID
}
// SetVPCID : Allow user to set VPCID
-func (options *DeleteVPCRoutingTableRouteOptions) SetVPCID(vpcID string) *DeleteVPCRoutingTableRouteOptions {
- options.VPCID = core.StringPtr(vpcID)
- return options
+func (_options *DeleteVPCRoutingTableRouteOptions) SetVPCID(vpcID string) *DeleteVPCRoutingTableRouteOptions {
+ _options.VPCID = core.StringPtr(vpcID)
+ return _options
}
// SetRoutingTableID : Allow user to set RoutingTableID
-func (options *DeleteVPCRoutingTableRouteOptions) SetRoutingTableID(routingTableID string) *DeleteVPCRoutingTableRouteOptions {
- options.RoutingTableID = core.StringPtr(routingTableID)
- return options
+func (_options *DeleteVPCRoutingTableRouteOptions) SetRoutingTableID(routingTableID string) *DeleteVPCRoutingTableRouteOptions {
+ _options.RoutingTableID = core.StringPtr(routingTableID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *DeleteVPCRoutingTableRouteOptions) SetID(id string) *DeleteVPCRoutingTableRouteOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteVPCRoutingTableRouteOptions) SetID(id string) *DeleteVPCRoutingTableRouteOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22797,10 +28880,10 @@ func (options *DeleteVPCRoutingTableRouteOptions) SetHeaders(param map[string]st
// DeleteVPNGatewayConnectionOptions : The DeleteVPNGatewayConnection options.
type DeleteVPNGatewayConnectionOptions struct {
// The VPN gateway identifier.
- VPNGatewayID *string `validate:"required,ne="`
+ VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="`
// The VPN gateway connection identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -22815,15 +28898,15 @@ func (*VpcV1) NewDeleteVPNGatewayConnectionOptions(vpnGatewayID string, id strin
}
// SetVPNGatewayID : Allow user to set VPNGatewayID
-func (options *DeleteVPNGatewayConnectionOptions) SetVPNGatewayID(vpnGatewayID string) *DeleteVPNGatewayConnectionOptions {
- options.VPNGatewayID = core.StringPtr(vpnGatewayID)
- return options
+func (_options *DeleteVPNGatewayConnectionOptions) SetVPNGatewayID(vpnGatewayID string) *DeleteVPNGatewayConnectionOptions {
+ _options.VPNGatewayID = core.StringPtr(vpnGatewayID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *DeleteVPNGatewayConnectionOptions) SetID(id string) *DeleteVPNGatewayConnectionOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteVPNGatewayConnectionOptions) SetID(id string) *DeleteVPNGatewayConnectionOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22835,7 +28918,7 @@ func (options *DeleteVPNGatewayConnectionOptions) SetHeaders(param map[string]st
// DeleteVPNGatewayOptions : The DeleteVPNGateway options.
type DeleteVPNGatewayOptions struct {
// The VPN gateway identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -22849,9 +28932,9 @@ func (*VpcV1) NewDeleteVPNGatewayOptions(id string) *DeleteVPNGatewayOptions {
}
// SetID : Allow user to set ID
-func (options *DeleteVPNGatewayOptions) SetID(id string) *DeleteVPNGatewayOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *DeleteVPNGatewayOptions) SetID(id string) *DeleteVPNGatewayOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -22917,8 +29000,8 @@ type EndpointGateway struct {
CRN *string `json:"crn" validate:"required"`
// The health of this resource.
- // - `ok`: Healthy
- // - `degraded`: Suffering from compromised performance, capacity, or connectivity
+ // - `ok`: No abnormal behavior detected
+ // - `degraded`: Experiencing compromised performance, capacity, or connectivity
// - `faulted`: Completely unreachable, inoperative, or otherwise entirely incapacitated
// - `inapplicable`: The health state does not apply because of the current lifecycle state. A resource with a
// lifecycle state of `failed` or `deleting` will have a health state of `inapplicable`. A `pending` resource may also
@@ -22931,7 +29014,7 @@ type EndpointGateway struct {
// The unique identifier for this endpoint gateway.
ID *string `json:"id" validate:"required"`
- // Collection of reserved IPs bound to an endpoint gateway.
+ // The reserved IPs bound to this endpoint gateway.
Ips []ReservedIPReference `json:"ips" validate:"required"`
// The lifecycle state of the endpoint gateway.
@@ -22943,13 +29026,16 @@ type EndpointGateway struct {
// The resource group for this endpoint gateway.
ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`
- // The type of resource referenced.
+ // The resource type.
ResourceType *string `json:"resource_type" validate:"required"`
+ // The security groups targeting this endpoint gateway.
+ SecurityGroups []SecurityGroupReference `json:"security_groups" validate:"required"`
+
// The fully qualified domain name for the target service.
ServiceEndpoint *string `json:"service_endpoint,omitempty"`
- // Collection of fully qualified domain names for the target service.
+ // The fully qualified domain names for the target service.
ServiceEndpoints []string `json:"service_endpoints" validate:"required"`
// The target for this endpoint gateway.
@@ -22961,8 +29047,8 @@ type EndpointGateway struct {
// Constants associated with the EndpointGateway.HealthState property.
// The health of this resource.
-// - `ok`: Healthy
-// - `degraded`: Suffering from compromised performance, capacity, or connectivity
+// - `ok`: No abnormal behavior detected
+// - `degraded`: Experiencing compromised performance, capacity, or connectivity
// - `faulted`: Completely unreachable, inoperative, or otherwise entirely incapacitated
// - `inapplicable`: The health state does not apply because of the current lifecycle state. A resource with a lifecycle
// state of `failed` or `deleting` will have a health state of `inapplicable`. A `pending` resource may also have this
@@ -22977,7 +29063,6 @@ const (
// Constants associated with the EndpointGateway.LifecycleState property.
// The lifecycle state of the endpoint gateway.
const (
- EndpointGatewayLifecycleStateDeletedConst = "deleted"
EndpointGatewayLifecycleStateDeletingConst = "deleting"
EndpointGatewayLifecycleStateFailedConst = "failed"
EndpointGatewayLifecycleStatePendingConst = "pending"
@@ -22988,7 +29073,7 @@ const (
)
// Constants associated with the EndpointGateway.ResourceType property.
-// The type of resource referenced.
+// The resource type.
const (
EndpointGatewayResourceTypeEndpointGatewayConst = "endpoint_gateway"
)
@@ -23036,6 +29121,10 @@ func UnmarshalEndpointGateway(m map[string]json.RawMessage, result interface{})
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupReference)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "service_endpoint", &obj.ServiceEndpoint)
if err != nil {
return
@@ -23102,6 +29191,18 @@ func UnmarshalEndpointGatewayCollection(m map[string]json.RawMessage, result int
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *EndpointGatewayCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// EndpointGatewayCollectionFirst : A link to the first page of resources.
type EndpointGatewayCollectionFirst struct {
// The URL for a page of resources.
@@ -23155,11 +29256,11 @@ func UnmarshalEndpointGatewayPatch(m map[string]json.RawMessage, result interfac
}
// AsPatch returns a generic map representation of the EndpointGatewayPatch
-func (endpointGatewayPatch *EndpointGatewayPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (endpointGatewayPatch *EndpointGatewayPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(endpointGatewayPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -23182,9 +29283,9 @@ func UnmarshalEndpointGatewayReferenceDeleted(m map[string]json.RawMessage, resu
return
}
-// EndpointGatewayReservedIP : A reserved IP to bind to the endpoint gateway. This can be an existing reserved IP, or a prototype used to allocate a
-// reserved IP. The reserved IP will be bound to the endpoint gateway to function as a virtual private endpoint for the
-// service.
+// EndpointGatewayReservedIP : A reserved IP to bind to the endpoint gateway. This can be specified using an existing reserved IP, or a prototype
+// object for a new reserved IP. The reserved IP will be bound to the endpoint gateway to function as a virtual private
+// endpoint for the service.
// Models which "extend" this model:
// - EndpointGatewayReservedIPReservedIPIdentity
// - EndpointGatewayReservedIPReservedIPPrototypeTargetContext
@@ -23195,13 +29296,18 @@ type EndpointGatewayReservedIP struct {
// The URL for this reserved IP.
Href *string `json:"href,omitempty"`
- // If set to `true`, this reserved IP will be automatically deleted when the target is deleted or when the reserved IP
- // is unbound.
+ // The IP address to reserve, which must not already be reserved on the subnet.
+ //
+ // If unspecified, an available address on the subnet will automatically be selected.
+ Address *string `json:"address,omitempty"`
+
+ // Indicates whether this reserved IP member will be automatically deleted when either
+ // `target` is deleted, or the reserved IP is unbound.
AutoDelete *bool `json:"auto_delete,omitempty"`
- // The user-defined name for this reserved IP. If not specified, the name will be a hyphenated list of
- // randomly-selected words. Names must be unique within the subnet the reserved IP resides in. Names beginning with
- // `ibm-` are reserved for provider-owned resources.
+ // The user-defined name for this reserved IP. If unspecified, the name will be a hyphenated list of randomly-selected
+ // words. Names must be unique within the subnet the reserved IP resides in. Names beginning with `ibm-` are reserved
+ // for provider-owned resources.
Name *string `json:"name,omitempty"`
// The subnet in which to create this reserved IP.
@@ -23227,6 +29333,10 @@ func UnmarshalEndpointGatewayReservedIP(m map[string]json.RawMessage, result int
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "address", &obj.Address)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete)
if err != nil {
return
@@ -23516,6 +29626,18 @@ func UnmarshalFloatingIPCollection(m map[string]json.RawMessage, result interfac
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *FloatingIPCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// FloatingIPCollectionFirst : A link to the first page of resources.
type FloatingIPCollectionFirst struct {
// The URL for a page of resources.
@@ -23555,10 +29677,10 @@ type FloatingIPPatch struct {
// The unique user-defined name for this floating IP.
Name *string `json:"name,omitempty"`
- // A new network interface to bind this floating IP to, replacing any existing binding.
- // For this request to succeed, the existing floating IP must not be required by another
- // resource, such as a public gateway.
- Target FloatingIPPatchTargetNetworkInterfaceIdentityIntf `json:"target,omitempty"`
+ // The network interface to bind the floating IP to, replacing any existing binding. For
+ // this request to succeed, the floating IP must not be required by another resource, such
+ // as a public gateway.
+ Target FloatingIPTargetPatchIntf `json:"target,omitempty"`
}
// UnmarshalFloatingIPPatch unmarshals an instance of FloatingIPPatch from the specified map of raw messages.
@@ -23568,7 +29690,7 @@ func UnmarshalFloatingIPPatch(m map[string]json.RawMessage, result interface{})
if err != nil {
return
}
- err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentity)
+ err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalFloatingIPTargetPatch)
if err != nil {
return
}
@@ -23577,51 +29699,15 @@ func UnmarshalFloatingIPPatch(m map[string]json.RawMessage, result interface{})
}
// AsPatch returns a generic map representation of the FloatingIPPatch
-func (floatingIPPatch *FloatingIPPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (floatingIPPatch *FloatingIPPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(floatingIPPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
-// FloatingIPPatchTargetNetworkInterfaceIdentity : A new network interface to bind this floating IP to, replacing any existing binding. For this request to succeed, the
-// existing floating IP must not be required by another resource, such as a public gateway.
-// Models which "extend" this model:
-// - FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID
-// - FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref
-type FloatingIPPatchTargetNetworkInterfaceIdentity struct {
- // The unique identifier for this network interface.
- ID *string `json:"id,omitempty"`
-
- // The URL for this network interface.
- Href *string `json:"href,omitempty"`
-}
-
-func (*FloatingIPPatchTargetNetworkInterfaceIdentity) isaFloatingIPPatchTargetNetworkInterfaceIdentity() bool {
- return true
-}
-
-type FloatingIPPatchTargetNetworkInterfaceIdentityIntf interface {
- isaFloatingIPPatchTargetNetworkInterfaceIdentity() bool
-}
-
-// UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentity unmarshals an instance of FloatingIPPatchTargetNetworkInterfaceIdentity from the specified map of raw messages.
-func UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(FloatingIPPatchTargetNetworkInterfaceIdentity)
- err = core.UnmarshalPrimitive(m, "id", &obj.ID)
- if err != nil {
- return
- }
- err = core.UnmarshalPrimitive(m, "href", &obj.Href)
- if err != nil {
- return
- }
- reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
- return
-}
-
// FloatingIPPrototype : FloatingIPPrototype struct
// Models which "extend" this model:
// - FloatingIPPrototypeFloatingIPByZone
@@ -23762,8 +29848,7 @@ type FloatingIPTarget struct {
// The user-defined name for this network interface.
Name *string `json:"name,omitempty"`
- // The primary IPv4 address.
- PrimaryIpv4Address *string `json:"primary_ipv4_address,omitempty"`
+ PrimaryIP *ReservedIPReference `json:"primary_ip,omitempty"`
// The resource type.
ResourceType *string `json:"resource_type,omitempty"`
@@ -23805,7 +29890,7 @@ func UnmarshalFloatingIPTarget(m map[string]json.RawMessage, result interface{})
if err != nil {
return
}
- err = core.UnmarshalPrimitive(m, "primary_ipv4_address", &obj.PrimaryIpv4Address)
+ err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference)
if err != nil {
return
}
@@ -23821,6 +29906,42 @@ func UnmarshalFloatingIPTarget(m map[string]json.RawMessage, result interface{})
return
}
+// FloatingIPTargetPatch : The network interface to bind the floating IP to, replacing any existing binding. For this request to succeed, the
+// floating IP must not be required by another resource, such as a public gateway.
+// Models which "extend" this model:
+// - FloatingIPTargetPatchNetworkInterfaceIdentityByID
+// - FloatingIPTargetPatchNetworkInterfaceIdentityByHref
+type FloatingIPTargetPatch struct {
+ // The unique identifier for this network interface.
+ ID *string `json:"id,omitempty"`
+
+ // The URL for this network interface.
+ Href *string `json:"href,omitempty"`
+}
+
+func (*FloatingIPTargetPatch) isaFloatingIPTargetPatch() bool {
+ return true
+}
+
+type FloatingIPTargetPatchIntf interface {
+ isaFloatingIPTargetPatch() bool
+}
+
+// UnmarshalFloatingIPTargetPatch unmarshals an instance of FloatingIPTargetPatch from the specified map of raw messages.
+func UnmarshalFloatingIPTargetPatch(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(FloatingIPTargetPatch)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// FloatingIPUnpaginatedCollection : FloatingIPUnpaginatedCollection struct
type FloatingIPUnpaginatedCollection struct {
// Collection of floating IPs.
@@ -23843,7 +29964,8 @@ type FlowLogCollector struct {
// Indicates whether this collector is active.
Active *bool `json:"active" validate:"required"`
- // If set to `true`, this flow log collector will be automatically deleted when the target is deleted.
+ // Indicates whether this flow log collector will be automatically deleted when `target` is deleted. At present, this
+ // is always `true`, but may be modifiable in the future.
AutoDelete *bool `json:"auto_delete" validate:"required"`
// The date and time that the flow log collector was created.
@@ -23868,7 +29990,7 @@ type FlowLogCollector struct {
ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`
// The Cloud Object Storage bucket where the collected flows are logged.
- StorageBucket *CloudObjectStorageBucketReference `json:"storage_bucket" validate:"required"`
+ StorageBucket *LegacyCloudObjectStorageBucketReference `json:"storage_bucket" validate:"required"`
// The target this collector is collecting flow logs for. If the target is an instance,
// subnet, or VPC, flow logs will not be collected for any network interfaces within the
@@ -23882,7 +30004,6 @@ type FlowLogCollector struct {
// Constants associated with the FlowLogCollector.LifecycleState property.
// The lifecycle state of the flow log collector.
const (
- FlowLogCollectorLifecycleStateDeletedConst = "deleted"
FlowLogCollectorLifecycleStateDeletingConst = "deleting"
FlowLogCollectorLifecycleStateFailedConst = "failed"
FlowLogCollectorLifecycleStatePendingConst = "pending"
@@ -23931,7 +30052,7 @@ func UnmarshalFlowLogCollector(m map[string]json.RawMessage, result interface{})
if err != nil {
return
}
- err = core.UnmarshalModel(m, "storage_bucket", &obj.StorageBucket, UnmarshalCloudObjectStorageBucketReference)
+ err = core.UnmarshalModel(m, "storage_bucket", &obj.StorageBucket, UnmarshalLegacyCloudObjectStorageBucketReference)
if err != nil {
return
}
@@ -23993,6 +30114,18 @@ func UnmarshalFlowLogCollectorCollection(m map[string]json.RawMessage, result in
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *FlowLogCollectorCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// FlowLogCollectorCollectionFirst : A link to the first page of resources.
type FlowLogCollectorCollectionFirst struct {
// The URL for a page of resources.
@@ -24053,11 +30186,11 @@ func UnmarshalFlowLogCollectorPatch(m map[string]json.RawMessage, result interfa
}
// AsPatch returns a generic map representation of the FlowLogCollectorPatch
-func (flowLogCollectorPatch *FlowLogCollectorPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (flowLogCollectorPatch *FlowLogCollectorPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(flowLogCollectorPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -24182,13 +30315,287 @@ func UnmarshalFlowLogCollectorTargetPrototype(m map[string]json.RawMessage, resu
return
}
+// GenericResourceReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
+// information.
+type GenericResourceReferenceDeleted struct {
+ // Link to documentation about deleted resources.
+ MoreInfo *string `json:"more_info" validate:"required"`
+}
+
+// UnmarshalGenericResourceReferenceDeleted unmarshals an instance of GenericResourceReferenceDeleted from the specified map of raw messages.
+func UnmarshalGenericResourceReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(GenericResourceReferenceDeleted)
+ err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// GetBareMetalServerDiskOptions : The GetBareMetalServerDisk options.
+type GetBareMetalServerDiskOptions struct {
+ // The bare metal server identifier.
+ BareMetalServerID *string `json:"bare_metal_server_id" validate:"required,ne="`
+
+ // The bare metal server disk identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewGetBareMetalServerDiskOptions : Instantiate GetBareMetalServerDiskOptions
+func (*VpcV1) NewGetBareMetalServerDiskOptions(bareMetalServerID string, id string) *GetBareMetalServerDiskOptions {
+ return &GetBareMetalServerDiskOptions{
+ BareMetalServerID: core.StringPtr(bareMetalServerID),
+ ID: core.StringPtr(id),
+ }
+}
+
+// SetBareMetalServerID : Allow user to set BareMetalServerID
+func (_options *GetBareMetalServerDiskOptions) SetBareMetalServerID(bareMetalServerID string) *GetBareMetalServerDiskOptions {
+ _options.BareMetalServerID = core.StringPtr(bareMetalServerID)
+ return _options
+}
+
+// SetID : Allow user to set ID
+func (_options *GetBareMetalServerDiskOptions) SetID(id string) *GetBareMetalServerDiskOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *GetBareMetalServerDiskOptions) SetHeaders(param map[string]string) *GetBareMetalServerDiskOptions {
+ options.Headers = param
+ return options
+}
+
+// GetBareMetalServerInitializationOptions : The GetBareMetalServerInitialization options.
+type GetBareMetalServerInitializationOptions struct {
+ // The bare metal server identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewGetBareMetalServerInitializationOptions : Instantiate GetBareMetalServerInitializationOptions
+func (*VpcV1) NewGetBareMetalServerInitializationOptions(id string) *GetBareMetalServerInitializationOptions {
+ return &GetBareMetalServerInitializationOptions{
+ ID: core.StringPtr(id),
+ }
+}
+
+// SetID : Allow user to set ID
+func (_options *GetBareMetalServerInitializationOptions) SetID(id string) *GetBareMetalServerInitializationOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *GetBareMetalServerInitializationOptions) SetHeaders(param map[string]string) *GetBareMetalServerInitializationOptions {
+ options.Headers = param
+ return options
+}
+
+// GetBareMetalServerNetworkInterfaceFloatingIPOptions : The GetBareMetalServerNetworkInterfaceFloatingIP options.
+type GetBareMetalServerNetworkInterfaceFloatingIPOptions struct {
+ // The bare metal server identifier.
+ BareMetalServerID *string `json:"bare_metal_server_id" validate:"required,ne="`
+
+ // The network interface identifier.
+ NetworkInterfaceID *string `json:"network_interface_id" validate:"required,ne="`
+
+ // The floating IP identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewGetBareMetalServerNetworkInterfaceFloatingIPOptions : Instantiate GetBareMetalServerNetworkInterfaceFloatingIPOptions
+func (*VpcV1) NewGetBareMetalServerNetworkInterfaceFloatingIPOptions(bareMetalServerID string, networkInterfaceID string, id string) *GetBareMetalServerNetworkInterfaceFloatingIPOptions {
+ return &GetBareMetalServerNetworkInterfaceFloatingIPOptions{
+ BareMetalServerID: core.StringPtr(bareMetalServerID),
+ NetworkInterfaceID: core.StringPtr(networkInterfaceID),
+ ID: core.StringPtr(id),
+ }
+}
+
+// SetBareMetalServerID : Allow user to set BareMetalServerID
+func (_options *GetBareMetalServerNetworkInterfaceFloatingIPOptions) SetBareMetalServerID(bareMetalServerID string) *GetBareMetalServerNetworkInterfaceFloatingIPOptions {
+ _options.BareMetalServerID = core.StringPtr(bareMetalServerID)
+ return _options
+}
+
+// SetNetworkInterfaceID : Allow user to set NetworkInterfaceID
+func (_options *GetBareMetalServerNetworkInterfaceFloatingIPOptions) SetNetworkInterfaceID(networkInterfaceID string) *GetBareMetalServerNetworkInterfaceFloatingIPOptions {
+ _options.NetworkInterfaceID = core.StringPtr(networkInterfaceID)
+ return _options
+}
+
+// SetID : Allow user to set ID
+func (_options *GetBareMetalServerNetworkInterfaceFloatingIPOptions) SetID(id string) *GetBareMetalServerNetworkInterfaceFloatingIPOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *GetBareMetalServerNetworkInterfaceFloatingIPOptions) SetHeaders(param map[string]string) *GetBareMetalServerNetworkInterfaceFloatingIPOptions {
+ options.Headers = param
+ return options
+}
+
+// GetBareMetalServerNetworkInterfaceIPOptions : The GetBareMetalServerNetworkInterfaceIP options.
+type GetBareMetalServerNetworkInterfaceIPOptions struct {
+ // The bare metal server identifier.
+ BareMetalServerID *string `json:"bare_metal_server_id" validate:"required,ne="`
+
+ // The network interface identifier.
+ NetworkInterfaceID *string `json:"network_interface_id" validate:"required,ne="`
+
+ // The reserved IP identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewGetBareMetalServerNetworkInterfaceIPOptions : Instantiate GetBareMetalServerNetworkInterfaceIPOptions
+func (*VpcV1) NewGetBareMetalServerNetworkInterfaceIPOptions(bareMetalServerID string, networkInterfaceID string, id string) *GetBareMetalServerNetworkInterfaceIPOptions {
+ return &GetBareMetalServerNetworkInterfaceIPOptions{
+ BareMetalServerID: core.StringPtr(bareMetalServerID),
+ NetworkInterfaceID: core.StringPtr(networkInterfaceID),
+ ID: core.StringPtr(id),
+ }
+}
+
+// SetBareMetalServerID : Allow user to set BareMetalServerID
+func (_options *GetBareMetalServerNetworkInterfaceIPOptions) SetBareMetalServerID(bareMetalServerID string) *GetBareMetalServerNetworkInterfaceIPOptions {
+ _options.BareMetalServerID = core.StringPtr(bareMetalServerID)
+ return _options
+}
+
+// SetNetworkInterfaceID : Allow user to set NetworkInterfaceID
+func (_options *GetBareMetalServerNetworkInterfaceIPOptions) SetNetworkInterfaceID(networkInterfaceID string) *GetBareMetalServerNetworkInterfaceIPOptions {
+ _options.NetworkInterfaceID = core.StringPtr(networkInterfaceID)
+ return _options
+}
+
+// SetID : Allow user to set ID
+func (_options *GetBareMetalServerNetworkInterfaceIPOptions) SetID(id string) *GetBareMetalServerNetworkInterfaceIPOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *GetBareMetalServerNetworkInterfaceIPOptions) SetHeaders(param map[string]string) *GetBareMetalServerNetworkInterfaceIPOptions {
+ options.Headers = param
+ return options
+}
+
+// GetBareMetalServerNetworkInterfaceOptions : The GetBareMetalServerNetworkInterface options.
+type GetBareMetalServerNetworkInterfaceOptions struct {
+ // The bare metal server identifier.
+ BareMetalServerID *string `json:"bare_metal_server_id" validate:"required,ne="`
+
+ // The network interface identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewGetBareMetalServerNetworkInterfaceOptions : Instantiate GetBareMetalServerNetworkInterfaceOptions
+func (*VpcV1) NewGetBareMetalServerNetworkInterfaceOptions(bareMetalServerID string, id string) *GetBareMetalServerNetworkInterfaceOptions {
+ return &GetBareMetalServerNetworkInterfaceOptions{
+ BareMetalServerID: core.StringPtr(bareMetalServerID),
+ ID: core.StringPtr(id),
+ }
+}
+
+// SetBareMetalServerID : Allow user to set BareMetalServerID
+func (_options *GetBareMetalServerNetworkInterfaceOptions) SetBareMetalServerID(bareMetalServerID string) *GetBareMetalServerNetworkInterfaceOptions {
+ _options.BareMetalServerID = core.StringPtr(bareMetalServerID)
+ return _options
+}
+
+// SetID : Allow user to set ID
+func (_options *GetBareMetalServerNetworkInterfaceOptions) SetID(id string) *GetBareMetalServerNetworkInterfaceOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *GetBareMetalServerNetworkInterfaceOptions) SetHeaders(param map[string]string) *GetBareMetalServerNetworkInterfaceOptions {
+ options.Headers = param
+ return options
+}
+
+// GetBareMetalServerOptions : The GetBareMetalServer options.
+type GetBareMetalServerOptions struct {
+ // The bare metal server identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewGetBareMetalServerOptions : Instantiate GetBareMetalServerOptions
+func (*VpcV1) NewGetBareMetalServerOptions(id string) *GetBareMetalServerOptions {
+ return &GetBareMetalServerOptions{
+ ID: core.StringPtr(id),
+ }
+}
+
+// SetID : Allow user to set ID
+func (_options *GetBareMetalServerOptions) SetID(id string) *GetBareMetalServerOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *GetBareMetalServerOptions) SetHeaders(param map[string]string) *GetBareMetalServerOptions {
+ options.Headers = param
+ return options
+}
+
+// GetBareMetalServerProfileOptions : The GetBareMetalServerProfile options.
+type GetBareMetalServerProfileOptions struct {
+ // The bare metal server profile name.
+ Name *string `json:"name" validate:"required,ne="`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewGetBareMetalServerProfileOptions : Instantiate GetBareMetalServerProfileOptions
+func (*VpcV1) NewGetBareMetalServerProfileOptions(name string) *GetBareMetalServerProfileOptions {
+ return &GetBareMetalServerProfileOptions{
+ Name: core.StringPtr(name),
+ }
+}
+
+// SetName : Allow user to set Name
+func (_options *GetBareMetalServerProfileOptions) SetName(name string) *GetBareMetalServerProfileOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *GetBareMetalServerProfileOptions) SetHeaders(param map[string]string) *GetBareMetalServerProfileOptions {
+ options.Headers = param
+ return options
+}
+
// GetDedicatedHostDiskOptions : The GetDedicatedHostDisk options.
type GetDedicatedHostDiskOptions struct {
// The dedicated host identifier.
- DedicatedHostID *string `validate:"required,ne="`
+ DedicatedHostID *string `json:"dedicated_host_id" validate:"required,ne="`
// The dedicated host disk identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24203,15 +30610,15 @@ func (*VpcV1) NewGetDedicatedHostDiskOptions(dedicatedHostID string, id string)
}
// SetDedicatedHostID : Allow user to set DedicatedHostID
-func (options *GetDedicatedHostDiskOptions) SetDedicatedHostID(dedicatedHostID string) *GetDedicatedHostDiskOptions {
- options.DedicatedHostID = core.StringPtr(dedicatedHostID)
- return options
+func (_options *GetDedicatedHostDiskOptions) SetDedicatedHostID(dedicatedHostID string) *GetDedicatedHostDiskOptions {
+ _options.DedicatedHostID = core.StringPtr(dedicatedHostID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *GetDedicatedHostDiskOptions) SetID(id string) *GetDedicatedHostDiskOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetDedicatedHostDiskOptions) SetID(id string) *GetDedicatedHostDiskOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -24223,7 +30630,7 @@ func (options *GetDedicatedHostDiskOptions) SetHeaders(param map[string]string)
// GetDedicatedHostGroupOptions : The GetDedicatedHostGroup options.
type GetDedicatedHostGroupOptions struct {
// The dedicated host group identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24237,9 +30644,9 @@ func (*VpcV1) NewGetDedicatedHostGroupOptions(id string) *GetDedicatedHostGroupO
}
// SetID : Allow user to set ID
-func (options *GetDedicatedHostGroupOptions) SetID(id string) *GetDedicatedHostGroupOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetDedicatedHostGroupOptions) SetID(id string) *GetDedicatedHostGroupOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -24251,7 +30658,7 @@ func (options *GetDedicatedHostGroupOptions) SetHeaders(param map[string]string)
// GetDedicatedHostOptions : The GetDedicatedHost options.
type GetDedicatedHostOptions struct {
// The dedicated host identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24265,9 +30672,9 @@ func (*VpcV1) NewGetDedicatedHostOptions(id string) *GetDedicatedHostOptions {
}
// SetID : Allow user to set ID
-func (options *GetDedicatedHostOptions) SetID(id string) *GetDedicatedHostOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetDedicatedHostOptions) SetID(id string) *GetDedicatedHostOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -24279,7 +30686,7 @@ func (options *GetDedicatedHostOptions) SetHeaders(param map[string]string) *Get
// GetDedicatedHostProfileOptions : The GetDedicatedHostProfile options.
type GetDedicatedHostProfileOptions struct {
// The dedicated host profile name.
- Name *string `validate:"required,ne="`
+ Name *string `json:"name" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24293,9 +30700,9 @@ func (*VpcV1) NewGetDedicatedHostProfileOptions(name string) *GetDedicatedHostPr
}
// SetName : Allow user to set Name
-func (options *GetDedicatedHostProfileOptions) SetName(name string) *GetDedicatedHostProfileOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *GetDedicatedHostProfileOptions) SetName(name string) *GetDedicatedHostProfileOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -24307,10 +30714,10 @@ func (options *GetDedicatedHostProfileOptions) SetHeaders(param map[string]strin
// GetEndpointGatewayIPOptions : The GetEndpointGatewayIP options.
type GetEndpointGatewayIPOptions struct {
// The endpoint gateway identifier.
- EndpointGatewayID *string `validate:"required,ne="`
+ EndpointGatewayID *string `json:"endpoint_gateway_id" validate:"required,ne="`
// The reserved IP identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24325,15 +30732,15 @@ func (*VpcV1) NewGetEndpointGatewayIPOptions(endpointGatewayID string, id string
}
// SetEndpointGatewayID : Allow user to set EndpointGatewayID
-func (options *GetEndpointGatewayIPOptions) SetEndpointGatewayID(endpointGatewayID string) *GetEndpointGatewayIPOptions {
- options.EndpointGatewayID = core.StringPtr(endpointGatewayID)
- return options
+func (_options *GetEndpointGatewayIPOptions) SetEndpointGatewayID(endpointGatewayID string) *GetEndpointGatewayIPOptions {
+ _options.EndpointGatewayID = core.StringPtr(endpointGatewayID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *GetEndpointGatewayIPOptions) SetID(id string) *GetEndpointGatewayIPOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetEndpointGatewayIPOptions) SetID(id string) *GetEndpointGatewayIPOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -24345,7 +30752,7 @@ func (options *GetEndpointGatewayIPOptions) SetHeaders(param map[string]string)
// GetEndpointGatewayOptions : The GetEndpointGateway options.
type GetEndpointGatewayOptions struct {
// The endpoint gateway identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24359,9 +30766,9 @@ func (*VpcV1) NewGetEndpointGatewayOptions(id string) *GetEndpointGatewayOptions
}
// SetID : Allow user to set ID
-func (options *GetEndpointGatewayOptions) SetID(id string) *GetEndpointGatewayOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetEndpointGatewayOptions) SetID(id string) *GetEndpointGatewayOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -24373,7 +30780,7 @@ func (options *GetEndpointGatewayOptions) SetHeaders(param map[string]string) *G
// GetFloatingIPOptions : The GetFloatingIP options.
type GetFloatingIPOptions struct {
// The floating IP identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24387,9 +30794,9 @@ func (*VpcV1) NewGetFloatingIPOptions(id string) *GetFloatingIPOptions {
}
// SetID : Allow user to set ID
-func (options *GetFloatingIPOptions) SetID(id string) *GetFloatingIPOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetFloatingIPOptions) SetID(id string) *GetFloatingIPOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -24401,7 +30808,7 @@ func (options *GetFloatingIPOptions) SetHeaders(param map[string]string) *GetFlo
// GetFlowLogCollectorOptions : The GetFlowLogCollector options.
type GetFlowLogCollectorOptions struct {
// The flow log collector identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24415,9 +30822,9 @@ func (*VpcV1) NewGetFlowLogCollectorOptions(id string) *GetFlowLogCollectorOptio
}
// SetID : Allow user to set ID
-func (options *GetFlowLogCollectorOptions) SetID(id string) *GetFlowLogCollectorOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetFlowLogCollectorOptions) SetID(id string) *GetFlowLogCollectorOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -24429,7 +30836,7 @@ func (options *GetFlowLogCollectorOptions) SetHeaders(param map[string]string) *
// GetIkePolicyOptions : The GetIkePolicy options.
type GetIkePolicyOptions struct {
// The IKE policy identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24443,9 +30850,9 @@ func (*VpcV1) NewGetIkePolicyOptions(id string) *GetIkePolicyOptions {
}
// SetID : Allow user to set ID
-func (options *GetIkePolicyOptions) SetID(id string) *GetIkePolicyOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetIkePolicyOptions) SetID(id string) *GetIkePolicyOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -24457,7 +30864,7 @@ func (options *GetIkePolicyOptions) SetHeaders(param map[string]string) *GetIkeP
// GetImageOptions : The GetImage options.
type GetImageOptions struct {
// The image identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24471,9 +30878,9 @@ func (*VpcV1) NewGetImageOptions(id string) *GetImageOptions {
}
// SetID : Allow user to set ID
-func (options *GetImageOptions) SetID(id string) *GetImageOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetImageOptions) SetID(id string) *GetImageOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -24485,10 +30892,10 @@ func (options *GetImageOptions) SetHeaders(param map[string]string) *GetImageOpt
// GetInstanceDiskOptions : The GetInstanceDisk options.
type GetInstanceDiskOptions struct {
// The instance identifier.
- InstanceID *string `validate:"required,ne="`
+ InstanceID *string `json:"instance_id" validate:"required,ne="`
// The instance disk identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24503,15 +30910,15 @@ func (*VpcV1) NewGetInstanceDiskOptions(instanceID string, id string) *GetInstan
}
// SetInstanceID : Allow user to set InstanceID
-func (options *GetInstanceDiskOptions) SetInstanceID(instanceID string) *GetInstanceDiskOptions {
- options.InstanceID = core.StringPtr(instanceID)
- return options
+func (_options *GetInstanceDiskOptions) SetInstanceID(instanceID string) *GetInstanceDiskOptions {
+ _options.InstanceID = core.StringPtr(instanceID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *GetInstanceDiskOptions) SetID(id string) *GetInstanceDiskOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetInstanceDiskOptions) SetID(id string) *GetInstanceDiskOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -24520,13 +30927,61 @@ func (options *GetInstanceDiskOptions) SetHeaders(param map[string]string) *GetI
return options
}
+// GetInstanceGroupManagerActionOptions : The GetInstanceGroupManagerAction options.
+type GetInstanceGroupManagerActionOptions struct {
+ // The instance group identifier.
+ InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="`
+
+ // The instance group manager identifier.
+ InstanceGroupManagerID *string `json:"instance_group_manager_id" validate:"required,ne="`
+
+ // The instance group manager action identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewGetInstanceGroupManagerActionOptions : Instantiate GetInstanceGroupManagerActionOptions
+func (*VpcV1) NewGetInstanceGroupManagerActionOptions(instanceGroupID string, instanceGroupManagerID string, id string) *GetInstanceGroupManagerActionOptions {
+ return &GetInstanceGroupManagerActionOptions{
+ InstanceGroupID: core.StringPtr(instanceGroupID),
+ InstanceGroupManagerID: core.StringPtr(instanceGroupManagerID),
+ ID: core.StringPtr(id),
+ }
+}
+
+// SetInstanceGroupID : Allow user to set InstanceGroupID
+func (_options *GetInstanceGroupManagerActionOptions) SetInstanceGroupID(instanceGroupID string) *GetInstanceGroupManagerActionOptions {
+ _options.InstanceGroupID = core.StringPtr(instanceGroupID)
+ return _options
+}
+
+// SetInstanceGroupManagerID : Allow user to set InstanceGroupManagerID
+func (_options *GetInstanceGroupManagerActionOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *GetInstanceGroupManagerActionOptions {
+ _options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
+ return _options
+}
+
+// SetID : Allow user to set ID
+func (_options *GetInstanceGroupManagerActionOptions) SetID(id string) *GetInstanceGroupManagerActionOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *GetInstanceGroupManagerActionOptions) SetHeaders(param map[string]string) *GetInstanceGroupManagerActionOptions {
+ options.Headers = param
+ return options
+}
+
// GetInstanceGroupManagerOptions : The GetInstanceGroupManager options.
type GetInstanceGroupManagerOptions struct {
// The instance group identifier.
- InstanceGroupID *string `validate:"required,ne="`
+ InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="`
// The instance group manager identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24541,15 +30996,15 @@ func (*VpcV1) NewGetInstanceGroupManagerOptions(instanceGroupID string, id strin
}
// SetInstanceGroupID : Allow user to set InstanceGroupID
-func (options *GetInstanceGroupManagerOptions) SetInstanceGroupID(instanceGroupID string) *GetInstanceGroupManagerOptions {
- options.InstanceGroupID = core.StringPtr(instanceGroupID)
- return options
+func (_options *GetInstanceGroupManagerOptions) SetInstanceGroupID(instanceGroupID string) *GetInstanceGroupManagerOptions {
+ _options.InstanceGroupID = core.StringPtr(instanceGroupID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *GetInstanceGroupManagerOptions) SetID(id string) *GetInstanceGroupManagerOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetInstanceGroupManagerOptions) SetID(id string) *GetInstanceGroupManagerOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -24561,13 +31016,13 @@ func (options *GetInstanceGroupManagerOptions) SetHeaders(param map[string]strin
// GetInstanceGroupManagerPolicyOptions : The GetInstanceGroupManagerPolicy options.
type GetInstanceGroupManagerPolicyOptions struct {
// The instance group identifier.
- InstanceGroupID *string `validate:"required,ne="`
+ InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="`
// The instance group manager identifier.
- InstanceGroupManagerID *string `validate:"required,ne="`
+ InstanceGroupManagerID *string `json:"instance_group_manager_id" validate:"required,ne="`
// The instance group manager policy identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24583,21 +31038,21 @@ func (*VpcV1) NewGetInstanceGroupManagerPolicyOptions(instanceGroupID string, in
}
// SetInstanceGroupID : Allow user to set InstanceGroupID
-func (options *GetInstanceGroupManagerPolicyOptions) SetInstanceGroupID(instanceGroupID string) *GetInstanceGroupManagerPolicyOptions {
- options.InstanceGroupID = core.StringPtr(instanceGroupID)
- return options
+func (_options *GetInstanceGroupManagerPolicyOptions) SetInstanceGroupID(instanceGroupID string) *GetInstanceGroupManagerPolicyOptions {
+ _options.InstanceGroupID = core.StringPtr(instanceGroupID)
+ return _options
}
// SetInstanceGroupManagerID : Allow user to set InstanceGroupManagerID
-func (options *GetInstanceGroupManagerPolicyOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *GetInstanceGroupManagerPolicyOptions {
- options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
- return options
+func (_options *GetInstanceGroupManagerPolicyOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *GetInstanceGroupManagerPolicyOptions {
+ _options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *GetInstanceGroupManagerPolicyOptions) SetID(id string) *GetInstanceGroupManagerPolicyOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetInstanceGroupManagerPolicyOptions) SetID(id string) *GetInstanceGroupManagerPolicyOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -24609,10 +31064,10 @@ func (options *GetInstanceGroupManagerPolicyOptions) SetHeaders(param map[string
// GetInstanceGroupMembershipOptions : The GetInstanceGroupMembership options.
type GetInstanceGroupMembershipOptions struct {
// The instance group identifier.
- InstanceGroupID *string `validate:"required,ne="`
+ InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="`
// The instance group membership identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24627,15 +31082,15 @@ func (*VpcV1) NewGetInstanceGroupMembershipOptions(instanceGroupID string, id st
}
// SetInstanceGroupID : Allow user to set InstanceGroupID
-func (options *GetInstanceGroupMembershipOptions) SetInstanceGroupID(instanceGroupID string) *GetInstanceGroupMembershipOptions {
- options.InstanceGroupID = core.StringPtr(instanceGroupID)
- return options
+func (_options *GetInstanceGroupMembershipOptions) SetInstanceGroupID(instanceGroupID string) *GetInstanceGroupMembershipOptions {
+ _options.InstanceGroupID = core.StringPtr(instanceGroupID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *GetInstanceGroupMembershipOptions) SetID(id string) *GetInstanceGroupMembershipOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetInstanceGroupMembershipOptions) SetID(id string) *GetInstanceGroupMembershipOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -24647,7 +31102,7 @@ func (options *GetInstanceGroupMembershipOptions) SetHeaders(param map[string]st
// GetInstanceGroupOptions : The GetInstanceGroup options.
type GetInstanceGroupOptions struct {
// The instance group identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24661,9 +31116,9 @@ func (*VpcV1) NewGetInstanceGroupOptions(id string) *GetInstanceGroupOptions {
}
// SetID : Allow user to set ID
-func (options *GetInstanceGroupOptions) SetID(id string) *GetInstanceGroupOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetInstanceGroupOptions) SetID(id string) *GetInstanceGroupOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -24675,7 +31130,7 @@ func (options *GetInstanceGroupOptions) SetHeaders(param map[string]string) *Get
// GetInstanceInitializationOptions : The GetInstanceInitialization options.
type GetInstanceInitializationOptions struct {
// The instance identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24689,9 +31144,9 @@ func (*VpcV1) NewGetInstanceInitializationOptions(id string) *GetInstanceInitial
}
// SetID : Allow user to set ID
-func (options *GetInstanceInitializationOptions) SetID(id string) *GetInstanceInitializationOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetInstanceInitializationOptions) SetID(id string) *GetInstanceInitializationOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -24703,13 +31158,13 @@ func (options *GetInstanceInitializationOptions) SetHeaders(param map[string]str
// GetInstanceNetworkInterfaceFloatingIPOptions : The GetInstanceNetworkInterfaceFloatingIP options.
type GetInstanceNetworkInterfaceFloatingIPOptions struct {
// The instance identifier.
- InstanceID *string `validate:"required,ne="`
+ InstanceID *string `json:"instance_id" validate:"required,ne="`
// The network interface identifier.
- NetworkInterfaceID *string `validate:"required,ne="`
+ NetworkInterfaceID *string `json:"network_interface_id" validate:"required,ne="`
// The floating IP identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24725,21 +31180,21 @@ func (*VpcV1) NewGetInstanceNetworkInterfaceFloatingIPOptions(instanceID string,
}
// SetInstanceID : Allow user to set InstanceID
-func (options *GetInstanceNetworkInterfaceFloatingIPOptions) SetInstanceID(instanceID string) *GetInstanceNetworkInterfaceFloatingIPOptions {
- options.InstanceID = core.StringPtr(instanceID)
- return options
+func (_options *GetInstanceNetworkInterfaceFloatingIPOptions) SetInstanceID(instanceID string) *GetInstanceNetworkInterfaceFloatingIPOptions {
+ _options.InstanceID = core.StringPtr(instanceID)
+ return _options
}
// SetNetworkInterfaceID : Allow user to set NetworkInterfaceID
-func (options *GetInstanceNetworkInterfaceFloatingIPOptions) SetNetworkInterfaceID(networkInterfaceID string) *GetInstanceNetworkInterfaceFloatingIPOptions {
- options.NetworkInterfaceID = core.StringPtr(networkInterfaceID)
- return options
+func (_options *GetInstanceNetworkInterfaceFloatingIPOptions) SetNetworkInterfaceID(networkInterfaceID string) *GetInstanceNetworkInterfaceFloatingIPOptions {
+ _options.NetworkInterfaceID = core.StringPtr(networkInterfaceID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *GetInstanceNetworkInterfaceFloatingIPOptions) SetID(id string) *GetInstanceNetworkInterfaceFloatingIPOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetInstanceNetworkInterfaceFloatingIPOptions) SetID(id string) *GetInstanceNetworkInterfaceFloatingIPOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -24748,13 +31203,61 @@ func (options *GetInstanceNetworkInterfaceFloatingIPOptions) SetHeaders(param ma
return options
}
+// GetInstanceNetworkInterfaceIPOptions : The GetInstanceNetworkInterfaceIP options.
+type GetInstanceNetworkInterfaceIPOptions struct {
+ // The instance identifier.
+ InstanceID *string `json:"instance_id" validate:"required,ne="`
+
+ // The network interface identifier.
+ NetworkInterfaceID *string `json:"network_interface_id" validate:"required,ne="`
+
+ // The reserved IP identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewGetInstanceNetworkInterfaceIPOptions : Instantiate GetInstanceNetworkInterfaceIPOptions
+func (*VpcV1) NewGetInstanceNetworkInterfaceIPOptions(instanceID string, networkInterfaceID string, id string) *GetInstanceNetworkInterfaceIPOptions {
+ return &GetInstanceNetworkInterfaceIPOptions{
+ InstanceID: core.StringPtr(instanceID),
+ NetworkInterfaceID: core.StringPtr(networkInterfaceID),
+ ID: core.StringPtr(id),
+ }
+}
+
+// SetInstanceID : Allow user to set InstanceID
+func (_options *GetInstanceNetworkInterfaceIPOptions) SetInstanceID(instanceID string) *GetInstanceNetworkInterfaceIPOptions {
+ _options.InstanceID = core.StringPtr(instanceID)
+ return _options
+}
+
+// SetNetworkInterfaceID : Allow user to set NetworkInterfaceID
+func (_options *GetInstanceNetworkInterfaceIPOptions) SetNetworkInterfaceID(networkInterfaceID string) *GetInstanceNetworkInterfaceIPOptions {
+ _options.NetworkInterfaceID = core.StringPtr(networkInterfaceID)
+ return _options
+}
+
+// SetID : Allow user to set ID
+func (_options *GetInstanceNetworkInterfaceIPOptions) SetID(id string) *GetInstanceNetworkInterfaceIPOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *GetInstanceNetworkInterfaceIPOptions) SetHeaders(param map[string]string) *GetInstanceNetworkInterfaceIPOptions {
+ options.Headers = param
+ return options
+}
+
// GetInstanceNetworkInterfaceOptions : The GetInstanceNetworkInterface options.
type GetInstanceNetworkInterfaceOptions struct {
// The instance identifier.
- InstanceID *string `validate:"required,ne="`
+ InstanceID *string `json:"instance_id" validate:"required,ne="`
// The network interface identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24769,15 +31272,15 @@ func (*VpcV1) NewGetInstanceNetworkInterfaceOptions(instanceID string, id string
}
// SetInstanceID : Allow user to set InstanceID
-func (options *GetInstanceNetworkInterfaceOptions) SetInstanceID(instanceID string) *GetInstanceNetworkInterfaceOptions {
- options.InstanceID = core.StringPtr(instanceID)
- return options
+func (_options *GetInstanceNetworkInterfaceOptions) SetInstanceID(instanceID string) *GetInstanceNetworkInterfaceOptions {
+ _options.InstanceID = core.StringPtr(instanceID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *GetInstanceNetworkInterfaceOptions) SetID(id string) *GetInstanceNetworkInterfaceOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetInstanceNetworkInterfaceOptions) SetID(id string) *GetInstanceNetworkInterfaceOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -24789,7 +31292,7 @@ func (options *GetInstanceNetworkInterfaceOptions) SetHeaders(param map[string]s
// GetInstanceOptions : The GetInstance options.
type GetInstanceOptions struct {
// The instance identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24803,9 +31306,9 @@ func (*VpcV1) NewGetInstanceOptions(id string) *GetInstanceOptions {
}
// SetID : Allow user to set ID
-func (options *GetInstanceOptions) SetID(id string) *GetInstanceOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetInstanceOptions) SetID(id string) *GetInstanceOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -24817,7 +31320,7 @@ func (options *GetInstanceOptions) SetHeaders(param map[string]string) *GetInsta
// GetInstanceProfileOptions : The GetInstanceProfile options.
type GetInstanceProfileOptions struct {
// The instance profile name.
- Name *string `validate:"required,ne="`
+ Name *string `json:"name" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24831,9 +31334,9 @@ func (*VpcV1) NewGetInstanceProfileOptions(name string) *GetInstanceProfileOptio
}
// SetName : Allow user to set Name
-func (options *GetInstanceProfileOptions) SetName(name string) *GetInstanceProfileOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *GetInstanceProfileOptions) SetName(name string) *GetInstanceProfileOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -24845,7 +31348,7 @@ func (options *GetInstanceProfileOptions) SetHeaders(param map[string]string) *G
// GetInstanceTemplateOptions : The GetInstanceTemplate options.
type GetInstanceTemplateOptions struct {
// The instance template identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24859,9 +31362,9 @@ func (*VpcV1) NewGetInstanceTemplateOptions(id string) *GetInstanceTemplateOptio
}
// SetID : Allow user to set ID
-func (options *GetInstanceTemplateOptions) SetID(id string) *GetInstanceTemplateOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetInstanceTemplateOptions) SetID(id string) *GetInstanceTemplateOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -24873,10 +31376,10 @@ func (options *GetInstanceTemplateOptions) SetHeaders(param map[string]string) *
// GetInstanceVolumeAttachmentOptions : The GetInstanceVolumeAttachment options.
type GetInstanceVolumeAttachmentOptions struct {
// The instance identifier.
- InstanceID *string `validate:"required,ne="`
+ InstanceID *string `json:"instance_id" validate:"required,ne="`
// The volume attachment identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24891,15 +31394,15 @@ func (*VpcV1) NewGetInstanceVolumeAttachmentOptions(instanceID string, id string
}
// SetInstanceID : Allow user to set InstanceID
-func (options *GetInstanceVolumeAttachmentOptions) SetInstanceID(instanceID string) *GetInstanceVolumeAttachmentOptions {
- options.InstanceID = core.StringPtr(instanceID)
- return options
+func (_options *GetInstanceVolumeAttachmentOptions) SetInstanceID(instanceID string) *GetInstanceVolumeAttachmentOptions {
+ _options.InstanceID = core.StringPtr(instanceID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *GetInstanceVolumeAttachmentOptions) SetID(id string) *GetInstanceVolumeAttachmentOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetInstanceVolumeAttachmentOptions) SetID(id string) *GetInstanceVolumeAttachmentOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -24911,7 +31414,7 @@ func (options *GetInstanceVolumeAttachmentOptions) SetHeaders(param map[string]s
// GetIpsecPolicyOptions : The GetIpsecPolicy options.
type GetIpsecPolicyOptions struct {
// The IPsec policy identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24925,9 +31428,9 @@ func (*VpcV1) NewGetIpsecPolicyOptions(id string) *GetIpsecPolicyOptions {
}
// SetID : Allow user to set ID
-func (options *GetIpsecPolicyOptions) SetID(id string) *GetIpsecPolicyOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetIpsecPolicyOptions) SetID(id string) *GetIpsecPolicyOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -24939,7 +31442,7 @@ func (options *GetIpsecPolicyOptions) SetHeaders(param map[string]string) *GetIp
// GetKeyOptions : The GetKey options.
type GetKeyOptions struct {
// The key identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24953,9 +31456,9 @@ func (*VpcV1) NewGetKeyOptions(id string) *GetKeyOptions {
}
// SetID : Allow user to set ID
-func (options *GetKeyOptions) SetID(id string) *GetKeyOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetKeyOptions) SetID(id string) *GetKeyOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -24967,10 +31470,10 @@ func (options *GetKeyOptions) SetHeaders(param map[string]string) *GetKeyOptions
// GetLoadBalancerListenerOptions : The GetLoadBalancerListener options.
type GetLoadBalancerListenerOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// The listener identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -24985,15 +31488,15 @@ func (*VpcV1) NewGetLoadBalancerListenerOptions(loadBalancerID string, id string
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *GetLoadBalancerListenerOptions) SetLoadBalancerID(loadBalancerID string) *GetLoadBalancerListenerOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *GetLoadBalancerListenerOptions) SetLoadBalancerID(loadBalancerID string) *GetLoadBalancerListenerOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *GetLoadBalancerListenerOptions) SetID(id string) *GetLoadBalancerListenerOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetLoadBalancerListenerOptions) SetID(id string) *GetLoadBalancerListenerOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25005,13 +31508,13 @@ func (options *GetLoadBalancerListenerOptions) SetHeaders(param map[string]strin
// GetLoadBalancerListenerPolicyOptions : The GetLoadBalancerListenerPolicy options.
type GetLoadBalancerListenerPolicyOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// The listener identifier.
- ListenerID *string `validate:"required,ne="`
+ ListenerID *string `json:"listener_id" validate:"required,ne="`
// The policy identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25027,21 +31530,21 @@ func (*VpcV1) NewGetLoadBalancerListenerPolicyOptions(loadBalancerID string, lis
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *GetLoadBalancerListenerPolicyOptions) SetLoadBalancerID(loadBalancerID string) *GetLoadBalancerListenerPolicyOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *GetLoadBalancerListenerPolicyOptions) SetLoadBalancerID(loadBalancerID string) *GetLoadBalancerListenerPolicyOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetListenerID : Allow user to set ListenerID
-func (options *GetLoadBalancerListenerPolicyOptions) SetListenerID(listenerID string) *GetLoadBalancerListenerPolicyOptions {
- options.ListenerID = core.StringPtr(listenerID)
- return options
+func (_options *GetLoadBalancerListenerPolicyOptions) SetListenerID(listenerID string) *GetLoadBalancerListenerPolicyOptions {
+ _options.ListenerID = core.StringPtr(listenerID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *GetLoadBalancerListenerPolicyOptions) SetID(id string) *GetLoadBalancerListenerPolicyOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetLoadBalancerListenerPolicyOptions) SetID(id string) *GetLoadBalancerListenerPolicyOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25053,16 +31556,16 @@ func (options *GetLoadBalancerListenerPolicyOptions) SetHeaders(param map[string
// GetLoadBalancerListenerPolicyRuleOptions : The GetLoadBalancerListenerPolicyRule options.
type GetLoadBalancerListenerPolicyRuleOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// The listener identifier.
- ListenerID *string `validate:"required,ne="`
+ ListenerID *string `json:"listener_id" validate:"required,ne="`
// The policy identifier.
- PolicyID *string `validate:"required,ne="`
+ PolicyID *string `json:"policy_id" validate:"required,ne="`
// The rule identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25079,27 +31582,27 @@ func (*VpcV1) NewGetLoadBalancerListenerPolicyRuleOptions(loadBalancerID string,
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *GetLoadBalancerListenerPolicyRuleOptions) SetLoadBalancerID(loadBalancerID string) *GetLoadBalancerListenerPolicyRuleOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *GetLoadBalancerListenerPolicyRuleOptions) SetLoadBalancerID(loadBalancerID string) *GetLoadBalancerListenerPolicyRuleOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetListenerID : Allow user to set ListenerID
-func (options *GetLoadBalancerListenerPolicyRuleOptions) SetListenerID(listenerID string) *GetLoadBalancerListenerPolicyRuleOptions {
- options.ListenerID = core.StringPtr(listenerID)
- return options
+func (_options *GetLoadBalancerListenerPolicyRuleOptions) SetListenerID(listenerID string) *GetLoadBalancerListenerPolicyRuleOptions {
+ _options.ListenerID = core.StringPtr(listenerID)
+ return _options
}
// SetPolicyID : Allow user to set PolicyID
-func (options *GetLoadBalancerListenerPolicyRuleOptions) SetPolicyID(policyID string) *GetLoadBalancerListenerPolicyRuleOptions {
- options.PolicyID = core.StringPtr(policyID)
- return options
+func (_options *GetLoadBalancerListenerPolicyRuleOptions) SetPolicyID(policyID string) *GetLoadBalancerListenerPolicyRuleOptions {
+ _options.PolicyID = core.StringPtr(policyID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *GetLoadBalancerListenerPolicyRuleOptions) SetID(id string) *GetLoadBalancerListenerPolicyRuleOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetLoadBalancerListenerPolicyRuleOptions) SetID(id string) *GetLoadBalancerListenerPolicyRuleOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25111,7 +31614,7 @@ func (options *GetLoadBalancerListenerPolicyRuleOptions) SetHeaders(param map[st
// GetLoadBalancerOptions : The GetLoadBalancer options.
type GetLoadBalancerOptions struct {
// The load balancer identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25125,9 +31628,9 @@ func (*VpcV1) NewGetLoadBalancerOptions(id string) *GetLoadBalancerOptions {
}
// SetID : Allow user to set ID
-func (options *GetLoadBalancerOptions) SetID(id string) *GetLoadBalancerOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetLoadBalancerOptions) SetID(id string) *GetLoadBalancerOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25139,13 +31642,13 @@ func (options *GetLoadBalancerOptions) SetHeaders(param map[string]string) *GetL
// GetLoadBalancerPoolMemberOptions : The GetLoadBalancerPoolMember options.
type GetLoadBalancerPoolMemberOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// The pool identifier.
- PoolID *string `validate:"required,ne="`
+ PoolID *string `json:"pool_id" validate:"required,ne="`
// The member identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25161,21 +31664,21 @@ func (*VpcV1) NewGetLoadBalancerPoolMemberOptions(loadBalancerID string, poolID
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *GetLoadBalancerPoolMemberOptions) SetLoadBalancerID(loadBalancerID string) *GetLoadBalancerPoolMemberOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *GetLoadBalancerPoolMemberOptions) SetLoadBalancerID(loadBalancerID string) *GetLoadBalancerPoolMemberOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetPoolID : Allow user to set PoolID
-func (options *GetLoadBalancerPoolMemberOptions) SetPoolID(poolID string) *GetLoadBalancerPoolMemberOptions {
- options.PoolID = core.StringPtr(poolID)
- return options
+func (_options *GetLoadBalancerPoolMemberOptions) SetPoolID(poolID string) *GetLoadBalancerPoolMemberOptions {
+ _options.PoolID = core.StringPtr(poolID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *GetLoadBalancerPoolMemberOptions) SetID(id string) *GetLoadBalancerPoolMemberOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetLoadBalancerPoolMemberOptions) SetID(id string) *GetLoadBalancerPoolMemberOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25187,10 +31690,10 @@ func (options *GetLoadBalancerPoolMemberOptions) SetHeaders(param map[string]str
// GetLoadBalancerPoolOptions : The GetLoadBalancerPool options.
type GetLoadBalancerPoolOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// The pool identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25205,15 +31708,15 @@ func (*VpcV1) NewGetLoadBalancerPoolOptions(loadBalancerID string, id string) *G
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *GetLoadBalancerPoolOptions) SetLoadBalancerID(loadBalancerID string) *GetLoadBalancerPoolOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *GetLoadBalancerPoolOptions) SetLoadBalancerID(loadBalancerID string) *GetLoadBalancerPoolOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *GetLoadBalancerPoolOptions) SetID(id string) *GetLoadBalancerPoolOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetLoadBalancerPoolOptions) SetID(id string) *GetLoadBalancerPoolOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25225,7 +31728,7 @@ func (options *GetLoadBalancerPoolOptions) SetHeaders(param map[string]string) *
// GetLoadBalancerProfileOptions : The GetLoadBalancerProfile options.
type GetLoadBalancerProfileOptions struct {
// The load balancer profile name.
- Name *string `validate:"required,ne="`
+ Name *string `json:"name" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25239,9 +31742,9 @@ func (*VpcV1) NewGetLoadBalancerProfileOptions(name string) *GetLoadBalancerProf
}
// SetName : Allow user to set Name
-func (options *GetLoadBalancerProfileOptions) SetName(name string) *GetLoadBalancerProfileOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *GetLoadBalancerProfileOptions) SetName(name string) *GetLoadBalancerProfileOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25253,7 +31756,7 @@ func (options *GetLoadBalancerProfileOptions) SetHeaders(param map[string]string
// GetLoadBalancerStatisticsOptions : The GetLoadBalancerStatistics options.
type GetLoadBalancerStatisticsOptions struct {
// The load balancer identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25267,9 +31770,9 @@ func (*VpcV1) NewGetLoadBalancerStatisticsOptions(id string) *GetLoadBalancerSta
}
// SetID : Allow user to set ID
-func (options *GetLoadBalancerStatisticsOptions) SetID(id string) *GetLoadBalancerStatisticsOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetLoadBalancerStatisticsOptions) SetID(id string) *GetLoadBalancerStatisticsOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25281,7 +31784,7 @@ func (options *GetLoadBalancerStatisticsOptions) SetHeaders(param map[string]str
// GetNetworkACLOptions : The GetNetworkACL options.
type GetNetworkACLOptions struct {
// The network ACL identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25295,9 +31798,9 @@ func (*VpcV1) NewGetNetworkACLOptions(id string) *GetNetworkACLOptions {
}
// SetID : Allow user to set ID
-func (options *GetNetworkACLOptions) SetID(id string) *GetNetworkACLOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetNetworkACLOptions) SetID(id string) *GetNetworkACLOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25309,10 +31812,10 @@ func (options *GetNetworkACLOptions) SetHeaders(param map[string]string) *GetNet
// GetNetworkACLRuleOptions : The GetNetworkACLRule options.
type GetNetworkACLRuleOptions struct {
// The network ACL identifier.
- NetworkACLID *string `validate:"required,ne="`
+ NetworkACLID *string `json:"network_acl_id" validate:"required,ne="`
// The rule identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25327,15 +31830,15 @@ func (*VpcV1) NewGetNetworkACLRuleOptions(networkACLID string, id string) *GetNe
}
// SetNetworkACLID : Allow user to set NetworkACLID
-func (options *GetNetworkACLRuleOptions) SetNetworkACLID(networkACLID string) *GetNetworkACLRuleOptions {
- options.NetworkACLID = core.StringPtr(networkACLID)
- return options
+func (_options *GetNetworkACLRuleOptions) SetNetworkACLID(networkACLID string) *GetNetworkACLRuleOptions {
+ _options.NetworkACLID = core.StringPtr(networkACLID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *GetNetworkACLRuleOptions) SetID(id string) *GetNetworkACLRuleOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetNetworkACLRuleOptions) SetID(id string) *GetNetworkACLRuleOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25347,7 +31850,7 @@ func (options *GetNetworkACLRuleOptions) SetHeaders(param map[string]string) *Ge
// GetOperatingSystemOptions : The GetOperatingSystem options.
type GetOperatingSystemOptions struct {
// The operating system name.
- Name *string `validate:"required,ne="`
+ Name *string `json:"name" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25361,9 +31864,9 @@ func (*VpcV1) NewGetOperatingSystemOptions(name string) *GetOperatingSystemOptio
}
// SetName : Allow user to set Name
-func (options *GetOperatingSystemOptions) SetName(name string) *GetOperatingSystemOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *GetOperatingSystemOptions) SetName(name string) *GetOperatingSystemOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25372,10 +31875,38 @@ func (options *GetOperatingSystemOptions) SetHeaders(param map[string]string) *G
return options
}
+// GetPlacementGroupOptions : The GetPlacementGroup options.
+type GetPlacementGroupOptions struct {
+ // The placement group identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewGetPlacementGroupOptions : Instantiate GetPlacementGroupOptions
+func (*VpcV1) NewGetPlacementGroupOptions(id string) *GetPlacementGroupOptions {
+ return &GetPlacementGroupOptions{
+ ID: core.StringPtr(id),
+ }
+}
+
+// SetID : Allow user to set ID
+func (_options *GetPlacementGroupOptions) SetID(id string) *GetPlacementGroupOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *GetPlacementGroupOptions) SetHeaders(param map[string]string) *GetPlacementGroupOptions {
+ options.Headers = param
+ return options
+}
+
// GetPublicGatewayOptions : The GetPublicGateway options.
type GetPublicGatewayOptions struct {
// The public gateway identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25389,9 +31920,9 @@ func (*VpcV1) NewGetPublicGatewayOptions(id string) *GetPublicGatewayOptions {
}
// SetID : Allow user to set ID
-func (options *GetPublicGatewayOptions) SetID(id string) *GetPublicGatewayOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetPublicGatewayOptions) SetID(id string) *GetPublicGatewayOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25403,7 +31934,7 @@ func (options *GetPublicGatewayOptions) SetHeaders(param map[string]string) *Get
// GetRegionOptions : The GetRegion options.
type GetRegionOptions struct {
// The region name.
- Name *string `validate:"required,ne="`
+ Name *string `json:"name" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25417,9 +31948,9 @@ func (*VpcV1) NewGetRegionOptions(name string) *GetRegionOptions {
}
// SetName : Allow user to set Name
-func (options *GetRegionOptions) SetName(name string) *GetRegionOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *GetRegionOptions) SetName(name string) *GetRegionOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25431,10 +31962,10 @@ func (options *GetRegionOptions) SetHeaders(param map[string]string) *GetRegionO
// GetRegionZoneOptions : The GetRegionZone options.
type GetRegionZoneOptions struct {
// The region name.
- RegionName *string `validate:"required,ne="`
+ RegionName *string `json:"region_name" validate:"required,ne="`
// The zone name.
- Name *string `validate:"required,ne="`
+ Name *string `json:"name" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25449,15 +31980,15 @@ func (*VpcV1) NewGetRegionZoneOptions(regionName string, name string) *GetRegion
}
// SetRegionName : Allow user to set RegionName
-func (options *GetRegionZoneOptions) SetRegionName(regionName string) *GetRegionZoneOptions {
- options.RegionName = core.StringPtr(regionName)
- return options
+func (_options *GetRegionZoneOptions) SetRegionName(regionName string) *GetRegionZoneOptions {
+ _options.RegionName = core.StringPtr(regionName)
+ return _options
}
// SetName : Allow user to set Name
-func (options *GetRegionZoneOptions) SetName(name string) *GetRegionZoneOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *GetRegionZoneOptions) SetName(name string) *GetRegionZoneOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25466,48 +31997,10 @@ func (options *GetRegionZoneOptions) SetHeaders(param map[string]string) *GetReg
return options
}
-// GetSecurityGroupNetworkInterfaceOptions : The GetSecurityGroupNetworkInterface options.
-type GetSecurityGroupNetworkInterfaceOptions struct {
- // The security group identifier.
- SecurityGroupID *string `validate:"required,ne="`
-
- // The network interface identifier.
- ID *string `validate:"required,ne="`
-
- // Allows users to set headers on API requests
- Headers map[string]string
-}
-
-// NewGetSecurityGroupNetworkInterfaceOptions : Instantiate GetSecurityGroupNetworkInterfaceOptions
-func (*VpcV1) NewGetSecurityGroupNetworkInterfaceOptions(securityGroupID string, id string) *GetSecurityGroupNetworkInterfaceOptions {
- return &GetSecurityGroupNetworkInterfaceOptions{
- SecurityGroupID: core.StringPtr(securityGroupID),
- ID: core.StringPtr(id),
- }
-}
-
-// SetSecurityGroupID : Allow user to set SecurityGroupID
-func (options *GetSecurityGroupNetworkInterfaceOptions) SetSecurityGroupID(securityGroupID string) *GetSecurityGroupNetworkInterfaceOptions {
- options.SecurityGroupID = core.StringPtr(securityGroupID)
- return options
-}
-
-// SetID : Allow user to set ID
-func (options *GetSecurityGroupNetworkInterfaceOptions) SetID(id string) *GetSecurityGroupNetworkInterfaceOptions {
- options.ID = core.StringPtr(id)
- return options
-}
-
-// SetHeaders : Allow user to set Headers
-func (options *GetSecurityGroupNetworkInterfaceOptions) SetHeaders(param map[string]string) *GetSecurityGroupNetworkInterfaceOptions {
- options.Headers = param
- return options
-}
-
// GetSecurityGroupOptions : The GetSecurityGroup options.
type GetSecurityGroupOptions struct {
// The security group identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25521,9 +32014,9 @@ func (*VpcV1) NewGetSecurityGroupOptions(id string) *GetSecurityGroupOptions {
}
// SetID : Allow user to set ID
-func (options *GetSecurityGroupOptions) SetID(id string) *GetSecurityGroupOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetSecurityGroupOptions) SetID(id string) *GetSecurityGroupOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25535,10 +32028,10 @@ func (options *GetSecurityGroupOptions) SetHeaders(param map[string]string) *Get
// GetSecurityGroupRuleOptions : The GetSecurityGroupRule options.
type GetSecurityGroupRuleOptions struct {
// The security group identifier.
- SecurityGroupID *string `validate:"required,ne="`
+ SecurityGroupID *string `json:"security_group_id" validate:"required,ne="`
// The rule identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25553,15 +32046,15 @@ func (*VpcV1) NewGetSecurityGroupRuleOptions(securityGroupID string, id string)
}
// SetSecurityGroupID : Allow user to set SecurityGroupID
-func (options *GetSecurityGroupRuleOptions) SetSecurityGroupID(securityGroupID string) *GetSecurityGroupRuleOptions {
- options.SecurityGroupID = core.StringPtr(securityGroupID)
- return options
+func (_options *GetSecurityGroupRuleOptions) SetSecurityGroupID(securityGroupID string) *GetSecurityGroupRuleOptions {
+ _options.SecurityGroupID = core.StringPtr(securityGroupID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *GetSecurityGroupRuleOptions) SetID(id string) *GetSecurityGroupRuleOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetSecurityGroupRuleOptions) SetID(id string) *GetSecurityGroupRuleOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25573,10 +32066,10 @@ func (options *GetSecurityGroupRuleOptions) SetHeaders(param map[string]string)
// GetSecurityGroupTargetOptions : The GetSecurityGroupTarget options.
type GetSecurityGroupTargetOptions struct {
// The security group identifier.
- SecurityGroupID *string `validate:"required,ne="`
+ SecurityGroupID *string `json:"security_group_id" validate:"required,ne="`
// The security group target identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25591,15 +32084,15 @@ func (*VpcV1) NewGetSecurityGroupTargetOptions(securityGroupID string, id string
}
// SetSecurityGroupID : Allow user to set SecurityGroupID
-func (options *GetSecurityGroupTargetOptions) SetSecurityGroupID(securityGroupID string) *GetSecurityGroupTargetOptions {
- options.SecurityGroupID = core.StringPtr(securityGroupID)
- return options
+func (_options *GetSecurityGroupTargetOptions) SetSecurityGroupID(securityGroupID string) *GetSecurityGroupTargetOptions {
+ _options.SecurityGroupID = core.StringPtr(securityGroupID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *GetSecurityGroupTargetOptions) SetID(id string) *GetSecurityGroupTargetOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetSecurityGroupTargetOptions) SetID(id string) *GetSecurityGroupTargetOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25608,10 +32101,38 @@ func (options *GetSecurityGroupTargetOptions) SetHeaders(param map[string]string
return options
}
+// GetSnapshotOptions : The GetSnapshot options.
+type GetSnapshotOptions struct {
+ // The snapshot identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewGetSnapshotOptions : Instantiate GetSnapshotOptions
+func (*VpcV1) NewGetSnapshotOptions(id string) *GetSnapshotOptions {
+ return &GetSnapshotOptions{
+ ID: core.StringPtr(id),
+ }
+}
+
+// SetID : Allow user to set ID
+func (_options *GetSnapshotOptions) SetID(id string) *GetSnapshotOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *GetSnapshotOptions) SetHeaders(param map[string]string) *GetSnapshotOptions {
+ options.Headers = param
+ return options
+}
+
// GetSubnetNetworkACLOptions : The GetSubnetNetworkACL options.
type GetSubnetNetworkACLOptions struct {
// The subnet identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25625,9 +32146,9 @@ func (*VpcV1) NewGetSubnetNetworkACLOptions(id string) *GetSubnetNetworkACLOptio
}
// SetID : Allow user to set ID
-func (options *GetSubnetNetworkACLOptions) SetID(id string) *GetSubnetNetworkACLOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetSubnetNetworkACLOptions) SetID(id string) *GetSubnetNetworkACLOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25639,7 +32160,7 @@ func (options *GetSubnetNetworkACLOptions) SetHeaders(param map[string]string) *
// GetSubnetOptions : The GetSubnet options.
type GetSubnetOptions struct {
// The subnet identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25653,9 +32174,9 @@ func (*VpcV1) NewGetSubnetOptions(id string) *GetSubnetOptions {
}
// SetID : Allow user to set ID
-func (options *GetSubnetOptions) SetID(id string) *GetSubnetOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetSubnetOptions) SetID(id string) *GetSubnetOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25667,7 +32188,7 @@ func (options *GetSubnetOptions) SetHeaders(param map[string]string) *GetSubnetO
// GetSubnetPublicGatewayOptions : The GetSubnetPublicGateway options.
type GetSubnetPublicGatewayOptions struct {
// The subnet identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25681,9 +32202,9 @@ func (*VpcV1) NewGetSubnetPublicGatewayOptions(id string) *GetSubnetPublicGatewa
}
// SetID : Allow user to set ID
-func (options *GetSubnetPublicGatewayOptions) SetID(id string) *GetSubnetPublicGatewayOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetSubnetPublicGatewayOptions) SetID(id string) *GetSubnetPublicGatewayOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25695,10 +32216,10 @@ func (options *GetSubnetPublicGatewayOptions) SetHeaders(param map[string]string
// GetSubnetReservedIPOptions : The GetSubnetReservedIP options.
type GetSubnetReservedIPOptions struct {
// The subnet identifier.
- SubnetID *string `validate:"required,ne="`
+ SubnetID *string `json:"subnet_id" validate:"required,ne="`
// The reserved IP identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25713,15 +32234,15 @@ func (*VpcV1) NewGetSubnetReservedIPOptions(subnetID string, id string) *GetSubn
}
// SetSubnetID : Allow user to set SubnetID
-func (options *GetSubnetReservedIPOptions) SetSubnetID(subnetID string) *GetSubnetReservedIPOptions {
- options.SubnetID = core.StringPtr(subnetID)
- return options
+func (_options *GetSubnetReservedIPOptions) SetSubnetID(subnetID string) *GetSubnetReservedIPOptions {
+ _options.SubnetID = core.StringPtr(subnetID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *GetSubnetReservedIPOptions) SetID(id string) *GetSubnetReservedIPOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetSubnetReservedIPOptions) SetID(id string) *GetSubnetReservedIPOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25733,7 +32254,7 @@ func (options *GetSubnetReservedIPOptions) SetHeaders(param map[string]string) *
// GetSubnetRoutingTableOptions : The GetSubnetRoutingTable options.
type GetSubnetRoutingTableOptions struct {
// The subnet identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25747,9 +32268,9 @@ func (*VpcV1) NewGetSubnetRoutingTableOptions(id string) *GetSubnetRoutingTableO
}
// SetID : Allow user to set ID
-func (options *GetSubnetRoutingTableOptions) SetID(id string) *GetSubnetRoutingTableOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetSubnetRoutingTableOptions) SetID(id string) *GetSubnetRoutingTableOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25761,7 +32282,7 @@ func (options *GetSubnetRoutingTableOptions) SetHeaders(param map[string]string)
// GetVolumeOptions : The GetVolume options.
type GetVolumeOptions struct {
// The volume identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25775,9 +32296,9 @@ func (*VpcV1) NewGetVolumeOptions(id string) *GetVolumeOptions {
}
// SetID : Allow user to set ID
-func (options *GetVolumeOptions) SetID(id string) *GetVolumeOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetVolumeOptions) SetID(id string) *GetVolumeOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25789,7 +32310,7 @@ func (options *GetVolumeOptions) SetHeaders(param map[string]string) *GetVolumeO
// GetVolumeProfileOptions : The GetVolumeProfile options.
type GetVolumeProfileOptions struct {
// The volume profile name.
- Name *string `validate:"required,ne="`
+ Name *string `json:"name" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25803,9 +32324,9 @@ func (*VpcV1) NewGetVolumeProfileOptions(name string) *GetVolumeProfileOptions {
}
// SetName : Allow user to set Name
-func (options *GetVolumeProfileOptions) SetName(name string) *GetVolumeProfileOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *GetVolumeProfileOptions) SetName(name string) *GetVolumeProfileOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25817,10 +32338,10 @@ func (options *GetVolumeProfileOptions) SetHeaders(param map[string]string) *Get
// GetVPCAddressPrefixOptions : The GetVPCAddressPrefix options.
type GetVPCAddressPrefixOptions struct {
// The VPC identifier.
- VPCID *string `validate:"required,ne="`
+ VPCID *string `json:"vpc_id" validate:"required,ne="`
// The prefix identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25835,15 +32356,15 @@ func (*VpcV1) NewGetVPCAddressPrefixOptions(vpcID string, id string) *GetVPCAddr
}
// SetVPCID : Allow user to set VPCID
-func (options *GetVPCAddressPrefixOptions) SetVPCID(vpcID string) *GetVPCAddressPrefixOptions {
- options.VPCID = core.StringPtr(vpcID)
- return options
+func (_options *GetVPCAddressPrefixOptions) SetVPCID(vpcID string) *GetVPCAddressPrefixOptions {
+ _options.VPCID = core.StringPtr(vpcID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *GetVPCAddressPrefixOptions) SetID(id string) *GetVPCAddressPrefixOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetVPCAddressPrefixOptions) SetID(id string) *GetVPCAddressPrefixOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25855,7 +32376,7 @@ func (options *GetVPCAddressPrefixOptions) SetHeaders(param map[string]string) *
// GetVPCDefaultNetworkACLOptions : The GetVPCDefaultNetworkACL options.
type GetVPCDefaultNetworkACLOptions struct {
// The VPC identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25869,9 +32390,9 @@ func (*VpcV1) NewGetVPCDefaultNetworkACLOptions(id string) *GetVPCDefaultNetwork
}
// SetID : Allow user to set ID
-func (options *GetVPCDefaultNetworkACLOptions) SetID(id string) *GetVPCDefaultNetworkACLOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetVPCDefaultNetworkACLOptions) SetID(id string) *GetVPCDefaultNetworkACLOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25883,7 +32404,7 @@ func (options *GetVPCDefaultNetworkACLOptions) SetHeaders(param map[string]strin
// GetVPCDefaultRoutingTableOptions : The GetVPCDefaultRoutingTable options.
type GetVPCDefaultRoutingTableOptions struct {
// The VPC identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25897,9 +32418,9 @@ func (*VpcV1) NewGetVPCDefaultRoutingTableOptions(id string) *GetVPCDefaultRouti
}
// SetID : Allow user to set ID
-func (options *GetVPCDefaultRoutingTableOptions) SetID(id string) *GetVPCDefaultRoutingTableOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetVPCDefaultRoutingTableOptions) SetID(id string) *GetVPCDefaultRoutingTableOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25911,7 +32432,7 @@ func (options *GetVPCDefaultRoutingTableOptions) SetHeaders(param map[string]str
// GetVPCDefaultSecurityGroupOptions : The GetVPCDefaultSecurityGroup options.
type GetVPCDefaultSecurityGroupOptions struct {
// The VPC identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25925,9 +32446,9 @@ func (*VpcV1) NewGetVPCDefaultSecurityGroupOptions(id string) *GetVPCDefaultSecu
}
// SetID : Allow user to set ID
-func (options *GetVPCDefaultSecurityGroupOptions) SetID(id string) *GetVPCDefaultSecurityGroupOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetVPCDefaultSecurityGroupOptions) SetID(id string) *GetVPCDefaultSecurityGroupOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25939,7 +32460,7 @@ func (options *GetVPCDefaultSecurityGroupOptions) SetHeaders(param map[string]st
// GetVPCOptions : The GetVPC options.
type GetVPCOptions struct {
// The VPC identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25953,9 +32474,9 @@ func (*VpcV1) NewGetVPCOptions(id string) *GetVPCOptions {
}
// SetID : Allow user to set ID
-func (options *GetVPCOptions) SetID(id string) *GetVPCOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetVPCOptions) SetID(id string) *GetVPCOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -25967,10 +32488,10 @@ func (options *GetVPCOptions) SetHeaders(param map[string]string) *GetVPCOptions
// GetVPCRouteOptions : The GetVPCRoute options.
type GetVPCRouteOptions struct {
// The VPC identifier.
- VPCID *string `validate:"required,ne="`
+ VPCID *string `json:"vpc_id" validate:"required,ne="`
// The route identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -25985,15 +32506,15 @@ func (*VpcV1) NewGetVPCRouteOptions(vpcID string, id string) *GetVPCRouteOptions
}
// SetVPCID : Allow user to set VPCID
-func (options *GetVPCRouteOptions) SetVPCID(vpcID string) *GetVPCRouteOptions {
- options.VPCID = core.StringPtr(vpcID)
- return options
+func (_options *GetVPCRouteOptions) SetVPCID(vpcID string) *GetVPCRouteOptions {
+ _options.VPCID = core.StringPtr(vpcID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *GetVPCRouteOptions) SetID(id string) *GetVPCRouteOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetVPCRouteOptions) SetID(id string) *GetVPCRouteOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -26005,10 +32526,10 @@ func (options *GetVPCRouteOptions) SetHeaders(param map[string]string) *GetVPCRo
// GetVPCRoutingTableOptions : The GetVPCRoutingTable options.
type GetVPCRoutingTableOptions struct {
// The VPC identifier.
- VPCID *string `validate:"required,ne="`
+ VPCID *string `json:"vpc_id" validate:"required,ne="`
// The routing table identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -26023,15 +32544,15 @@ func (*VpcV1) NewGetVPCRoutingTableOptions(vpcID string, id string) *GetVPCRouti
}
// SetVPCID : Allow user to set VPCID
-func (options *GetVPCRoutingTableOptions) SetVPCID(vpcID string) *GetVPCRoutingTableOptions {
- options.VPCID = core.StringPtr(vpcID)
- return options
+func (_options *GetVPCRoutingTableOptions) SetVPCID(vpcID string) *GetVPCRoutingTableOptions {
+ _options.VPCID = core.StringPtr(vpcID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *GetVPCRoutingTableOptions) SetID(id string) *GetVPCRoutingTableOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetVPCRoutingTableOptions) SetID(id string) *GetVPCRoutingTableOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -26043,13 +32564,13 @@ func (options *GetVPCRoutingTableOptions) SetHeaders(param map[string]string) *G
// GetVPCRoutingTableRouteOptions : The GetVPCRoutingTableRoute options.
type GetVPCRoutingTableRouteOptions struct {
// The VPC identifier.
- VPCID *string `validate:"required,ne="`
+ VPCID *string `json:"vpc_id" validate:"required,ne="`
// The routing table identifier.
- RoutingTableID *string `validate:"required,ne="`
+ RoutingTableID *string `json:"routing_table_id" validate:"required,ne="`
// The VPC routing table route identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -26065,21 +32586,21 @@ func (*VpcV1) NewGetVPCRoutingTableRouteOptions(vpcID string, routingTableID str
}
// SetVPCID : Allow user to set VPCID
-func (options *GetVPCRoutingTableRouteOptions) SetVPCID(vpcID string) *GetVPCRoutingTableRouteOptions {
- options.VPCID = core.StringPtr(vpcID)
- return options
+func (_options *GetVPCRoutingTableRouteOptions) SetVPCID(vpcID string) *GetVPCRoutingTableRouteOptions {
+ _options.VPCID = core.StringPtr(vpcID)
+ return _options
}
// SetRoutingTableID : Allow user to set RoutingTableID
-func (options *GetVPCRoutingTableRouteOptions) SetRoutingTableID(routingTableID string) *GetVPCRoutingTableRouteOptions {
- options.RoutingTableID = core.StringPtr(routingTableID)
- return options
+func (_options *GetVPCRoutingTableRouteOptions) SetRoutingTableID(routingTableID string) *GetVPCRoutingTableRouteOptions {
+ _options.RoutingTableID = core.StringPtr(routingTableID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *GetVPCRoutingTableRouteOptions) SetID(id string) *GetVPCRoutingTableRouteOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetVPCRoutingTableRouteOptions) SetID(id string) *GetVPCRoutingTableRouteOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -26091,10 +32612,10 @@ func (options *GetVPCRoutingTableRouteOptions) SetHeaders(param map[string]strin
// GetVPNGatewayConnectionOptions : The GetVPNGatewayConnection options.
type GetVPNGatewayConnectionOptions struct {
// The VPN gateway identifier.
- VPNGatewayID *string `validate:"required,ne="`
+ VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="`
// The VPN gateway connection identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -26109,15 +32630,15 @@ func (*VpcV1) NewGetVPNGatewayConnectionOptions(vpnGatewayID string, id string)
}
// SetVPNGatewayID : Allow user to set VPNGatewayID
-func (options *GetVPNGatewayConnectionOptions) SetVPNGatewayID(vpnGatewayID string) *GetVPNGatewayConnectionOptions {
- options.VPNGatewayID = core.StringPtr(vpnGatewayID)
- return options
+func (_options *GetVPNGatewayConnectionOptions) SetVPNGatewayID(vpnGatewayID string) *GetVPNGatewayConnectionOptions {
+ _options.VPNGatewayID = core.StringPtr(vpnGatewayID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *GetVPNGatewayConnectionOptions) SetID(id string) *GetVPNGatewayConnectionOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetVPNGatewayConnectionOptions) SetID(id string) *GetVPNGatewayConnectionOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -26129,7 +32650,7 @@ func (options *GetVPNGatewayConnectionOptions) SetHeaders(param map[string]strin
// GetVPNGatewayOptions : The GetVPNGateway options.
type GetVPNGatewayOptions struct {
// The VPN gateway identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -26143,9 +32664,9 @@ func (*VpcV1) NewGetVPNGatewayOptions(id string) *GetVPNGatewayOptions {
}
// SetID : Allow user to set ID
-func (options *GetVPNGatewayOptions) SetID(id string) *GetVPNGatewayOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *GetVPNGatewayOptions) SetID(id string) *GetVPNGatewayOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -26159,7 +32680,7 @@ type IkePolicy struct {
// The authentication algorithm.
AuthenticationAlgorithm *string `json:"authentication_algorithm" validate:"required"`
- // Collection of references to VPN gateway connections that use this IKE policy.
+ // The VPN gateway connections that use this IKE policy.
Connections []VPNGatewayConnectionReference `json:"connections" validate:"required"`
// The date and time that this IKE policy was created.
@@ -26330,39 +32851,16 @@ func UnmarshalIkePolicyCollection(m map[string]json.RawMessage, result interface
return
}
-// IkePolicyIdentity : Identifies an IKE policy by a unique property.
-// Models which "extend" this model:
-// - IkePolicyIdentityByID
-// - IkePolicyIdentityByHref
-type IkePolicyIdentity struct {
- // The unique identifier for this IKE policy.
- ID *string `json:"id,omitempty"`
-
- // The IKE policy's canonical URL.
- Href *string `json:"href,omitempty"`
-}
-
-func (*IkePolicyIdentity) isaIkePolicyIdentity() bool {
- return true
-}
-
-type IkePolicyIdentityIntf interface {
- isaIkePolicyIdentity() bool
-}
-
-// UnmarshalIkePolicyIdentity unmarshals an instance of IkePolicyIdentity from the specified map of raw messages.
-func UnmarshalIkePolicyIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(IkePolicyIdentity)
- err = core.UnmarshalPrimitive(m, "id", &obj.ID)
- if err != nil {
- return
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *IkePolicyCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
}
- err = core.UnmarshalPrimitive(m, "href", &obj.Href)
- if err != nil {
- return
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
}
- reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
- return
+ return start, nil
}
// IkePolicyPatch : IkePolicyPatch struct
@@ -26435,11 +32933,11 @@ func UnmarshalIkePolicyPatch(m map[string]json.RawMessage, result interface{}) (
}
// AsPatch returns a generic map representation of the IkePolicyPatch
-func (ikePolicyPatch *IkePolicyPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (ikePolicyPatch *IkePolicyPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(ikePolicyPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -26498,9 +32996,11 @@ func UnmarshalIkePolicyReference(m map[string]json.RawMessage, result interface{
// IP : IP struct
type IP struct {
- // The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
- // property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
- // and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
+ // The IP address.
+ //
+ // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify
+ // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the
+ // error, or bypass the resource on which the unexpected IP address format was encountered.
Address *string `json:"address" validate:"required"`
}
@@ -26520,7 +33020,7 @@ type IPsecPolicy struct {
// The authentication algorithm.
AuthenticationAlgorithm *string `json:"authentication_algorithm" validate:"required"`
- // Collection of references to VPN gateway connections that use this IPsec policy.
+ // The VPN gateway connections that use this IPsec policy.
Connections []VPNGatewayConnectionReference `json:"connections" validate:"required"`
// The date and time that this IPsec policy was created.
@@ -26707,6 +33207,18 @@ func UnmarshalIPsecPolicyCollection(m map[string]json.RawMessage, result interfa
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *IPsecPolicyCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// IPsecPolicyCollectionFirst : A link to the first page of resources.
type IPsecPolicyCollectionFirst struct {
// The URL for a page of resources.
@@ -26741,41 +33253,6 @@ func UnmarshalIPsecPolicyCollectionNext(m map[string]json.RawMessage, result int
return
}
-// IPsecPolicyIdentity : Identifies an IPsec policy by a unique property.
-// Models which "extend" this model:
-// - IPsecPolicyIdentityByID
-// - IPsecPolicyIdentityByHref
-type IPsecPolicyIdentity struct {
- // The unique identifier for this IPsec policy.
- ID *string `json:"id,omitempty"`
-
- // The IPsec policy's canonical URL.
- Href *string `json:"href,omitempty"`
-}
-
-func (*IPsecPolicyIdentity) isaIPsecPolicyIdentity() bool {
- return true
-}
-
-type IPsecPolicyIdentityIntf interface {
- isaIPsecPolicyIdentity() bool
-}
-
-// UnmarshalIPsecPolicyIdentity unmarshals an instance of IPsecPolicyIdentity from the specified map of raw messages.
-func UnmarshalIPsecPolicyIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(IPsecPolicyIdentity)
- err = core.UnmarshalPrimitive(m, "id", &obj.ID)
- if err != nil {
- return
- }
- err = core.UnmarshalPrimitive(m, "href", &obj.Href)
- if err != nil {
- return
- }
- reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
- return
-}
-
// IPsecPolicyPatch : IPsecPolicyPatch struct
type IPsecPolicyPatch struct {
// The authentication algorithm.
@@ -26849,11 +33326,11 @@ func UnmarshalIPsecPolicyPatch(m map[string]json.RawMessage, result interface{})
}
// AsPatch returns a generic map representation of the IPsecPolicyPatch
-func (iPsecPolicyPatch *IPsecPolicyPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (iPsecPolicyPatch *IPsecPolicyPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(iPsecPolicyPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -26992,7 +33469,7 @@ type Image struct {
Encryption *string `json:"encryption" validate:"required"`
// The key that will be used to encrypt volumes created from this image (unless an
- // alternate `encryption_key` is provided at volume creation).
+ // alternate `encryption_key` is specified at volume creation).
//
// This property will be present for images with an `encryption` type of `user_managed`.
EncryptionKey *EncryptionKeyReference `json:"encryption_key,omitempty"`
@@ -27021,6 +33498,11 @@ type Image struct {
// The resource group for this image.
ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`
+ // The volume used to create this image (this may be
+ // [deleted](https://cloud.ibm.com/apidocs/vpc#deleted-resources)).
+ // If absent, this image was not created from a volume.
+ SourceVolume *VolumeReference `json:"source_volume,omitempty"`
+
// The status of this image
// - available: image can be used (provisionable)
// - deleting: image is being deleted, and can no longer be used to provision new
@@ -27037,7 +33519,7 @@ type Image struct {
// unexpected property value was encountered.
Status *string `json:"status" validate:"required"`
- // Array of reasons for the current status (if any).
+ // The reasons for the current status (if any).
//
// The enumerated reason code values for this property will expand in the future. When processing this property, check
// for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
@@ -27134,6 +33616,10 @@ func UnmarshalImage(m map[string]json.RawMessage, result interface{}) (err error
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "source_volume", &obj.SourceVolume, UnmarshalVolumeReference)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "status", &obj.Status)
if err != nil {
return
@@ -27189,6 +33675,18 @@ func UnmarshalImageCollection(m map[string]json.RawMessage, result interface{})
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *ImageCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// ImageCollectionFirst : A link to the first page of resources.
type ImageCollectionFirst struct {
// The URL for a page of resources.
@@ -27272,16 +33770,16 @@ func UnmarshalImageFileChecksums(m map[string]json.RawMessage, result interface{
// ImageFilePrototype : ImageFilePrototype struct
type ImageFilePrototype struct {
- // The Cloud Object Store (COS) location of the image file.
+ // The Cloud Object Storage location of the image file.
Href *string `json:"href" validate:"required"`
}
// NewImageFilePrototype : Instantiate ImageFilePrototype (Generic Model Constructor)
-func (*VpcV1) NewImageFilePrototype(href string) (model *ImageFilePrototype, err error) {
- model = &ImageFilePrototype{
+func (*VpcV1) NewImageFilePrototype(href string) (_model *ImageFilePrototype, err error) {
+ _model = &ImageFilePrototype{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -27341,7 +33839,7 @@ func UnmarshalImageIdentity(m map[string]json.RawMessage, result interface{}) (e
// ImagePatch : ImagePatch struct
type ImagePatch struct {
- // The unique user-defined name for this image. Names starting with "ibm-" are not allowed.
+ // The unique user-defined name for this image. Names starting with `ibm-` are not allowed.
Name *string `json:"name,omitempty"`
}
@@ -27357,11 +33855,11 @@ func UnmarshalImagePatch(m map[string]json.RawMessage, result interface{}) (err
}
// AsPatch returns a generic map representation of the ImagePatch
-func (imagePatch *ImagePatch) AsPatch() (patch map[string]interface{}, err error) {
+func (imagePatch *ImagePatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(imagePatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -27369,8 +33867,9 @@ func (imagePatch *ImagePatch) AsPatch() (patch map[string]interface{}, err error
// ImagePrototype : ImagePrototype struct
// Models which "extend" this model:
// - ImagePrototypeImageByFile
+// - ImagePrototypeImageBySourceVolume
type ImagePrototype struct {
- // The unique user-defined name for this image. Names starting with "ibm-" are not allowed. If unspecified, the name
+ // The unique user-defined name for this image. Names starting with `ibm-` are not allowed. If unspecified, the name
// will be a hyphenated list of randomly-selected words.
Name *string `json:"name,omitempty"`
@@ -27381,27 +33880,35 @@ type ImagePrototype struct {
// A base64-encoded, encrypted representation of the key that was used to encrypt the data for this image.
//
// That representation is created by wrapping the key's value with the `encryption_key` root key (which must also be
- // provided), using either [Key Protect](https://cloud.ibm.com/docs/key-protect?topic=key-protect-wrap-keys) or the
+ // specified), using either [Key Protect](https://cloud.ibm.com/docs/key-protect?topic=key-protect-wrap-keys) or the
// [Hyper Protect Crypto Service](https://cloud.ibm.com/docs/services/hs-crypto?topic=hs-crypto-wrap-keys).
//
- // If this property is not provided, the imported image is treated as unencrypted.
+ // If unspecified, the imported image is treated as unencrypted.
EncryptedDataKey *string `json:"encrypted_data_key,omitempty"`
- // The identity of the root key that was used to wrap the data key (which is ultimately
- // represented as `encrypted_data_key`). Additionally, the root key will be used to encrypt
- // volumes created from this image (unless an alternate `encryption_key` is provided at
- // volume creation).
+ // The root key that was used to wrap the data key (which is ultimately represented as
+ // `encrypted_data_key`). Additionally, the root key will be used to encrypt volumes
+ // created from this image (unless an alternate `encryption_key` is specified at volume
+ // creation).
//
- // If this property is not provided, the imported image is treated as unencrypted.
+ // If unspecified, the imported image is treated as unencrypted.
EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
// The file from which to create the image.
File *ImageFilePrototype `json:"file,omitempty"`
- // The identity of the [supported operating
- // system](https://cloud.ibm.com/apidocs/vpc#list-operating-systems) included in
- // this image.
+ // The [supported operating
+ // system](https://cloud.ibm.com/apidocs/vpc#list-operating-systems) included in this
+ // image.
OperatingSystem OperatingSystemIdentityIntf `json:"operating_system,omitempty"`
+
+ // The volume from which to create the image. The specified volume must:
+ // - Originate from an image, which will be used to populate this image's
+ // operating system information.
+ // - Not be `active` or `busy`.
+ //
+ // During image creation, the specified volume may briefly become `busy`.
+ SourceVolume VolumeIdentityIntf `json:"source_volume,omitempty"`
}
func (*ImagePrototype) isaImagePrototype() bool {
@@ -27439,6 +33946,10 @@ func UnmarshalImagePrototype(m map[string]json.RawMessage, result interface{}) (
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "source_volume", &obj.SourceVolume, UnmarshalVolumeIdentity)
+ if err != nil {
+ return
+ }
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
@@ -27522,8 +34033,10 @@ type ImageStatusReason struct {
// Constants associated with the ImageStatusReason.Code property.
// A snake case string succinctly identifying the status reason.
const (
- ImageStatusReasonCodeEncryptionKeyDeletedConst = "encryption_key_deleted"
- ImageStatusReasonCodeEncryptionKeyDisabledConst = "encryption_key_disabled"
+ ImageStatusReasonCodeEncryptionKeyDeletedConst = "encryption_key_deleted"
+ ImageStatusReasonCodeEncryptionKeyDisabledConst = "encryption_key_disabled"
+ ImageStatusReasonCodeImageRequestInProgressConst = "image_request_in_progress"
+ ImageStatusReasonCodeImageRequestQueuedConst = "image_request_queued"
)
// UnmarshalImageStatusReason unmarshals an instance of ImageStatusReason from the specified map of raw messages.
@@ -27547,7 +34060,11 @@ func UnmarshalImageStatusReason(m map[string]json.RawMessage, result interface{}
// Instance : Instance struct
type Instance struct {
- // The total bandwidth (in megabits per second) shared across the virtual server instance's network interfaces.
+ // The availability policy for this virtual server instance.
+ AvailabilityPolicy *InstanceAvailabilityPolicy `json:"availability_policy" validate:"required"`
+
+ // The total bandwidth (in megabits per second) shared across the virtual server instance's network interfaces and
+ // storage volumes.
Bandwidth *int64 `json:"bandwidth" validate:"required"`
// Boot volume attachment.
@@ -27559,7 +34076,10 @@ type Instance struct {
// The CRN for this virtual server instance.
CRN *string `json:"crn" validate:"required"`
- // Collection of the instance's disks.
+ // If present, the dedicated host this virtual server instance has been placed on.
+ DedicatedHost *DedicatedHostReference `json:"dedicated_host,omitempty"`
+
+ // The instance disks for this virtual server instance.
Disks []InstanceDisk `json:"disks" validate:"required"`
// The virtual server instance GPU configuration.
@@ -27577,12 +34097,18 @@ type Instance struct {
// The amount of memory, truncated to whole gibibytes.
Memory *int64 `json:"memory" validate:"required"`
+ // The metadata service configuration.
+ MetadataService *InstanceMetadataService `json:"metadata_service" validate:"required"`
+
// The user-defined name for this virtual server instance (and default system hostname).
Name *string `json:"name" validate:"required"`
- // Collection of the virtual server instance's network interfaces, including the primary network interface.
+ // The network interfaces for this virtual server instance, including the primary network interface.
NetworkInterfaces []NetworkInterfaceInstanceContextReference `json:"network_interfaces" validate:"required"`
+ // The placement restrictions for the virtual server instance.
+ PlacementTarget InstancePlacementTargetIntf `json:"placement_target,omitempty"`
+
// Primary network interface.
PrimaryNetworkInterface *NetworkInterfaceInstanceContextReference `json:"primary_network_interface" validate:"required"`
@@ -27592,13 +34118,34 @@ type Instance struct {
// The resource group for this instance.
ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+
+ // Indicates whether the state of the virtual server instance permits a start request.
+ Startable *bool `json:"startable" validate:"required"`
+
// The status of the virtual server instance.
Status *string `json:"status" validate:"required"`
+ // The reasons for the current status (if any).
+ //
+ // The enumerated reason code values for this property will expand in the future. When processing this property, check
+ // for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
+ // unexpected reason code was encountered.
+ StatusReasons []InstanceStatusReason `json:"status_reasons" validate:"required"`
+
+ // The amount of bandwidth (in megabits per second) allocated exclusively to instance network interfaces.
+ TotalNetworkBandwidth *int64 `json:"total_network_bandwidth" validate:"required"`
+
+ // The amount of bandwidth (in megabits per second) allocated exclusively to instance storage volumes. An increase in
+ // this value will result in a corresponding decrease to
+ // `total_network_bandwidth`.
+ TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth" validate:"required"`
+
// The virtual server instance VCPU configuration.
Vcpu *InstanceVcpu `json:"vcpu" validate:"required"`
- // Collection of the virtual server instance's volume attachments, including the boot volume attachment.
+ // The volume attachments for this virtual server instance, including the boot volume attachment.
VolumeAttachments []VolumeAttachmentReferenceInstanceContext `json:"volume_attachments" validate:"required"`
// The VPC this virtual server instance resides in.
@@ -27608,6 +34155,12 @@ type Instance struct {
Zone *ZoneReference `json:"zone" validate:"required"`
}
+// Constants associated with the Instance.ResourceType property.
+// The resource type.
+const (
+ InstanceResourceTypeInstanceConst = "instance"
+)
+
// Constants associated with the Instance.Status property.
// The status of the virtual server instance.
const (
@@ -27627,6 +34180,10 @@ const (
// UnmarshalInstance unmarshals an instance of Instance from the specified map of raw messages.
func UnmarshalInstance(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(Instance)
+ err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicy)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "bandwidth", &obj.Bandwidth)
if err != nil {
return
@@ -27643,6 +34200,10 @@ func UnmarshalInstance(m map[string]json.RawMessage, result interface{}) (err er
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "dedicated_host", &obj.DedicatedHost, UnmarshalDedicatedHostReference)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "disks", &obj.Disks, UnmarshalInstanceDisk)
if err != nil {
return
@@ -27667,6 +34228,10 @@ func UnmarshalInstance(m map[string]json.RawMessage, result interface{}) (err er
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataService)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "name", &obj.Name)
if err != nil {
return
@@ -27675,6 +34240,10 @@ func UnmarshalInstance(m map[string]json.RawMessage, result interface{}) (err er
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTarget)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfaceInstanceContextReference)
if err != nil {
return
@@ -27687,10 +34256,30 @@ func UnmarshalInstance(m map[string]json.RawMessage, result interface{}) (err er
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "startable", &obj.Startable)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "status", &obj.Status)
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "status_reasons", &obj.StatusReasons, UnmarshalInstanceStatusReason)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "total_network_bandwidth", &obj.TotalNetworkBandwidth)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "vcpu", &obj.Vcpu, UnmarshalInstanceVcpu)
if err != nil {
return
@@ -27794,6 +34383,114 @@ func UnmarshalInstanceAction(m map[string]json.RawMessage, result interface{}) (
return
}
+// InstanceAvailabilityPolicy : InstanceAvailabilityPolicy struct
+type InstanceAvailabilityPolicy struct {
+ // The action to perform if the compute host experiences a failure.
+ // - `restart`: Automatically restart the virtual server instance after host failure
+ // - `stop`: Leave the virtual server instance stopped after host failure
+ //
+ // The enumerated values for this property are expected to expand in the future. When processing this property, check
+ // for and log unknown values. Optionally halt processing and surface the error, or bypass the instance on which the
+ // unexpected property value was encountered.
+ HostFailure *string `json:"host_failure" validate:"required"`
+}
+
+// Constants associated with the InstanceAvailabilityPolicy.HostFailure property.
+// The action to perform if the compute host experiences a failure.
+// - `restart`: Automatically restart the virtual server instance after host failure
+// - `stop`: Leave the virtual server instance stopped after host failure
+//
+// The enumerated values for this property are expected to expand in the future. When processing this property, check
+// for and log unknown values. Optionally halt processing and surface the error, or bypass the instance on which the
+// unexpected property value was encountered.
+const (
+ InstanceAvailabilityPolicyHostFailureRestartConst = "restart"
+ InstanceAvailabilityPolicyHostFailureStopConst = "stop"
+)
+
+// UnmarshalInstanceAvailabilityPolicy unmarshals an instance of InstanceAvailabilityPolicy from the specified map of raw messages.
+func UnmarshalInstanceAvailabilityPolicy(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceAvailabilityPolicy)
+ err = core.UnmarshalPrimitive(m, "host_failure", &obj.HostFailure)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceAvailabilityPolicyPatch : InstanceAvailabilityPolicyPatch struct
+type InstanceAvailabilityPolicyPatch struct {
+ // The action to perform if the compute host experiences a failure.
+ // - `restart`: Automatically restart the virtual server instance after host failure
+ // - `stop`: Leave the virtual server instance stopped after host failure
+ //
+ // The enumerated values for this property are expected to expand in the future. When processing this property, check
+ // for and log unknown values. Optionally halt processing and surface the error, or bypass the instance on which the
+ // unexpected property value was encountered.
+ HostFailure *string `json:"host_failure,omitempty"`
+}
+
+// Constants associated with the InstanceAvailabilityPolicyPatch.HostFailure property.
+// The action to perform if the compute host experiences a failure.
+// - `restart`: Automatically restart the virtual server instance after host failure
+// - `stop`: Leave the virtual server instance stopped after host failure
+//
+// The enumerated values for this property are expected to expand in the future. When processing this property, check
+// for and log unknown values. Optionally halt processing and surface the error, or bypass the instance on which the
+// unexpected property value was encountered.
+const (
+ InstanceAvailabilityPolicyPatchHostFailureRestartConst = "restart"
+ InstanceAvailabilityPolicyPatchHostFailureStopConst = "stop"
+)
+
+// UnmarshalInstanceAvailabilityPolicyPatch unmarshals an instance of InstanceAvailabilityPolicyPatch from the specified map of raw messages.
+func UnmarshalInstanceAvailabilityPolicyPatch(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceAvailabilityPolicyPatch)
+ err = core.UnmarshalPrimitive(m, "host_failure", &obj.HostFailure)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceAvailabilityPrototype : InstanceAvailabilityPrototype struct
+type InstanceAvailabilityPrototype struct {
+ // The action to perform if the compute host experiences a failure.
+ // - `restart`: Automatically restart the virtual server instance after host failure
+ // - `stop`: Leave the virtual server instance stopped after host failure
+ //
+ // The enumerated values for this property are expected to expand in the future. When processing this property, check
+ // for and log unknown values. Optionally halt processing and surface the error, or bypass the instance on which the
+ // unexpected property value was encountered.
+ HostFailure *string `json:"host_failure,omitempty"`
+}
+
+// Constants associated with the InstanceAvailabilityPrototype.HostFailure property.
+// The action to perform if the compute host experiences a failure.
+// - `restart`: Automatically restart the virtual server instance after host failure
+// - `stop`: Leave the virtual server instance stopped after host failure
+//
+// The enumerated values for this property are expected to expand in the future. When processing this property, check
+// for and log unknown values. Optionally halt processing and surface the error, or bypass the instance on which the
+// unexpected property value was encountered.
+const (
+ InstanceAvailabilityPrototypeHostFailureRestartConst = "restart"
+ InstanceAvailabilityPrototypeHostFailureStopConst = "stop"
+)
+
+// UnmarshalInstanceAvailabilityPrototype unmarshals an instance of InstanceAvailabilityPrototype from the specified map of raw messages.
+func UnmarshalInstanceAvailabilityPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceAvailabilityPrototype)
+ err = core.UnmarshalPrimitive(m, "host_failure", &obj.HostFailure)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// InstanceCollection : InstanceCollection struct
type InstanceCollection struct {
// A link to the first page of resources.
@@ -27840,6 +34537,18 @@ func UnmarshalInstanceCollection(m map[string]json.RawMessage, result interface{
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *InstanceCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// InstanceCollectionFirst : A link to the first page of resources.
type InstanceCollectionFirst struct {
// The URL for a page of resources.
@@ -27934,6 +34643,41 @@ func UnmarshalInstanceConsoleAccessToken(m map[string]json.RawMessage, result in
return
}
+// InstanceDefaultTrustedProfilePrototype : InstanceDefaultTrustedProfilePrototype struct
+type InstanceDefaultTrustedProfilePrototype struct {
+ // If set to `true`, the system will create a link to the specified `target` trusted profile during instance creation.
+ // Regardless of whether a link is created by the system or manually using the IAM Identity service, it will be
+ // automatically deleted when the instance is deleted.
+ AutoLink *bool `json:"auto_link,omitempty"`
+
+ // The default IAM trusted profile to use for this virtual server instance.
+ Target TrustedProfileIdentityIntf `json:"target" validate:"required"`
+}
+
+// NewInstanceDefaultTrustedProfilePrototype : Instantiate InstanceDefaultTrustedProfilePrototype (Generic Model Constructor)
+func (*VpcV1) NewInstanceDefaultTrustedProfilePrototype(target TrustedProfileIdentityIntf) (_model *InstanceDefaultTrustedProfilePrototype, err error) {
+ _model = &InstanceDefaultTrustedProfilePrototype{
+ Target: target,
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+// UnmarshalInstanceDefaultTrustedProfilePrototype unmarshals an instance of InstanceDefaultTrustedProfilePrototype from the specified map of raw messages.
+func UnmarshalInstanceDefaultTrustedProfilePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceDefaultTrustedProfilePrototype)
+ err = core.UnmarshalPrimitive(m, "auto_link", &obj.AutoLink)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalTrustedProfileIdentity)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// InstanceDisk : InstanceDisk struct
type InstanceDisk struct {
// The date and time that the disk was created.
@@ -28049,11 +34793,11 @@ func UnmarshalInstanceDiskPatch(m map[string]json.RawMessage, result interface{}
}
// AsPatch returns a generic map representation of the InstanceDiskPatch
-func (instanceDiskPatch *InstanceDiskPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (instanceDiskPatch *InstanceDiskPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(instanceDiskPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -28192,7 +34936,7 @@ type InstanceGroup struct {
// pool created.
LoadBalancerPool *LoadBalancerPoolReference `json:"load_balancer_pool,omitempty"`
- // Array of references to managers for the instance group.
+ // The managers for the instance group.
Managers []InstanceGroupManagerReference `json:"managers" validate:"required"`
// The number of instances in the instance group.
@@ -28211,9 +34955,12 @@ type InstanceGroup struct {
// - `unhealthy`: Group is unable to reach `membership_count` instances.
Status *string `json:"status" validate:"required"`
- // Array of references to subnets to use when creating new instances.
+ // The subnets to use when creating new instances.
Subnets []SubnetReference `json:"subnets" validate:"required"`
+ // The date and time that the instance group was updated.
+ UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"`
+
// The VPC the instance group resides in.
VPC *VPCReference `json:"vpc" validate:"required"`
}
@@ -28287,6 +35034,10 @@ func UnmarshalInstanceGroup(m map[string]json.RawMessage, result interface{}) (e
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference)
if err != nil {
return
@@ -28341,6 +35092,18 @@ func UnmarshalInstanceGroupCollection(m map[string]json.RawMessage, result inter
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *InstanceGroupCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// InstanceGroupCollectionFirst : A link to the first page of resources.
type InstanceGroupCollectionFirst struct {
// The URL for a page of resources.
@@ -28378,19 +35141,26 @@ func UnmarshalInstanceGroupCollectionNext(m map[string]json.RawMessage, result i
// InstanceGroupManager : InstanceGroupManager struct
// Models which "extend" this model:
// - InstanceGroupManagerAutoScale
+// - InstanceGroupManagerScheduled
type InstanceGroupManager struct {
+ // The date and time that the instance group manager was created.
+ CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
+
// The URL for this instance group manager.
Href *string `json:"href" validate:"required"`
// The unique identifier for this instance group manager.
ID *string `json:"id" validate:"required"`
- // If set to `true`, this manager will control the instance group.
+ // Indicates whether this manager will control the instance group.
ManagementEnabled *bool `json:"management_enabled" validate:"required"`
- // The user-defined name for this instance group manager. Names must be unique within the instance group.
+ // The user-defined name for this instance group manager.
Name *string `json:"name" validate:"required"`
+ // The date and time that the instance group manager was updated.
+ UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"`
+
// The time window in seconds to aggregate metrics prior to evaluation.
AggregationWindow *int64 `json:"aggregation_window,omitempty"`
@@ -28408,6 +35178,9 @@ type InstanceGroupManager struct {
// The policies of the instance group manager.
Policies []InstanceGroupManagerPolicyReference `json:"policies,omitempty"`
+
+ // The actions of the instance group manager.
+ Actions []InstanceGroupManagerActionReference `json:"actions,omitempty"`
}
// Constants associated with the InstanceGroupManager.ManagerType property.
@@ -28427,6 +35200,10 @@ type InstanceGroupManagerIntf interface {
// UnmarshalInstanceGroupManager unmarshals an instance of InstanceGroupManager from the specified map of raw messages.
func UnmarshalInstanceGroupManager(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(InstanceGroupManager)
+ err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "href", &obj.Href)
if err != nil {
return
@@ -28443,6 +35220,10 @@ func UnmarshalInstanceGroupManager(m map[string]json.RawMessage, result interfac
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "aggregation_window", &obj.AggregationWindow)
if err != nil {
return
@@ -28467,6 +35248,483 @@ func UnmarshalInstanceGroupManager(m map[string]json.RawMessage, result interfac
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "actions", &obj.Actions, UnmarshalInstanceGroupManagerActionReference)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerAction : InstanceGroupManagerAction struct
+// Models which "extend" this model:
+// - InstanceGroupManagerActionScheduledAction
+type InstanceGroupManagerAction struct {
+ // Indicates whether this scheduled action will be automatically deleted after it has completed and
+ // `auto_delete_timeout` hours have passed. At present, this is always
+ // `true`, but may be modifiable in the future.
+ AutoDelete *bool `json:"auto_delete" validate:"required"`
+
+ // If `auto_delete` is `true`, and this scheduled action has finished, the hours after which it will be automatically
+ // deleted. If the value is `0`, the action will be deleted once it has finished. This value may be modifiable in the
+ // future.
+ AutoDeleteTimeout *int64 `json:"auto_delete_timeout" validate:"required"`
+
+ // The date and time that the instance group manager action was created.
+ CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
+
+ // The URL for this instance group manager action.
+ Href *string `json:"href" validate:"required"`
+
+ // The unique identifier for this instance group manager action.
+ ID *string `json:"id" validate:"required"`
+
+ // The user-defined name for this instance group manager action.
+ Name *string `json:"name" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+
+ // The status of the instance group action
+ // - `active`: Action is ready to be run
+ // - `completed`: Action was completed successfully
+ // - `failed`: Action could not be completed successfully
+ // - `incompatible`: Action parameters are not compatible with the group or manager
+ // - `omitted`: Action was not applied because this action's manager was disabled.
+ Status *string `json:"status" validate:"required"`
+
+ // The date and time that the instance group manager action was modified.
+ UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"`
+
+ // The type of action for the instance group.
+ ActionType *string `json:"action_type,omitempty"`
+
+ // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min
+ // period.
+ CronSpec *string `json:"cron_spec,omitempty"`
+
+ // The date and time the scheduled action was last applied. If absent, the action has never been applied.
+ LastAppliedAt *strfmt.DateTime `json:"last_applied_at,omitempty"`
+
+ // The date and time the scheduled action will next run. If absent, the system is currently calculating the next run
+ // time.
+ NextRunAt *strfmt.DateTime `json:"next_run_at,omitempty"`
+
+ Group *InstanceGroupManagerScheduledActionGroup `json:"group,omitempty"`
+
+ Manager InstanceGroupManagerScheduledActionManagerIntf `json:"manager,omitempty"`
+}
+
+// Constants associated with the InstanceGroupManagerAction.ResourceType property.
+// The resource type.
+const (
+ InstanceGroupManagerActionResourceTypeInstanceGroupManagerActionConst = "instance_group_manager_action"
+)
+
+// Constants associated with the InstanceGroupManagerAction.Status property.
+// The status of the instance group action
+// - `active`: Action is ready to be run
+// - `completed`: Action was completed successfully
+// - `failed`: Action could not be completed successfully
+// - `incompatible`: Action parameters are not compatible with the group or manager
+// - `omitted`: Action was not applied because this action's manager was disabled.
+const (
+ InstanceGroupManagerActionStatusActiveConst = "active"
+ InstanceGroupManagerActionStatusCompletedConst = "completed"
+ InstanceGroupManagerActionStatusFailedConst = "failed"
+ InstanceGroupManagerActionStatusIncompatibleConst = "incompatible"
+ InstanceGroupManagerActionStatusOmittedConst = "omitted"
+)
+
+// Constants associated with the InstanceGroupManagerAction.ActionType property.
+// The type of action for the instance group.
+const (
+ InstanceGroupManagerActionActionTypeScheduledConst = "scheduled"
+)
+
+func (*InstanceGroupManagerAction) isaInstanceGroupManagerAction() bool {
+ return true
+}
+
+type InstanceGroupManagerActionIntf interface {
+ isaInstanceGroupManagerAction() bool
+}
+
+// UnmarshalInstanceGroupManagerAction unmarshals an instance of InstanceGroupManagerAction from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerAction(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerAction)
+ err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "auto_delete_timeout", &obj.AutoDeleteTimeout)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "status", &obj.Status)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "action_type", &obj.ActionType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "last_applied_at", &obj.LastAppliedAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "next_run_at", &obj.NextRunAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroup)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManager)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerActionGroupPatch : InstanceGroupManagerActionGroupPatch struct
+type InstanceGroupManagerActionGroupPatch struct {
+ // The desired number of instance group members at the scheduled time.
+ MembershipCount *int64 `json:"membership_count,omitempty"`
+}
+
+// UnmarshalInstanceGroupManagerActionGroupPatch unmarshals an instance of InstanceGroupManagerActionGroupPatch from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerActionGroupPatch(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerActionGroupPatch)
+ err = core.UnmarshalPrimitive(m, "membership_count", &obj.MembershipCount)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerActionManagerPatch : InstanceGroupManagerActionManagerPatch struct
+type InstanceGroupManagerActionManagerPatch struct {
+ // The desired maximum number of instance group members at the scheduled time.
+ MaxMembershipCount *int64 `json:"max_membership_count,omitempty"`
+
+ // The desired minimum number of instance group members at the scheduled time.
+ MinMembershipCount *int64 `json:"min_membership_count,omitempty"`
+}
+
+// UnmarshalInstanceGroupManagerActionManagerPatch unmarshals an instance of InstanceGroupManagerActionManagerPatch from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerActionManagerPatch(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerActionManagerPatch)
+ err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerActionPatch : InstanceGroupManagerActionPatch struct
+type InstanceGroupManagerActionPatch struct {
+ // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min
+ // period.
+ CronSpec *string `json:"cron_spec,omitempty"`
+
+ Group *InstanceGroupManagerActionGroupPatch `json:"group,omitempty"`
+
+ Manager *InstanceGroupManagerActionManagerPatch `json:"manager,omitempty"`
+
+ // The user-defined name for this instance group manager action.
+ Name *string `json:"name,omitempty"`
+
+ // The date and time the scheduled action will run.
+ RunAt *strfmt.DateTime `json:"run_at,omitempty"`
+}
+
+// UnmarshalInstanceGroupManagerActionPatch unmarshals an instance of InstanceGroupManagerActionPatch from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerActionPatch(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerActionPatch)
+ err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerActionGroupPatch)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerActionManagerPatch)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// AsPatch returns a generic map representation of the InstanceGroupManagerActionPatch
+func (instanceGroupManagerActionPatch *InstanceGroupManagerActionPatch) AsPatch() (_patch map[string]interface{}, err error) {
+ var jsonData []byte
+ jsonData, err = json.Marshal(instanceGroupManagerActionPatch)
+ if err == nil {
+ err = json.Unmarshal(jsonData, &_patch)
+ }
+ return
+}
+
+// InstanceGroupManagerActionPrototype : InstanceGroupManagerActionPrototype struct
+// Models which "extend" this model:
+// - InstanceGroupManagerActionPrototypeScheduledActionPrototype
+type InstanceGroupManagerActionPrototype struct {
+ // The user-defined name for this instance group manager action. Names must be unique within the instance group
+ // manager. If unspecified, the name will be a hyphenated list of randomly-selected words.
+ Name *string `json:"name,omitempty"`
+
+ // The date and time the scheduled action will run.
+ RunAt *strfmt.DateTime `json:"run_at,omitempty"`
+
+ Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group,omitempty"`
+
+ Manager InstanceGroupManagerScheduledActionManagerPrototypeIntf `json:"manager,omitempty"`
+
+ // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min
+ // period.
+ CronSpec *string `json:"cron_spec,omitempty"`
+}
+
+func (*InstanceGroupManagerActionPrototype) isaInstanceGroupManagerActionPrototype() bool {
+ return true
+}
+
+type InstanceGroupManagerActionPrototypeIntf interface {
+ isaInstanceGroupManagerActionPrototype() bool
+}
+
+// UnmarshalInstanceGroupManagerActionPrototype unmarshals an instance of InstanceGroupManagerActionPrototype from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerActionPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerActionPrototype)
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManagerPrototype)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerActionReference : InstanceGroupManagerActionReference struct
+type InstanceGroupManagerActionReference struct {
+ // If present, this property indicates the referenced resource has been deleted and provides
+ // some supplementary information.
+ Deleted *InstanceGroupManagerActionReferenceDeleted `json:"deleted,omitempty"`
+
+ // The URL for this instance group manager action.
+ Href *string `json:"href" validate:"required"`
+
+ // The unique identifier for this instance group manager action.
+ ID *string `json:"id" validate:"required"`
+
+ // The user-defined name for this instance group manager action.
+ Name *string `json:"name" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+}
+
+// Constants associated with the InstanceGroupManagerActionReference.ResourceType property.
+// The resource type.
+const (
+ InstanceGroupManagerActionReferenceResourceTypeInstanceGroupManagerActionConst = "instance_group_manager_action"
+)
+
+// UnmarshalInstanceGroupManagerActionReference unmarshals an instance of InstanceGroupManagerActionReference from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerActionReference(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerActionReference)
+ err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceGroupManagerActionReferenceDeleted)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerActionReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
+// information.
+type InstanceGroupManagerActionReferenceDeleted struct {
+ // Link to documentation about deleted resources.
+ MoreInfo *string `json:"more_info" validate:"required"`
+}
+
+// UnmarshalInstanceGroupManagerActionReferenceDeleted unmarshals an instance of InstanceGroupManagerActionReferenceDeleted from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerActionReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerActionReferenceDeleted)
+ err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerActionsCollection : InstanceGroupManagerActionsCollection struct
+type InstanceGroupManagerActionsCollection struct {
+ // Collection of instance group manager actions.
+ Actions []InstanceGroupManagerActionIntf `json:"actions" validate:"required"`
+
+ // A link to the first page of resources.
+ First *InstanceGroupManagerActionsCollectionFirst `json:"first" validate:"required"`
+
+ // The maximum number of resources that can be returned by the request.
+ Limit *int64 `json:"limit" validate:"required"`
+
+ // A link to the next page of resources. This property is present for all pages
+ // except the last page.
+ Next *InstanceGroupManagerActionsCollectionNext `json:"next,omitempty"`
+
+ // The total number of resources across all pages.
+ TotalCount *int64 `json:"total_count" validate:"required"`
+}
+
+// UnmarshalInstanceGroupManagerActionsCollection unmarshals an instance of InstanceGroupManagerActionsCollection from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerActionsCollection(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerActionsCollection)
+ err = core.UnmarshalModel(m, "actions", &obj.Actions, UnmarshalInstanceGroupManagerAction)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalInstanceGroupManagerActionsCollectionFirst)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalInstanceGroupManagerActionsCollectionNext)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *InstanceGroupManagerActionsCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
+// InstanceGroupManagerActionsCollectionFirst : A link to the first page of resources.
+type InstanceGroupManagerActionsCollectionFirst struct {
+ // The URL for a page of resources.
+ Href *string `json:"href" validate:"required"`
+}
+
+// UnmarshalInstanceGroupManagerActionsCollectionFirst unmarshals an instance of InstanceGroupManagerActionsCollectionFirst from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerActionsCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerActionsCollectionFirst)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerActionsCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
+type InstanceGroupManagerActionsCollectionNext struct {
+ // The URL for a page of resources.
+ Href *string `json:"href" validate:"required"`
+}
+
+// UnmarshalInstanceGroupManagerActionsCollectionNext unmarshals an instance of InstanceGroupManagerActionsCollectionNext from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerActionsCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerActionsCollectionNext)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
@@ -28517,6 +35775,18 @@ func UnmarshalInstanceGroupManagerCollection(m map[string]json.RawMessage, resul
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *InstanceGroupManagerCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// InstanceGroupManagerCollectionFirst : A link to the first page of resources.
type InstanceGroupManagerCollectionFirst struct {
// The URL for a page of resources.
@@ -28559,7 +35829,7 @@ type InstanceGroupManagerPatch struct {
// The duration of time in seconds to pause further scale actions after scaling has taken place.
Cooldown *int64 `json:"cooldown,omitempty"`
- // If set to `true`, this manager will control the instance group.
+ // Indicates whether this manager will control the instance group.
ManagementEnabled *bool `json:"management_enabled,omitempty"`
// The maximum number of members in a managed instance group.
@@ -28568,7 +35838,7 @@ type InstanceGroupManagerPatch struct {
// The minimum number of members in a managed instance group.
MinMembershipCount *int64 `json:"min_membership_count,omitempty"`
- // The user-defined name for this instance group manager. Names must be unique within the instance group.
+ // The user-defined name for this instance group manager.
Name *string `json:"name,omitempty"`
}
@@ -28604,11 +35874,11 @@ func UnmarshalInstanceGroupManagerPatch(m map[string]json.RawMessage, result int
}
// AsPatch returns a generic map representation of the InstanceGroupManagerPatch
-func (instanceGroupManagerPatch *InstanceGroupManagerPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (instanceGroupManagerPatch *InstanceGroupManagerPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(instanceGroupManagerPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -28617,16 +35887,21 @@ func (instanceGroupManagerPatch *InstanceGroupManagerPatch) AsPatch() (patch map
// Models which "extend" this model:
// - InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy
type InstanceGroupManagerPolicy struct {
+ // The date and time that the instance group manager policy was created.
+ CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
+
// The URL for this instance group manager policy.
Href *string `json:"href" validate:"required"`
// The unique identifier for this instance group manager policy.
ID *string `json:"id" validate:"required"`
- // The user-defined name for this instance group manager policy. Names must be unique within the instance group
- // manager.
+ // The user-defined name for this instance group manager policy.
Name *string `json:"name" validate:"required"`
+ // The date and time that the instance group manager policy was updated.
+ UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"`
+
// The type of metric to be evaluated.
MetricType *string `json:"metric_type,omitempty"`
@@ -28663,6 +35938,10 @@ type InstanceGroupManagerPolicyIntf interface {
// UnmarshalInstanceGroupManagerPolicy unmarshals an instance of InstanceGroupManagerPolicy from the specified map of raw messages.
func UnmarshalInstanceGroupManagerPolicy(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(InstanceGroupManagerPolicy)
+ err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "href", &obj.Href)
if err != nil {
return
@@ -28675,6 +35954,10 @@ func UnmarshalInstanceGroupManagerPolicy(m map[string]json.RawMessage, result in
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "metric_type", &obj.MetricType)
if err != nil {
return
@@ -28737,6 +36020,18 @@ func UnmarshalInstanceGroupManagerPolicyCollection(m map[string]json.RawMessage,
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *InstanceGroupManagerPolicyCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// InstanceGroupManagerPolicyCollectionFirst : A link to the first page of resources.
type InstanceGroupManagerPolicyCollectionFirst struct {
// The URL for a page of resources.
@@ -28779,8 +36074,7 @@ type InstanceGroupManagerPolicyPatch struct {
// The metric value to be evaluated.
MetricValue *int64 `json:"metric_value,omitempty"`
- // The user-defined name for this instance group manager policy. Names must be unique within the instance group
- // manager.
+ // The user-defined name for this instance group manager policy.
Name *string `json:"name,omitempty"`
}
@@ -28813,11 +36107,11 @@ func UnmarshalInstanceGroupManagerPolicyPatch(m map[string]json.RawMessage, resu
}
// AsPatch returns a generic map representation of the InstanceGroupManagerPolicyPatch
-func (instanceGroupManagerPolicyPatch *InstanceGroupManagerPolicyPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (instanceGroupManagerPolicyPatch *InstanceGroupManagerPolicyPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(instanceGroupManagerPolicyPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -28827,7 +36121,7 @@ func (instanceGroupManagerPolicyPatch *InstanceGroupManagerPolicyPatch) AsPatch(
// - InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype
type InstanceGroupManagerPolicyPrototype struct {
// The user-defined name for this instance group manager policy. Names must be unique within the instance group
- // manager.
+ // manager. If unspecified, the name will be a hyphenated list of randomly-selected words.
Name *string `json:"name,omitempty"`
// The type of metric to be evaluated.
@@ -28898,8 +36192,7 @@ type InstanceGroupManagerPolicyReference struct {
// The unique identifier for this instance group manager policy.
ID *string `json:"id" validate:"required"`
- // The user-defined name for this instance group manager policy. Names must be unique within the instance group
- // manager.
+ // The user-defined name for this instance group manager policy.
Name *string `json:"name" validate:"required"`
}
@@ -28947,11 +36240,13 @@ func UnmarshalInstanceGroupManagerPolicyReferenceDeleted(m map[string]json.RawMe
// InstanceGroupManagerPrototype : InstanceGroupManagerPrototype struct
// Models which "extend" this model:
// - InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype
+// - InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype
type InstanceGroupManagerPrototype struct {
- // If set to `true`, this manager will control the instance group.
+ // Indicates whether this manager will control the instance group.
ManagementEnabled *bool `json:"management_enabled,omitempty"`
- // The user-defined name for this instance group manager. Names must be unique within the instance group.
+ // The user-defined name for this instance group manager. Names must be unique within the instance group. If
+ // unspecified, the name will be a hyphenated list of randomly-selected words.
Name *string `json:"name,omitempty"`
// The time window in seconds to aggregate metrics prior to evaluation.
@@ -29031,7 +36326,7 @@ type InstanceGroupManagerReference struct {
// The unique identifier for this instance group manager.
ID *string `json:"id" validate:"required"`
- // The user-defined name for this instance group manager. Names must be unique within the instance group.
+ // The user-defined name for this instance group manager.
Name *string `json:"name" validate:"required"`
}
@@ -29076,8 +36371,165 @@ func UnmarshalInstanceGroupManagerReferenceDeleted(m map[string]json.RawMessage,
return
}
+// InstanceGroupManagerScheduledActionGroup : InstanceGroupManagerScheduledActionGroup struct
+type InstanceGroupManagerScheduledActionGroup struct {
+ // The desired number of instance group members at the scheduled time.
+ MembershipCount *int64 `json:"membership_count" validate:"required"`
+}
+
+// UnmarshalInstanceGroupManagerScheduledActionGroup unmarshals an instance of InstanceGroupManagerScheduledActionGroup from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerScheduledActionGroup(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerScheduledActionGroup)
+ err = core.UnmarshalPrimitive(m, "membership_count", &obj.MembershipCount)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerScheduledActionGroupPrototype : InstanceGroupManagerScheduledActionGroupPrototype struct
+type InstanceGroupManagerScheduledActionGroupPrototype struct {
+ // The desired number of instance group members at the scheduled time.
+ MembershipCount *int64 `json:"membership_count" validate:"required"`
+}
+
+// NewInstanceGroupManagerScheduledActionGroupPrototype : Instantiate InstanceGroupManagerScheduledActionGroupPrototype (Generic Model Constructor)
+func (*VpcV1) NewInstanceGroupManagerScheduledActionGroupPrototype(membershipCount int64) (_model *InstanceGroupManagerScheduledActionGroupPrototype, err error) {
+ _model = &InstanceGroupManagerScheduledActionGroupPrototype{
+ MembershipCount: core.Int64Ptr(membershipCount),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+// UnmarshalInstanceGroupManagerScheduledActionGroupPrototype unmarshals an instance of InstanceGroupManagerScheduledActionGroupPrototype from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerScheduledActionGroupPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerScheduledActionGroupPrototype)
+ err = core.UnmarshalPrimitive(m, "membership_count", &obj.MembershipCount)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerScheduledActionManager : InstanceGroupManagerScheduledActionManager struct
+// Models which "extend" this model:
+// - InstanceGroupManagerScheduledActionManagerAutoScale
+type InstanceGroupManagerScheduledActionManager struct {
+ // If present, this property indicates the referenced resource has been deleted and provides
+ // some supplementary information.
+ Deleted *InstanceGroupManagerReferenceDeleted `json:"deleted,omitempty"`
+
+ // The URL for this instance group manager.
+ Href *string `json:"href,omitempty"`
+
+ // The unique identifier for this instance group manager.
+ ID *string `json:"id,omitempty"`
+
+ // The user-defined name for this instance group manager.
+ Name *string `json:"name,omitempty"`
+
+ // The desired maximum number of instance group members at the scheduled time.
+ MaxMembershipCount *int64 `json:"max_membership_count,omitempty"`
+
+ // The desired minimum number of instance group members at the scheduled time.
+ MinMembershipCount *int64 `json:"min_membership_count,omitempty"`
+}
+
+func (*InstanceGroupManagerScheduledActionManager) isaInstanceGroupManagerScheduledActionManager() bool {
+ return true
+}
+
+type InstanceGroupManagerScheduledActionManagerIntf interface {
+ isaInstanceGroupManagerScheduledActionManager() bool
+}
+
+// UnmarshalInstanceGroupManagerScheduledActionManager unmarshals an instance of InstanceGroupManagerScheduledActionManager from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerScheduledActionManager(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerScheduledActionManager)
+ err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceGroupManagerReferenceDeleted)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerScheduledActionManagerPrototype : InstanceGroupManagerScheduledActionManagerPrototype struct
+// Models which "extend" this model:
+// - InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype
+type InstanceGroupManagerScheduledActionManagerPrototype struct {
+ // The desired maximum number of instance group members at the scheduled time.
+ MaxMembershipCount *int64 `json:"max_membership_count,omitempty"`
+
+ // The desired minimum number of instance group members at the scheduled time.
+ MinMembershipCount *int64 `json:"min_membership_count,omitempty"`
+
+ // The unique identifier for this instance group manager.
+ ID *string `json:"id,omitempty"`
+
+ // The URL for this instance group manager.
+ Href *string `json:"href,omitempty"`
+}
+
+func (*InstanceGroupManagerScheduledActionManagerPrototype) isaInstanceGroupManagerScheduledActionManagerPrototype() bool {
+ return true
+}
+
+type InstanceGroupManagerScheduledActionManagerPrototypeIntf interface {
+ isaInstanceGroupManagerScheduledActionManagerPrototype() bool
+}
+
+// UnmarshalInstanceGroupManagerScheduledActionManagerPrototype unmarshals an instance of InstanceGroupManagerScheduledActionManagerPrototype from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerScheduledActionManagerPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerScheduledActionManagerPrototype)
+ err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// InstanceGroupMembership : InstanceGroupMembership struct
type InstanceGroupMembership struct {
+ // The date and time that the instance group manager policy was created.
+ CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
+
// If set to true, when deleting the membership the instance will also be deleted.
DeleteInstanceOnMembershipDelete *bool `json:"delete_instance_on_membership_delete" validate:"required"`
@@ -29103,6 +36555,9 @@ type InstanceGroupMembership struct {
// - `pending`: Membership is waiting for dependent resources
// - `unhealthy`: Membership has unhealthy dependent resources.
Status *string `json:"status" validate:"required"`
+
+ // The date and time that the instance group membership was updated.
+ UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"`
}
// Constants associated with the InstanceGroupMembership.Status property.
@@ -29123,6 +36578,10 @@ const (
// UnmarshalInstanceGroupMembership unmarshals an instance of InstanceGroupMembership from the specified map of raw messages.
func UnmarshalInstanceGroupMembership(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(InstanceGroupMembership)
+ err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "delete_instance_on_membership_delete", &obj.DeleteInstanceOnMembershipDelete)
if err != nil {
return
@@ -29155,6 +36614,10 @@ func UnmarshalInstanceGroupMembership(m map[string]json.RawMessage, result inter
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt)
+ if err != nil {
+ return
+ }
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
@@ -29205,6 +36668,18 @@ func UnmarshalInstanceGroupMembershipCollection(m map[string]json.RawMessage, re
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *InstanceGroupMembershipCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// InstanceGroupMembershipCollectionFirst : A link to the first page of resources.
type InstanceGroupMembershipCollectionFirst struct {
// The URL for a page of resources.
@@ -29257,11 +36732,11 @@ func UnmarshalInstanceGroupMembershipPatch(m map[string]json.RawMessage, result
}
// AsPatch returns a generic map representation of the InstanceGroupMembershipPatch
-func (instanceGroupMembershipPatch *InstanceGroupMembershipPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (instanceGroupMembershipPatch *InstanceGroupMembershipPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(instanceGroupMembershipPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -29273,13 +36748,16 @@ type InstanceGroupPatch struct {
ApplicationPort *int64 `json:"application_port,omitempty"`
// Instance template to use when creating new instances.
+ //
+ // Instance groups are not compatible with instance templates that specify `true` for
+ // `default_trusted_profile.auto_link`.
InstanceTemplate InstanceTemplateIdentityIntf `json:"instance_template,omitempty"`
// The load balancer that the load balancer pool used by this group
- // is in. Must be supplied when using a load balancer pool.
+ // is in. Required when using a load balancer pool.
LoadBalancer LoadBalancerIdentityIntf `json:"load_balancer,omitempty"`
- // When specified, the load balancer pool will be managed by this
+ // If specified, the load balancer pool will be managed by this
// group. Instances created by this group will have a new load
// balancer pool member in that pool created. Must be used with
// `application_port`.
@@ -29291,7 +36769,7 @@ type InstanceGroupPatch struct {
// The user-defined name for this instance group.
Name *string `json:"name,omitempty"`
- // Array of identities to subnets to use when creating new instances.
+ // The subnets to use when creating new instances.
Subnets []SubnetIdentityIntf `json:"subnets,omitempty"`
}
@@ -29331,11 +36809,11 @@ func UnmarshalInstanceGroupPatch(m map[string]json.RawMessage, result interface{
}
// AsPatch returns a generic map representation of the InstanceGroupPatch
-func (instanceGroupPatch *InstanceGroupPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (instanceGroupPatch *InstanceGroupPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(instanceGroupPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -29406,8 +36884,12 @@ func UnmarshalInstanceGroupReferenceDeleted(m map[string]json.RawMessage, result
// InstanceInitialization : InstanceInitialization struct
type InstanceInitialization struct {
- // Collection of references to public SSH keys used at instance initialization.
- Keys []KeyReferenceInstanceInitializationContextIntf `json:"keys" validate:"required"`
+ // The default trusted profile configuration specified at virtual server instance
+ // creation. If absent, no default trusted profile was specified.
+ DefaultTrustedProfile *InstanceInitializationDefaultTrustedProfile `json:"default_trusted_profile,omitempty"`
+
+ // The public SSH keys used at instance initialization.
+ Keys []KeyReference `json:"keys" validate:"required"`
Password *InstanceInitializationPassword `json:"password,omitempty"`
}
@@ -29415,7 +36897,11 @@ type InstanceInitialization struct {
// UnmarshalInstanceInitialization unmarshals an instance of InstanceInitialization from the specified map of raw messages.
func UnmarshalInstanceInitialization(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(InstanceInitialization)
- err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyReferenceInstanceInitializationContext)
+ err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceInitializationDefaultTrustedProfile)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyReference)
if err != nil {
return
}
@@ -29427,13 +36913,39 @@ func UnmarshalInstanceInitialization(m map[string]json.RawMessage, result interf
return
}
+// InstanceInitializationDefaultTrustedProfile : InstanceInitializationDefaultTrustedProfile struct
+type InstanceInitializationDefaultTrustedProfile struct {
+ // If set to `true`, the system created a link to the specified `target` trusted profile during instance creation.
+ // Regardless of whether a link was created by the system or manually using the IAM Identity service, it will be
+ // automatically deleted when the instance is deleted.
+ AutoLink *bool `json:"auto_link" validate:"required"`
+
+ // The default IAM trusted profile to use for this virtual server instance.
+ Target *TrustedProfileReference `json:"target" validate:"required"`
+}
+
+// UnmarshalInstanceInitializationDefaultTrustedProfile unmarshals an instance of InstanceInitializationDefaultTrustedProfile from the specified map of raw messages.
+func UnmarshalInstanceInitializationDefaultTrustedProfile(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceInitializationDefaultTrustedProfile)
+ err = core.UnmarshalPrimitive(m, "auto_link", &obj.AutoLink)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalTrustedProfileReference)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// InstanceInitializationPassword : InstanceInitializationPassword struct
type InstanceInitializationPassword struct {
// The administrator password at initialization, encrypted using `encryption_key`, and returned base64-encoded.
EncryptedPassword *[]byte `json:"encrypted_password" validate:"required"`
- // The reference to the public SSH key used to encrypt the administrator password.
- EncryptionKey KeyReferenceInstanceInitializationContextIntf `json:"encryption_key" validate:"required"`
+ // The public SSH key used to encrypt the administrator password.
+ EncryptionKey *KeyIdentityByFingerprint `json:"encryption_key" validate:"required"`
}
// UnmarshalInstanceInitializationPassword unmarshals an instance of InstanceInitializationPassword from the specified map of raw messages.
@@ -29443,7 +36955,58 @@ func UnmarshalInstanceInitializationPassword(m map[string]json.RawMessage, resul
if err != nil {
return
}
- err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalKeyReferenceInstanceInitializationContext)
+ err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalKeyIdentityByFingerprint)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceMetadataService : The metadata service configuration.
+type InstanceMetadataService struct {
+ // Indicates whether the metadata service endpoint is available to the virtual server instance.
+ Enabled *bool `json:"enabled" validate:"required"`
+}
+
+// UnmarshalInstanceMetadataService unmarshals an instance of InstanceMetadataService from the specified map of raw messages.
+func UnmarshalInstanceMetadataService(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceMetadataService)
+ err = core.UnmarshalPrimitive(m, "enabled", &obj.Enabled)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceMetadataServicePatch : The metadata service configuration.
+type InstanceMetadataServicePatch struct {
+ // Indicates whether the metadata service endpoint will be available to the virtual server instance.
+ Enabled *bool `json:"enabled,omitempty"`
+}
+
+// UnmarshalInstanceMetadataServicePatch unmarshals an instance of InstanceMetadataServicePatch from the specified map of raw messages.
+func UnmarshalInstanceMetadataServicePatch(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceMetadataServicePatch)
+ err = core.UnmarshalPrimitive(m, "enabled", &obj.Enabled)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceMetadataServicePrototype : The metadata service configuration.
+type InstanceMetadataServicePrototype struct {
+ // Indicates whether the metadata service endpoint will be available to the virtual server instance.
+ Enabled *bool `json:"enabled,omitempty"`
+}
+
+// UnmarshalInstanceMetadataServicePrototype unmarshals an instance of InstanceMetadataServicePrototype from the specified map of raw messages.
+func UnmarshalInstanceMetadataServicePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceMetadataServicePrototype)
+ err = core.UnmarshalPrimitive(m, "enabled", &obj.Enabled)
if err != nil {
return
}
@@ -29453,51 +37016,82 @@ func UnmarshalInstanceInitializationPassword(m map[string]json.RawMessage, resul
// InstancePatch : InstancePatch struct
type InstancePatch struct {
+ // The availability policy for this virtual server instance.
+ AvailabilityPolicy *InstanceAvailabilityPolicyPatch `json:"availability_policy,omitempty"`
+
+ // The metadata service configuration.
+ MetadataService *InstanceMetadataServicePatch `json:"metadata_service,omitempty"`
+
// The user-defined name for this virtual server instance (and default system hostname).
Name *string `json:"name,omitempty"`
+ // The placement restrictions to use for the virtual server instance. For the placement
+ // restrictions to be changed, the instance `status` must be `stopping` or `stopped`.
+ PlacementTarget InstancePlacementTargetPatchIntf `json:"placement_target,omitempty"`
+
// The profile to use for this virtual server instance. For the profile to be changed,
// the instance `status` must be `stopping` or `stopped`. In addition, the requested
// profile must:
- // - Match the current profile's instance disk support. (Note: If the current profile
- // supports instance storage disks, the requested profile can have a different
- // instance storage disk configuration.)
+ // - Have matching instance disk support. Any disks associated with the current profile
+ // will be deleted, and any disks associated with the requested profile will be
+ // created.
// - Be compatible with any `placement_target` constraints. For example, if the
// instance is placed on a dedicated host, the requested profile `family` must be
// the same as the dedicated host `family`.
Profile InstancePatchProfileIntf `json:"profile,omitempty"`
+
+ // The amount of bandwidth (in megabits per second) allocated exclusively to instance storage volumes. An increase in
+ // this value will result in a corresponding decrease to
+ // `total_network_bandwidth`.
+ TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth,omitempty"`
}
// UnmarshalInstancePatch unmarshals an instance of InstancePatch from the specified map of raw messages.
func UnmarshalInstancePatch(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(InstancePatch)
+ err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPatch)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePatch)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "name", &obj.Name)
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPatch)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstancePatchProfile)
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth)
+ if err != nil {
+ return
+ }
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
// AsPatch returns a generic map representation of the InstancePatch
-func (instancePatch *InstancePatch) AsPatch() (patch map[string]interface{}, err error) {
+func (instancePatch *InstancePatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(instancePatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
// InstancePatchProfile : The profile to use for this virtual server instance. For the profile to be changed, the instance `status` must be
// `stopping` or `stopped`. In addition, the requested profile must:
-// - Match the current profile's instance disk support. (Note: If the current profile
-// supports instance storage disks, the requested profile can have a different
-// instance storage disk configuration.)
+// - Have matching instance disk support. Any disks associated with the current profile
+// will be deleted, and any disks associated with the requested profile will be
+// created.
// - Be compatible with any `placement_target` constraints. For example, if the
// instance is placed on a dedicated host, the requested profile `family` must be
// the same as the dedicated host `family`.
@@ -29535,6 +37129,162 @@ func UnmarshalInstancePatchProfile(m map[string]json.RawMessage, result interfac
return
}
+// InstancePlacementTarget : InstancePlacementTarget struct
+// Models which "extend" this model:
+// - InstancePlacementTargetDedicatedHostGroupReference
+// - InstancePlacementTargetDedicatedHostReference
+// - InstancePlacementTargetPlacementGroupReference
+type InstancePlacementTarget struct {
+ // The CRN for this dedicated host group.
+ CRN *string `json:"crn,omitempty"`
+
+ // If present, this property indicates the referenced resource has been deleted and provides
+ // some supplementary information.
+ Deleted *DedicatedHostGroupReferenceDeleted `json:"deleted,omitempty"`
+
+ // The URL for this dedicated host group.
+ Href *string `json:"href,omitempty"`
+
+ // The unique identifier for this dedicated host group.
+ ID *string `json:"id,omitempty"`
+
+ // The unique user-defined name for this dedicated host group.
+ Name *string `json:"name,omitempty"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type,omitempty"`
+}
+
+// Constants associated with the InstancePlacementTarget.ResourceType property.
+// The resource type.
+const (
+ InstancePlacementTargetResourceTypeDedicatedHostGroupConst = "dedicated_host_group"
+)
+
+func (*InstancePlacementTarget) isaInstancePlacementTarget() bool {
+ return true
+}
+
+type InstancePlacementTargetIntf interface {
+ isaInstancePlacementTarget() bool
+}
+
+// UnmarshalInstancePlacementTarget unmarshals an instance of InstancePlacementTarget from the specified map of raw messages.
+func UnmarshalInstancePlacementTarget(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTarget)
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalDedicatedHostGroupReferenceDeleted)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePlacementTargetPatch : InstancePlacementTargetPatch struct
+// Models which "extend" this model:
+// - InstancePlacementTargetPatchDedicatedHostIdentity
+// - InstancePlacementTargetPatchDedicatedHostGroupIdentity
+type InstancePlacementTargetPatch struct {
+ // The unique identifier for this dedicated host.
+ ID *string `json:"id,omitempty"`
+
+ // The CRN for this dedicated host.
+ CRN *string `json:"crn,omitempty"`
+
+ // The URL for this dedicated host.
+ Href *string `json:"href,omitempty"`
+}
+
+func (*InstancePlacementTargetPatch) isaInstancePlacementTargetPatch() bool {
+ return true
+}
+
+type InstancePlacementTargetPatchIntf interface {
+ isaInstancePlacementTargetPatch() bool
+}
+
+// UnmarshalInstancePlacementTargetPatch unmarshals an instance of InstancePlacementTargetPatch from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetPatch(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetPatch)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePlacementTargetPrototype : InstancePlacementTargetPrototype struct
+// Models which "extend" this model:
+// - InstancePlacementTargetPrototypeDedicatedHostIdentity
+// - InstancePlacementTargetPrototypeDedicatedHostGroupIdentity
+// - InstancePlacementTargetPrototypePlacementGroupIdentity
+type InstancePlacementTargetPrototype struct {
+ // The unique identifier for this dedicated host.
+ ID *string `json:"id,omitempty"`
+
+ // The CRN for this dedicated host.
+ CRN *string `json:"crn,omitempty"`
+
+ // The URL for this dedicated host.
+ Href *string `json:"href,omitempty"`
+}
+
+func (*InstancePlacementTargetPrototype) isaInstancePlacementTargetPrototype() bool {
+ return true
+}
+
+type InstancePlacementTargetPrototypeIntf interface {
+ isaInstancePlacementTargetPrototype() bool
+}
+
+// UnmarshalInstancePlacementTargetPrototype unmarshals an instance of InstancePlacementTargetPrototype from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetPrototype)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// InstanceProfile : InstanceProfile struct
type InstanceProfile struct {
Bandwidth InstanceProfileBandwidthIntf `json:"bandwidth" validate:"required"`
@@ -29545,6 +37295,14 @@ type InstanceProfile struct {
// The product family this virtual server instance profile belongs to.
Family *string `json:"family,omitempty"`
+ GpuCount InstanceProfileGpuIntf `json:"gpu_count,omitempty"`
+
+ GpuManufacturer *InstanceProfileGpuManufacturer `json:"gpu_manufacturer,omitempty"`
+
+ GpuMemory InstanceProfileGpuMemoryIntf `json:"gpu_memory,omitempty"`
+
+ GpuModel *InstanceProfileGpuModel `json:"gpu_model,omitempty"`
+
// The URL for this virtual server instance profile.
Href *string `json:"href" validate:"required"`
@@ -29557,6 +37315,8 @@ type InstanceProfile struct {
PortSpeed InstanceProfilePortSpeedIntf `json:"port_speed" validate:"required"`
+ TotalVolumeBandwidth InstanceProfileVolumeBandwidthIntf `json:"total_volume_bandwidth" validate:"required"`
+
VcpuArchitecture *InstanceProfileVcpuArchitecture `json:"vcpu_architecture" validate:"required"`
VcpuCount InstanceProfileVcpuIntf `json:"vcpu_count" validate:"required"`
@@ -29577,6 +37337,22 @@ func UnmarshalInstanceProfile(m map[string]json.RawMessage, result interface{})
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "gpu_count", &obj.GpuCount, UnmarshalInstanceProfileGpu)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "gpu_manufacturer", &obj.GpuManufacturer, UnmarshalInstanceProfileGpuManufacturer)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "gpu_memory", &obj.GpuMemory, UnmarshalInstanceProfileGpuMemory)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "gpu_model", &obj.GpuModel, UnmarshalInstanceProfileGpuModel)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "href", &obj.Href)
if err != nil {
return
@@ -29597,6 +37373,10 @@ func UnmarshalInstanceProfile(m map[string]json.RawMessage, result interface{})
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth, UnmarshalInstanceProfileVolumeBandwidth)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "vcpu_architecture", &obj.VcpuArchitecture, UnmarshalInstanceProfileVcpuArchitecture)
if err != nil {
return
@@ -29951,6 +37731,222 @@ func UnmarshalInstanceProfileDiskSupportedInterfaces(m map[string]json.RawMessag
return
}
+// InstanceProfileGpu : InstanceProfileGpu struct
+// Models which "extend" this model:
+// - InstanceProfileGpuFixed
+// - InstanceProfileGpuRange
+// - InstanceProfileGpuEnum
+// - InstanceProfileGpuDependent
+type InstanceProfileGpu struct {
+ // The type for this profile field.
+ Type *string `json:"type,omitempty"`
+
+ // The value for this profile field.
+ Value *int64 `json:"value,omitempty"`
+
+ // The default value for this profile field.
+ Default *int64 `json:"default,omitempty"`
+
+ // The maximum value for this profile field.
+ Max *int64 `json:"max,omitempty"`
+
+ // The minimum value for this profile field.
+ Min *int64 `json:"min,omitempty"`
+
+ // The increment step value for this profile field.
+ Step *int64 `json:"step,omitempty"`
+
+ // The permitted values for this profile field.
+ Values []int64 `json:"values,omitempty"`
+}
+
+// Constants associated with the InstanceProfileGpu.Type property.
+// The type for this profile field.
+const (
+ InstanceProfileGpuTypeFixedConst = "fixed"
+)
+
+func (*InstanceProfileGpu) isaInstanceProfileGpu() bool {
+ return true
+}
+
+type InstanceProfileGpuIntf interface {
+ isaInstanceProfileGpu() bool
+}
+
+// UnmarshalInstanceProfileGpu unmarshals an instance of InstanceProfileGpu from the specified map of raw messages.
+func UnmarshalInstanceProfileGpu(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceProfileGpu)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "value", &obj.Value)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "max", &obj.Max)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min", &obj.Min)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "step", &obj.Step)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "values", &obj.Values)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceProfileGpuManufacturer : InstanceProfileGpuManufacturer struct
+type InstanceProfileGpuManufacturer struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The possible GPU manufacturer(s) for an instance with this profile.
+ Values []string `json:"values" validate:"required"`
+}
+
+// Constants associated with the InstanceProfileGpuManufacturer.Type property.
+// The type for this profile field.
+const (
+ InstanceProfileGpuManufacturerTypeEnumConst = "enum"
+)
+
+// UnmarshalInstanceProfileGpuManufacturer unmarshals an instance of InstanceProfileGpuManufacturer from the specified map of raw messages.
+func UnmarshalInstanceProfileGpuManufacturer(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceProfileGpuManufacturer)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "values", &obj.Values)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceProfileGpuMemory : InstanceProfileGpuMemory struct
+// Models which "extend" this model:
+// - InstanceProfileGpuMemoryFixed
+// - InstanceProfileGpuMemoryRange
+// - InstanceProfileGpuMemoryEnum
+// - InstanceProfileGpuMemoryDependent
+type InstanceProfileGpuMemory struct {
+ // The type for this profile field.
+ Type *string `json:"type,omitempty"`
+
+ // The value for this profile field.
+ Value *int64 `json:"value,omitempty"`
+
+ // The default value for this profile field.
+ Default *int64 `json:"default,omitempty"`
+
+ // The maximum value for this profile field.
+ Max *int64 `json:"max,omitempty"`
+
+ // The minimum value for this profile field.
+ Min *int64 `json:"min,omitempty"`
+
+ // The increment step value for this profile field.
+ Step *int64 `json:"step,omitempty"`
+
+ // The permitted values for this profile field.
+ Values []int64 `json:"values,omitempty"`
+}
+
+// Constants associated with the InstanceProfileGpuMemory.Type property.
+// The type for this profile field.
+const (
+ InstanceProfileGpuMemoryTypeFixedConst = "fixed"
+)
+
+func (*InstanceProfileGpuMemory) isaInstanceProfileGpuMemory() bool {
+ return true
+}
+
+type InstanceProfileGpuMemoryIntf interface {
+ isaInstanceProfileGpuMemory() bool
+}
+
+// UnmarshalInstanceProfileGpuMemory unmarshals an instance of InstanceProfileGpuMemory from the specified map of raw messages.
+func UnmarshalInstanceProfileGpuMemory(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceProfileGpuMemory)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "value", &obj.Value)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "max", &obj.Max)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min", &obj.Min)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "step", &obj.Step)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "values", &obj.Values)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceProfileGpuModel : InstanceProfileGpuModel struct
+type InstanceProfileGpuModel struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The possible GPU model(s) for an instance with this profile.
+ Values []string `json:"values" validate:"required"`
+}
+
+// Constants associated with the InstanceProfileGpuModel.Type property.
+// The type for this profile field.
+const (
+ InstanceProfileGpuModelTypeEnumConst = "enum"
+)
+
+// UnmarshalInstanceProfileGpuModel unmarshals an instance of InstanceProfileGpuModel from the specified map of raw messages.
+func UnmarshalInstanceProfileGpuModel(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceProfileGpuModel)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "values", &obj.Values)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// InstanceProfileIdentity : Identifies an instance profile by a unique property.
// Models which "extend" this model:
// - InstanceProfileIdentityByName
@@ -30281,47 +38277,155 @@ func UnmarshalInstanceProfileVcpuArchitecture(m map[string]json.RawMessage, resu
return
}
+// InstanceProfileVolumeBandwidth : InstanceProfileVolumeBandwidth struct
+// Models which "extend" this model:
+// - InstanceProfileVolumeBandwidthFixed
+// - InstanceProfileVolumeBandwidthRange
+// - InstanceProfileVolumeBandwidthEnum
+// - InstanceProfileVolumeBandwidthDependent
+type InstanceProfileVolumeBandwidth struct {
+ // The type for this profile field.
+ Type *string `json:"type,omitempty"`
+
+ // The value for this profile field.
+ Value *int64 `json:"value,omitempty"`
+
+ // The default value for this profile field.
+ Default *int64 `json:"default,omitempty"`
+
+ // The maximum value for this profile field.
+ Max *int64 `json:"max,omitempty"`
+
+ // The minimum value for this profile field.
+ Min *int64 `json:"min,omitempty"`
+
+ // The increment step value for this profile field.
+ Step *int64 `json:"step,omitempty"`
+
+ // The permitted values for this profile field.
+ Values []int64 `json:"values,omitempty"`
+}
+
+// Constants associated with the InstanceProfileVolumeBandwidth.Type property.
+// The type for this profile field.
+const (
+ InstanceProfileVolumeBandwidthTypeFixedConst = "fixed"
+)
+
+func (*InstanceProfileVolumeBandwidth) isaInstanceProfileVolumeBandwidth() bool {
+ return true
+}
+
+type InstanceProfileVolumeBandwidthIntf interface {
+ isaInstanceProfileVolumeBandwidth() bool
+}
+
+// UnmarshalInstanceProfileVolumeBandwidth unmarshals an instance of InstanceProfileVolumeBandwidth from the specified map of raw messages.
+func UnmarshalInstanceProfileVolumeBandwidth(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceProfileVolumeBandwidth)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "value", &obj.Value)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "max", &obj.Max)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min", &obj.Min)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "step", &obj.Step)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "values", &obj.Values)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// InstancePrototype : InstancePrototype struct
// Models which "extend" this model:
// - InstancePrototypeInstanceByImage
+// - InstancePrototypeInstanceBySourceSnapshot
// - InstancePrototypeInstanceBySourceTemplate
type InstancePrototype struct {
- // The public SSH keys for the administrative user of the virtual server instance. Up to 10 keys may be provided; if no
- // keys are provided the instance will be inaccessible unless the image used provides another means of access. For
- // Windows instances, one of the keys will be used to encrypt the administrator password.
+ // The availability policy to use for this virtual server instance.
+ AvailabilityPolicy *InstanceAvailabilityPrototype `json:"availability_policy,omitempty"`
+
+ // The default trusted profile configuration to use for this virtual server instance
//
- // Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled images,
- // these keys will also be added as SSH authorized keys for the administrative user.
+ // This property's value is used when provisioning the virtual server instance, but not
+ // subsequently managed. Accordingly, it is reflected as an [instance
+ // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization)
+ // property.
+ DefaultTrustedProfile *InstanceDefaultTrustedProfilePrototype `json:"default_trusted_profile,omitempty"`
+
+ // The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the
+ // virtual server instance as cloud-init vendor data. For cloud-init enabled images, these keys will also be added as
+ // SSH authorized keys for the administrative user.
+ //
+ // For Windows images, at least one key must be specified, and one will be chosen to encrypt [the administrator
+ // password](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization). Keys are optional for other images, but if
+ // no keys are specified, the instance will be inaccessible unless the specified image provides another means of
+ // access.
+ //
+ // This property's value is used when provisioning the virtual server instance, but not subsequently managed.
+ // Accordingly, it is reflected as an [instance
+ // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property.
Keys []KeyIdentityIntf `json:"keys,omitempty"`
+ // The metadata service configuration.
+ MetadataService *InstanceMetadataServicePrototype `json:"metadata_service,omitempty"`
+
// The unique user-defined name for this virtual server instance (and default system hostname). If unspecified, the
// name will be a hyphenated list of randomly-selected words.
Name *string `json:"name,omitempty"`
- // Collection of additional network interfaces to create for the virtual server instance.
+ // The additional network interfaces to create for the virtual server instance.
NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"`
- // The profile to use for this virtual server instance.
+ // The placement restrictions to use for the virtual server instance.
+ PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"`
+
+ // The profile to use for this virtual server instance. If unspecified, `bx2-2x8` will
+ // be used, but this default value is expected to change in the future.
Profile InstanceProfileIdentityIntf `json:"profile,omitempty"`
// The resource group to use. If unspecified, the account's [default resource
// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
+ // The amount of bandwidth (in megabits per second) allocated exclusively to instance storage volumes. An increase in
+ // this value will result in a corresponding decrease to
+ // `total_network_bandwidth`.
+ TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth,omitempty"`
+
// User data to be made available when setting up the virtual server instance.
UserData *string `json:"user_data,omitempty"`
- // Collection of volume attachments.
+ // The volume attachments for this virtual server instance.
VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"`
- // The VPC the virtual server instance is to be a part of. If provided, must match the
- // VPC tied to the subnets of the instance's network interfaces.
+ // The VPC the virtual server instance is to be a part of. If specified, it must match
+ // the VPC referenced by the subnets of the instance's network interfaces.
VPC VPCIdentityIntf `json:"vpc,omitempty"`
// The boot volume attachment for the virtual server instance.
BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"`
- // The identity of the image to use when provisioning the virtual server instance.
+ // The image to use when provisioning the virtual server instance.
Image ImageIdentityIntf `json:"image,omitempty"`
// Primary network interface.
@@ -30330,7 +38434,7 @@ type InstancePrototype struct {
// The zone this virtual server instance will reside in.
Zone ZoneIdentityIntf `json:"zone,omitempty"`
- // Identifies an instance template by a unique property.
+ // The template to create this virtual server instance from.
SourceTemplate InstanceTemplateIdentityIntf `json:"source_template,omitempty"`
}
@@ -30345,10 +38449,22 @@ type InstancePrototypeIntf interface {
// UnmarshalInstancePrototype unmarshals an instance of InstancePrototype from the specified map of raw messages.
func UnmarshalInstancePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(InstancePrototype)
+ err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPrototype)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity)
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "name", &obj.Name)
if err != nil {
return
@@ -30357,6 +38473,10 @@ func UnmarshalInstancePrototype(m map[string]json.RawMessage, result interface{}
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity)
if err != nil {
return
@@ -30365,6 +38485,10 @@ func UnmarshalInstancePrototype(m map[string]json.RawMessage, result interface{}
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData)
if err != nil {
return
@@ -30465,57 +38589,132 @@ func UnmarshalInstanceReferenceDeleted(m map[string]json.RawMessage, result inte
return
}
+// InstanceStatusReason : InstanceStatusReason struct
+type InstanceStatusReason struct {
+ // A snake case string succinctly identifying the status reason.
+ Code *string `json:"code" validate:"required"`
+
+ // An explanation of the status reason.
+ Message *string `json:"message" validate:"required"`
+
+ // Link to documentation about this status reason.
+ MoreInfo *string `json:"more_info,omitempty"`
+}
+
+// Constants associated with the InstanceStatusReason.Code property.
+// A snake case string succinctly identifying the status reason.
+const (
+ InstanceStatusReasonCodeCannotStartConst = "cannot_start"
+ InstanceStatusReasonCodeCannotStartCapacityConst = "cannot_start_capacity"
+ InstanceStatusReasonCodeCannotStartComputeConst = "cannot_start_compute"
+ InstanceStatusReasonCodeCannotStartIPAddressConst = "cannot_start_ip_address"
+ InstanceStatusReasonCodeCannotStartNetworkConst = "cannot_start_network"
+ InstanceStatusReasonCodeCannotStartPlacementGroupConst = "cannot_start_placement_group"
+ InstanceStatusReasonCodeCannotStartStorageConst = "cannot_start_storage"
+ InstanceStatusReasonCodeEncryptionKeyDeletedConst = "encryption_key_deleted"
+ InstanceStatusReasonCodeStoppedByHostFailureConst = "stopped_by_host_failure"
+ InstanceStatusReasonCodeStoppedForImageCreationConst = "stopped_for_image_creation"
+)
+
+// UnmarshalInstanceStatusReason unmarshals an instance of InstanceStatusReason from the specified map of raw messages.
+func UnmarshalInstanceStatusReason(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceStatusReason)
+ err = core.UnmarshalPrimitive(m, "code", &obj.Code)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "message", &obj.Message)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// InstanceTemplate : InstanceTemplate struct
// Models which "extend" this model:
// - InstanceTemplateInstanceByImage
-// - InstanceTemplateInstanceBySourceTemplate
+// - InstanceTemplateInstanceBySourceSnapshot
type InstanceTemplate struct {
+ // The availability policy to use for this virtual server instance.
+ AvailabilityPolicy *InstanceAvailabilityPrototype `json:"availability_policy,omitempty"`
+
// The date and time that the instance template was created.
CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
// The CRN for this instance template.
CRN *string `json:"crn" validate:"required"`
+ // The default trusted profile configuration to use for this virtual server instance
+ //
+ // This property's value is used when provisioning the virtual server instance, but not
+ // subsequently managed. Accordingly, it is reflected as an [instance
+ // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization)
+ // property.
+ DefaultTrustedProfile *InstanceDefaultTrustedProfilePrototype `json:"default_trusted_profile,omitempty"`
+
// The URL for this instance template.
Href *string `json:"href" validate:"required"`
// The unique identifier for this instance template.
ID *string `json:"id" validate:"required"`
- // The public SSH keys for the administrative user of the virtual server instance. Up to 10 keys may be provided; if no
- // keys are provided the instance will be inaccessible unless the image used provides another means of access. For
- // Windows instances, one of the keys will be used to encrypt the administrator password.
+ // The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the
+ // virtual server instance as cloud-init vendor data. For cloud-init enabled images, these keys will also be added as
+ // SSH authorized keys for the administrative user.
//
- // Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled images,
- // these keys will also be added as SSH authorized keys for the administrative user.
+ // For Windows images, at least one key must be specified, and one will be chosen to encrypt [the administrator
+ // password](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization). Keys are optional for other images, but if
+ // no keys are specified, the instance will be inaccessible unless the specified image provides another means of
+ // access.
+ //
+ // This property's value is used when provisioning the virtual server instance, but not subsequently managed.
+ // Accordingly, it is reflected as an [instance
+ // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property.
Keys []KeyIdentityIntf `json:"keys,omitempty"`
+ // The metadata service configuration.
+ MetadataService *InstanceMetadataServicePrototype `json:"metadata_service,omitempty"`
+
// The unique user-defined name for this instance template.
Name *string `json:"name" validate:"required"`
- // Collection of additional network interfaces to create for the virtual server instance.
+ // The additional network interfaces to create for the virtual server instance.
NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"`
- // The profile to use for this virtual server instance.
+ // The placement restrictions to use for the virtual server instance.
+ PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"`
+
+ // The profile to use for this virtual server instance. If unspecified, `bx2-2x8` will
+ // be used, but this default value is expected to change in the future.
Profile InstanceProfileIdentityIntf `json:"profile,omitempty"`
// The resource group for this instance template.
ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`
+ // The amount of bandwidth (in megabits per second) allocated exclusively to instance storage volumes. An increase in
+ // this value will result in a corresponding decrease to
+ // `total_network_bandwidth`.
+ TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth,omitempty"`
+
// User data to be made available when setting up the virtual server instance.
UserData *string `json:"user_data,omitempty"`
- // Collection of volume attachments.
+ // The volume attachments for this virtual server instance.
VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"`
- // The VPC the virtual server instance is to be a part of. If provided, must match the
- // VPC tied to the subnets of the instance's network interfaces.
+ // The VPC the virtual server instance is to be a part of. If specified, it must match
+ // the VPC referenced by the subnets of the instance's network interfaces.
VPC VPCIdentityIntf `json:"vpc,omitempty"`
// The boot volume attachment for the virtual server instance.
BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"`
- // The identity of the image to use when provisioning the virtual server instance.
+ // The image to use when provisioning the virtual server instance.
Image ImageIdentityIntf `json:"image,omitempty"`
// Primary network interface.
@@ -30523,9 +38722,6 @@ type InstanceTemplate struct {
// The zone this virtual server instance will reside in.
Zone ZoneIdentityIntf `json:"zone,omitempty"`
-
- // Identifies an instance template by a unique property.
- SourceTemplate InstanceTemplateIdentityIntf `json:"source_template,omitempty"`
}
func (*InstanceTemplate) isaInstanceTemplate() bool {
@@ -30539,6 +38735,10 @@ type InstanceTemplateIntf interface {
// UnmarshalInstanceTemplate unmarshals an instance of InstanceTemplate from the specified map of raw messages.
func UnmarshalInstanceTemplate(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(InstanceTemplate)
+ err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
if err != nil {
return
@@ -30547,6 +38747,10 @@ func UnmarshalInstanceTemplate(m map[string]json.RawMessage, result interface{})
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "href", &obj.Href)
if err != nil {
return
@@ -30559,6 +38763,10 @@ func UnmarshalInstanceTemplate(m map[string]json.RawMessage, result interface{})
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "name", &obj.Name)
if err != nil {
return
@@ -30567,6 +38775,10 @@ func UnmarshalInstanceTemplate(m map[string]json.RawMessage, result interface{})
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity)
if err != nil {
return
@@ -30575,6 +38787,10 @@ func UnmarshalInstanceTemplate(m map[string]json.RawMessage, result interface{})
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData)
if err != nil {
return
@@ -30603,10 +38819,6 @@ func UnmarshalInstanceTemplate(m map[string]json.RawMessage, result interface{})
if err != nil {
return
}
- err = core.UnmarshalModel(m, "source_template", &obj.SourceTemplate, UnmarshalInstanceTemplateIdentity)
- if err != nil {
- return
- }
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
@@ -30752,11 +38964,11 @@ func UnmarshalInstanceTemplatePatch(m map[string]json.RawMessage, result interfa
}
// AsPatch returns a generic map representation of the InstanceTemplatePatch
-func (instanceTemplatePatch *InstanceTemplatePatch) AsPatch() (patch map[string]interface{}, err error) {
+func (instanceTemplatePatch *InstanceTemplatePatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(instanceTemplatePatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -30766,42 +38978,71 @@ func (instanceTemplatePatch *InstanceTemplatePatch) AsPatch() (patch map[string]
// - InstanceTemplatePrototypeInstanceByImage
// - InstanceTemplatePrototypeInstanceBySourceTemplate
type InstanceTemplatePrototype struct {
- // The public SSH keys for the administrative user of the virtual server instance. Up to 10 keys may be provided; if no
- // keys are provided the instance will be inaccessible unless the image used provides another means of access. For
- // Windows instances, one of the keys will be used to encrypt the administrator password.
+ // The availability policy to use for this virtual server instance.
+ AvailabilityPolicy *InstanceAvailabilityPrototype `json:"availability_policy,omitempty"`
+
+ // The default trusted profile configuration to use for this virtual server instance
//
- // Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled images,
- // these keys will also be added as SSH authorized keys for the administrative user.
+ // This property's value is used when provisioning the virtual server instance, but not
+ // subsequently managed. Accordingly, it is reflected as an [instance
+ // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization)
+ // property.
+ DefaultTrustedProfile *InstanceDefaultTrustedProfilePrototype `json:"default_trusted_profile,omitempty"`
+
+ // The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the
+ // virtual server instance as cloud-init vendor data. For cloud-init enabled images, these keys will also be added as
+ // SSH authorized keys for the administrative user.
+ //
+ // For Windows images, at least one key must be specified, and one will be chosen to encrypt [the administrator
+ // password](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization). Keys are optional for other images, but if
+ // no keys are specified, the instance will be inaccessible unless the specified image provides another means of
+ // access.
+ //
+ // This property's value is used when provisioning the virtual server instance, but not subsequently managed.
+ // Accordingly, it is reflected as an [instance
+ // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property.
Keys []KeyIdentityIntf `json:"keys,omitempty"`
+ // The metadata service configuration.
+ MetadataService *InstanceMetadataServicePrototype `json:"metadata_service,omitempty"`
+
// The unique user-defined name for this virtual server instance (and default system hostname). If unspecified, the
// name will be a hyphenated list of randomly-selected words.
Name *string `json:"name,omitempty"`
- // Collection of additional network interfaces to create for the virtual server instance.
+ // The additional network interfaces to create for the virtual server instance.
NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"`
- // The profile to use for this virtual server instance.
+ // The placement restrictions to use for the virtual server instance.
+ PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"`
+
+ // The profile to use for this virtual server instance. If unspecified, `bx2-2x8` will
+ // be used, but this default value is expected to change in the future.
Profile InstanceProfileIdentityIntf `json:"profile,omitempty"`
// The resource group to use. If unspecified, the account's [default resource
// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
+ // The amount of bandwidth (in megabits per second) allocated exclusively to instance storage volumes. An increase in
+ // this value will result in a corresponding decrease to
+ // `total_network_bandwidth`.
+ TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth,omitempty"`
+
// User data to be made available when setting up the virtual server instance.
UserData *string `json:"user_data,omitempty"`
- // Collection of volume attachments.
+ // The volume attachments for this virtual server instance.
VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"`
- // The VPC the virtual server instance is to be a part of. If provided, must match the
- // VPC tied to the subnets of the instance's network interfaces.
+ // The VPC the virtual server instance is to be a part of. If specified, it must match
+ // the VPC referenced by the subnets of the instance's network interfaces.
VPC VPCIdentityIntf `json:"vpc,omitempty"`
// The boot volume attachment for the virtual server instance.
BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"`
- // The identity of the image to use when provisioning the virtual server instance.
+ // The image to use when provisioning the virtual server instance.
Image ImageIdentityIntf `json:"image,omitempty"`
// Primary network interface.
@@ -30810,7 +39051,7 @@ type InstanceTemplatePrototype struct {
// The zone this virtual server instance will reside in.
Zone ZoneIdentityIntf `json:"zone,omitempty"`
- // Identifies an instance template by a unique property.
+ // The template to create this virtual server instance from.
SourceTemplate InstanceTemplateIdentityIntf `json:"source_template,omitempty"`
}
@@ -30825,10 +39066,22 @@ type InstanceTemplatePrototypeIntf interface {
// UnmarshalInstanceTemplatePrototype unmarshals an instance of InstanceTemplatePrototype from the specified map of raw messages.
func UnmarshalInstanceTemplatePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(InstanceTemplatePrototype)
+ err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPrototype)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity)
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "name", &obj.Name)
if err != nil {
return
@@ -30837,6 +39090,10 @@ func UnmarshalInstanceTemplatePrototype(m map[string]json.RawMessage, result int
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity)
if err != nil {
return
@@ -30845,6 +39102,10 @@ func UnmarshalInstanceTemplatePrototype(m map[string]json.RawMessage, result int
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData)
if err != nil {
return
@@ -30994,7 +39255,7 @@ type Key struct {
// words.
Name *string `json:"name" validate:"required"`
- // The public SSH key.
+ // The public SSH key, consisting of two space-separated fields: the algorithm name, and the base64-encoded key.
PublicKey *string `json:"public_key" validate:"required"`
// The resource group for this key.
@@ -31059,17 +39320,92 @@ func UnmarshalKey(m map[string]json.RawMessage, result interface{}) (err error)
// KeyCollection : KeyCollection struct
type KeyCollection struct {
+ // A link to the first page of resources.
+ First *KeyCollectionFirst `json:"first" validate:"required"`
+
// Collection of keys.
Keys []Key `json:"keys" validate:"required"`
+
+ // The maximum number of resources that can be returned by the request.
+ Limit *int64 `json:"limit" validate:"required"`
+
+ // A link to the next page of resources. This property is present for all pages
+ // except the last page.
+ Next *KeyCollectionNext `json:"next,omitempty"`
+
+ // The total number of resources across all pages.
+ TotalCount *int64 `json:"total_count" validate:"required"`
}
// UnmarshalKeyCollection unmarshals an instance of KeyCollection from the specified map of raw messages.
func UnmarshalKeyCollection(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(KeyCollection)
+ err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalKeyCollectionFirst)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKey)
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalKeyCollectionNext)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *KeyCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
+// KeyCollectionFirst : A link to the first page of resources.
+type KeyCollectionFirst struct {
+ // The URL for a page of resources.
+ Href *string `json:"href" validate:"required"`
+}
+
+// UnmarshalKeyCollectionFirst unmarshals an instance of KeyCollectionFirst from the specified map of raw messages.
+func UnmarshalKeyCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(KeyCollectionFirst)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// KeyCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
+type KeyCollectionNext struct {
+ // The URL for a page of resources.
+ Href *string `json:"href" validate:"required"`
+}
+
+// UnmarshalKeyCollectionNext unmarshals an instance of KeyCollectionNext from the specified map of raw messages.
+func UnmarshalKeyCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(KeyCollectionNext)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
@@ -31079,7 +39415,7 @@ func UnmarshalKeyCollection(m map[string]json.RawMessage, result interface{}) (e
// - KeyIdentityByID
// - KeyIdentityByCRN
// - KeyIdentityByHref
-// - KeyIdentityKeyIdentityByFingerprint
+// - KeyIdentityByFingerprint
type KeyIdentity struct {
// The unique identifier for this key.
ID *string `json:"id,omitempty"`
@@ -31144,40 +39480,19 @@ func UnmarshalKeyPatch(m map[string]json.RawMessage, result interface{}) (err er
}
// AsPatch returns a generic map representation of the KeyPatch
-func (keyPatch *KeyPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (keyPatch *KeyPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(keyPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
-// KeyReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
-// information.
-type KeyReferenceDeleted struct {
- // Link to documentation about deleted resources.
- MoreInfo *string `json:"more_info" validate:"required"`
-}
-
-// UnmarshalKeyReferenceDeleted unmarshals an instance of KeyReferenceDeleted from the specified map of raw messages.
-func UnmarshalKeyReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(KeyReferenceDeleted)
- err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
- if err != nil {
- return
- }
- reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
- return
-}
-
-// KeyReferenceInstanceInitializationContext : KeyReferenceInstanceInitializationContext struct
-// Models which "extend" this model:
-// - KeyReferenceInstanceInitializationContextKeyReference
-// - KeyReferenceInstanceInitializationContextKeyIdentityByFingerprint
-type KeyReferenceInstanceInitializationContext struct {
+// KeyReference : KeyReference struct
+type KeyReference struct {
// The CRN for this key.
- CRN *string `json:"crn,omitempty"`
+ CRN *string `json:"crn" validate:"required"`
// If present, this property indicates the referenced resource has been deleted and provides
// some supplementary information.
@@ -31185,29 +39500,21 @@ type KeyReferenceInstanceInitializationContext struct {
// The fingerprint for this key. The value is returned base64-encoded and prefixed with the hash algorithm (always
// `SHA256`).
- Fingerprint *string `json:"fingerprint,omitempty"`
+ Fingerprint *string `json:"fingerprint" validate:"required"`
// The URL for this key.
- Href *string `json:"href,omitempty"`
+ Href *string `json:"href" validate:"required"`
// The unique identifier for this key.
- ID *string `json:"id,omitempty"`
+ ID *string `json:"id" validate:"required"`
// The user-defined name for this key.
- Name *string `json:"name,omitempty"`
+ Name *string `json:"name" validate:"required"`
}
-func (*KeyReferenceInstanceInitializationContext) isaKeyReferenceInstanceInitializationContext() bool {
- return true
-}
-
-type KeyReferenceInstanceInitializationContextIntf interface {
- isaKeyReferenceInstanceInitializationContext() bool
-}
-
-// UnmarshalKeyReferenceInstanceInitializationContext unmarshals an instance of KeyReferenceInstanceInitializationContext from the specified map of raw messages.
-func UnmarshalKeyReferenceInstanceInitializationContext(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(KeyReferenceInstanceInitializationContext)
+// UnmarshalKeyReference unmarshals an instance of KeyReference from the specified map of raw messages.
+func UnmarshalKeyReference(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(KeyReference)
err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
if err != nil {
return
@@ -31236,10 +39543,364 @@ func UnmarshalKeyReferenceInstanceInitializationContext(m map[string]json.RawMes
return
}
+// KeyReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
+// information.
+type KeyReferenceDeleted struct {
+ // Link to documentation about deleted resources.
+ MoreInfo *string `json:"more_info" validate:"required"`
+}
+
+// UnmarshalKeyReferenceDeleted unmarshals an instance of KeyReferenceDeleted from the specified map of raw messages.
+func UnmarshalKeyReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(KeyReferenceDeleted)
+ err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// LegacyCloudObjectStorageBucketIdentity : Identifies a Cloud Object Storage bucket by a unique property.
+// Models which "extend" this model:
+// - LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName
+type LegacyCloudObjectStorageBucketIdentity struct {
+ // The globally unique name of this Cloud Object Storage bucket.
+ Name *string `json:"name,omitempty"`
+}
+
+func (*LegacyCloudObjectStorageBucketIdentity) isaLegacyCloudObjectStorageBucketIdentity() bool {
+ return true
+}
+
+type LegacyCloudObjectStorageBucketIdentityIntf interface {
+ isaLegacyCloudObjectStorageBucketIdentity() bool
+}
+
+// UnmarshalLegacyCloudObjectStorageBucketIdentity unmarshals an instance of LegacyCloudObjectStorageBucketIdentity from the specified map of raw messages.
+func UnmarshalLegacyCloudObjectStorageBucketIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(LegacyCloudObjectStorageBucketIdentity)
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// LegacyCloudObjectStorageBucketReference : LegacyCloudObjectStorageBucketReference struct
+type LegacyCloudObjectStorageBucketReference struct {
+ // The globally unique name of this Cloud Object Storage bucket.
+ Name *string `json:"name" validate:"required"`
+}
+
+// UnmarshalLegacyCloudObjectStorageBucketReference unmarshals an instance of LegacyCloudObjectStorageBucketReference from the specified map of raw messages.
+func UnmarshalLegacyCloudObjectStorageBucketReference(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(LegacyCloudObjectStorageBucketReference)
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// ListBareMetalServerDisksOptions : The ListBareMetalServerDisks options.
+type ListBareMetalServerDisksOptions struct {
+ // The bare metal server identifier.
+ BareMetalServerID *string `json:"bare_metal_server_id" validate:"required,ne="`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewListBareMetalServerDisksOptions : Instantiate ListBareMetalServerDisksOptions
+func (*VpcV1) NewListBareMetalServerDisksOptions(bareMetalServerID string) *ListBareMetalServerDisksOptions {
+ return &ListBareMetalServerDisksOptions{
+ BareMetalServerID: core.StringPtr(bareMetalServerID),
+ }
+}
+
+// SetBareMetalServerID : Allow user to set BareMetalServerID
+func (_options *ListBareMetalServerDisksOptions) SetBareMetalServerID(bareMetalServerID string) *ListBareMetalServerDisksOptions {
+ _options.BareMetalServerID = core.StringPtr(bareMetalServerID)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *ListBareMetalServerDisksOptions) SetHeaders(param map[string]string) *ListBareMetalServerDisksOptions {
+ options.Headers = param
+ return options
+}
+
+// ListBareMetalServerNetworkInterfaceFloatingIpsOptions : The ListBareMetalServerNetworkInterfaceFloatingIps options.
+type ListBareMetalServerNetworkInterfaceFloatingIpsOptions struct {
+ // The bare metal server identifier.
+ BareMetalServerID *string `json:"bare_metal_server_id" validate:"required,ne="`
+
+ // The network interface identifier.
+ NetworkInterfaceID *string `json:"network_interface_id" validate:"required,ne="`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewListBareMetalServerNetworkInterfaceFloatingIpsOptions : Instantiate ListBareMetalServerNetworkInterfaceFloatingIpsOptions
+func (*VpcV1) NewListBareMetalServerNetworkInterfaceFloatingIpsOptions(bareMetalServerID string, networkInterfaceID string) *ListBareMetalServerNetworkInterfaceFloatingIpsOptions {
+ return &ListBareMetalServerNetworkInterfaceFloatingIpsOptions{
+ BareMetalServerID: core.StringPtr(bareMetalServerID),
+ NetworkInterfaceID: core.StringPtr(networkInterfaceID),
+ }
+}
+
+// SetBareMetalServerID : Allow user to set BareMetalServerID
+func (_options *ListBareMetalServerNetworkInterfaceFloatingIpsOptions) SetBareMetalServerID(bareMetalServerID string) *ListBareMetalServerNetworkInterfaceFloatingIpsOptions {
+ _options.BareMetalServerID = core.StringPtr(bareMetalServerID)
+ return _options
+}
+
+// SetNetworkInterfaceID : Allow user to set NetworkInterfaceID
+func (_options *ListBareMetalServerNetworkInterfaceFloatingIpsOptions) SetNetworkInterfaceID(networkInterfaceID string) *ListBareMetalServerNetworkInterfaceFloatingIpsOptions {
+ _options.NetworkInterfaceID = core.StringPtr(networkInterfaceID)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *ListBareMetalServerNetworkInterfaceFloatingIpsOptions) SetHeaders(param map[string]string) *ListBareMetalServerNetworkInterfaceFloatingIpsOptions {
+ options.Headers = param
+ return options
+}
+
+// ListBareMetalServerNetworkInterfaceIpsOptions : The ListBareMetalServerNetworkInterfaceIps options.
+type ListBareMetalServerNetworkInterfaceIpsOptions struct {
+ // The bare metal server identifier.
+ BareMetalServerID *string `json:"bare_metal_server_id" validate:"required,ne="`
+
+ // The network interface identifier.
+ NetworkInterfaceID *string `json:"network_interface_id" validate:"required,ne="`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewListBareMetalServerNetworkInterfaceIpsOptions : Instantiate ListBareMetalServerNetworkInterfaceIpsOptions
+func (*VpcV1) NewListBareMetalServerNetworkInterfaceIpsOptions(bareMetalServerID string, networkInterfaceID string) *ListBareMetalServerNetworkInterfaceIpsOptions {
+ return &ListBareMetalServerNetworkInterfaceIpsOptions{
+ BareMetalServerID: core.StringPtr(bareMetalServerID),
+ NetworkInterfaceID: core.StringPtr(networkInterfaceID),
+ }
+}
+
+// SetBareMetalServerID : Allow user to set BareMetalServerID
+func (_options *ListBareMetalServerNetworkInterfaceIpsOptions) SetBareMetalServerID(bareMetalServerID string) *ListBareMetalServerNetworkInterfaceIpsOptions {
+ _options.BareMetalServerID = core.StringPtr(bareMetalServerID)
+ return _options
+}
+
+// SetNetworkInterfaceID : Allow user to set NetworkInterfaceID
+func (_options *ListBareMetalServerNetworkInterfaceIpsOptions) SetNetworkInterfaceID(networkInterfaceID string) *ListBareMetalServerNetworkInterfaceIpsOptions {
+ _options.NetworkInterfaceID = core.StringPtr(networkInterfaceID)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *ListBareMetalServerNetworkInterfaceIpsOptions) SetHeaders(param map[string]string) *ListBareMetalServerNetworkInterfaceIpsOptions {
+ options.Headers = param
+ return options
+}
+
+// ListBareMetalServerNetworkInterfacesOptions : The ListBareMetalServerNetworkInterfaces options.
+type ListBareMetalServerNetworkInterfacesOptions struct {
+ // The bare metal server identifier.
+ BareMetalServerID *string `json:"bare_metal_server_id" validate:"required,ne="`
+
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
+
+ // The number of resources to return on a page.
+ Limit *int64 `json:"limit,omitempty"`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewListBareMetalServerNetworkInterfacesOptions : Instantiate ListBareMetalServerNetworkInterfacesOptions
+func (*VpcV1) NewListBareMetalServerNetworkInterfacesOptions(bareMetalServerID string) *ListBareMetalServerNetworkInterfacesOptions {
+ return &ListBareMetalServerNetworkInterfacesOptions{
+ BareMetalServerID: core.StringPtr(bareMetalServerID),
+ }
+}
+
+// SetBareMetalServerID : Allow user to set BareMetalServerID
+func (_options *ListBareMetalServerNetworkInterfacesOptions) SetBareMetalServerID(bareMetalServerID string) *ListBareMetalServerNetworkInterfacesOptions {
+ _options.BareMetalServerID = core.StringPtr(bareMetalServerID)
+ return _options
+}
+
+// SetStart : Allow user to set Start
+func (_options *ListBareMetalServerNetworkInterfacesOptions) SetStart(start string) *ListBareMetalServerNetworkInterfacesOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
+}
+
+// SetLimit : Allow user to set Limit
+func (_options *ListBareMetalServerNetworkInterfacesOptions) SetLimit(limit int64) *ListBareMetalServerNetworkInterfacesOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *ListBareMetalServerNetworkInterfacesOptions) SetHeaders(param map[string]string) *ListBareMetalServerNetworkInterfacesOptions {
+ options.Headers = param
+ return options
+}
+
+// ListBareMetalServerProfilesOptions : The ListBareMetalServerProfiles options.
+type ListBareMetalServerProfilesOptions struct {
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
+
+ // The number of resources to return on a page.
+ Limit *int64 `json:"limit,omitempty"`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewListBareMetalServerProfilesOptions : Instantiate ListBareMetalServerProfilesOptions
+func (*VpcV1) NewListBareMetalServerProfilesOptions() *ListBareMetalServerProfilesOptions {
+ return &ListBareMetalServerProfilesOptions{}
+}
+
+// SetStart : Allow user to set Start
+func (_options *ListBareMetalServerProfilesOptions) SetStart(start string) *ListBareMetalServerProfilesOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
+}
+
+// SetLimit : Allow user to set Limit
+func (_options *ListBareMetalServerProfilesOptions) SetLimit(limit int64) *ListBareMetalServerProfilesOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *ListBareMetalServerProfilesOptions) SetHeaders(param map[string]string) *ListBareMetalServerProfilesOptions {
+ options.Headers = param
+ return options
+}
+
+// ListBareMetalServersOptions : The ListBareMetalServers options.
+type ListBareMetalServersOptions struct {
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
+
+ // The number of resources to return on a page.
+ Limit *int64 `json:"limit,omitempty"`
+
+ // Filters the collection to resources in the resource group with the specified identifier.
+ ResourceGroupID *string `json:"resource_group.id,omitempty"`
+
+ // Filters the collection to resources with the exact specified name.
+ Name *string `json:"name,omitempty"`
+
+ // Filters the collection to resources in the VPC with the specified identifier.
+ VPCID *string `json:"vpc.id,omitempty"`
+
+ // Filters the collection to resources in the VPC with the specified CRN.
+ VPCCRN *string `json:"vpc.crn,omitempty"`
+
+ // Filters the collection to resources in the VPC with the exact specified name.
+ VPCName *string `json:"vpc.name,omitempty"`
+
+ // Filters the collection to bare metal servers on the subnet with the specified identifier.
+ NetworkInterfacesSubnetID *string `json:"network_interfaces.subnet.id,omitempty"`
+
+ // Filters the collection to bare metal servers on the subnet with the specified CRN.
+ NetworkInterfacesSubnetCRN *string `json:"network_interfaces.subnet.crn,omitempty"`
+
+ // Filters the collection to bare metal servers on the subnet with the specified name.
+ NetworkInterfacesSubnetName *string `json:"network_interfaces.subnet.name,omitempty"`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewListBareMetalServersOptions : Instantiate ListBareMetalServersOptions
+func (*VpcV1) NewListBareMetalServersOptions() *ListBareMetalServersOptions {
+ return &ListBareMetalServersOptions{}
+}
+
+// SetStart : Allow user to set Start
+func (_options *ListBareMetalServersOptions) SetStart(start string) *ListBareMetalServersOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
+}
+
+// SetLimit : Allow user to set Limit
+func (_options *ListBareMetalServersOptions) SetLimit(limit int64) *ListBareMetalServersOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
+}
+
+// SetResourceGroupID : Allow user to set ResourceGroupID
+func (_options *ListBareMetalServersOptions) SetResourceGroupID(resourceGroupID string) *ListBareMetalServersOptions {
+ _options.ResourceGroupID = core.StringPtr(resourceGroupID)
+ return _options
+}
+
+// SetName : Allow user to set Name
+func (_options *ListBareMetalServersOptions) SetName(name string) *ListBareMetalServersOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
+}
+
+// SetVPCID : Allow user to set VPCID
+func (_options *ListBareMetalServersOptions) SetVPCID(vpcID string) *ListBareMetalServersOptions {
+ _options.VPCID = core.StringPtr(vpcID)
+ return _options
+}
+
+// SetVPCCRN : Allow user to set VPCCRN
+func (_options *ListBareMetalServersOptions) SetVPCCRN(vpcCRN string) *ListBareMetalServersOptions {
+ _options.VPCCRN = core.StringPtr(vpcCRN)
+ return _options
+}
+
+// SetVPCName : Allow user to set VPCName
+func (_options *ListBareMetalServersOptions) SetVPCName(vpcName string) *ListBareMetalServersOptions {
+ _options.VPCName = core.StringPtr(vpcName)
+ return _options
+}
+
+// SetNetworkInterfacesSubnetID : Allow user to set NetworkInterfacesSubnetID
+func (_options *ListBareMetalServersOptions) SetNetworkInterfacesSubnetID(networkInterfacesSubnetID string) *ListBareMetalServersOptions {
+ _options.NetworkInterfacesSubnetID = core.StringPtr(networkInterfacesSubnetID)
+ return _options
+}
+
+// SetNetworkInterfacesSubnetCRN : Allow user to set NetworkInterfacesSubnetCRN
+func (_options *ListBareMetalServersOptions) SetNetworkInterfacesSubnetCRN(networkInterfacesSubnetCRN string) *ListBareMetalServersOptions {
+ _options.NetworkInterfacesSubnetCRN = core.StringPtr(networkInterfacesSubnetCRN)
+ return _options
+}
+
+// SetNetworkInterfacesSubnetName : Allow user to set NetworkInterfacesSubnetName
+func (_options *ListBareMetalServersOptions) SetNetworkInterfacesSubnetName(networkInterfacesSubnetName string) *ListBareMetalServersOptions {
+ _options.NetworkInterfacesSubnetName = core.StringPtr(networkInterfacesSubnetName)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *ListBareMetalServersOptions) SetHeaders(param map[string]string) *ListBareMetalServersOptions {
+ options.Headers = param
+ return options
+}
+
// ListDedicatedHostDisksOptions : The ListDedicatedHostDisks options.
type ListDedicatedHostDisksOptions struct {
// The dedicated host identifier.
- DedicatedHostID *string `validate:"required,ne="`
+ DedicatedHostID *string `json:"dedicated_host_id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -31253,9 +39914,9 @@ func (*VpcV1) NewListDedicatedHostDisksOptions(dedicatedHostID string) *ListDedi
}
// SetDedicatedHostID : Allow user to set DedicatedHostID
-func (options *ListDedicatedHostDisksOptions) SetDedicatedHostID(dedicatedHostID string) *ListDedicatedHostDisksOptions {
- options.DedicatedHostID = core.StringPtr(dedicatedHostID)
- return options
+func (_options *ListDedicatedHostDisksOptions) SetDedicatedHostID(dedicatedHostID string) *ListDedicatedHostDisksOptions {
+ _options.DedicatedHostID = core.StringPtr(dedicatedHostID)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -31266,18 +39927,20 @@ func (options *ListDedicatedHostDisksOptions) SetHeaders(param map[string]string
// ListDedicatedHostGroupsOptions : The ListDedicatedHostGroups options.
type ListDedicatedHostGroupsOptions struct {
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
- // Filters the collection to resources within one of the resource groups identified in a comma-separated list of
- // resource group identifiers.
- ResourceGroupID *string
+ // Filters the collection to resources in the resource group with the specified identifier.
+ ResourceGroupID *string `json:"resource_group.id,omitempty"`
// Filters the collection to resources in the zone with the exact specified name.
- ZoneName *string
+ ZoneName *string `json:"zone.name,omitempty"`
+
+ // Filters the collection to resources with the exact specified name.
+ Name *string `json:"name,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -31289,27 +39952,33 @@ func (*VpcV1) NewListDedicatedHostGroupsOptions() *ListDedicatedHostGroupsOption
}
// SetStart : Allow user to set Start
-func (options *ListDedicatedHostGroupsOptions) SetStart(start string) *ListDedicatedHostGroupsOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListDedicatedHostGroupsOptions) SetStart(start string) *ListDedicatedHostGroupsOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListDedicatedHostGroupsOptions) SetLimit(limit int64) *ListDedicatedHostGroupsOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListDedicatedHostGroupsOptions) SetLimit(limit int64) *ListDedicatedHostGroupsOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetResourceGroupID : Allow user to set ResourceGroupID
-func (options *ListDedicatedHostGroupsOptions) SetResourceGroupID(resourceGroupID string) *ListDedicatedHostGroupsOptions {
- options.ResourceGroupID = core.StringPtr(resourceGroupID)
- return options
+func (_options *ListDedicatedHostGroupsOptions) SetResourceGroupID(resourceGroupID string) *ListDedicatedHostGroupsOptions {
+ _options.ResourceGroupID = core.StringPtr(resourceGroupID)
+ return _options
}
// SetZoneName : Allow user to set ZoneName
-func (options *ListDedicatedHostGroupsOptions) SetZoneName(zoneName string) *ListDedicatedHostGroupsOptions {
- options.ZoneName = core.StringPtr(zoneName)
- return options
+func (_options *ListDedicatedHostGroupsOptions) SetZoneName(zoneName string) *ListDedicatedHostGroupsOptions {
+ _options.ZoneName = core.StringPtr(zoneName)
+ return _options
+}
+
+// SetName : Allow user to set Name
+func (_options *ListDedicatedHostGroupsOptions) SetName(name string) *ListDedicatedHostGroupsOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -31320,11 +39989,11 @@ func (options *ListDedicatedHostGroupsOptions) SetHeaders(param map[string]strin
// ListDedicatedHostProfilesOptions : The ListDedicatedHostProfiles options.
type ListDedicatedHostProfilesOptions struct {
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -31336,15 +40005,15 @@ func (*VpcV1) NewListDedicatedHostProfilesOptions() *ListDedicatedHostProfilesOp
}
// SetStart : Allow user to set Start
-func (options *ListDedicatedHostProfilesOptions) SetStart(start string) *ListDedicatedHostProfilesOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListDedicatedHostProfilesOptions) SetStart(start string) *ListDedicatedHostProfilesOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListDedicatedHostProfilesOptions) SetLimit(limit int64) *ListDedicatedHostProfilesOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListDedicatedHostProfilesOptions) SetLimit(limit int64) *ListDedicatedHostProfilesOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -31356,20 +40025,22 @@ func (options *ListDedicatedHostProfilesOptions) SetHeaders(param map[string]str
// ListDedicatedHostsOptions : The ListDedicatedHosts options.
type ListDedicatedHostsOptions struct {
// Filters the collection to dedicated host groups with the specified identifier.
- DedicatedHostGroupID *string
+ DedicatedHostGroupID *string `json:"dedicated_host_group.id,omitempty"`
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
- // Filters the collection to resources within one of the resource groups identified in a comma-separated list of
- // resource group identifiers.
- ResourceGroupID *string
+ // Filters the collection to resources in the resource group with the specified identifier.
+ ResourceGroupID *string `json:"resource_group.id,omitempty"`
// Filters the collection to resources in the zone with the exact specified name.
- ZoneName *string
+ ZoneName *string `json:"zone.name,omitempty"`
+
+ // Filters the collection to resources with the exact specified name.
+ Name *string `json:"name,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -31381,33 +40052,39 @@ func (*VpcV1) NewListDedicatedHostsOptions() *ListDedicatedHostsOptions {
}
// SetDedicatedHostGroupID : Allow user to set DedicatedHostGroupID
-func (options *ListDedicatedHostsOptions) SetDedicatedHostGroupID(dedicatedHostGroupID string) *ListDedicatedHostsOptions {
- options.DedicatedHostGroupID = core.StringPtr(dedicatedHostGroupID)
- return options
+func (_options *ListDedicatedHostsOptions) SetDedicatedHostGroupID(dedicatedHostGroupID string) *ListDedicatedHostsOptions {
+ _options.DedicatedHostGroupID = core.StringPtr(dedicatedHostGroupID)
+ return _options
}
// SetStart : Allow user to set Start
-func (options *ListDedicatedHostsOptions) SetStart(start string) *ListDedicatedHostsOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListDedicatedHostsOptions) SetStart(start string) *ListDedicatedHostsOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListDedicatedHostsOptions) SetLimit(limit int64) *ListDedicatedHostsOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListDedicatedHostsOptions) SetLimit(limit int64) *ListDedicatedHostsOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetResourceGroupID : Allow user to set ResourceGroupID
-func (options *ListDedicatedHostsOptions) SetResourceGroupID(resourceGroupID string) *ListDedicatedHostsOptions {
- options.ResourceGroupID = core.StringPtr(resourceGroupID)
- return options
+func (_options *ListDedicatedHostsOptions) SetResourceGroupID(resourceGroupID string) *ListDedicatedHostsOptions {
+ _options.ResourceGroupID = core.StringPtr(resourceGroupID)
+ return _options
}
// SetZoneName : Allow user to set ZoneName
-func (options *ListDedicatedHostsOptions) SetZoneName(zoneName string) *ListDedicatedHostsOptions {
- options.ZoneName = core.StringPtr(zoneName)
- return options
+func (_options *ListDedicatedHostsOptions) SetZoneName(zoneName string) *ListDedicatedHostsOptions {
+ _options.ZoneName = core.StringPtr(zoneName)
+ return _options
+}
+
+// SetName : Allow user to set Name
+func (_options *ListDedicatedHostsOptions) SetName(name string) *ListDedicatedHostsOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -31419,29 +40096,27 @@ func (options *ListDedicatedHostsOptions) SetHeaders(param map[string]string) *L
// ListEndpointGatewayIpsOptions : The ListEndpointGatewayIps options.
type ListEndpointGatewayIpsOptions struct {
// The endpoint gateway identifier.
- EndpointGatewayID *string `validate:"required,ne="`
+ EndpointGatewayID *string `json:"endpoint_gateway_id" validate:"required,ne="`
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
- // Sorts the returned collection by the specified field name in ascending order. A `-` may be prepended to the field
- // name to sort in descending order. For example, the value
- // `-created_at` sorts the collection by the `created_at` field in descending order, and the value `name` sorts it by
- // the `name` field in ascending order.
- Sort *string
+ // Sorts the returned collection by the specified property name in ascending order. A `-` may be prepended to the name
+ // to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property
+ // in descending order, and the value `name` sorts it by the `name` property in ascending order.
+ Sort *string `json:"sort,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
}
// Constants associated with the ListEndpointGatewayIpsOptions.Sort property.
-// Sorts the returned collection by the specified field name in ascending order. A `-` may be prepended to the field
-// name to sort in descending order. For example, the value
-// `-created_at` sorts the collection by the `created_at` field in descending order, and the value `name` sorts it by
-// the `name` field in ascending order.
+// Sorts the returned collection by the specified property name in ascending order. A `-` may be prepended to the name
+// to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property
+// in descending order, and the value `name` sorts it by the `name` property in ascending order.
const (
ListEndpointGatewayIpsOptionsSortAddressConst = "address"
ListEndpointGatewayIpsOptionsSortCreatedAtConst = "created_at"
@@ -31456,27 +40131,27 @@ func (*VpcV1) NewListEndpointGatewayIpsOptions(endpointGatewayID string) *ListEn
}
// SetEndpointGatewayID : Allow user to set EndpointGatewayID
-func (options *ListEndpointGatewayIpsOptions) SetEndpointGatewayID(endpointGatewayID string) *ListEndpointGatewayIpsOptions {
- options.EndpointGatewayID = core.StringPtr(endpointGatewayID)
- return options
+func (_options *ListEndpointGatewayIpsOptions) SetEndpointGatewayID(endpointGatewayID string) *ListEndpointGatewayIpsOptions {
+ _options.EndpointGatewayID = core.StringPtr(endpointGatewayID)
+ return _options
}
// SetStart : Allow user to set Start
-func (options *ListEndpointGatewayIpsOptions) SetStart(start string) *ListEndpointGatewayIpsOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListEndpointGatewayIpsOptions) SetStart(start string) *ListEndpointGatewayIpsOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListEndpointGatewayIpsOptions) SetLimit(limit int64) *ListEndpointGatewayIpsOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListEndpointGatewayIpsOptions) SetLimit(limit int64) *ListEndpointGatewayIpsOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetSort : Allow user to set Sort
-func (options *ListEndpointGatewayIpsOptions) SetSort(sort string) *ListEndpointGatewayIpsOptions {
- options.Sort = core.StringPtr(sort)
- return options
+func (_options *ListEndpointGatewayIpsOptions) SetSort(sort string) *ListEndpointGatewayIpsOptions {
+ _options.Sort = core.StringPtr(sort)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -31488,17 +40163,16 @@ func (options *ListEndpointGatewayIpsOptions) SetHeaders(param map[string]string
// ListEndpointGatewaysOptions : The ListEndpointGateways options.
type ListEndpointGatewaysOptions struct {
// Filters the collection to resources with the exact specified name.
- Name *string
+ Name *string `json:"name,omitempty"`
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
- // Filters the collection to resources within one of the resource groups identified in a comma-separated list of
- // resource group identifiers.
- ResourceGroupID *string
+ // Filters the collection to resources in the resource group with the specified identifier.
+ ResourceGroupID *string `json:"resource_group.id,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -31510,27 +40184,27 @@ func (*VpcV1) NewListEndpointGatewaysOptions() *ListEndpointGatewaysOptions {
}
// SetName : Allow user to set Name
-func (options *ListEndpointGatewaysOptions) SetName(name string) *ListEndpointGatewaysOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *ListEndpointGatewaysOptions) SetName(name string) *ListEndpointGatewaysOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetStart : Allow user to set Start
-func (options *ListEndpointGatewaysOptions) SetStart(start string) *ListEndpointGatewaysOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListEndpointGatewaysOptions) SetStart(start string) *ListEndpointGatewaysOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListEndpointGatewaysOptions) SetLimit(limit int64) *ListEndpointGatewaysOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListEndpointGatewaysOptions) SetLimit(limit int64) *ListEndpointGatewaysOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetResourceGroupID : Allow user to set ResourceGroupID
-func (options *ListEndpointGatewaysOptions) SetResourceGroupID(resourceGroupID string) *ListEndpointGatewaysOptions {
- options.ResourceGroupID = core.StringPtr(resourceGroupID)
- return options
+func (_options *ListEndpointGatewaysOptions) SetResourceGroupID(resourceGroupID string) *ListEndpointGatewaysOptions {
+ _options.ResourceGroupID = core.StringPtr(resourceGroupID)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -31541,41 +40215,60 @@ func (options *ListEndpointGatewaysOptions) SetHeaders(param map[string]string)
// ListFloatingIpsOptions : The ListFloatingIps options.
type ListFloatingIpsOptions struct {
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
- // Filters the collection to resources within one of the resource groups identified in a comma-separated list of
- // resource group identifiers.
- ResourceGroupID *string
+ // Filters the collection to resources in the resource group with the specified identifier.
+ ResourceGroupID *string `json:"resource_group.id,omitempty"`
+
+ // Sorts the returned collection by the specified property name in ascending order. A `-` may be prepended to the name
+ // to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property
+ // in descending order, and the value `name` sorts it by the `name` property in ascending order.
+ Sort *string `json:"sort,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
}
+// Constants associated with the ListFloatingIpsOptions.Sort property.
+// Sorts the returned collection by the specified property name in ascending order. A `-` may be prepended to the name
+// to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property
+// in descending order, and the value `name` sorts it by the `name` property in ascending order.
+const (
+ ListFloatingIpsOptionsSortCreatedAtConst = "created_at"
+ ListFloatingIpsOptionsSortNameConst = "name"
+)
+
// NewListFloatingIpsOptions : Instantiate ListFloatingIpsOptions
func (*VpcV1) NewListFloatingIpsOptions() *ListFloatingIpsOptions {
return &ListFloatingIpsOptions{}
}
// SetStart : Allow user to set Start
-func (options *ListFloatingIpsOptions) SetStart(start string) *ListFloatingIpsOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListFloatingIpsOptions) SetStart(start string) *ListFloatingIpsOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListFloatingIpsOptions) SetLimit(limit int64) *ListFloatingIpsOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListFloatingIpsOptions) SetLimit(limit int64) *ListFloatingIpsOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetResourceGroupID : Allow user to set ResourceGroupID
-func (options *ListFloatingIpsOptions) SetResourceGroupID(resourceGroupID string) *ListFloatingIpsOptions {
- options.ResourceGroupID = core.StringPtr(resourceGroupID)
- return options
+func (_options *ListFloatingIpsOptions) SetResourceGroupID(resourceGroupID string) *ListFloatingIpsOptions {
+ _options.ResourceGroupID = core.StringPtr(resourceGroupID)
+ return _options
+}
+
+// SetSort : Allow user to set Sort
+func (_options *ListFloatingIpsOptions) SetSort(sort string) *ListFloatingIpsOptions {
+ _options.Sort = core.StringPtr(sort)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -31586,33 +40279,32 @@ func (options *ListFloatingIpsOptions) SetHeaders(param map[string]string) *List
// ListFlowLogCollectorsOptions : The ListFlowLogCollectors options.
type ListFlowLogCollectorsOptions struct {
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
- // Filters the collection to resources within one of the resource groups identified in a comma-separated list of
- // resource group identifiers.
- ResourceGroupID *string
+ // Filters the collection to resources in the resource group with the specified identifier.
+ ResourceGroupID *string `json:"resource_group.id,omitempty"`
// Filters the collection to resources with the exact specified name.
- Name *string
+ Name *string `json:"name,omitempty"`
// Filters the collection to resources in the VPC with the specified identifier.
- VPCID *string
+ VPCID *string `json:"vpc.id,omitempty"`
// Filters the collection to resources in the VPC with the specified CRN.
- VPCCRN *string
+ VPCCRN *string `json:"vpc.crn,omitempty"`
// Filters the collection to resources in the VPC with the exact specified name.
- VPCName *string
+ VPCName *string `json:"vpc.name,omitempty"`
// Filters the collection to flow log collectors that target the specified resource.
- TargetID *string
+ TargetID *string `json:"target.id,omitempty"`
// Filters the collection to flow log collectors that target the specified resource type.
- TargetResourceType *string
+ TargetResourceType *string `json:"target.resource_type,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -31633,57 +40325,57 @@ func (*VpcV1) NewListFlowLogCollectorsOptions() *ListFlowLogCollectorsOptions {
}
// SetStart : Allow user to set Start
-func (options *ListFlowLogCollectorsOptions) SetStart(start string) *ListFlowLogCollectorsOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListFlowLogCollectorsOptions) SetStart(start string) *ListFlowLogCollectorsOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListFlowLogCollectorsOptions) SetLimit(limit int64) *ListFlowLogCollectorsOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListFlowLogCollectorsOptions) SetLimit(limit int64) *ListFlowLogCollectorsOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetResourceGroupID : Allow user to set ResourceGroupID
-func (options *ListFlowLogCollectorsOptions) SetResourceGroupID(resourceGroupID string) *ListFlowLogCollectorsOptions {
- options.ResourceGroupID = core.StringPtr(resourceGroupID)
- return options
+func (_options *ListFlowLogCollectorsOptions) SetResourceGroupID(resourceGroupID string) *ListFlowLogCollectorsOptions {
+ _options.ResourceGroupID = core.StringPtr(resourceGroupID)
+ return _options
}
// SetName : Allow user to set Name
-func (options *ListFlowLogCollectorsOptions) SetName(name string) *ListFlowLogCollectorsOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *ListFlowLogCollectorsOptions) SetName(name string) *ListFlowLogCollectorsOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetVPCID : Allow user to set VPCID
-func (options *ListFlowLogCollectorsOptions) SetVPCID(vpcID string) *ListFlowLogCollectorsOptions {
- options.VPCID = core.StringPtr(vpcID)
- return options
+func (_options *ListFlowLogCollectorsOptions) SetVPCID(vpcID string) *ListFlowLogCollectorsOptions {
+ _options.VPCID = core.StringPtr(vpcID)
+ return _options
}
// SetVPCCRN : Allow user to set VPCCRN
-func (options *ListFlowLogCollectorsOptions) SetVPCCRN(vpcCRN string) *ListFlowLogCollectorsOptions {
- options.VPCCRN = core.StringPtr(vpcCRN)
- return options
+func (_options *ListFlowLogCollectorsOptions) SetVPCCRN(vpcCRN string) *ListFlowLogCollectorsOptions {
+ _options.VPCCRN = core.StringPtr(vpcCRN)
+ return _options
}
// SetVPCName : Allow user to set VPCName
-func (options *ListFlowLogCollectorsOptions) SetVPCName(vpcName string) *ListFlowLogCollectorsOptions {
- options.VPCName = core.StringPtr(vpcName)
- return options
+func (_options *ListFlowLogCollectorsOptions) SetVPCName(vpcName string) *ListFlowLogCollectorsOptions {
+ _options.VPCName = core.StringPtr(vpcName)
+ return _options
}
// SetTargetID : Allow user to set TargetID
-func (options *ListFlowLogCollectorsOptions) SetTargetID(targetID string) *ListFlowLogCollectorsOptions {
- options.TargetID = core.StringPtr(targetID)
- return options
+func (_options *ListFlowLogCollectorsOptions) SetTargetID(targetID string) *ListFlowLogCollectorsOptions {
+ _options.TargetID = core.StringPtr(targetID)
+ return _options
}
// SetTargetResourceType : Allow user to set TargetResourceType
-func (options *ListFlowLogCollectorsOptions) SetTargetResourceType(targetResourceType string) *ListFlowLogCollectorsOptions {
- options.TargetResourceType = core.StringPtr(targetResourceType)
- return options
+func (_options *ListFlowLogCollectorsOptions) SetTargetResourceType(targetResourceType string) *ListFlowLogCollectorsOptions {
+ _options.TargetResourceType = core.StringPtr(targetResourceType)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -31694,11 +40386,11 @@ func (options *ListFlowLogCollectorsOptions) SetHeaders(param map[string]string)
// ListIkePoliciesOptions : The ListIkePolicies options.
type ListIkePoliciesOptions struct {
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -31710,15 +40402,15 @@ func (*VpcV1) NewListIkePoliciesOptions() *ListIkePoliciesOptions {
}
// SetStart : Allow user to set Start
-func (options *ListIkePoliciesOptions) SetStart(start string) *ListIkePoliciesOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListIkePoliciesOptions) SetStart(start string) *ListIkePoliciesOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListIkePoliciesOptions) SetLimit(limit int64) *ListIkePoliciesOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListIkePoliciesOptions) SetLimit(limit int64) *ListIkePoliciesOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -31730,7 +40422,7 @@ func (options *ListIkePoliciesOptions) SetHeaders(param map[string]string) *List
// ListIkePolicyConnectionsOptions : The ListIkePolicyConnections options.
type ListIkePolicyConnectionsOptions struct {
// The IKE policy identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -31744,9 +40436,9 @@ func (*VpcV1) NewListIkePolicyConnectionsOptions(id string) *ListIkePolicyConnec
}
// SetID : Allow user to set ID
-func (options *ListIkePolicyConnectionsOptions) SetID(id string) *ListIkePolicyConnectionsOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *ListIkePolicyConnectionsOptions) SetID(id string) *ListIkePolicyConnectionsOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -31757,21 +40449,20 @@ func (options *ListIkePolicyConnectionsOptions) SetHeaders(param map[string]stri
// ListImagesOptions : The ListImages options.
type ListImagesOptions struct {
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
- // Filters the collection to resources within one of the resource groups identified in a comma-separated list of
- // resource group identifiers.
- ResourceGroupID *string
+ // Filters the collection to resources in the resource group with the specified identifier.
+ ResourceGroupID *string `json:"resource_group.id,omitempty"`
// Filters the collection to resources with the exact specified name.
- Name *string
+ Name *string `json:"name,omitempty"`
// Filters the collection to images with the specified `visibility`.
- Visibility *string
+ Visibility *string `json:"visibility,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -31790,33 +40481,33 @@ func (*VpcV1) NewListImagesOptions() *ListImagesOptions {
}
// SetStart : Allow user to set Start
-func (options *ListImagesOptions) SetStart(start string) *ListImagesOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListImagesOptions) SetStart(start string) *ListImagesOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListImagesOptions) SetLimit(limit int64) *ListImagesOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListImagesOptions) SetLimit(limit int64) *ListImagesOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetResourceGroupID : Allow user to set ResourceGroupID
-func (options *ListImagesOptions) SetResourceGroupID(resourceGroupID string) *ListImagesOptions {
- options.ResourceGroupID = core.StringPtr(resourceGroupID)
- return options
+func (_options *ListImagesOptions) SetResourceGroupID(resourceGroupID string) *ListImagesOptions {
+ _options.ResourceGroupID = core.StringPtr(resourceGroupID)
+ return _options
}
// SetName : Allow user to set Name
-func (options *ListImagesOptions) SetName(name string) *ListImagesOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *ListImagesOptions) SetName(name string) *ListImagesOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetVisibility : Allow user to set Visibility
-func (options *ListImagesOptions) SetVisibility(visibility string) *ListImagesOptions {
- options.Visibility = core.StringPtr(visibility)
- return options
+func (_options *ListImagesOptions) SetVisibility(visibility string) *ListImagesOptions {
+ _options.Visibility = core.StringPtr(visibility)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -31828,7 +40519,7 @@ func (options *ListImagesOptions) SetHeaders(param map[string]string) *ListImage
// ListInstanceDisksOptions : The ListInstanceDisks options.
type ListInstanceDisksOptions struct {
// The instance identifier.
- InstanceID *string `validate:"required,ne="`
+ InstanceID *string `json:"instance_id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -31842,9 +40533,9 @@ func (*VpcV1) NewListInstanceDisksOptions(instanceID string) *ListInstanceDisksO
}
// SetInstanceID : Allow user to set InstanceID
-func (options *ListInstanceDisksOptions) SetInstanceID(instanceID string) *ListInstanceDisksOptions {
- options.InstanceID = core.StringPtr(instanceID)
- return options
+func (_options *ListInstanceDisksOptions) SetInstanceID(instanceID string) *ListInstanceDisksOptions {
+ _options.InstanceID = core.StringPtr(instanceID)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -31853,19 +40544,75 @@ func (options *ListInstanceDisksOptions) SetHeaders(param map[string]string) *Li
return options
}
+// ListInstanceGroupManagerActionsOptions : The ListInstanceGroupManagerActions options.
+type ListInstanceGroupManagerActionsOptions struct {
+ // The instance group identifier.
+ InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="`
+
+ // The instance group manager identifier.
+ InstanceGroupManagerID *string `json:"instance_group_manager_id" validate:"required,ne="`
+
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
+
+ // The number of resources to return on a page.
+ Limit *int64 `json:"limit,omitempty"`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewListInstanceGroupManagerActionsOptions : Instantiate ListInstanceGroupManagerActionsOptions
+func (*VpcV1) NewListInstanceGroupManagerActionsOptions(instanceGroupID string, instanceGroupManagerID string) *ListInstanceGroupManagerActionsOptions {
+ return &ListInstanceGroupManagerActionsOptions{
+ InstanceGroupID: core.StringPtr(instanceGroupID),
+ InstanceGroupManagerID: core.StringPtr(instanceGroupManagerID),
+ }
+}
+
+// SetInstanceGroupID : Allow user to set InstanceGroupID
+func (_options *ListInstanceGroupManagerActionsOptions) SetInstanceGroupID(instanceGroupID string) *ListInstanceGroupManagerActionsOptions {
+ _options.InstanceGroupID = core.StringPtr(instanceGroupID)
+ return _options
+}
+
+// SetInstanceGroupManagerID : Allow user to set InstanceGroupManagerID
+func (_options *ListInstanceGroupManagerActionsOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *ListInstanceGroupManagerActionsOptions {
+ _options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
+ return _options
+}
+
+// SetStart : Allow user to set Start
+func (_options *ListInstanceGroupManagerActionsOptions) SetStart(start string) *ListInstanceGroupManagerActionsOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
+}
+
+// SetLimit : Allow user to set Limit
+func (_options *ListInstanceGroupManagerActionsOptions) SetLimit(limit int64) *ListInstanceGroupManagerActionsOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *ListInstanceGroupManagerActionsOptions) SetHeaders(param map[string]string) *ListInstanceGroupManagerActionsOptions {
+ options.Headers = param
+ return options
+}
+
// ListInstanceGroupManagerPoliciesOptions : The ListInstanceGroupManagerPolicies options.
type ListInstanceGroupManagerPoliciesOptions struct {
// The instance group identifier.
- InstanceGroupID *string `validate:"required,ne="`
+ InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="`
// The instance group manager identifier.
- InstanceGroupManagerID *string `validate:"required,ne="`
+ InstanceGroupManagerID *string `json:"instance_group_manager_id" validate:"required,ne="`
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -31880,27 +40627,27 @@ func (*VpcV1) NewListInstanceGroupManagerPoliciesOptions(instanceGroupID string,
}
// SetInstanceGroupID : Allow user to set InstanceGroupID
-func (options *ListInstanceGroupManagerPoliciesOptions) SetInstanceGroupID(instanceGroupID string) *ListInstanceGroupManagerPoliciesOptions {
- options.InstanceGroupID = core.StringPtr(instanceGroupID)
- return options
+func (_options *ListInstanceGroupManagerPoliciesOptions) SetInstanceGroupID(instanceGroupID string) *ListInstanceGroupManagerPoliciesOptions {
+ _options.InstanceGroupID = core.StringPtr(instanceGroupID)
+ return _options
}
// SetInstanceGroupManagerID : Allow user to set InstanceGroupManagerID
-func (options *ListInstanceGroupManagerPoliciesOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *ListInstanceGroupManagerPoliciesOptions {
- options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
- return options
+func (_options *ListInstanceGroupManagerPoliciesOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *ListInstanceGroupManagerPoliciesOptions {
+ _options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
+ return _options
}
// SetStart : Allow user to set Start
-func (options *ListInstanceGroupManagerPoliciesOptions) SetStart(start string) *ListInstanceGroupManagerPoliciesOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListInstanceGroupManagerPoliciesOptions) SetStart(start string) *ListInstanceGroupManagerPoliciesOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListInstanceGroupManagerPoliciesOptions) SetLimit(limit int64) *ListInstanceGroupManagerPoliciesOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListInstanceGroupManagerPoliciesOptions) SetLimit(limit int64) *ListInstanceGroupManagerPoliciesOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -31912,13 +40659,13 @@ func (options *ListInstanceGroupManagerPoliciesOptions) SetHeaders(param map[str
// ListInstanceGroupManagersOptions : The ListInstanceGroupManagers options.
type ListInstanceGroupManagersOptions struct {
// The instance group identifier.
- InstanceGroupID *string `validate:"required,ne="`
+ InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="`
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -31932,21 +40679,21 @@ func (*VpcV1) NewListInstanceGroupManagersOptions(instanceGroupID string) *ListI
}
// SetInstanceGroupID : Allow user to set InstanceGroupID
-func (options *ListInstanceGroupManagersOptions) SetInstanceGroupID(instanceGroupID string) *ListInstanceGroupManagersOptions {
- options.InstanceGroupID = core.StringPtr(instanceGroupID)
- return options
+func (_options *ListInstanceGroupManagersOptions) SetInstanceGroupID(instanceGroupID string) *ListInstanceGroupManagersOptions {
+ _options.InstanceGroupID = core.StringPtr(instanceGroupID)
+ return _options
}
// SetStart : Allow user to set Start
-func (options *ListInstanceGroupManagersOptions) SetStart(start string) *ListInstanceGroupManagersOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListInstanceGroupManagersOptions) SetStart(start string) *ListInstanceGroupManagersOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListInstanceGroupManagersOptions) SetLimit(limit int64) *ListInstanceGroupManagersOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListInstanceGroupManagersOptions) SetLimit(limit int64) *ListInstanceGroupManagersOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -31958,13 +40705,13 @@ func (options *ListInstanceGroupManagersOptions) SetHeaders(param map[string]str
// ListInstanceGroupMembershipsOptions : The ListInstanceGroupMemberships options.
type ListInstanceGroupMembershipsOptions struct {
// The instance group identifier.
- InstanceGroupID *string `validate:"required,ne="`
+ InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="`
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -31978,21 +40725,21 @@ func (*VpcV1) NewListInstanceGroupMembershipsOptions(instanceGroupID string) *Li
}
// SetInstanceGroupID : Allow user to set InstanceGroupID
-func (options *ListInstanceGroupMembershipsOptions) SetInstanceGroupID(instanceGroupID string) *ListInstanceGroupMembershipsOptions {
- options.InstanceGroupID = core.StringPtr(instanceGroupID)
- return options
+func (_options *ListInstanceGroupMembershipsOptions) SetInstanceGroupID(instanceGroupID string) *ListInstanceGroupMembershipsOptions {
+ _options.InstanceGroupID = core.StringPtr(instanceGroupID)
+ return _options
}
// SetStart : Allow user to set Start
-func (options *ListInstanceGroupMembershipsOptions) SetStart(start string) *ListInstanceGroupMembershipsOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListInstanceGroupMembershipsOptions) SetStart(start string) *ListInstanceGroupMembershipsOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListInstanceGroupMembershipsOptions) SetLimit(limit int64) *ListInstanceGroupMembershipsOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListInstanceGroupMembershipsOptions) SetLimit(limit int64) *ListInstanceGroupMembershipsOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -32003,11 +40750,11 @@ func (options *ListInstanceGroupMembershipsOptions) SetHeaders(param map[string]
// ListInstanceGroupsOptions : The ListInstanceGroups options.
type ListInstanceGroupsOptions struct {
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -32019,15 +40766,15 @@ func (*VpcV1) NewListInstanceGroupsOptions() *ListInstanceGroupsOptions {
}
// SetStart : Allow user to set Start
-func (options *ListInstanceGroupsOptions) SetStart(start string) *ListInstanceGroupsOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListInstanceGroupsOptions) SetStart(start string) *ListInstanceGroupsOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListInstanceGroupsOptions) SetLimit(limit int64) *ListInstanceGroupsOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListInstanceGroupsOptions) SetLimit(limit int64) *ListInstanceGroupsOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -32039,10 +40786,10 @@ func (options *ListInstanceGroupsOptions) SetHeaders(param map[string]string) *L
// ListInstanceNetworkInterfaceFloatingIpsOptions : The ListInstanceNetworkInterfaceFloatingIps options.
type ListInstanceNetworkInterfaceFloatingIpsOptions struct {
// The instance identifier.
- InstanceID *string `validate:"required,ne="`
+ InstanceID *string `json:"instance_id" validate:"required,ne="`
// The network interface identifier.
- NetworkInterfaceID *string `validate:"required,ne="`
+ NetworkInterfaceID *string `json:"network_interface_id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -32057,15 +40804,15 @@ func (*VpcV1) NewListInstanceNetworkInterfaceFloatingIpsOptions(instanceID strin
}
// SetInstanceID : Allow user to set InstanceID
-func (options *ListInstanceNetworkInterfaceFloatingIpsOptions) SetInstanceID(instanceID string) *ListInstanceNetworkInterfaceFloatingIpsOptions {
- options.InstanceID = core.StringPtr(instanceID)
- return options
+func (_options *ListInstanceNetworkInterfaceFloatingIpsOptions) SetInstanceID(instanceID string) *ListInstanceNetworkInterfaceFloatingIpsOptions {
+ _options.InstanceID = core.StringPtr(instanceID)
+ return _options
}
// SetNetworkInterfaceID : Allow user to set NetworkInterfaceID
-func (options *ListInstanceNetworkInterfaceFloatingIpsOptions) SetNetworkInterfaceID(networkInterfaceID string) *ListInstanceNetworkInterfaceFloatingIpsOptions {
- options.NetworkInterfaceID = core.StringPtr(networkInterfaceID)
- return options
+func (_options *ListInstanceNetworkInterfaceFloatingIpsOptions) SetNetworkInterfaceID(networkInterfaceID string) *ListInstanceNetworkInterfaceFloatingIpsOptions {
+ _options.NetworkInterfaceID = core.StringPtr(networkInterfaceID)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -32074,10 +40821,66 @@ func (options *ListInstanceNetworkInterfaceFloatingIpsOptions) SetHeaders(param
return options
}
+// ListInstanceNetworkInterfaceIpsOptions : The ListInstanceNetworkInterfaceIps options.
+type ListInstanceNetworkInterfaceIpsOptions struct {
+ // The instance identifier.
+ InstanceID *string `json:"instance_id" validate:"required,ne="`
+
+ // The network interface identifier.
+ NetworkInterfaceID *string `json:"network_interface_id" validate:"required,ne="`
+
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
+
+ // The number of resources to return on a page.
+ Limit *int64 `json:"limit,omitempty"`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewListInstanceNetworkInterfaceIpsOptions : Instantiate ListInstanceNetworkInterfaceIpsOptions
+func (*VpcV1) NewListInstanceNetworkInterfaceIpsOptions(instanceID string, networkInterfaceID string) *ListInstanceNetworkInterfaceIpsOptions {
+ return &ListInstanceNetworkInterfaceIpsOptions{
+ InstanceID: core.StringPtr(instanceID),
+ NetworkInterfaceID: core.StringPtr(networkInterfaceID),
+ }
+}
+
+// SetInstanceID : Allow user to set InstanceID
+func (_options *ListInstanceNetworkInterfaceIpsOptions) SetInstanceID(instanceID string) *ListInstanceNetworkInterfaceIpsOptions {
+ _options.InstanceID = core.StringPtr(instanceID)
+ return _options
+}
+
+// SetNetworkInterfaceID : Allow user to set NetworkInterfaceID
+func (_options *ListInstanceNetworkInterfaceIpsOptions) SetNetworkInterfaceID(networkInterfaceID string) *ListInstanceNetworkInterfaceIpsOptions {
+ _options.NetworkInterfaceID = core.StringPtr(networkInterfaceID)
+ return _options
+}
+
+// SetStart : Allow user to set Start
+func (_options *ListInstanceNetworkInterfaceIpsOptions) SetStart(start string) *ListInstanceNetworkInterfaceIpsOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
+}
+
+// SetLimit : Allow user to set Limit
+func (_options *ListInstanceNetworkInterfaceIpsOptions) SetLimit(limit int64) *ListInstanceNetworkInterfaceIpsOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *ListInstanceNetworkInterfaceIpsOptions) SetHeaders(param map[string]string) *ListInstanceNetworkInterfaceIpsOptions {
+ options.Headers = param
+ return options
+}
+
// ListInstanceNetworkInterfacesOptions : The ListInstanceNetworkInterfaces options.
type ListInstanceNetworkInterfacesOptions struct {
// The instance identifier.
- InstanceID *string `validate:"required,ne="`
+ InstanceID *string `json:"instance_id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -32091,9 +40894,9 @@ func (*VpcV1) NewListInstanceNetworkInterfacesOptions(instanceID string) *ListIn
}
// SetInstanceID : Allow user to set InstanceID
-func (options *ListInstanceNetworkInterfacesOptions) SetInstanceID(instanceID string) *ListInstanceNetworkInterfacesOptions {
- options.InstanceID = core.StringPtr(instanceID)
- return options
+func (_options *ListInstanceNetworkInterfacesOptions) SetInstanceID(instanceID string) *ListInstanceNetworkInterfacesOptions {
+ _options.InstanceID = core.StringPtr(instanceID)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -32141,7 +40944,7 @@ func (options *ListInstanceTemplatesOptions) SetHeaders(param map[string]string)
// ListInstanceVolumeAttachmentsOptions : The ListInstanceVolumeAttachments options.
type ListInstanceVolumeAttachmentsOptions struct {
// The instance identifier.
- InstanceID *string `validate:"required,ne="`
+ InstanceID *string `json:"instance_id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -32155,9 +40958,9 @@ func (*VpcV1) NewListInstanceVolumeAttachmentsOptions(instanceID string) *ListIn
}
// SetInstanceID : Allow user to set InstanceID
-func (options *ListInstanceVolumeAttachmentsOptions) SetInstanceID(instanceID string) *ListInstanceVolumeAttachmentsOptions {
- options.InstanceID = core.StringPtr(instanceID)
- return options
+func (_options *ListInstanceVolumeAttachmentsOptions) SetInstanceID(instanceID string) *ListInstanceVolumeAttachmentsOptions {
+ _options.InstanceID = core.StringPtr(instanceID)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -32168,27 +40971,44 @@ func (options *ListInstanceVolumeAttachmentsOptions) SetHeaders(param map[string
// ListInstancesOptions : The ListInstances options.
type ListInstancesOptions struct {
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
- // Filters the collection to resources within one of the resource groups identified in a comma-separated list of
- // resource group identifiers.
- ResourceGroupID *string
+ // Filters the collection to resources in the resource group with the specified identifier.
+ ResourceGroupID *string `json:"resource_group.id,omitempty"`
// Filters the collection to resources with the exact specified name.
- Name *string
+ Name *string `json:"name,omitempty"`
// Filters the collection to resources in the VPC with the specified identifier.
- VPCID *string
+ VPCID *string `json:"vpc.id,omitempty"`
// Filters the collection to resources in the VPC with the specified CRN.
- VPCCRN *string
+ VPCCRN *string `json:"vpc.crn,omitempty"`
// Filters the collection to resources in the VPC with the exact specified name.
- VPCName *string
+ VPCName *string `json:"vpc.name,omitempty"`
+
+ // Filters the collection to instances on the dedicated host with the specified identifier.
+ DedicatedHostID *string `json:"dedicated_host.id,omitempty"`
+
+ // Filters the collection to instances on the dedicated host with the specified CRN.
+ DedicatedHostCRN *string `json:"dedicated_host.crn,omitempty"`
+
+ // Filters the collection to instances on the dedicated host with the specified name.
+ DedicatedHostName *string `json:"dedicated_host.name,omitempty"`
+
+ // Filters the collection to instances in the placement group with the specified identifier.
+ PlacementGroupID *string `json:"placement_group.id,omitempty"`
+
+ // Filters the collection to instances in the placement group with the specified CRN.
+ PlacementGroupCRN *string `json:"placement_group.crn,omitempty"`
+
+ // Filters the collection to instances in the placement group with the specified name.
+ PlacementGroupName *string `json:"placement_group.name,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -32200,45 +41020,81 @@ func (*VpcV1) NewListInstancesOptions() *ListInstancesOptions {
}
// SetStart : Allow user to set Start
-func (options *ListInstancesOptions) SetStart(start string) *ListInstancesOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListInstancesOptions) SetStart(start string) *ListInstancesOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListInstancesOptions) SetLimit(limit int64) *ListInstancesOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListInstancesOptions) SetLimit(limit int64) *ListInstancesOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetResourceGroupID : Allow user to set ResourceGroupID
-func (options *ListInstancesOptions) SetResourceGroupID(resourceGroupID string) *ListInstancesOptions {
- options.ResourceGroupID = core.StringPtr(resourceGroupID)
- return options
+func (_options *ListInstancesOptions) SetResourceGroupID(resourceGroupID string) *ListInstancesOptions {
+ _options.ResourceGroupID = core.StringPtr(resourceGroupID)
+ return _options
}
// SetName : Allow user to set Name
-func (options *ListInstancesOptions) SetName(name string) *ListInstancesOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *ListInstancesOptions) SetName(name string) *ListInstancesOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetVPCID : Allow user to set VPCID
-func (options *ListInstancesOptions) SetVPCID(vpcID string) *ListInstancesOptions {
- options.VPCID = core.StringPtr(vpcID)
- return options
+func (_options *ListInstancesOptions) SetVPCID(vpcID string) *ListInstancesOptions {
+ _options.VPCID = core.StringPtr(vpcID)
+ return _options
}
// SetVPCCRN : Allow user to set VPCCRN
-func (options *ListInstancesOptions) SetVPCCRN(vpcCRN string) *ListInstancesOptions {
- options.VPCCRN = core.StringPtr(vpcCRN)
- return options
+func (_options *ListInstancesOptions) SetVPCCRN(vpcCRN string) *ListInstancesOptions {
+ _options.VPCCRN = core.StringPtr(vpcCRN)
+ return _options
}
// SetVPCName : Allow user to set VPCName
-func (options *ListInstancesOptions) SetVPCName(vpcName string) *ListInstancesOptions {
- options.VPCName = core.StringPtr(vpcName)
- return options
+func (_options *ListInstancesOptions) SetVPCName(vpcName string) *ListInstancesOptions {
+ _options.VPCName = core.StringPtr(vpcName)
+ return _options
+}
+
+// SetDedicatedHostID : Allow user to set DedicatedHostID
+func (_options *ListInstancesOptions) SetDedicatedHostID(dedicatedHostID string) *ListInstancesOptions {
+ _options.DedicatedHostID = core.StringPtr(dedicatedHostID)
+ return _options
+}
+
+// SetDedicatedHostCRN : Allow user to set DedicatedHostCRN
+func (_options *ListInstancesOptions) SetDedicatedHostCRN(dedicatedHostCRN string) *ListInstancesOptions {
+ _options.DedicatedHostCRN = core.StringPtr(dedicatedHostCRN)
+ return _options
+}
+
+// SetDedicatedHostName : Allow user to set DedicatedHostName
+func (_options *ListInstancesOptions) SetDedicatedHostName(dedicatedHostName string) *ListInstancesOptions {
+ _options.DedicatedHostName = core.StringPtr(dedicatedHostName)
+ return _options
+}
+
+// SetPlacementGroupID : Allow user to set PlacementGroupID
+func (_options *ListInstancesOptions) SetPlacementGroupID(placementGroupID string) *ListInstancesOptions {
+ _options.PlacementGroupID = core.StringPtr(placementGroupID)
+ return _options
+}
+
+// SetPlacementGroupCRN : Allow user to set PlacementGroupCRN
+func (_options *ListInstancesOptions) SetPlacementGroupCRN(placementGroupCRN string) *ListInstancesOptions {
+ _options.PlacementGroupCRN = core.StringPtr(placementGroupCRN)
+ return _options
+}
+
+// SetPlacementGroupName : Allow user to set PlacementGroupName
+func (_options *ListInstancesOptions) SetPlacementGroupName(placementGroupName string) *ListInstancesOptions {
+ _options.PlacementGroupName = core.StringPtr(placementGroupName)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -32249,11 +41105,11 @@ func (options *ListInstancesOptions) SetHeaders(param map[string]string) *ListIn
// ListIpsecPoliciesOptions : The ListIpsecPolicies options.
type ListIpsecPoliciesOptions struct {
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -32265,15 +41121,15 @@ func (*VpcV1) NewListIpsecPoliciesOptions() *ListIpsecPoliciesOptions {
}
// SetStart : Allow user to set Start
-func (options *ListIpsecPoliciesOptions) SetStart(start string) *ListIpsecPoliciesOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListIpsecPoliciesOptions) SetStart(start string) *ListIpsecPoliciesOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListIpsecPoliciesOptions) SetLimit(limit int64) *ListIpsecPoliciesOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListIpsecPoliciesOptions) SetLimit(limit int64) *ListIpsecPoliciesOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -32285,7 +41141,7 @@ func (options *ListIpsecPoliciesOptions) SetHeaders(param map[string]string) *Li
// ListIpsecPolicyConnectionsOptions : The ListIpsecPolicyConnections options.
type ListIpsecPolicyConnectionsOptions struct {
// The IPsec policy identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -32299,9 +41155,9 @@ func (*VpcV1) NewListIpsecPolicyConnectionsOptions(id string) *ListIpsecPolicyCo
}
// SetID : Allow user to set ID
-func (options *ListIpsecPolicyConnectionsOptions) SetID(id string) *ListIpsecPolicyConnectionsOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *ListIpsecPolicyConnectionsOptions) SetID(id string) *ListIpsecPolicyConnectionsOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -32312,9 +41168,11 @@ func (options *ListIpsecPolicyConnectionsOptions) SetHeaders(param map[string]st
// ListKeysOptions : The ListKeys options.
type ListKeysOptions struct {
- // Filters the collection to resources within one of the resource groups identified in a comma-separated list of
- // resource group identifiers.
- ResourceGroupID *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
+
+ // The number of resources to return on a page.
+ Limit *int64 `json:"limit,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -32325,10 +41183,16 @@ func (*VpcV1) NewListKeysOptions() *ListKeysOptions {
return &ListKeysOptions{}
}
-// SetResourceGroupID : Allow user to set ResourceGroupID
-func (options *ListKeysOptions) SetResourceGroupID(resourceGroupID string) *ListKeysOptions {
- options.ResourceGroupID = core.StringPtr(resourceGroupID)
- return options
+// SetStart : Allow user to set Start
+func (_options *ListKeysOptions) SetStart(start string) *ListKeysOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
+}
+
+// SetLimit : Allow user to set Limit
+func (_options *ListKeysOptions) SetLimit(limit int64) *ListKeysOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -32340,10 +41204,10 @@ func (options *ListKeysOptions) SetHeaders(param map[string]string) *ListKeysOpt
// ListLoadBalancerListenerPoliciesOptions : The ListLoadBalancerListenerPolicies options.
type ListLoadBalancerListenerPoliciesOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// The listener identifier.
- ListenerID *string `validate:"required,ne="`
+ ListenerID *string `json:"listener_id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -32358,15 +41222,15 @@ func (*VpcV1) NewListLoadBalancerListenerPoliciesOptions(loadBalancerID string,
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *ListLoadBalancerListenerPoliciesOptions) SetLoadBalancerID(loadBalancerID string) *ListLoadBalancerListenerPoliciesOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *ListLoadBalancerListenerPoliciesOptions) SetLoadBalancerID(loadBalancerID string) *ListLoadBalancerListenerPoliciesOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetListenerID : Allow user to set ListenerID
-func (options *ListLoadBalancerListenerPoliciesOptions) SetListenerID(listenerID string) *ListLoadBalancerListenerPoliciesOptions {
- options.ListenerID = core.StringPtr(listenerID)
- return options
+func (_options *ListLoadBalancerListenerPoliciesOptions) SetListenerID(listenerID string) *ListLoadBalancerListenerPoliciesOptions {
+ _options.ListenerID = core.StringPtr(listenerID)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -32378,13 +41242,13 @@ func (options *ListLoadBalancerListenerPoliciesOptions) SetHeaders(param map[str
// ListLoadBalancerListenerPolicyRulesOptions : The ListLoadBalancerListenerPolicyRules options.
type ListLoadBalancerListenerPolicyRulesOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// The listener identifier.
- ListenerID *string `validate:"required,ne="`
+ ListenerID *string `json:"listener_id" validate:"required,ne="`
// The policy identifier.
- PolicyID *string `validate:"required,ne="`
+ PolicyID *string `json:"policy_id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -32400,21 +41264,21 @@ func (*VpcV1) NewListLoadBalancerListenerPolicyRulesOptions(loadBalancerID strin
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *ListLoadBalancerListenerPolicyRulesOptions) SetLoadBalancerID(loadBalancerID string) *ListLoadBalancerListenerPolicyRulesOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *ListLoadBalancerListenerPolicyRulesOptions) SetLoadBalancerID(loadBalancerID string) *ListLoadBalancerListenerPolicyRulesOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetListenerID : Allow user to set ListenerID
-func (options *ListLoadBalancerListenerPolicyRulesOptions) SetListenerID(listenerID string) *ListLoadBalancerListenerPolicyRulesOptions {
- options.ListenerID = core.StringPtr(listenerID)
- return options
+func (_options *ListLoadBalancerListenerPolicyRulesOptions) SetListenerID(listenerID string) *ListLoadBalancerListenerPolicyRulesOptions {
+ _options.ListenerID = core.StringPtr(listenerID)
+ return _options
}
// SetPolicyID : Allow user to set PolicyID
-func (options *ListLoadBalancerListenerPolicyRulesOptions) SetPolicyID(policyID string) *ListLoadBalancerListenerPolicyRulesOptions {
- options.PolicyID = core.StringPtr(policyID)
- return options
+func (_options *ListLoadBalancerListenerPolicyRulesOptions) SetPolicyID(policyID string) *ListLoadBalancerListenerPolicyRulesOptions {
+ _options.PolicyID = core.StringPtr(policyID)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -32426,7 +41290,7 @@ func (options *ListLoadBalancerListenerPolicyRulesOptions) SetHeaders(param map[
// ListLoadBalancerListenersOptions : The ListLoadBalancerListeners options.
type ListLoadBalancerListenersOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -32440,9 +41304,9 @@ func (*VpcV1) NewListLoadBalancerListenersOptions(loadBalancerID string) *ListLo
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *ListLoadBalancerListenersOptions) SetLoadBalancerID(loadBalancerID string) *ListLoadBalancerListenersOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *ListLoadBalancerListenersOptions) SetLoadBalancerID(loadBalancerID string) *ListLoadBalancerListenersOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -32454,10 +41318,10 @@ func (options *ListLoadBalancerListenersOptions) SetHeaders(param map[string]str
// ListLoadBalancerPoolMembersOptions : The ListLoadBalancerPoolMembers options.
type ListLoadBalancerPoolMembersOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// The pool identifier.
- PoolID *string `validate:"required,ne="`
+ PoolID *string `json:"pool_id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -32472,15 +41336,15 @@ func (*VpcV1) NewListLoadBalancerPoolMembersOptions(loadBalancerID string, poolI
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *ListLoadBalancerPoolMembersOptions) SetLoadBalancerID(loadBalancerID string) *ListLoadBalancerPoolMembersOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *ListLoadBalancerPoolMembersOptions) SetLoadBalancerID(loadBalancerID string) *ListLoadBalancerPoolMembersOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetPoolID : Allow user to set PoolID
-func (options *ListLoadBalancerPoolMembersOptions) SetPoolID(poolID string) *ListLoadBalancerPoolMembersOptions {
- options.PoolID = core.StringPtr(poolID)
- return options
+func (_options *ListLoadBalancerPoolMembersOptions) SetPoolID(poolID string) *ListLoadBalancerPoolMembersOptions {
+ _options.PoolID = core.StringPtr(poolID)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -32492,7 +41356,7 @@ func (options *ListLoadBalancerPoolMembersOptions) SetHeaders(param map[string]s
// ListLoadBalancerPoolsOptions : The ListLoadBalancerPools options.
type ListLoadBalancerPoolsOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -32506,9 +41370,9 @@ func (*VpcV1) NewListLoadBalancerPoolsOptions(loadBalancerID string) *ListLoadBa
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *ListLoadBalancerPoolsOptions) SetLoadBalancerID(loadBalancerID string) *ListLoadBalancerPoolsOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *ListLoadBalancerPoolsOptions) SetLoadBalancerID(loadBalancerID string) *ListLoadBalancerPoolsOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -32519,11 +41383,11 @@ func (options *ListLoadBalancerPoolsOptions) SetHeaders(param map[string]string)
// ListLoadBalancerProfilesOptions : The ListLoadBalancerProfiles options.
type ListLoadBalancerProfilesOptions struct {
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -32535,15 +41399,15 @@ func (*VpcV1) NewListLoadBalancerProfilesOptions() *ListLoadBalancerProfilesOpti
}
// SetStart : Allow user to set Start
-func (options *ListLoadBalancerProfilesOptions) SetStart(start string) *ListLoadBalancerProfilesOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListLoadBalancerProfilesOptions) SetStart(start string) *ListLoadBalancerProfilesOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListLoadBalancerProfilesOptions) SetLimit(limit int64) *ListLoadBalancerProfilesOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListLoadBalancerProfilesOptions) SetLimit(limit int64) *ListLoadBalancerProfilesOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -32554,6 +41418,11 @@ func (options *ListLoadBalancerProfilesOptions) SetHeaders(param map[string]stri
// ListLoadBalancersOptions : The ListLoadBalancers options.
type ListLoadBalancersOptions struct {
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
+
+ // The number of resources to return on a page.
+ Limit *int64 `json:"limit,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -32564,6 +41433,18 @@ func (*VpcV1) NewListLoadBalancersOptions() *ListLoadBalancersOptions {
return &ListLoadBalancersOptions{}
}
+// SetStart : Allow user to set Start
+func (_options *ListLoadBalancersOptions) SetStart(start string) *ListLoadBalancersOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
+}
+
+// SetLimit : Allow user to set Limit
+func (_options *ListLoadBalancersOptions) SetLimit(limit int64) *ListLoadBalancersOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
+}
+
// SetHeaders : Allow user to set Headers
func (options *ListLoadBalancersOptions) SetHeaders(param map[string]string) *ListLoadBalancersOptions {
options.Headers = param
@@ -32573,16 +41454,16 @@ func (options *ListLoadBalancersOptions) SetHeaders(param map[string]string) *Li
// ListNetworkACLRulesOptions : The ListNetworkACLRules options.
type ListNetworkACLRulesOptions struct {
// The network ACL identifier.
- NetworkACLID *string `validate:"required,ne="`
+ NetworkACLID *string `json:"network_acl_id" validate:"required,ne="`
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
// Filters the collection to rules with the specified direction.
- Direction *string
+ Direction *string `json:"direction,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -32603,27 +41484,27 @@ func (*VpcV1) NewListNetworkACLRulesOptions(networkACLID string) *ListNetworkACL
}
// SetNetworkACLID : Allow user to set NetworkACLID
-func (options *ListNetworkACLRulesOptions) SetNetworkACLID(networkACLID string) *ListNetworkACLRulesOptions {
- options.NetworkACLID = core.StringPtr(networkACLID)
- return options
+func (_options *ListNetworkACLRulesOptions) SetNetworkACLID(networkACLID string) *ListNetworkACLRulesOptions {
+ _options.NetworkACLID = core.StringPtr(networkACLID)
+ return _options
}
// SetStart : Allow user to set Start
-func (options *ListNetworkACLRulesOptions) SetStart(start string) *ListNetworkACLRulesOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListNetworkACLRulesOptions) SetStart(start string) *ListNetworkACLRulesOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListNetworkACLRulesOptions) SetLimit(limit int64) *ListNetworkACLRulesOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListNetworkACLRulesOptions) SetLimit(limit int64) *ListNetworkACLRulesOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetDirection : Allow user to set Direction
-func (options *ListNetworkACLRulesOptions) SetDirection(direction string) *ListNetworkACLRulesOptions {
- options.Direction = core.StringPtr(direction)
- return options
+func (_options *ListNetworkACLRulesOptions) SetDirection(direction string) *ListNetworkACLRulesOptions {
+ _options.Direction = core.StringPtr(direction)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -32634,15 +41515,14 @@ func (options *ListNetworkACLRulesOptions) SetHeaders(param map[string]string) *
// ListNetworkAclsOptions : The ListNetworkAcls options.
type ListNetworkAclsOptions struct {
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
- // Filters the collection to resources within one of the resource groups identified in a comma-separated list of
- // resource group identifiers.
- ResourceGroupID *string
+ // Filters the collection to resources in the resource group with the specified identifier.
+ ResourceGroupID *string `json:"resource_group.id,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -32654,21 +41534,21 @@ func (*VpcV1) NewListNetworkAclsOptions() *ListNetworkAclsOptions {
}
// SetStart : Allow user to set Start
-func (options *ListNetworkAclsOptions) SetStart(start string) *ListNetworkAclsOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListNetworkAclsOptions) SetStart(start string) *ListNetworkAclsOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListNetworkAclsOptions) SetLimit(limit int64) *ListNetworkAclsOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListNetworkAclsOptions) SetLimit(limit int64) *ListNetworkAclsOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetResourceGroupID : Allow user to set ResourceGroupID
-func (options *ListNetworkAclsOptions) SetResourceGroupID(resourceGroupID string) *ListNetworkAclsOptions {
- options.ResourceGroupID = core.StringPtr(resourceGroupID)
- return options
+func (_options *ListNetworkAclsOptions) SetResourceGroupID(resourceGroupID string) *ListNetworkAclsOptions {
+ _options.ResourceGroupID = core.StringPtr(resourceGroupID)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -32679,11 +41559,11 @@ func (options *ListNetworkAclsOptions) SetHeaders(param map[string]string) *List
// ListOperatingSystemsOptions : The ListOperatingSystems options.
type ListOperatingSystemsOptions struct {
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -32695,15 +41575,15 @@ func (*VpcV1) NewListOperatingSystemsOptions() *ListOperatingSystemsOptions {
}
// SetStart : Allow user to set Start
-func (options *ListOperatingSystemsOptions) SetStart(start string) *ListOperatingSystemsOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListOperatingSystemsOptions) SetStart(start string) *ListOperatingSystemsOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListOperatingSystemsOptions) SetLimit(limit int64) *ListOperatingSystemsOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListOperatingSystemsOptions) SetLimit(limit int64) *ListOperatingSystemsOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -32712,17 +41592,51 @@ func (options *ListOperatingSystemsOptions) SetHeaders(param map[string]string)
return options
}
-// ListPublicGatewaysOptions : The ListPublicGateways options.
-type ListPublicGatewaysOptions struct {
- // A server-supplied token determining what resource to start the page on.
- Start *string
+// ListPlacementGroupsOptions : The ListPlacementGroups options.
+type ListPlacementGroupsOptions struct {
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
- // Filters the collection to resources within one of the resource groups identified in a comma-separated list of
- // resource group identifiers.
- ResourceGroupID *string
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewListPlacementGroupsOptions : Instantiate ListPlacementGroupsOptions
+func (*VpcV1) NewListPlacementGroupsOptions() *ListPlacementGroupsOptions {
+ return &ListPlacementGroupsOptions{}
+}
+
+// SetStart : Allow user to set Start
+func (_options *ListPlacementGroupsOptions) SetStart(start string) *ListPlacementGroupsOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
+}
+
+// SetLimit : Allow user to set Limit
+func (_options *ListPlacementGroupsOptions) SetLimit(limit int64) *ListPlacementGroupsOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *ListPlacementGroupsOptions) SetHeaders(param map[string]string) *ListPlacementGroupsOptions {
+ options.Headers = param
+ return options
+}
+
+// ListPublicGatewaysOptions : The ListPublicGateways options.
+type ListPublicGatewaysOptions struct {
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
+
+ // The number of resources to return on a page.
+ Limit *int64 `json:"limit,omitempty"`
+
+ // Filters the collection to resources in the resource group with the specified identifier.
+ ResourceGroupID *string `json:"resource_group.id,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -32734,21 +41648,21 @@ func (*VpcV1) NewListPublicGatewaysOptions() *ListPublicGatewaysOptions {
}
// SetStart : Allow user to set Start
-func (options *ListPublicGatewaysOptions) SetStart(start string) *ListPublicGatewaysOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListPublicGatewaysOptions) SetStart(start string) *ListPublicGatewaysOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListPublicGatewaysOptions) SetLimit(limit int64) *ListPublicGatewaysOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListPublicGatewaysOptions) SetLimit(limit int64) *ListPublicGatewaysOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetResourceGroupID : Allow user to set ResourceGroupID
-func (options *ListPublicGatewaysOptions) SetResourceGroupID(resourceGroupID string) *ListPublicGatewaysOptions {
- options.ResourceGroupID = core.StringPtr(resourceGroupID)
- return options
+func (_options *ListPublicGatewaysOptions) SetResourceGroupID(resourceGroupID string) *ListPublicGatewaysOptions {
+ _options.ResourceGroupID = core.StringPtr(resourceGroupID)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -32760,7 +41674,7 @@ func (options *ListPublicGatewaysOptions) SetHeaders(param map[string]string) *L
// ListRegionZonesOptions : The ListRegionZones options.
type ListRegionZonesOptions struct {
// The region name.
- RegionName *string `validate:"required,ne="`
+ RegionName *string `json:"region_name" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -32774,9 +41688,9 @@ func (*VpcV1) NewListRegionZonesOptions(regionName string) *ListRegionZonesOptio
}
// SetRegionName : Allow user to set RegionName
-func (options *ListRegionZonesOptions) SetRegionName(regionName string) *ListRegionZonesOptions {
- options.RegionName = core.StringPtr(regionName)
- return options
+func (_options *ListRegionZonesOptions) SetRegionName(regionName string) *ListRegionZonesOptions {
+ _options.RegionName = core.StringPtr(regionName)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -32803,56 +41717,10 @@ func (options *ListRegionsOptions) SetHeaders(param map[string]string) *ListRegi
return options
}
-// ListSecurityGroupNetworkInterfacesOptions : The ListSecurityGroupNetworkInterfaces options.
-type ListSecurityGroupNetworkInterfacesOptions struct {
- // The security group identifier.
- SecurityGroupID *string `validate:"required,ne="`
-
- // A server-supplied token determining what resource to start the page on.
- Start *string
-
- // The number of resources to return on a page.
- Limit *int64
-
- // Allows users to set headers on API requests
- Headers map[string]string
-}
-
-// NewListSecurityGroupNetworkInterfacesOptions : Instantiate ListSecurityGroupNetworkInterfacesOptions
-func (*VpcV1) NewListSecurityGroupNetworkInterfacesOptions(securityGroupID string) *ListSecurityGroupNetworkInterfacesOptions {
- return &ListSecurityGroupNetworkInterfacesOptions{
- SecurityGroupID: core.StringPtr(securityGroupID),
- }
-}
-
-// SetSecurityGroupID : Allow user to set SecurityGroupID
-func (options *ListSecurityGroupNetworkInterfacesOptions) SetSecurityGroupID(securityGroupID string) *ListSecurityGroupNetworkInterfacesOptions {
- options.SecurityGroupID = core.StringPtr(securityGroupID)
- return options
-}
-
-// SetStart : Allow user to set Start
-func (options *ListSecurityGroupNetworkInterfacesOptions) SetStart(start string) *ListSecurityGroupNetworkInterfacesOptions {
- options.Start = core.StringPtr(start)
- return options
-}
-
-// SetLimit : Allow user to set Limit
-func (options *ListSecurityGroupNetworkInterfacesOptions) SetLimit(limit int64) *ListSecurityGroupNetworkInterfacesOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
-}
-
-// SetHeaders : Allow user to set Headers
-func (options *ListSecurityGroupNetworkInterfacesOptions) SetHeaders(param map[string]string) *ListSecurityGroupNetworkInterfacesOptions {
- options.Headers = param
- return options
-}
-
// ListSecurityGroupRulesOptions : The ListSecurityGroupRules options.
type ListSecurityGroupRulesOptions struct {
// The security group identifier.
- SecurityGroupID *string `validate:"required,ne="`
+ SecurityGroupID *string `json:"security_group_id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -32866,9 +41734,9 @@ func (*VpcV1) NewListSecurityGroupRulesOptions(securityGroupID string) *ListSecu
}
// SetSecurityGroupID : Allow user to set SecurityGroupID
-func (options *ListSecurityGroupRulesOptions) SetSecurityGroupID(securityGroupID string) *ListSecurityGroupRulesOptions {
- options.SecurityGroupID = core.StringPtr(securityGroupID)
- return options
+func (_options *ListSecurityGroupRulesOptions) SetSecurityGroupID(securityGroupID string) *ListSecurityGroupRulesOptions {
+ _options.SecurityGroupID = core.StringPtr(securityGroupID)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -32880,13 +41748,13 @@ func (options *ListSecurityGroupRulesOptions) SetHeaders(param map[string]string
// ListSecurityGroupTargetsOptions : The ListSecurityGroupTargets options.
type ListSecurityGroupTargetsOptions struct {
// The security group identifier.
- SecurityGroupID *string `validate:"required,ne="`
+ SecurityGroupID *string `json:"security_group_id" validate:"required,ne="`
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -32900,21 +41768,21 @@ func (*VpcV1) NewListSecurityGroupTargetsOptions(securityGroupID string) *ListSe
}
// SetSecurityGroupID : Allow user to set SecurityGroupID
-func (options *ListSecurityGroupTargetsOptions) SetSecurityGroupID(securityGroupID string) *ListSecurityGroupTargetsOptions {
- options.SecurityGroupID = core.StringPtr(securityGroupID)
- return options
+func (_options *ListSecurityGroupTargetsOptions) SetSecurityGroupID(securityGroupID string) *ListSecurityGroupTargetsOptions {
+ _options.SecurityGroupID = core.StringPtr(securityGroupID)
+ return _options
}
// SetStart : Allow user to set Start
-func (options *ListSecurityGroupTargetsOptions) SetStart(start string) *ListSecurityGroupTargetsOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListSecurityGroupTargetsOptions) SetStart(start string) *ListSecurityGroupTargetsOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListSecurityGroupTargetsOptions) SetLimit(limit int64) *ListSecurityGroupTargetsOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListSecurityGroupTargetsOptions) SetLimit(limit int64) *ListSecurityGroupTargetsOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -32925,24 +41793,23 @@ func (options *ListSecurityGroupTargetsOptions) SetHeaders(param map[string]stri
// ListSecurityGroupsOptions : The ListSecurityGroups options.
type ListSecurityGroupsOptions struct {
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
- // Filters the collection to resources within one of the resource groups identified in a comma-separated list of
- // resource group identifiers.
- ResourceGroupID *string
+ // Filters the collection to resources in the resource group with the specified identifier.
+ ResourceGroupID *string `json:"resource_group.id,omitempty"`
// Filters the collection to resources in the VPC with the specified identifier.
- VPCID *string
+ VPCID *string `json:"vpc.id,omitempty"`
// Filters the collection to resources in the VPC with the specified CRN.
- VPCCRN *string
+ VPCCRN *string `json:"vpc.crn,omitempty"`
// Filters the collection to resources in the VPC with the exact specified name.
- VPCName *string
+ VPCName *string `json:"vpc.name,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -32954,39 +41821,39 @@ func (*VpcV1) NewListSecurityGroupsOptions() *ListSecurityGroupsOptions {
}
// SetStart : Allow user to set Start
-func (options *ListSecurityGroupsOptions) SetStart(start string) *ListSecurityGroupsOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListSecurityGroupsOptions) SetStart(start string) *ListSecurityGroupsOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListSecurityGroupsOptions) SetLimit(limit int64) *ListSecurityGroupsOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListSecurityGroupsOptions) SetLimit(limit int64) *ListSecurityGroupsOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetResourceGroupID : Allow user to set ResourceGroupID
-func (options *ListSecurityGroupsOptions) SetResourceGroupID(resourceGroupID string) *ListSecurityGroupsOptions {
- options.ResourceGroupID = core.StringPtr(resourceGroupID)
- return options
+func (_options *ListSecurityGroupsOptions) SetResourceGroupID(resourceGroupID string) *ListSecurityGroupsOptions {
+ _options.ResourceGroupID = core.StringPtr(resourceGroupID)
+ return _options
}
// SetVPCID : Allow user to set VPCID
-func (options *ListSecurityGroupsOptions) SetVPCID(vpcID string) *ListSecurityGroupsOptions {
- options.VPCID = core.StringPtr(vpcID)
- return options
+func (_options *ListSecurityGroupsOptions) SetVPCID(vpcID string) *ListSecurityGroupsOptions {
+ _options.VPCID = core.StringPtr(vpcID)
+ return _options
}
// SetVPCCRN : Allow user to set VPCCRN
-func (options *ListSecurityGroupsOptions) SetVPCCRN(vpcCRN string) *ListSecurityGroupsOptions {
- options.VPCCRN = core.StringPtr(vpcCRN)
- return options
+func (_options *ListSecurityGroupsOptions) SetVPCCRN(vpcCRN string) *ListSecurityGroupsOptions {
+ _options.VPCCRN = core.StringPtr(vpcCRN)
+ return _options
}
// SetVPCName : Allow user to set VPCName
-func (options *ListSecurityGroupsOptions) SetVPCName(vpcName string) *ListSecurityGroupsOptions {
- options.VPCName = core.StringPtr(vpcName)
- return options
+func (_options *ListSecurityGroupsOptions) SetVPCName(vpcName string) *ListSecurityGroupsOptions {
+ _options.VPCName = core.StringPtr(vpcName)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -32995,32 +41862,154 @@ func (options *ListSecurityGroupsOptions) SetHeaders(param map[string]string) *L
return options
}
+// ListSnapshotsOptions : The ListSnapshots options.
+type ListSnapshotsOptions struct {
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
+
+ // The number of resources to return on a page.
+ Limit *int64 `json:"limit,omitempty"`
+
+ // Filters the collection to resources with the exact tag value.
+ Tag *string `json:"tag,omitempty"`
+
+ // Filters the collection to resources in the resource group with the specified identifier.
+ ResourceGroupID *string `json:"resource_group.id,omitempty"`
+
+ // Filters the collection to resources with the exact specified name.
+ Name *string `json:"name,omitempty"`
+
+ // Filters the collection to resources with the source volume with the specified identifier.
+ SourceVolumeID *string `json:"source_volume.id,omitempty"`
+
+ // Filters the collection to resources with the source volume with the specified CRN.
+ SourceVolumeCRN *string `json:"source_volume.crn,omitempty"`
+
+ // Filters the collection to resources with the source image with the specified identifier.
+ //
+ // This parameter also supports the values `null` and `not:null` which filter the collection to resources which have no
+ // source image or any existent source image, respectively.
+ SourceImageID *string `json:"source_image.id,omitempty"`
+
+ // Filters the collection to resources with the source volume with the specified CRN.
+ //
+ // This parameter also supports the values `null` and `not:null` which filter the collection to resources which have no
+ // source image or any existent source image, respectively.
+ SourceImageCRN *string `json:"source_image.crn,omitempty"`
+
+ // Sorts the returned collection by the specified property name in ascending order. A `-` may be prepended to the name
+ // to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property
+ // in descending order, and the value `name` sorts it by the `name` property in ascending order.
+ Sort *string `json:"sort,omitempty"`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// Constants associated with the ListSnapshotsOptions.Sort property.
+// Sorts the returned collection by the specified property name in ascending order. A `-` may be prepended to the name
+// to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property
+// in descending order, and the value `name` sorts it by the `name` property in ascending order.
+const (
+ ListSnapshotsOptionsSortCreatedAtConst = "created_at"
+ ListSnapshotsOptionsSortNameConst = "name"
+)
+
+// NewListSnapshotsOptions : Instantiate ListSnapshotsOptions
+func (*VpcV1) NewListSnapshotsOptions() *ListSnapshotsOptions {
+ return &ListSnapshotsOptions{}
+}
+
+// SetStart : Allow user to set Start
+func (_options *ListSnapshotsOptions) SetStart(start string) *ListSnapshotsOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
+}
+
+// SetLimit : Allow user to set Limit
+func (_options *ListSnapshotsOptions) SetLimit(limit int64) *ListSnapshotsOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
+}
+
+// SetTag : Allow user to set Tag
+func (_options *ListSnapshotsOptions) SetTag(tag string) *ListSnapshotsOptions {
+ _options.Tag = core.StringPtr(tag)
+ return _options
+}
+
+// SetResourceGroupID : Allow user to set ResourceGroupID
+func (_options *ListSnapshotsOptions) SetResourceGroupID(resourceGroupID string) *ListSnapshotsOptions {
+ _options.ResourceGroupID = core.StringPtr(resourceGroupID)
+ return _options
+}
+
+// SetName : Allow user to set Name
+func (_options *ListSnapshotsOptions) SetName(name string) *ListSnapshotsOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
+}
+
+// SetSourceVolumeID : Allow user to set SourceVolumeID
+func (_options *ListSnapshotsOptions) SetSourceVolumeID(sourceVolumeID string) *ListSnapshotsOptions {
+ _options.SourceVolumeID = core.StringPtr(sourceVolumeID)
+ return _options
+}
+
+// SetSourceVolumeCRN : Allow user to set SourceVolumeCRN
+func (_options *ListSnapshotsOptions) SetSourceVolumeCRN(sourceVolumeCRN string) *ListSnapshotsOptions {
+ _options.SourceVolumeCRN = core.StringPtr(sourceVolumeCRN)
+ return _options
+}
+
+// SetSourceImageID : Allow user to set SourceImageID
+func (_options *ListSnapshotsOptions) SetSourceImageID(sourceImageID string) *ListSnapshotsOptions {
+ _options.SourceImageID = core.StringPtr(sourceImageID)
+ return _options
+}
+
+// SetSourceImageCRN : Allow user to set SourceImageCRN
+func (_options *ListSnapshotsOptions) SetSourceImageCRN(sourceImageCRN string) *ListSnapshotsOptions {
+ _options.SourceImageCRN = core.StringPtr(sourceImageCRN)
+ return _options
+}
+
+// SetSort : Allow user to set Sort
+func (_options *ListSnapshotsOptions) SetSort(sort string) *ListSnapshotsOptions {
+ _options.Sort = core.StringPtr(sort)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *ListSnapshotsOptions) SetHeaders(param map[string]string) *ListSnapshotsOptions {
+ options.Headers = param
+ return options
+}
+
// ListSubnetReservedIpsOptions : The ListSubnetReservedIps options.
type ListSubnetReservedIpsOptions struct {
// The subnet identifier.
- SubnetID *string `validate:"required,ne="`
+ SubnetID *string `json:"subnet_id" validate:"required,ne="`
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
- // Sorts the returned collection by the specified field name in ascending order. A `-` may be prepended to the field
- // name to sort in descending order. For example, the value
- // `-created_at` sorts the collection by the `created_at` field in descending order, and the value `name` sorts it by
- // the `name` field in ascending order.
- Sort *string
+ // Sorts the returned collection by the specified property name in ascending order. A `-` may be prepended to the name
+ // to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property
+ // in descending order, and the value `name` sorts it by the `name` property in ascending order.
+ Sort *string `json:"sort,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
}
// Constants associated with the ListSubnetReservedIpsOptions.Sort property.
-// Sorts the returned collection by the specified field name in ascending order. A `-` may be prepended to the field
-// name to sort in descending order. For example, the value
-// `-created_at` sorts the collection by the `created_at` field in descending order, and the value `name` sorts it by
-// the `name` field in ascending order.
+// Sorts the returned collection by the specified property name in ascending order. A `-` may be prepended to the name
+// to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property
+// in descending order, and the value `name` sorts it by the `name` property in ascending order.
const (
ListSubnetReservedIpsOptionsSortAddressConst = "address"
ListSubnetReservedIpsOptionsSortCreatedAtConst = "created_at"
@@ -33035,27 +42024,27 @@ func (*VpcV1) NewListSubnetReservedIpsOptions(subnetID string) *ListSubnetReserv
}
// SetSubnetID : Allow user to set SubnetID
-func (options *ListSubnetReservedIpsOptions) SetSubnetID(subnetID string) *ListSubnetReservedIpsOptions {
- options.SubnetID = core.StringPtr(subnetID)
- return options
+func (_options *ListSubnetReservedIpsOptions) SetSubnetID(subnetID string) *ListSubnetReservedIpsOptions {
+ _options.SubnetID = core.StringPtr(subnetID)
+ return _options
}
// SetStart : Allow user to set Start
-func (options *ListSubnetReservedIpsOptions) SetStart(start string) *ListSubnetReservedIpsOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListSubnetReservedIpsOptions) SetStart(start string) *ListSubnetReservedIpsOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListSubnetReservedIpsOptions) SetLimit(limit int64) *ListSubnetReservedIpsOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListSubnetReservedIpsOptions) SetLimit(limit int64) *ListSubnetReservedIpsOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetSort : Allow user to set Sort
-func (options *ListSubnetReservedIpsOptions) SetSort(sort string) *ListSubnetReservedIpsOptions {
- options.Sort = core.StringPtr(sort)
- return options
+func (_options *ListSubnetReservedIpsOptions) SetSort(sort string) *ListSubnetReservedIpsOptions {
+ _options.Sort = core.StringPtr(sort)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -33066,21 +42055,20 @@ func (options *ListSubnetReservedIpsOptions) SetHeaders(param map[string]string)
// ListSubnetsOptions : The ListSubnets options.
type ListSubnetsOptions struct {
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
- // Filters the collection to resources within one of the resource groups identified in a comma-separated list of
- // resource group identifiers.
- ResourceGroupID *string
+ // Filters the collection to resources in the resource group with the specified identifier.
+ ResourceGroupID *string `json:"resource_group.id,omitempty"`
// Filters the collection to subnets attached to the routing table with the specified identifier.
- RoutingTableID *string
+ RoutingTableID *string `json:"routing_table.id,omitempty"`
// Filters the collection to subnets attached to the routing table with the specified name.
- RoutingTableName *string
+ RoutingTableName *string `json:"routing_table.name,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -33092,33 +42080,33 @@ func (*VpcV1) NewListSubnetsOptions() *ListSubnetsOptions {
}
// SetStart : Allow user to set Start
-func (options *ListSubnetsOptions) SetStart(start string) *ListSubnetsOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListSubnetsOptions) SetStart(start string) *ListSubnetsOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListSubnetsOptions) SetLimit(limit int64) *ListSubnetsOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListSubnetsOptions) SetLimit(limit int64) *ListSubnetsOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetResourceGroupID : Allow user to set ResourceGroupID
-func (options *ListSubnetsOptions) SetResourceGroupID(resourceGroupID string) *ListSubnetsOptions {
- options.ResourceGroupID = core.StringPtr(resourceGroupID)
- return options
+func (_options *ListSubnetsOptions) SetResourceGroupID(resourceGroupID string) *ListSubnetsOptions {
+ _options.ResourceGroupID = core.StringPtr(resourceGroupID)
+ return _options
}
// SetRoutingTableID : Allow user to set RoutingTableID
-func (options *ListSubnetsOptions) SetRoutingTableID(routingTableID string) *ListSubnetsOptions {
- options.RoutingTableID = core.StringPtr(routingTableID)
- return options
+func (_options *ListSubnetsOptions) SetRoutingTableID(routingTableID string) *ListSubnetsOptions {
+ _options.RoutingTableID = core.StringPtr(routingTableID)
+ return _options
}
// SetRoutingTableName : Allow user to set RoutingTableName
-func (options *ListSubnetsOptions) SetRoutingTableName(routingTableName string) *ListSubnetsOptions {
- options.RoutingTableName = core.StringPtr(routingTableName)
- return options
+func (_options *ListSubnetsOptions) SetRoutingTableName(routingTableName string) *ListSubnetsOptions {
+ _options.RoutingTableName = core.StringPtr(routingTableName)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -33129,11 +42117,11 @@ func (options *ListSubnetsOptions) SetHeaders(param map[string]string) *ListSubn
// ListVolumeProfilesOptions : The ListVolumeProfiles options.
type ListVolumeProfilesOptions struct {
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -33145,15 +42133,15 @@ func (*VpcV1) NewListVolumeProfilesOptions() *ListVolumeProfilesOptions {
}
// SetStart : Allow user to set Start
-func (options *ListVolumeProfilesOptions) SetStart(start string) *ListVolumeProfilesOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListVolumeProfilesOptions) SetStart(start string) *ListVolumeProfilesOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListVolumeProfilesOptions) SetLimit(limit int64) *ListVolumeProfilesOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListVolumeProfilesOptions) SetLimit(limit int64) *ListVolumeProfilesOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -33164,17 +42152,17 @@ func (options *ListVolumeProfilesOptions) SetHeaders(param map[string]string) *L
// ListVolumesOptions : The ListVolumes options.
type ListVolumesOptions struct {
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
// Filters the collection to resources with the exact specified name.
- Name *string
+ Name *string `json:"name,omitempty"`
// Filters the collection to resources in the zone with the exact specified name.
- ZoneName *string
+ ZoneName *string `json:"zone.name,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -33186,27 +42174,27 @@ func (*VpcV1) NewListVolumesOptions() *ListVolumesOptions {
}
// SetStart : Allow user to set Start
-func (options *ListVolumesOptions) SetStart(start string) *ListVolumesOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListVolumesOptions) SetStart(start string) *ListVolumesOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListVolumesOptions) SetLimit(limit int64) *ListVolumesOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListVolumesOptions) SetLimit(limit int64) *ListVolumesOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetName : Allow user to set Name
-func (options *ListVolumesOptions) SetName(name string) *ListVolumesOptions {
- options.Name = core.StringPtr(name)
- return options
+func (_options *ListVolumesOptions) SetName(name string) *ListVolumesOptions {
+ _options.Name = core.StringPtr(name)
+ return _options
}
// SetZoneName : Allow user to set ZoneName
-func (options *ListVolumesOptions) SetZoneName(zoneName string) *ListVolumesOptions {
- options.ZoneName = core.StringPtr(zoneName)
- return options
+func (_options *ListVolumesOptions) SetZoneName(zoneName string) *ListVolumesOptions {
+ _options.ZoneName = core.StringPtr(zoneName)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -33218,13 +42206,13 @@ func (options *ListVolumesOptions) SetHeaders(param map[string]string) *ListVolu
// ListVPCAddressPrefixesOptions : The ListVPCAddressPrefixes options.
type ListVPCAddressPrefixesOptions struct {
// The VPC identifier.
- VPCID *string `validate:"required,ne="`
+ VPCID *string `json:"vpc_id" validate:"required,ne="`
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -33238,21 +42226,21 @@ func (*VpcV1) NewListVPCAddressPrefixesOptions(vpcID string) *ListVPCAddressPref
}
// SetVPCID : Allow user to set VPCID
-func (options *ListVPCAddressPrefixesOptions) SetVPCID(vpcID string) *ListVPCAddressPrefixesOptions {
- options.VPCID = core.StringPtr(vpcID)
- return options
+func (_options *ListVPCAddressPrefixesOptions) SetVPCID(vpcID string) *ListVPCAddressPrefixesOptions {
+ _options.VPCID = core.StringPtr(vpcID)
+ return _options
}
// SetStart : Allow user to set Start
-func (options *ListVPCAddressPrefixesOptions) SetStart(start string) *ListVPCAddressPrefixesOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListVPCAddressPrefixesOptions) SetStart(start string) *ListVPCAddressPrefixesOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListVPCAddressPrefixesOptions) SetLimit(limit int64) *ListVPCAddressPrefixesOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListVPCAddressPrefixesOptions) SetLimit(limit int64) *ListVPCAddressPrefixesOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -33264,16 +42252,16 @@ func (options *ListVPCAddressPrefixesOptions) SetHeaders(param map[string]string
// ListVPCRoutesOptions : The ListVPCRoutes options.
type ListVPCRoutesOptions struct {
// The VPC identifier.
- VPCID *string `validate:"required,ne="`
+ VPCID *string `json:"vpc_id" validate:"required,ne="`
// Filters the collection to resources in the zone with the exact specified name.
- ZoneName *string
+ ZoneName *string `json:"zone.name,omitempty"`
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -33287,27 +42275,27 @@ func (*VpcV1) NewListVPCRoutesOptions(vpcID string) *ListVPCRoutesOptions {
}
// SetVPCID : Allow user to set VPCID
-func (options *ListVPCRoutesOptions) SetVPCID(vpcID string) *ListVPCRoutesOptions {
- options.VPCID = core.StringPtr(vpcID)
- return options
+func (_options *ListVPCRoutesOptions) SetVPCID(vpcID string) *ListVPCRoutesOptions {
+ _options.VPCID = core.StringPtr(vpcID)
+ return _options
}
// SetZoneName : Allow user to set ZoneName
-func (options *ListVPCRoutesOptions) SetZoneName(zoneName string) *ListVPCRoutesOptions {
- options.ZoneName = core.StringPtr(zoneName)
- return options
+func (_options *ListVPCRoutesOptions) SetZoneName(zoneName string) *ListVPCRoutesOptions {
+ _options.ZoneName = core.StringPtr(zoneName)
+ return _options
}
// SetStart : Allow user to set Start
-func (options *ListVPCRoutesOptions) SetStart(start string) *ListVPCRoutesOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListVPCRoutesOptions) SetStart(start string) *ListVPCRoutesOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListVPCRoutesOptions) SetLimit(limit int64) *ListVPCRoutesOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListVPCRoutesOptions) SetLimit(limit int64) *ListVPCRoutesOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -33319,16 +42307,16 @@ func (options *ListVPCRoutesOptions) SetHeaders(param map[string]string) *ListVP
// ListVPCRoutingTableRoutesOptions : The ListVPCRoutingTableRoutes options.
type ListVPCRoutingTableRoutesOptions struct {
// The VPC identifier.
- VPCID *string `validate:"required,ne="`
+ VPCID *string `json:"vpc_id" validate:"required,ne="`
// The routing table identifier.
- RoutingTableID *string `validate:"required,ne="`
+ RoutingTableID *string `json:"routing_table_id" validate:"required,ne="`
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -33343,27 +42331,27 @@ func (*VpcV1) NewListVPCRoutingTableRoutesOptions(vpcID string, routingTableID s
}
// SetVPCID : Allow user to set VPCID
-func (options *ListVPCRoutingTableRoutesOptions) SetVPCID(vpcID string) *ListVPCRoutingTableRoutesOptions {
- options.VPCID = core.StringPtr(vpcID)
- return options
+func (_options *ListVPCRoutingTableRoutesOptions) SetVPCID(vpcID string) *ListVPCRoutingTableRoutesOptions {
+ _options.VPCID = core.StringPtr(vpcID)
+ return _options
}
// SetRoutingTableID : Allow user to set RoutingTableID
-func (options *ListVPCRoutingTableRoutesOptions) SetRoutingTableID(routingTableID string) *ListVPCRoutingTableRoutesOptions {
- options.RoutingTableID = core.StringPtr(routingTableID)
- return options
+func (_options *ListVPCRoutingTableRoutesOptions) SetRoutingTableID(routingTableID string) *ListVPCRoutingTableRoutesOptions {
+ _options.RoutingTableID = core.StringPtr(routingTableID)
+ return _options
}
// SetStart : Allow user to set Start
-func (options *ListVPCRoutingTableRoutesOptions) SetStart(start string) *ListVPCRoutingTableRoutesOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListVPCRoutingTableRoutesOptions) SetStart(start string) *ListVPCRoutingTableRoutesOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListVPCRoutingTableRoutesOptions) SetLimit(limit int64) *ListVPCRoutingTableRoutesOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListVPCRoutingTableRoutesOptions) SetLimit(limit int64) *ListVPCRoutingTableRoutesOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -33375,17 +42363,16 @@ func (options *ListVPCRoutingTableRoutesOptions) SetHeaders(param map[string]str
// ListVPCRoutingTablesOptions : The ListVPCRoutingTables options.
type ListVPCRoutingTablesOptions struct {
// The VPC identifier.
- VPCID *string `validate:"required,ne="`
+ VPCID *string `json:"vpc_id" validate:"required,ne="`
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
- // If the supplied value is `true`, filters the routing table collection to only the default routing table. If the
- // supplied value is `false`, filters the routing table collection to exclude the default routing table.
- IsDefault *bool
+ // Filters the collection to routing tables with the specified `is_default` value.
+ IsDefault *bool `json:"is_default,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -33399,27 +42386,27 @@ func (*VpcV1) NewListVPCRoutingTablesOptions(vpcID string) *ListVPCRoutingTables
}
// SetVPCID : Allow user to set VPCID
-func (options *ListVPCRoutingTablesOptions) SetVPCID(vpcID string) *ListVPCRoutingTablesOptions {
- options.VPCID = core.StringPtr(vpcID)
- return options
+func (_options *ListVPCRoutingTablesOptions) SetVPCID(vpcID string) *ListVPCRoutingTablesOptions {
+ _options.VPCID = core.StringPtr(vpcID)
+ return _options
}
// SetStart : Allow user to set Start
-func (options *ListVPCRoutingTablesOptions) SetStart(start string) *ListVPCRoutingTablesOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListVPCRoutingTablesOptions) SetStart(start string) *ListVPCRoutingTablesOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListVPCRoutingTablesOptions) SetLimit(limit int64) *ListVPCRoutingTablesOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListVPCRoutingTablesOptions) SetLimit(limit int64) *ListVPCRoutingTablesOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetIsDefault : Allow user to set IsDefault
-func (options *ListVPCRoutingTablesOptions) SetIsDefault(isDefault bool) *ListVPCRoutingTablesOptions {
- options.IsDefault = core.BoolPtr(isDefault)
- return options
+func (_options *ListVPCRoutingTablesOptions) SetIsDefault(isDefault bool) *ListVPCRoutingTablesOptions {
+ _options.IsDefault = core.BoolPtr(isDefault)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -33430,20 +42417,17 @@ func (options *ListVPCRoutingTablesOptions) SetHeaders(param map[string]string)
// ListVpcsOptions : The ListVpcs options.
type ListVpcsOptions struct {
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
- // Filters the collection to resources within one of the resource groups identified in a comma-separated list of
- // resource group identifiers.
- ResourceGroupID *string
+ // Filters the collection to resources in the resource group with the specified identifier.
+ ResourceGroupID *string `json:"resource_group.id,omitempty"`
- // The `classic_access` parameter filters the returned collection by the supplied field. If the supplied field is
- // `true`, only Classic Access VPCs will be returned. If the supplied field is `false`, only VPCs without Classic
- // Access will be returned.
- ClassicAccess *bool
+ // Filters the collection to VPCs with the specified `classic_access` value.
+ ClassicAccess *bool `json:"classic_access,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -33455,27 +42439,27 @@ func (*VpcV1) NewListVpcsOptions() *ListVpcsOptions {
}
// SetStart : Allow user to set Start
-func (options *ListVpcsOptions) SetStart(start string) *ListVpcsOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListVpcsOptions) SetStart(start string) *ListVpcsOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListVpcsOptions) SetLimit(limit int64) *ListVpcsOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListVpcsOptions) SetLimit(limit int64) *ListVpcsOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetResourceGroupID : Allow user to set ResourceGroupID
-func (options *ListVpcsOptions) SetResourceGroupID(resourceGroupID string) *ListVpcsOptions {
- options.ResourceGroupID = core.StringPtr(resourceGroupID)
- return options
+func (_options *ListVpcsOptions) SetResourceGroupID(resourceGroupID string) *ListVpcsOptions {
+ _options.ResourceGroupID = core.StringPtr(resourceGroupID)
+ return _options
}
// SetClassicAccess : Allow user to set ClassicAccess
-func (options *ListVpcsOptions) SetClassicAccess(classicAccess bool) *ListVpcsOptions {
- options.ClassicAccess = core.BoolPtr(classicAccess)
- return options
+func (_options *ListVpcsOptions) SetClassicAccess(classicAccess bool) *ListVpcsOptions {
+ _options.ClassicAccess = core.BoolPtr(classicAccess)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -33487,10 +42471,10 @@ func (options *ListVpcsOptions) SetHeaders(param map[string]string) *ListVpcsOpt
// ListVPNGatewayConnectionLocalCIDRsOptions : The ListVPNGatewayConnectionLocalCIDRs options.
type ListVPNGatewayConnectionLocalCIDRsOptions struct {
// The VPN gateway identifier.
- VPNGatewayID *string `validate:"required,ne="`
+ VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="`
// The VPN gateway connection identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -33505,15 +42489,15 @@ func (*VpcV1) NewListVPNGatewayConnectionLocalCIDRsOptions(vpnGatewayID string,
}
// SetVPNGatewayID : Allow user to set VPNGatewayID
-func (options *ListVPNGatewayConnectionLocalCIDRsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayConnectionLocalCIDRsOptions {
- options.VPNGatewayID = core.StringPtr(vpnGatewayID)
- return options
+func (_options *ListVPNGatewayConnectionLocalCIDRsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayConnectionLocalCIDRsOptions {
+ _options.VPNGatewayID = core.StringPtr(vpnGatewayID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *ListVPNGatewayConnectionLocalCIDRsOptions) SetID(id string) *ListVPNGatewayConnectionLocalCIDRsOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *ListVPNGatewayConnectionLocalCIDRsOptions) SetID(id string) *ListVPNGatewayConnectionLocalCIDRsOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -33525,10 +42509,10 @@ func (options *ListVPNGatewayConnectionLocalCIDRsOptions) SetHeaders(param map[s
// ListVPNGatewayConnectionPeerCIDRsOptions : The ListVPNGatewayConnectionPeerCIDRs options.
type ListVPNGatewayConnectionPeerCIDRsOptions struct {
// The VPN gateway identifier.
- VPNGatewayID *string `validate:"required,ne="`
+ VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="`
// The VPN gateway connection identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -33543,15 +42527,15 @@ func (*VpcV1) NewListVPNGatewayConnectionPeerCIDRsOptions(vpnGatewayID string, i
}
// SetVPNGatewayID : Allow user to set VPNGatewayID
-func (options *ListVPNGatewayConnectionPeerCIDRsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayConnectionPeerCIDRsOptions {
- options.VPNGatewayID = core.StringPtr(vpnGatewayID)
- return options
+func (_options *ListVPNGatewayConnectionPeerCIDRsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayConnectionPeerCIDRsOptions {
+ _options.VPNGatewayID = core.StringPtr(vpnGatewayID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *ListVPNGatewayConnectionPeerCIDRsOptions) SetID(id string) *ListVPNGatewayConnectionPeerCIDRsOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *ListVPNGatewayConnectionPeerCIDRsOptions) SetID(id string) *ListVPNGatewayConnectionPeerCIDRsOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -33563,10 +42547,10 @@ func (options *ListVPNGatewayConnectionPeerCIDRsOptions) SetHeaders(param map[st
// ListVPNGatewayConnectionsOptions : The ListVPNGatewayConnections options.
type ListVPNGatewayConnectionsOptions struct {
// The VPN gateway identifier.
- VPNGatewayID *string `validate:"required,ne="`
+ VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="`
// Filters the collection to VPN gateway connections with the specified status.
- Status *string
+ Status *string `json:"status,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -33580,15 +42564,15 @@ func (*VpcV1) NewListVPNGatewayConnectionsOptions(vpnGatewayID string) *ListVPNG
}
// SetVPNGatewayID : Allow user to set VPNGatewayID
-func (options *ListVPNGatewayConnectionsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayConnectionsOptions {
- options.VPNGatewayID = core.StringPtr(vpnGatewayID)
- return options
+func (_options *ListVPNGatewayConnectionsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayConnectionsOptions {
+ _options.VPNGatewayID = core.StringPtr(vpnGatewayID)
+ return _options
}
// SetStatus : Allow user to set Status
-func (options *ListVPNGatewayConnectionsOptions) SetStatus(status string) *ListVPNGatewayConnectionsOptions {
- options.Status = core.StringPtr(status)
- return options
+func (_options *ListVPNGatewayConnectionsOptions) SetStatus(status string) *ListVPNGatewayConnectionsOptions {
+ _options.Status = core.StringPtr(status)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -33599,18 +42583,17 @@ func (options *ListVPNGatewayConnectionsOptions) SetHeaders(param map[string]str
// ListVPNGatewaysOptions : The ListVPNGateways options.
type ListVPNGatewaysOptions struct {
- // A server-supplied token determining what resource to start the page on.
- Start *string
+ // A server-provided token determining what resource to start the page on.
+ Start *string `json:"start,omitempty"`
// The number of resources to return on a page.
- Limit *int64
+ Limit *int64 `json:"limit,omitempty"`
- // Filters the collection to resources within one of the resource groups identified in a comma-separated list of
- // resource group identifiers.
- ResourceGroupID *string
+ // Filters the collection to resources in the resource group with the specified identifier.
+ ResourceGroupID *string `json:"resource_group.id,omitempty"`
// Filters the collection to VPN gateways with the specified mode.
- Mode *string
+ Mode *string `json:"mode,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -33629,27 +42612,27 @@ func (*VpcV1) NewListVPNGatewaysOptions() *ListVPNGatewaysOptions {
}
// SetStart : Allow user to set Start
-func (options *ListVPNGatewaysOptions) SetStart(start string) *ListVPNGatewaysOptions {
- options.Start = core.StringPtr(start)
- return options
+func (_options *ListVPNGatewaysOptions) SetStart(start string) *ListVPNGatewaysOptions {
+ _options.Start = core.StringPtr(start)
+ return _options
}
// SetLimit : Allow user to set Limit
-func (options *ListVPNGatewaysOptions) SetLimit(limit int64) *ListVPNGatewaysOptions {
- options.Limit = core.Int64Ptr(limit)
- return options
+func (_options *ListVPNGatewaysOptions) SetLimit(limit int64) *ListVPNGatewaysOptions {
+ _options.Limit = core.Int64Ptr(limit)
+ return _options
}
// SetResourceGroupID : Allow user to set ResourceGroupID
-func (options *ListVPNGatewaysOptions) SetResourceGroupID(resourceGroupID string) *ListVPNGatewaysOptions {
- options.ResourceGroupID = core.StringPtr(resourceGroupID)
- return options
+func (_options *ListVPNGatewaysOptions) SetResourceGroupID(resourceGroupID string) *ListVPNGatewaysOptions {
+ _options.ResourceGroupID = core.StringPtr(resourceGroupID)
+ return _options
}
// SetMode : Allow user to set Mode
-func (options *ListVPNGatewaysOptions) SetMode(mode string) *ListVPNGatewaysOptions {
- options.Mode = core.StringPtr(mode)
- return options
+func (_options *ListVPNGatewaysOptions) SetMode(mode string) *ListVPNGatewaysOptions {
+ _options.Mode = core.StringPtr(mode)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -33694,9 +42677,9 @@ type LoadBalancer struct {
Pools []LoadBalancerPoolReference `json:"pools" validate:"required"`
// The private IP addresses assigned to this load balancer.
- PrivateIps []IP `json:"private_ips" validate:"required"`
+ PrivateIps []LoadBalancerPrivateIpsItem `json:"private_ips" validate:"required"`
- // The profile to use for this load balancer.
+ // The profile for this load balancer.
Profile *LoadBalancerProfileReference `json:"profile" validate:"required"`
// The provisioning status of this load balancer.
@@ -33710,6 +42693,14 @@ type LoadBalancer struct {
// The resource group for this load balancer.
ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+
+ // Indicates whether route mode is enabled for this load balancer.
+ //
+ // At present, public load balancers are not supported with route mode enabled.
+ RouteMode *bool `json:"route_mode" validate:"required"`
+
// The security groups targeting this load balancer.
//
// Applicable only for load balancers that support security groups.
@@ -33720,6 +42711,9 @@ type LoadBalancer struct {
// The subnets this load balancer is part of.
Subnets []SubnetReference `json:"subnets" validate:"required"`
+
+ // Indicates whether this load balancer supports UDP.
+ UDPSupported *bool `json:"udp_supported" validate:"required"`
}
// Constants associated with the LoadBalancer.OperatingStatus property.
@@ -33740,6 +42734,12 @@ const (
LoadBalancerProvisioningStatusUpdatePendingConst = "update_pending"
)
+// Constants associated with the LoadBalancer.ResourceType property.
+// The resource type.
+const (
+ LoadBalancerResourceTypeLoadBalancerConst = "load_balancer"
+)
+
// UnmarshalLoadBalancer unmarshals an instance of LoadBalancer from the specified map of raw messages.
func UnmarshalLoadBalancer(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(LoadBalancer)
@@ -33787,7 +42787,7 @@ func UnmarshalLoadBalancer(m map[string]json.RawMessage, result interface{}) (er
if err != nil {
return
}
- err = core.UnmarshalModel(m, "private_ips", &obj.PrivateIps, UnmarshalIP)
+ err = core.UnmarshalModel(m, "private_ips", &obj.PrivateIps, UnmarshalLoadBalancerPrivateIpsItem)
if err != nil {
return
}
@@ -33807,6 +42807,14 @@ func UnmarshalLoadBalancer(m map[string]json.RawMessage, result interface{}) (er
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "route_mode", &obj.RouteMode)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupReference)
if err != nil {
return
@@ -33819,23 +42827,102 @@ func UnmarshalLoadBalancer(m map[string]json.RawMessage, result interface{}) (er
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "udp_supported", &obj.UDPSupported)
+ if err != nil {
+ return
+ }
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
// LoadBalancerCollection : LoadBalancerCollection struct
type LoadBalancerCollection struct {
+ // A link to the first page of resources.
+ First *LoadBalancerCollectionFirst `json:"first" validate:"required"`
+
+ // The maximum number of resources that can be returned by the request.
+ Limit *int64 `json:"limit" validate:"required"`
+
// Collection of load balancers.
LoadBalancers []LoadBalancer `json:"load_balancers" validate:"required"`
+
+ // A link to the next page of resources. This property is present for all pages
+ // except the last page.
+ Next *LoadBalancerCollectionNext `json:"next,omitempty"`
+
+ // The total number of resources across all pages.
+ TotalCount *int64 `json:"total_count" validate:"required"`
}
// UnmarshalLoadBalancerCollection unmarshals an instance of LoadBalancerCollection from the specified map of raw messages.
func UnmarshalLoadBalancerCollection(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(LoadBalancerCollection)
+ err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalLoadBalancerCollectionFirst)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "load_balancers", &obj.LoadBalancers, UnmarshalLoadBalancer)
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalLoadBalancerCollectionNext)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *LoadBalancerCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
+// LoadBalancerCollectionFirst : A link to the first page of resources.
+type LoadBalancerCollectionFirst struct {
+ // The URL for a page of resources.
+ Href *string `json:"href" validate:"required"`
+}
+
+// UnmarshalLoadBalancerCollectionFirst unmarshals an instance of LoadBalancerCollectionFirst from the specified map of raw messages.
+func UnmarshalLoadBalancerCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(LoadBalancerCollectionFirst)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// LoadBalancerCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
+type LoadBalancerCollectionNext struct {
+ // The URL for a page of resources.
+ Href *string `json:"href" validate:"required"`
+}
+
+// UnmarshalLoadBalancerCollectionNext unmarshals an instance of LoadBalancerCollectionNext from the specified map of raw messages.
+func UnmarshalLoadBalancerCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(LoadBalancerCollectionNext)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
@@ -33886,7 +42973,11 @@ func UnmarshalLoadBalancerIdentity(m map[string]json.RawMessage, result interfac
// LoadBalancerListener : LoadBalancerListener struct
type LoadBalancerListener struct {
// If set to `true`, this listener will accept and forward PROXY protocol information. Supported by load balancers in
- // the `application` family (otherwise always `false`).
+ // the `application` family (otherwise always `false`). Additional restrictions:
+ // - If this listener has `https_redirect` specified, its `accept_proxy_protocol` value must
+ // match the `accept_proxy_protocol` value of the `https_redirect` listener.
+ // - If this listener is the target of another listener's `https_redirect`, its
+ // `accept_proxy_protocol` value must match that listener's `accept_proxy_protocol` value.
AcceptProxyProtocol *bool `json:"accept_proxy_protocol" validate:"required"`
// The certificate instance used for SSL termination. It is applicable only to `https`
@@ -33899,25 +42990,41 @@ type LoadBalancerListener struct {
// The date and time that this listener was created.
CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
- // The default pool associated with the listener.
+ // The default pool for this listener. If absent, this listener has no default pool.
DefaultPool *LoadBalancerPoolReference `json:"default_pool,omitempty"`
// The listener's canonical URL.
Href *string `json:"href" validate:"required"`
+ // If specified, the target listener that requests are redirected to.
+ HTTPSRedirect *LoadBalancerListenerHTTPSRedirect `json:"https_redirect,omitempty"`
+
// The unique identifier for this load balancer listener.
ID *string `json:"id" validate:"required"`
- // An array of policies for this listener.
+ // The policies for this listener.
Policies []LoadBalancerListenerPolicyReference `json:"policies,omitempty"`
- // The listener port number. Each listener in the load balancer must have a unique
- // `port` and `protocol` combination.
+ // The listener port number, or the inclusive lower bound of the port range.
Port *int64 `json:"port" validate:"required"`
- // The listener protocol. Load balancers in the `network` family support `tcp`. Load balancers in the `application`
- // family support `tcp`, `http`, and `https`. Each listener in the load balancer must have a unique `port` and
- // `protocol` combination.
+ // The inclusive upper bound of the range of ports used by this listener.
+ //
+ // At present, only load balancers in the `network` family support more than one port per listener.
+ PortMax *int64 `json:"port_max" validate:"required"`
+
+ // The inclusive lower bound of the range of ports used by this listener.
+ //
+ // At present, only load balancers in the `network` family support more than one port per listener.
+ PortMin *int64 `json:"port_min" validate:"required"`
+
+ // The listener protocol. Load balancers in the `network` family support `tcp` and
+ // `udp` (if `udp_supported` is `true`). Load balancers in the `application` family support `tcp`, `http`, and `https`.
+ // Each listener in the load balancer must have a unique `port` and `protocol` combination.
+ //
+ // The enumerated values for this property are expected to expand in the future. When processing this property, check
+ // for and log unknown values. Optionally halt processing and surface the error, or bypass the listener on which the
+ // unexpected property value was encountered.
Protocol *string `json:"protocol" validate:"required"`
// The provisioning status of this listener.
@@ -33925,13 +43032,18 @@ type LoadBalancerListener struct {
}
// Constants associated with the LoadBalancerListener.Protocol property.
-// The listener protocol. Load balancers in the `network` family support `tcp`. Load balancers in the `application`
-// family support `tcp`, `http`, and `https`. Each listener in the load balancer must have a unique `port` and
-// `protocol` combination.
+// The listener protocol. Load balancers in the `network` family support `tcp` and
+// `udp` (if `udp_supported` is `true`). Load balancers in the `application` family support `tcp`, `http`, and `https`.
+// Each listener in the load balancer must have a unique `port` and `protocol` combination.
+//
+// The enumerated values for this property are expected to expand in the future. When processing this property, check
+// for and log unknown values. Optionally halt processing and surface the error, or bypass the listener on which the
+// unexpected property value was encountered.
const (
LoadBalancerListenerProtocolHTTPConst = "http"
LoadBalancerListenerProtocolHTTPSConst = "https"
LoadBalancerListenerProtocolTCPConst = "tcp"
+ LoadBalancerListenerProtocolUDPConst = "udp"
)
// Constants associated with the LoadBalancerListener.ProvisioningStatus property.
@@ -33972,6 +43084,10 @@ func UnmarshalLoadBalancerListener(m map[string]json.RawMessage, result interfac
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "https_redirect", &obj.HTTPSRedirect, UnmarshalLoadBalancerListenerHTTPSRedirect)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "id", &obj.ID)
if err != nil {
return
@@ -33984,6 +43100,14 @@ func UnmarshalLoadBalancerListener(m map[string]json.RawMessage, result interfac
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "port_max", &obj.PortMax)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "port_min", &obj.PortMin)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
if err != nil {
return
@@ -34013,10 +43137,151 @@ func UnmarshalLoadBalancerListenerCollection(m map[string]json.RawMessage, resul
return
}
+// LoadBalancerListenerHTTPSRedirect : LoadBalancerListenerHTTPSRedirect struct
+type LoadBalancerListenerHTTPSRedirect struct {
+ // The HTTP status code for this redirect.
+ HTTPStatusCode *int64 `json:"http_status_code" validate:"required"`
+
+ Listener *LoadBalancerListenerReference `json:"listener" validate:"required"`
+
+ // The redirect relative target URI.
+ URI *string `json:"uri,omitempty"`
+}
+
+// UnmarshalLoadBalancerListenerHTTPSRedirect unmarshals an instance of LoadBalancerListenerHTTPSRedirect from the specified map of raw messages.
+func UnmarshalLoadBalancerListenerHTTPSRedirect(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(LoadBalancerListenerHTTPSRedirect)
+ err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "listener", &obj.Listener, UnmarshalLoadBalancerListenerReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "uri", &obj.URI)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// LoadBalancerListenerHTTPSRedirectPatch : LoadBalancerListenerHTTPSRedirectPatch struct
+type LoadBalancerListenerHTTPSRedirectPatch struct {
+ // The HTTP status code for this redirect.
+ HTTPStatusCode *int64 `json:"http_status_code,omitempty"`
+
+ // Identifies a load balancer listener by a unique property.
+ Listener LoadBalancerListenerIdentityIntf `json:"listener,omitempty"`
+
+ // The redirect relative target URI.
+ URI *string `json:"uri,omitempty"`
+}
+
+// UnmarshalLoadBalancerListenerHTTPSRedirectPatch unmarshals an instance of LoadBalancerListenerHTTPSRedirectPatch from the specified map of raw messages.
+func UnmarshalLoadBalancerListenerHTTPSRedirectPatch(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(LoadBalancerListenerHTTPSRedirectPatch)
+ err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "listener", &obj.Listener, UnmarshalLoadBalancerListenerIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "uri", &obj.URI)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// LoadBalancerListenerHTTPSRedirectPrototype : LoadBalancerListenerHTTPSRedirectPrototype struct
+type LoadBalancerListenerHTTPSRedirectPrototype struct {
+ // The HTTP status code for this redirect.
+ HTTPStatusCode *int64 `json:"http_status_code" validate:"required"`
+
+ // Identifies a load balancer listener by a unique property.
+ Listener LoadBalancerListenerIdentityIntf `json:"listener" validate:"required"`
+
+ // The redirect relative target URI.
+ URI *string `json:"uri,omitempty"`
+}
+
+// NewLoadBalancerListenerHTTPSRedirectPrototype : Instantiate LoadBalancerListenerHTTPSRedirectPrototype (Generic Model Constructor)
+func (*VpcV1) NewLoadBalancerListenerHTTPSRedirectPrototype(httpStatusCode int64, listener LoadBalancerListenerIdentityIntf) (_model *LoadBalancerListenerHTTPSRedirectPrototype, err error) {
+ _model = &LoadBalancerListenerHTTPSRedirectPrototype{
+ HTTPStatusCode: core.Int64Ptr(httpStatusCode),
+ Listener: listener,
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+// UnmarshalLoadBalancerListenerHTTPSRedirectPrototype unmarshals an instance of LoadBalancerListenerHTTPSRedirectPrototype from the specified map of raw messages.
+func UnmarshalLoadBalancerListenerHTTPSRedirectPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(LoadBalancerListenerHTTPSRedirectPrototype)
+ err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "listener", &obj.Listener, UnmarshalLoadBalancerListenerIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "uri", &obj.URI)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// LoadBalancerListenerIdentity : Identifies a load balancer listener by a unique property.
+// Models which "extend" this model:
+// - LoadBalancerListenerIdentityByID
+// - LoadBalancerListenerIdentityByHref
+type LoadBalancerListenerIdentity struct {
+ // The unique identifier for this load balancer listener.
+ ID *string `json:"id,omitempty"`
+
+ // The listener's canonical URL.
+ Href *string `json:"href,omitempty"`
+}
+
+func (*LoadBalancerListenerIdentity) isaLoadBalancerListenerIdentity() bool {
+ return true
+}
+
+type LoadBalancerListenerIdentityIntf interface {
+ isaLoadBalancerListenerIdentity() bool
+}
+
+// UnmarshalLoadBalancerListenerIdentity unmarshals an instance of LoadBalancerListenerIdentity from the specified map of raw messages.
+func UnmarshalLoadBalancerListenerIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(LoadBalancerListenerIdentity)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// LoadBalancerListenerPatch : LoadBalancerListenerPatch struct
type LoadBalancerListenerPatch struct {
// If set to `true`, this listener will accept and forward PROXY protocol information. Supported by load balancers in
- // the `application` family (otherwise always `false`).
+ // the `application` family (otherwise always `false`). Additional restrictions:
+ // - If this listener has `https_redirect` specified, its `accept_proxy_protocol` value must
+ // match the `accept_proxy_protocol` value of the `https_redirect` listener.
+ // - If this listener is the target of another listener's `https_redirect`, its
+ // `accept_proxy_protocol` value must match that listener's `accept_proxy_protocol` value.
AcceptProxyProtocol *bool `json:"accept_proxy_protocol,omitempty"`
// The certificate instance used for SSL termination. It is applicable only to `https`
@@ -34026,31 +43291,73 @@ type LoadBalancerListenerPatch struct {
// The connection limit of the listener.
ConnectionLimit *int64 `json:"connection_limit,omitempty"`
- // The default pool associated with the listener. The specified pool must:
+ // The default pool for this listener. The specified pool must:
//
// - Belong to this load balancer
- // - Have the same `protocol` as this listener
- // - Not already be the default pool for another listener.
+ // - Have the same `protocol` as this listener, or have a compatible protocol.
+ // At present, the compatible protocols are `http` and `https`.
+ // - Not already be the `default_pool` for another listener
+ //
+ // Specify `null` to remove an existing default pool.
DefaultPool LoadBalancerPoolIdentityIntf `json:"default_pool,omitempty"`
- // The listener port number. Each listener in the load balancer must have a unique
- // `port` and `protocol` combination.
+ // The target listener that requests will be redirected to. This listener must have a
+ // `protocol` of `http`, and the target listener must have a `protocol` of `https`.
+ //
+ // Specify `null` to remove any existing https redirect.
+ HTTPSRedirect *LoadBalancerListenerHTTPSRedirectPatch `json:"https_redirect,omitempty"`
+
+ // The listener port number, or the inclusive lower bound of the port range. Each listener in the load balancer must
+ // have a unique `port` and `protocol` combination.
+ //
+ // Not supported for load balancers operating with route mode enabled.
Port *int64 `json:"port,omitempty"`
- // The listener protocol. Load balancers in the `network` family support `tcp`. Load balancers in the `application`
- // family support `tcp`, `http`, and `https`. Each listener in the load balancer must have a unique `port` and
- // `protocol` combination.
+ // The inclusive upper bound of the range of ports used by this listener. Must not be less than `port_min`.
+ //
+ // At present, only load balancers operating with route mode enabled, and public load balancers in the `network` family
+ // support different values for `port_min` and
+ // `port_max`. When route mode is enabled, the value `65535` must be specified.
+ //
+ // The specified port range must not overlap with port ranges used by other listeners for this load balancer using the
+ // same protocol.
+ PortMax *int64 `json:"port_max,omitempty"`
+
+ // The inclusive lower bound of the range of ports used by this listener. Must not be greater than `port_max`.
+ //
+ // At present, only load balancers operating with route mode enabled, and public load balancers in the `network` family
+ // support different values for `port_min` and
+ // `port_max`. When route mode is enabled, the value `1` must be specified.
+ //
+ // The specified port range must not overlap with port ranges used by other listeners for this load balancer using the
+ // same protocol.
+ PortMin *int64 `json:"port_min,omitempty"`
+
+ // The listener protocol. Each listener in the load balancer must have a unique `port` and `protocol` combination.
+ // Additional restrictions:
+ // - If this load balancer is in the `network` family, the protocol must be `tcp`
+ // or `udp` (if `udp_supported` is `true`) , and it cannot be changed while
+ // `default_pool` is set.
+ // - If `https_redirect` is set, the protocol must be `http`.
+ // - If this listener is a listener's `https_redirect` target, the protocol must be
+ // `https`.
Protocol *string `json:"protocol,omitempty"`
}
// Constants associated with the LoadBalancerListenerPatch.Protocol property.
-// The listener protocol. Load balancers in the `network` family support `tcp`. Load balancers in the `application`
-// family support `tcp`, `http`, and `https`. Each listener in the load balancer must have a unique `port` and
-// `protocol` combination.
+// The listener protocol. Each listener in the load balancer must have a unique `port` and `protocol` combination.
+// Additional restrictions:
+// - If this load balancer is in the `network` family, the protocol must be `tcp`
+// or `udp` (if `udp_supported` is `true`) , and it cannot be changed while
+// `default_pool` is set.
+// - If `https_redirect` is set, the protocol must be `http`.
+// - If this listener is a listener's `https_redirect` target, the protocol must be
+// `https`.
const (
LoadBalancerListenerPatchProtocolHTTPConst = "http"
LoadBalancerListenerPatchProtocolHTTPSConst = "https"
LoadBalancerListenerPatchProtocolTCPConst = "tcp"
+ LoadBalancerListenerPatchProtocolUDPConst = "udp"
)
// UnmarshalLoadBalancerListenerPatch unmarshals an instance of LoadBalancerListenerPatch from the specified map of raw messages.
@@ -34072,10 +43379,22 @@ func UnmarshalLoadBalancerListenerPatch(m map[string]json.RawMessage, result int
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "https_redirect", &obj.HTTPSRedirect, UnmarshalLoadBalancerListenerHTTPSRedirectPatch)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "port", &obj.Port)
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "port_max", &obj.PortMax)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "port_min", &obj.PortMin)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
if err != nil {
return
@@ -34085,11 +43404,11 @@ func UnmarshalLoadBalancerListenerPatch(m map[string]json.RawMessage, result int
}
// AsPatch returns a generic map representation of the LoadBalancerListenerPatch
-func (loadBalancerListenerPatch *LoadBalancerListenerPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (loadBalancerListenerPatch *LoadBalancerListenerPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(loadBalancerListenerPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -34097,6 +43416,10 @@ func (loadBalancerListenerPatch *LoadBalancerListenerPatch) AsPatch() (patch map
// LoadBalancerListenerPolicy : LoadBalancerListenerPolicy struct
type LoadBalancerListenerPolicy struct {
// The policy action.
+ //
+ // The enumerated values for this property are expected to expand in the future. When processing this property, check
+ // for and log unknown values. Optionally halt processing and surface the error, or bypass the policy on which the
+ // unexpected property value was encountered.
Action *string `json:"action" validate:"required"`
// The date and time that this policy was created.
@@ -34117,20 +43440,26 @@ type LoadBalancerListenerPolicy struct {
// The provisioning status of this policy.
ProvisioningStatus *string `json:"provisioning_status" validate:"required"`
- // The rules of this policy.
+ // The rules for this policy.
Rules []LoadBalancerListenerPolicyRuleReference `json:"rules" validate:"required"`
- // `LoadBalancerPoolReference` is in the response if `action` is `forward`.
- // `LoadBalancerListenerPolicyRedirectURL` is in the response if `action` is `redirect`.
+ // - If `action` is `forward`, the response is a `LoadBalancerPoolReference`
+ // - If `action` is `redirect`, the response is a `LoadBalancerListenerPolicyRedirectURL`
+ // - If `action` is `https_redirect`, the response is a `LoadBalancerListenerHTTPSRedirect`.
Target LoadBalancerListenerPolicyTargetIntf `json:"target,omitempty"`
}
// Constants associated with the LoadBalancerListenerPolicy.Action property.
// The policy action.
+//
+// The enumerated values for this property are expected to expand in the future. When processing this property, check
+// for and log unknown values. Optionally halt processing and surface the error, or bypass the policy on which the
+// unexpected property value was encountered.
const (
- LoadBalancerListenerPolicyActionForwardConst = "forward"
- LoadBalancerListenerPolicyActionRedirectConst = "redirect"
- LoadBalancerListenerPolicyActionRejectConst = "reject"
+ LoadBalancerListenerPolicyActionForwardConst = "forward"
+ LoadBalancerListenerPolicyActionHTTPSRedirectConst = "https_redirect"
+ LoadBalancerListenerPolicyActionRedirectConst = "redirect"
+ LoadBalancerListenerPolicyActionRejectConst = "reject"
)
// Constants associated with the LoadBalancerListenerPolicy.ProvisioningStatus property.
@@ -34212,10 +43541,10 @@ type LoadBalancerListenerPolicyPatch struct {
// Priority of the policy. Lower value indicates higher priority.
Priority *int64 `json:"priority,omitempty"`
- // When `action` is `forward`, `LoadBalancerPoolIdentity` specifies which pool the load
- // balancer forwards the traffic to. When `action` is `redirect`,
- // `LoadBalancerListenerPolicyRedirectURLPatch` specifies the url and http
- // status code used in the redirect response.
+ // - If `action` is `forward`, specify a `LoadBalancerPoolIdentity`.
+ // - If `action` is `redirect`, specify a `LoadBalancerListenerPolicyRedirectURLPatch`.
+ // - If `action` is `https_redirect`, specify a
+ // `LoadBalancerListenerPolicyHTTPSRedirectPatch`.
Target LoadBalancerListenerPolicyTargetPatchIntf `json:"target,omitempty"`
}
@@ -34239,11 +43568,11 @@ func UnmarshalLoadBalancerListenerPolicyPatch(m map[string]json.RawMessage, resu
}
// AsPatch returns a generic map representation of the LoadBalancerListenerPolicyPatch
-func (loadBalancerListenerPolicyPatch *LoadBalancerListenerPolicyPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (loadBalancerListenerPolicyPatch *LoadBalancerListenerPolicyPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(loadBalancerListenerPolicyPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -34251,6 +43580,10 @@ func (loadBalancerListenerPolicyPatch *LoadBalancerListenerPolicyPatch) AsPatch(
// LoadBalancerListenerPolicyPrototype : LoadBalancerListenerPolicyPrototype struct
type LoadBalancerListenerPolicyPrototype struct {
// The policy action.
+ //
+ // The enumerated values for this property are expected to expand in the future. When processing this property, check
+ // for and log unknown values. Optionally halt processing and surface the error, or bypass the policy on which the
+ // unexpected property value was encountered.
Action *string `json:"action" validate:"required"`
// The user-defined name for this policy. Names must be unique within the load balancer listener the policy resides in.
@@ -34259,31 +43592,36 @@ type LoadBalancerListenerPolicyPrototype struct {
// Priority of the policy. Lower value indicates higher priority.
Priority *int64 `json:"priority" validate:"required"`
- // An array of rules for this policy.
+ // The rule prototype objects for this policy.
Rules []LoadBalancerListenerPolicyRulePrototype `json:"rules,omitempty"`
- // When `action` is `forward`, `LoadBalancerPoolIdentity` is required to specify which
- // pool the load balancer forwards the traffic to. When `action` is `redirect`,
- // `LoadBalancerListenerPolicyRedirectURLPrototype` is required to specify the url and
- // http status code used in the redirect response.
+ // - If `action` is `forward`, specify a `LoadBalancerPoolIdentity`.
+ // - If `action` is `redirect`, specify a `LoadBalancerListenerPolicyRedirectURLPrototype`.
+ // - If `action` is `https_redirect`, specify a
+ // `LoadBalancerListenerPolicyHTTPSRedirectPrototype`.
Target LoadBalancerListenerPolicyTargetPrototypeIntf `json:"target,omitempty"`
}
// Constants associated with the LoadBalancerListenerPolicyPrototype.Action property.
// The policy action.
+//
+// The enumerated values for this property are expected to expand in the future. When processing this property, check
+// for and log unknown values. Optionally halt processing and surface the error, or bypass the policy on which the
+// unexpected property value was encountered.
const (
- LoadBalancerListenerPolicyPrototypeActionForwardConst = "forward"
- LoadBalancerListenerPolicyPrototypeActionRedirectConst = "redirect"
- LoadBalancerListenerPolicyPrototypeActionRejectConst = "reject"
+ LoadBalancerListenerPolicyPrototypeActionForwardConst = "forward"
+ LoadBalancerListenerPolicyPrototypeActionHTTPSRedirectConst = "https_redirect"
+ LoadBalancerListenerPolicyPrototypeActionRedirectConst = "redirect"
+ LoadBalancerListenerPolicyPrototypeActionRejectConst = "reject"
)
// NewLoadBalancerListenerPolicyPrototype : Instantiate LoadBalancerListenerPolicyPrototype (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerListenerPolicyPrototype(action string, priority int64) (model *LoadBalancerListenerPolicyPrototype, err error) {
- model = &LoadBalancerListenerPolicyPrototype{
+func (*VpcV1) NewLoadBalancerListenerPolicyPrototype(action string, priority int64) (_model *LoadBalancerListenerPolicyPrototype, err error) {
+ _model = &LoadBalancerListenerPolicyPrototype{
Action: core.StringPtr(action),
Priority: core.Int64Ptr(priority),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -34374,7 +43712,7 @@ type LoadBalancerListenerPolicyRule struct {
// The field. This is applicable to `header`, `query`, and `body` rule types.
//
- // If the rule type is `header`, this field is required.
+ // If the rule type is `header`, this property is required.
//
// If the rule type is `query`, this is optional. If specified and the rule condition is not
// `matches_regex`, the value must be percent-encoded.
@@ -34496,7 +43834,7 @@ type LoadBalancerListenerPolicyRulePatch struct {
// The field. This is applicable to `header`, `query`, and `body` rule types.
//
- // If the rule type is `header`, this field is required.
+ // If the rule type is `header`, this property is required.
//
// If the rule type is `query`, this is optional. If specified and the rule condition is not
// `matches_regex`, the value must be percent-encoded.
@@ -34559,11 +43897,11 @@ func UnmarshalLoadBalancerListenerPolicyRulePatch(m map[string]json.RawMessage,
}
// AsPatch returns a generic map representation of the LoadBalancerListenerPolicyRulePatch
-func (loadBalancerListenerPolicyRulePatch *LoadBalancerListenerPolicyRulePatch) AsPatch() (patch map[string]interface{}, err error) {
+func (loadBalancerListenerPolicyRulePatch *LoadBalancerListenerPolicyRulePatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(loadBalancerListenerPolicyRulePatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -34575,7 +43913,7 @@ type LoadBalancerListenerPolicyRulePrototype struct {
// The field. This is applicable to `header`, `query`, and `body` rule types.
//
- // If the rule type is `header`, this field is required.
+ // If the rule type is `header`, this property is required.
//
// If the rule type is `query`, this is optional. If specified and the rule condition is not
// `matches_regex`, the value must be percent-encoded.
@@ -34615,13 +43953,13 @@ const (
)
// NewLoadBalancerListenerPolicyRulePrototype : Instantiate LoadBalancerListenerPolicyRulePrototype (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerListenerPolicyRulePrototype(condition string, typeVar string, value string) (model *LoadBalancerListenerPolicyRulePrototype, err error) {
- model = &LoadBalancerListenerPolicyRulePrototype{
+func (*VpcV1) NewLoadBalancerListenerPolicyRulePrototype(condition string, typeVar string, value string) (_model *LoadBalancerListenerPolicyRulePrototype, err error) {
+ _model = &LoadBalancerListenerPolicyRulePrototype{
Condition: core.StringPtr(condition),
Type: core.StringPtr(typeVar),
Value: core.StringPtr(value),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -34698,11 +44036,13 @@ func UnmarshalLoadBalancerListenerPolicyRuleReferenceDeleted(m map[string]json.R
return
}
-// LoadBalancerListenerPolicyTarget : `LoadBalancerPoolReference` is in the response if `action` is `forward`.
-// `LoadBalancerListenerPolicyRedirectURL` is in the response if `action` is `redirect`.
+// LoadBalancerListenerPolicyTarget : - If `action` is `forward`, the response is a `LoadBalancerPoolReference`
+// - If `action` is `redirect`, the response is a `LoadBalancerListenerPolicyRedirectURL`
+// - If `action` is `https_redirect`, the response is a `LoadBalancerListenerHTTPSRedirect`.
// Models which "extend" this model:
// - LoadBalancerListenerPolicyTargetLoadBalancerPoolReference
// - LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL
+// - LoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect
type LoadBalancerListenerPolicyTarget struct {
// If present, this property indicates the referenced resource has been deleted and provides
// some supplementary information.
@@ -34717,11 +44057,16 @@ type LoadBalancerListenerPolicyTarget struct {
// The user-defined name for this load balancer pool.
Name *string `json:"name,omitempty"`
- // The http status code in the redirect response.
+ // The HTTP status code for this redirect.
HTTPStatusCode *int64 `json:"http_status_code,omitempty"`
// The redirect target URL.
URL *string `json:"url,omitempty"`
+
+ Listener *LoadBalancerListenerReference `json:"listener,omitempty"`
+
+ // The redirect relative target URI.
+ URI *string `json:"uri,omitempty"`
}
func (*LoadBalancerListenerPolicyTarget) isaLoadBalancerListenerPolicyTarget() bool {
@@ -34759,16 +44104,26 @@ func UnmarshalLoadBalancerListenerPolicyTarget(m map[string]json.RawMessage, res
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "listener", &obj.Listener, UnmarshalLoadBalancerListenerReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "uri", &obj.URI)
+ if err != nil {
+ return
+ }
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
-// LoadBalancerListenerPolicyTargetPatch : When `action` is `forward`, `LoadBalancerPoolIdentity` specifies which pool the load balancer forwards the traffic
-// to. When `action` is `redirect`,
-// `LoadBalancerListenerPolicyRedirectURLPatch` specifies the url and http status code used in the redirect response.
+// LoadBalancerListenerPolicyTargetPatch : - If `action` is `forward`, specify a `LoadBalancerPoolIdentity`.
+// - If `action` is `redirect`, specify a `LoadBalancerListenerPolicyRedirectURLPatch`.
+// - If `action` is `https_redirect`, specify a
+// `LoadBalancerListenerPolicyHTTPSRedirectPatch`.
// Models which "extend" this model:
// - LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity
// - LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch
+// - LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch
type LoadBalancerListenerPolicyTargetPatch struct {
// The unique identifier for this load balancer pool.
ID *string `json:"id,omitempty"`
@@ -34776,11 +44131,17 @@ type LoadBalancerListenerPolicyTargetPatch struct {
// The pool's canonical URL.
Href *string `json:"href,omitempty"`
- // The http status code in the redirect response.
+ // The HTTP status code for this redirect.
HTTPStatusCode *int64 `json:"http_status_code,omitempty"`
// The redirect target URL.
URL *string `json:"url,omitempty"`
+
+ // Identifies a load balancer listener by a unique property.
+ Listener LoadBalancerListenerIdentityIntf `json:"listener,omitempty"`
+
+ // The redirect relative target URI.
+ URI *string `json:"uri,omitempty"`
}
func (*LoadBalancerListenerPolicyTargetPatch) isaLoadBalancerListenerPolicyTargetPatch() bool {
@@ -34810,17 +44171,26 @@ func UnmarshalLoadBalancerListenerPolicyTargetPatch(m map[string]json.RawMessage
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "listener", &obj.Listener, UnmarshalLoadBalancerListenerIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "uri", &obj.URI)
+ if err != nil {
+ return
+ }
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
-// LoadBalancerListenerPolicyTargetPrototype : When `action` is `forward`, `LoadBalancerPoolIdentity` is required to specify which pool the load balancer forwards
-// the traffic to. When `action` is `redirect`,
-// `LoadBalancerListenerPolicyRedirectURLPrototype` is required to specify the url and http status code used in the
-// redirect response.
+// LoadBalancerListenerPolicyTargetPrototype : - If `action` is `forward`, specify a `LoadBalancerPoolIdentity`.
+// - If `action` is `redirect`, specify a `LoadBalancerListenerPolicyRedirectURLPrototype`.
+// - If `action` is `https_redirect`, specify a
+// `LoadBalancerListenerPolicyHTTPSRedirectPrototype`.
// Models which "extend" this model:
// - LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity
// - LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype
+// - LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype
type LoadBalancerListenerPolicyTargetPrototype struct {
// The unique identifier for this load balancer pool.
ID *string `json:"id,omitempty"`
@@ -34828,11 +44198,17 @@ type LoadBalancerListenerPolicyTargetPrototype struct {
// The pool's canonical URL.
Href *string `json:"href,omitempty"`
- // The http status code in the redirect response.
+ // The HTTP status code for this redirect.
HTTPStatusCode *int64 `json:"http_status_code,omitempty"`
// The redirect target URL.
URL *string `json:"url,omitempty"`
+
+ // Identifies a load balancer listener by a unique property.
+ Listener LoadBalancerListenerIdentityIntf `json:"listener,omitempty"`
+
+ // The redirect relative target URI.
+ URI *string `json:"uri,omitempty"`
}
func (*LoadBalancerListenerPolicyTargetPrototype) isaLoadBalancerListenerPolicyTargetPrototype() bool {
@@ -34862,6 +44238,14 @@ func UnmarshalLoadBalancerListenerPolicyTargetPrototype(m map[string]json.RawMes
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "listener", &obj.Listener, UnmarshalLoadBalancerListenerIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "uri", &obj.URI)
+ if err != nil {
+ return
+ }
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
@@ -34869,42 +44253,81 @@ func UnmarshalLoadBalancerListenerPolicyTargetPrototype(m map[string]json.RawMes
// LoadBalancerListenerPrototypeLoadBalancerContext : LoadBalancerListenerPrototypeLoadBalancerContext struct
type LoadBalancerListenerPrototypeLoadBalancerContext struct {
// If set to `true`, this listener will accept and forward PROXY protocol information. Supported by load balancers in
- // the `application` family (otherwise always `false`).
+ // the `application` family (otherwise always `false`). Additional restrictions:
+ // - If this listener has `https_redirect` specified, its `accept_proxy_protocol` value must
+ // match the `accept_proxy_protocol` value of the `https_redirect` listener.
+ // - If this listener is the target of another listener's `https_redirect`, its
+ // `accept_proxy_protocol` value must match that listener's `accept_proxy_protocol` value.
AcceptProxyProtocol *bool `json:"accept_proxy_protocol,omitempty"`
// The connection limit of the listener.
ConnectionLimit *int64 `json:"connection_limit,omitempty"`
- // The default pool associated with the listener.
+ // The default pool for this listener. If specified, the pool's protocol must match the
+ // listener's protocol, or the protocols must be compatible. At present, the compatible
+ // protocols are `http` and `https`.
+ //
+ // If unspecified, this listener will be created with no default pool, but one may be
+ // subsequently set.
DefaultPool *LoadBalancerPoolIdentityByName `json:"default_pool,omitempty"`
- // The listener port number. Each listener in the load balancer must have a unique
- // `port` and `protocol` combination.
- Port *int64 `json:"port" validate:"required"`
+ // The listener port number, or the inclusive lower bound of the port range. Each listener in the load balancer must
+ // have a unique `port` and `protocol` combination.
+ //
+ // Not supported for load balancers operating with route mode enabled.
+ Port *int64 `json:"port,omitempty"`
- // The listener protocol. Load balancers in the `network` family support `tcp`. Load balancers in the `application`
- // family support `tcp`, `http`, and `https`. Each listener in the load balancer must have a unique `port` and
- // `protocol` combination.
+ // The inclusive upper bound of the range of ports used by this listener. Must not be less than `port_min`.
+ //
+ // At present, only load balancers operating with route mode enabled, and public load balancers in the `network` family
+ // support different values for `port_min` and
+ // `port_max`. When route mode is enabled, the value `65535` must be specified.
+ //
+ // The specified port range must not overlap with port ranges used by other listeners for this load balancer using the
+ // same protocol.
+ PortMax *int64 `json:"port_max,omitempty"`
+
+ // The inclusive lower bound of the range of ports used by this listener. Must not be greater than `port_max`.
+ //
+ // At present, only load balancers operating with route mode enabled, and public load balancers in the `network` family
+ // support different values for `port_min` and
+ // `port_max`. When route mode is enabled, the value `1` must be specified.
+ //
+ // The specified port range must not overlap with port ranges used by other listeners for this load balancer using the
+ // same protocol.
+ PortMin *int64 `json:"port_min,omitempty"`
+
+ // The listener protocol. Load balancers in the `network` family support `tcp` and
+ // `udp` (if `udp_supported` is `true`). Load balancers in the `application` family support `tcp`, `http`, and `https`.
+ // Each listener in the load balancer must have a unique `port` and `protocol` combination.
+ //
+ // The enumerated values for this property are expected to expand in the future. When processing this property, check
+ // for and log unknown values. Optionally halt processing and surface the error, or bypass the listener on which the
+ // unexpected property value was encountered.
Protocol *string `json:"protocol" validate:"required"`
}
// Constants associated with the LoadBalancerListenerPrototypeLoadBalancerContext.Protocol property.
-// The listener protocol. Load balancers in the `network` family support `tcp`. Load balancers in the `application`
-// family support `tcp`, `http`, and `https`. Each listener in the load balancer must have a unique `port` and
-// `protocol` combination.
+// The listener protocol. Load balancers in the `network` family support `tcp` and
+// `udp` (if `udp_supported` is `true`). Load balancers in the `application` family support `tcp`, `http`, and `https`.
+// Each listener in the load balancer must have a unique `port` and `protocol` combination.
+//
+// The enumerated values for this property are expected to expand in the future. When processing this property, check
+// for and log unknown values. Optionally halt processing and surface the error, or bypass the listener on which the
+// unexpected property value was encountered.
const (
LoadBalancerListenerPrototypeLoadBalancerContextProtocolHTTPConst = "http"
LoadBalancerListenerPrototypeLoadBalancerContextProtocolHTTPSConst = "https"
LoadBalancerListenerPrototypeLoadBalancerContextProtocolTCPConst = "tcp"
+ LoadBalancerListenerPrototypeLoadBalancerContextProtocolUDPConst = "udp"
)
// NewLoadBalancerListenerPrototypeLoadBalancerContext : Instantiate LoadBalancerListenerPrototypeLoadBalancerContext (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerListenerPrototypeLoadBalancerContext(port int64, protocol string) (model *LoadBalancerListenerPrototypeLoadBalancerContext, err error) {
- model = &LoadBalancerListenerPrototypeLoadBalancerContext{
- Port: core.Int64Ptr(port),
+func (*VpcV1) NewLoadBalancerListenerPrototypeLoadBalancerContext(protocol string) (_model *LoadBalancerListenerPrototypeLoadBalancerContext, err error) {
+ _model = &LoadBalancerListenerPrototypeLoadBalancerContext{
Protocol: core.StringPtr(protocol),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -34927,6 +44350,14 @@ func UnmarshalLoadBalancerListenerPrototypeLoadBalancerContext(m map[string]json
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "port_max", &obj.PortMax)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "port_min", &obj.PortMin)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
if err != nil {
return
@@ -35004,16 +44435,16 @@ func UnmarshalLoadBalancerLogging(m map[string]json.RawMessage, result interface
// LoadBalancerLoggingDatapath : The datapath logging configuration for this load balancer.
type LoadBalancerLoggingDatapath struct {
- // If set to `true`, datapath logging is active for this load balancer.
+ // Indicates whether datapath logging is active for this load balancer.
Active *bool `json:"active" validate:"required"`
}
// NewLoadBalancerLoggingDatapath : Instantiate LoadBalancerLoggingDatapath (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerLoggingDatapath(active bool) (model *LoadBalancerLoggingDatapath, err error) {
- model = &LoadBalancerLoggingDatapath{
+func (*VpcV1) NewLoadBalancerLoggingDatapath(active bool) (_model *LoadBalancerLoggingDatapath, err error) {
+ _model = &LoadBalancerLoggingDatapath{
Active: core.BoolPtr(active),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -35055,11 +44486,11 @@ func UnmarshalLoadBalancerPatch(m map[string]json.RawMessage, result interface{}
}
// AsPatch returns a generic map representation of the LoadBalancerPatch
-func (loadBalancerPatch *LoadBalancerPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (loadBalancerPatch *LoadBalancerPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(loadBalancerPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -35135,6 +44566,7 @@ const (
LoadBalancerPoolProtocolHTTPConst = "http"
LoadBalancerPoolProtocolHTTPSConst = "https"
LoadBalancerPoolProtocolTCPConst = "tcp"
+ LoadBalancerPoolProtocolUDPConst = "udp"
)
// Constants associated with the LoadBalancerPool.ProvisioningStatus property.
@@ -35336,14 +44768,14 @@ const (
)
// NewLoadBalancerPoolHealthMonitorPatch : Instantiate LoadBalancerPoolHealthMonitorPatch (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerPoolHealthMonitorPatch(delay int64, maxRetries int64, timeout int64, typeVar string) (model *LoadBalancerPoolHealthMonitorPatch, err error) {
- model = &LoadBalancerPoolHealthMonitorPatch{
+func (*VpcV1) NewLoadBalancerPoolHealthMonitorPatch(delay int64, maxRetries int64, timeout int64, typeVar string) (_model *LoadBalancerPoolHealthMonitorPatch, err error) {
+ _model = &LoadBalancerPoolHealthMonitorPatch{
Delay: core.Int64Ptr(delay),
MaxRetries: core.Int64Ptr(maxRetries),
Timeout: core.Int64Ptr(timeout),
Type: core.StringPtr(typeVar),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -35410,14 +44842,14 @@ const (
)
// NewLoadBalancerPoolHealthMonitorPrototype : Instantiate LoadBalancerPoolHealthMonitorPrototype (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerPoolHealthMonitorPrototype(delay int64, maxRetries int64, timeout int64, typeVar string) (model *LoadBalancerPoolHealthMonitorPrototype, err error) {
- model = &LoadBalancerPoolHealthMonitorPrototype{
+func (*VpcV1) NewLoadBalancerPoolHealthMonitorPrototype(delay int64, maxRetries int64, timeout int64, typeVar string) (_model *LoadBalancerPoolHealthMonitorPrototype, err error) {
+ _model = &LoadBalancerPoolHealthMonitorPrototype{
Delay: core.Int64Ptr(delay),
MaxRetries: core.Int64Ptr(maxRetries),
Timeout: core.Int64Ptr(timeout),
Type: core.StringPtr(typeVar),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -35494,11 +44926,11 @@ type LoadBalancerPoolIdentityByName struct {
}
// NewLoadBalancerPoolIdentityByName : Instantiate LoadBalancerPoolIdentityByName (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerPoolIdentityByName(name string) (model *LoadBalancerPoolIdentityByName, err error) {
- model = &LoadBalancerPoolIdentityByName{
+func (*VpcV1) NewLoadBalancerPoolIdentityByName(name string) (_model *LoadBalancerPoolIdentityByName, err error) {
+ _model = &LoadBalancerPoolIdentityByName{
Name: core.StringPtr(name),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -35527,14 +44959,21 @@ type LoadBalancerPoolMember struct {
// The unique identifier for this load balancer pool member.
ID *string `json:"id" validate:"required"`
- // The port number of the application running in the server member.
+ // The port the member will receive load balancer traffic on. Applies only to load balancer traffic received on a
+ // listener with a single port. (If the traffic is received on a listener with a port range, the member will receive
+ // the traffic on the same port the listener received it on.)
+ //
+ // This port will also be used for health checks unless the `port` property of
+ // `health_monitor` property is specified.
Port *int64 `json:"port" validate:"required"`
// The provisioning status of this member.
ProvisioningStatus *string `json:"provisioning_status" validate:"required"`
// The pool member target. Load balancers in the `network` family support virtual server
- // instances. Load balancers in the `application` family support IP addresses.
+ // instances in the same zone as the load balancer's subnet. Load balancers in the
+ // `application` family support any IP address in the VPC. If the load balancer has
+ // `route mode` enabled, the member must be in a zone the load balancer has a subnet in.
Target LoadBalancerPoolMemberTargetIntf `json:"target" validate:"required"`
// Weight of the server member. Applicable only if the pool algorithm is
@@ -35619,11 +45058,20 @@ func UnmarshalLoadBalancerPoolMemberCollection(m map[string]json.RawMessage, res
// LoadBalancerPoolMemberPatch : LoadBalancerPoolMemberPatch struct
type LoadBalancerPoolMemberPatch struct {
- // The port number of the application running in the server member.
+ // The port the member will receive load balancer traffic on. Applies only to load balancer traffic received on a
+ // listener with a single port. (If the traffic is received on a listener with a port range, the member will receive
+ // the traffic on the same port the listener received it on.)
+ //
+ // This port will also be used for health checks unless the `port` property of
+ // `health_monitor` property is specified.
+ //
+ // The port must be unique across all members for all pools associated with this pool's listener.
Port *int64 `json:"port,omitempty"`
// The pool member target. Load balancers in the `network` family support virtual server
- // instances. Load balancers in the `application` family support IP addresses.
+ // instances in the same zone as the load balancer's subnet. Load balancers in the
+ // `application` family support any IP address in the VPC. If the load balancer has
+ // `route mode` enabled, the member must be in a zone the load balancer has a subnet in.
Target LoadBalancerPoolMemberTargetPrototypeIntf `json:"target,omitempty"`
// Weight of the server member. Applicable only if the pool algorithm is
@@ -35651,22 +45099,31 @@ func UnmarshalLoadBalancerPoolMemberPatch(m map[string]json.RawMessage, result i
}
// AsPatch returns a generic map representation of the LoadBalancerPoolMemberPatch
-func (loadBalancerPoolMemberPatch *LoadBalancerPoolMemberPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (loadBalancerPoolMemberPatch *LoadBalancerPoolMemberPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(loadBalancerPoolMemberPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
// LoadBalancerPoolMemberPrototype : LoadBalancerPoolMemberPrototype struct
type LoadBalancerPoolMemberPrototype struct {
- // The port number of the application running in the server member.
+ // The port the member will receive load balancer traffic on. Applies only to load balancer traffic received on a
+ // listener with a single port. (If the traffic is received on a listener with a port range, the member will receive
+ // the traffic on the same port the listener received it on.)
+ //
+ // This port will also be used for health checks unless the `port` property of
+ // `health_monitor` property is specified.
+ //
+ // The port must be unique across all members for all pools associated with this pool's listener.
Port *int64 `json:"port" validate:"required"`
// The pool member target. Load balancers in the `network` family support virtual server
- // instances. Load balancers in the `application` family support IP addresses.
+ // instances in the same zone as the load balancer's subnet. Load balancers in the
+ // `application` family support any IP address in the VPC. If the load balancer has
+ // `route mode` enabled, the member must be in a zone the load balancer has a subnet in.
Target LoadBalancerPoolMemberTargetPrototypeIntf `json:"target" validate:"required"`
// Weight of the server member. Applicable only if the pool algorithm is
@@ -35675,12 +45132,12 @@ type LoadBalancerPoolMemberPrototype struct {
}
// NewLoadBalancerPoolMemberPrototype : Instantiate LoadBalancerPoolMemberPrototype (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerPoolMemberPrototype(port int64, target LoadBalancerPoolMemberTargetPrototypeIntf) (model *LoadBalancerPoolMemberPrototype, err error) {
- model = &LoadBalancerPoolMemberPrototype{
+func (*VpcV1) NewLoadBalancerPoolMemberPrototype(port int64, target LoadBalancerPoolMemberTargetPrototypeIntf) (_model *LoadBalancerPoolMemberPrototype, err error) {
+ _model = &LoadBalancerPoolMemberPrototype{
Port: core.Int64Ptr(port),
Target: target,
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -35753,8 +45210,10 @@ func UnmarshalLoadBalancerPoolMemberReferenceDeleted(m map[string]json.RawMessag
return
}
-// LoadBalancerPoolMemberTarget : The pool member target. Load balancers in the `network` family support virtual server instances. Load balancers in
-// the `application` family support IP addresses.
+// LoadBalancerPoolMemberTarget : The pool member target. Load balancers in the `network` family support virtual server instances in the same zone as
+// the load balancer's subnet. Load balancers in the
+// `application` family support any IP address in the VPC. If the load balancer has
+// `route mode` enabled, the member must be in a zone the load balancer has a subnet in.
// Models which "extend" this model:
// - LoadBalancerPoolMemberTargetInstanceReference
// - LoadBalancerPoolMemberTargetIP
@@ -35775,9 +45234,11 @@ type LoadBalancerPoolMemberTarget struct {
// The user-defined name for this virtual server instance (and default system hostname).
Name *string `json:"name,omitempty"`
- // The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
- // property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
- // and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
+ // The IP address.
+ //
+ // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify
+ // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the
+ // error, or bypass the resource on which the unexpected IP address format was encountered.
Address *string `json:"address,omitempty"`
}
@@ -35820,8 +45281,10 @@ func UnmarshalLoadBalancerPoolMemberTarget(m map[string]json.RawMessage, result
return
}
-// LoadBalancerPoolMemberTargetPrototype : The pool member target. Load balancers in the `network` family support virtual server instances. Load balancers in
-// the `application` family support IP addresses.
+// LoadBalancerPoolMemberTargetPrototype : The pool member target. Load balancers in the `network` family support virtual server instances in the same zone as
+// the load balancer's subnet. Load balancers in the
+// `application` family support any IP address in the VPC. If the load balancer has
+// `route mode` enabled, the member must be in a zone the load balancer has a subnet in.
// Models which "extend" this model:
// - LoadBalancerPoolMemberTargetPrototypeInstanceIdentity
// - LoadBalancerPoolMemberTargetPrototypeIP
@@ -35835,9 +45298,11 @@ type LoadBalancerPoolMemberTargetPrototype struct {
// The URL for this virtual server instance.
Href *string `json:"href,omitempty"`
- // The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
- // property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
- // and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
+ // The IP address.
+ //
+ // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify
+ // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the
+ // error, or bypass the resource on which the unexpected IP address format was encountered.
Address *string `json:"address,omitempty"`
}
@@ -35883,11 +45348,11 @@ type LoadBalancerPoolPatch struct {
// The user-defined name for this load balancer pool.
Name *string `json:"name,omitempty"`
- // The protocol used for this load balancer pool.
+ // The protocol to use for this load balancer pool. Load balancers in the `network` family support `tcp` and `udp` (if
+ // `udp_supported` is `true`). Load balancers in the `application` family support `tcp`, `http` and `https`.
//
- // The enumerated values for this property are expected to expand in the future. When processing this property, check
- // for and log unknown values. Optionally halt processing and surface the error, or bypass the pool on which the
- // unexpected property value was encountered.
+ // If this pool is associated with a load balancer listener, the specified protocol must be compatible with the
+ // listener's protocol. At present, the compatible protocols are `http` and `https`.
Protocol *string `json:"protocol,omitempty"`
// The PROXY protocol setting for this pool:
@@ -35911,15 +45376,16 @@ const (
)
// Constants associated with the LoadBalancerPoolPatch.Protocol property.
-// The protocol used for this load balancer pool.
+// The protocol to use for this load balancer pool. Load balancers in the `network` family support `tcp` and `udp` (if
+// `udp_supported` is `true`). Load balancers in the `application` family support `tcp`, `http` and `https`.
//
-// The enumerated values for this property are expected to expand in the future. When processing this property, check
-// for and log unknown values. Optionally halt processing and surface the error, or bypass the pool on which the
-// unexpected property value was encountered.
+// If this pool is associated with a load balancer listener, the specified protocol must be compatible with the
+// listener's protocol. At present, the compatible protocols are `http` and `https`.
const (
LoadBalancerPoolPatchProtocolHTTPConst = "http"
LoadBalancerPoolPatchProtocolHTTPSConst = "https"
LoadBalancerPoolPatchProtocolTCPConst = "tcp"
+ LoadBalancerPoolPatchProtocolUDPConst = "udp"
)
// Constants associated with the LoadBalancerPoolPatch.ProxyProtocol property.
@@ -35967,11 +45433,11 @@ func UnmarshalLoadBalancerPoolPatch(m map[string]json.RawMessage, result interfa
}
// AsPatch returns a generic map representation of the LoadBalancerPoolPatch
-func (loadBalancerPoolPatch *LoadBalancerPoolPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (loadBalancerPoolPatch *LoadBalancerPoolPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(loadBalancerPoolPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -35992,9 +45458,9 @@ type LoadBalancerPoolPrototype struct {
// randomly-selected words.
Name *string `json:"name,omitempty"`
- // The protocol used for this load balancer pool. Load balancers in the `network` family support `tcp`. Load balancers
- // in the `application` family support `tcp`, `http`, and
- // `https`.
+ // The protocol used for this load balancer pool. Load balancers in the `network` family support `tcp` and `udp` (if
+ // `udp_supported` is `true`). Load balancers in the
+ // `application` family support `tcp`, `http`, and `https`.
Protocol *string `json:"protocol" validate:"required"`
// The PROXY protocol setting for this pool:
@@ -36018,13 +45484,14 @@ const (
)
// Constants associated with the LoadBalancerPoolPrototype.Protocol property.
-// The protocol used for this load balancer pool. Load balancers in the `network` family support `tcp`. Load balancers
-// in the `application` family support `tcp`, `http`, and
-// `https`.
+// The protocol used for this load balancer pool. Load balancers in the `network` family support `tcp` and `udp` (if
+// `udp_supported` is `true`). Load balancers in the
+// `application` family support `tcp`, `http`, and `https`.
const (
LoadBalancerPoolPrototypeProtocolHTTPConst = "http"
LoadBalancerPoolPrototypeProtocolHTTPSConst = "https"
LoadBalancerPoolPrototypeProtocolTCPConst = "tcp"
+ LoadBalancerPoolPrototypeProtocolUDPConst = "udp"
)
// Constants associated with the LoadBalancerPoolPrototype.ProxyProtocol property.
@@ -36041,13 +45508,13 @@ const (
)
// NewLoadBalancerPoolPrototype : Instantiate LoadBalancerPoolPrototype (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerPoolPrototype(algorithm string, healthMonitor *LoadBalancerPoolHealthMonitorPrototype, protocol string) (model *LoadBalancerPoolPrototype, err error) {
- model = &LoadBalancerPoolPrototype{
+func (*VpcV1) NewLoadBalancerPoolPrototype(algorithm string, healthMonitor *LoadBalancerPoolHealthMonitorPrototype, protocol string) (_model *LoadBalancerPoolPrototype, err error) {
+ _model = &LoadBalancerPoolPrototype{
Algorithm: core.StringPtr(algorithm),
HealthMonitor: healthMonitor,
Protocol: core.StringPtr(protocol),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -36145,19 +45612,31 @@ func UnmarshalLoadBalancerPoolReferenceDeleted(m map[string]json.RawMessage, res
// LoadBalancerPoolSessionPersistence : LoadBalancerPoolSessionPersistence struct
type LoadBalancerPoolSessionPersistence struct {
- // The session persistence type.
+ // The session persistence cookie name. Applicable only for type `app_cookie`. Names starting with `IBM` are not
+ // allowed.
+ CookieName *string `json:"cookie_name,omitempty"`
+
+ // The session persistence type. The `http_cookie` and `app_cookie` types are applicable only to the `http` and `https`
+ // protocols.
Type *string `json:"type" validate:"required"`
}
// Constants associated with the LoadBalancerPoolSessionPersistence.Type property.
-// The session persistence type.
+// The session persistence type. The `http_cookie` and `app_cookie` types are applicable only to the `http` and `https`
+// protocols.
const (
- LoadBalancerPoolSessionPersistenceTypeSourceIPConst = "source_ip"
+ LoadBalancerPoolSessionPersistenceTypeAppCookieConst = "app_cookie"
+ LoadBalancerPoolSessionPersistenceTypeHTTPCookieConst = "http_cookie"
+ LoadBalancerPoolSessionPersistenceTypeSourceIPConst = "source_ip"
)
// UnmarshalLoadBalancerPoolSessionPersistence unmarshals an instance of LoadBalancerPoolSessionPersistence from the specified map of raw messages.
func UnmarshalLoadBalancerPoolSessionPersistence(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(LoadBalancerPoolSessionPersistence)
+ err = core.UnmarshalPrimitive(m, "cookie_name", &obj.CookieName)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "type", &obj.Type)
if err != nil {
return
@@ -36166,30 +45645,33 @@ func UnmarshalLoadBalancerPoolSessionPersistence(m map[string]json.RawMessage, r
return
}
-// LoadBalancerPoolSessionPersistencePatch : LoadBalancerPoolSessionPersistencePatch struct
+// LoadBalancerPoolSessionPersistencePatch : The session persistence configuration. Specify `null` to remove any existing session persistence configuration.
type LoadBalancerPoolSessionPersistencePatch struct {
- // The session persistence type.
- Type *string `json:"type" validate:"required"`
+ // The session persistence cookie name. Applicable only for type `app_cookie`. Names starting with `IBM` are not
+ // allowed.
+ CookieName *string `json:"cookie_name,omitempty"`
+
+ // The session persistence type. The `http_cookie` and `app_cookie` types are applicable only to the `http` and `https`
+ // protocols.
+ Type *string `json:"type,omitempty"`
}
// Constants associated with the LoadBalancerPoolSessionPersistencePatch.Type property.
-// The session persistence type.
+// The session persistence type. The `http_cookie` and `app_cookie` types are applicable only to the `http` and `https`
+// protocols.
const (
- LoadBalancerPoolSessionPersistencePatchTypeSourceIPConst = "source_ip"
+ LoadBalancerPoolSessionPersistencePatchTypeAppCookieConst = "app_cookie"
+ LoadBalancerPoolSessionPersistencePatchTypeHTTPCookieConst = "http_cookie"
+ LoadBalancerPoolSessionPersistencePatchTypeSourceIPConst = "source_ip"
)
-// NewLoadBalancerPoolSessionPersistencePatch : Instantiate LoadBalancerPoolSessionPersistencePatch (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerPoolSessionPersistencePatch(typeVar string) (model *LoadBalancerPoolSessionPersistencePatch, err error) {
- model = &LoadBalancerPoolSessionPersistencePatch{
- Type: core.StringPtr(typeVar),
- }
- err = core.ValidateStruct(model, "required parameters")
- return
-}
-
// UnmarshalLoadBalancerPoolSessionPersistencePatch unmarshals an instance of LoadBalancerPoolSessionPersistencePatch from the specified map of raw messages.
func UnmarshalLoadBalancerPoolSessionPersistencePatch(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(LoadBalancerPoolSessionPersistencePatch)
+ err = core.UnmarshalPrimitive(m, "cookie_name", &obj.CookieName)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "type", &obj.Type)
if err != nil {
return
@@ -36200,28 +45682,40 @@ func UnmarshalLoadBalancerPoolSessionPersistencePatch(m map[string]json.RawMessa
// LoadBalancerPoolSessionPersistencePrototype : LoadBalancerPoolSessionPersistencePrototype struct
type LoadBalancerPoolSessionPersistencePrototype struct {
- // The session persistence type.
+ // The session persistence cookie name. Applicable only for type `app_cookie`. Names starting with `IBM` are not
+ // allowed.
+ CookieName *string `json:"cookie_name,omitempty"`
+
+ // The session persistence type. The `http_cookie` and `app_cookie` types are applicable only to the `http` and `https`
+ // protocols.
Type *string `json:"type" validate:"required"`
}
// Constants associated with the LoadBalancerPoolSessionPersistencePrototype.Type property.
-// The session persistence type.
+// The session persistence type. The `http_cookie` and `app_cookie` types are applicable only to the `http` and `https`
+// protocols.
const (
- LoadBalancerPoolSessionPersistencePrototypeTypeSourceIPConst = "source_ip"
+ LoadBalancerPoolSessionPersistencePrototypeTypeAppCookieConst = "app_cookie"
+ LoadBalancerPoolSessionPersistencePrototypeTypeHTTPCookieConst = "http_cookie"
+ LoadBalancerPoolSessionPersistencePrototypeTypeSourceIPConst = "source_ip"
)
// NewLoadBalancerPoolSessionPersistencePrototype : Instantiate LoadBalancerPoolSessionPersistencePrototype (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerPoolSessionPersistencePrototype(typeVar string) (model *LoadBalancerPoolSessionPersistencePrototype, err error) {
- model = &LoadBalancerPoolSessionPersistencePrototype{
+func (*VpcV1) NewLoadBalancerPoolSessionPersistencePrototype(typeVar string) (_model *LoadBalancerPoolSessionPersistencePrototype, err error) {
+ _model = &LoadBalancerPoolSessionPersistencePrototype{
Type: core.StringPtr(typeVar),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
// UnmarshalLoadBalancerPoolSessionPersistencePrototype unmarshals an instance of LoadBalancerPoolSessionPersistencePrototype from the specified map of raw messages.
func UnmarshalLoadBalancerPoolSessionPersistencePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(LoadBalancerPoolSessionPersistencePrototype)
+ err = core.UnmarshalPrimitive(m, "cookie_name", &obj.CookieName)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "type", &obj.Type)
if err != nil {
return
@@ -36230,6 +45724,71 @@ func UnmarshalLoadBalancerPoolSessionPersistencePrototype(m map[string]json.RawM
return
}
+// LoadBalancerPrivateIpsItem : LoadBalancerPrivateIpsItem struct
+type LoadBalancerPrivateIpsItem struct {
+ // The IP address.
+ //
+ // If the address has not yet been selected, the value will be `0.0.0.0`.
+ //
+ // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify
+ // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the
+ // error, or bypass the resource on which the unexpected IP address format was encountered.
+ Address *string `json:"address" validate:"required"`
+
+ // If present, this property indicates the referenced resource has been deleted and provides
+ // some supplementary information.
+ Deleted *ReservedIPReferenceDeleted `json:"deleted,omitempty"`
+
+ // The URL for this reserved IP.
+ Href *string `json:"href" validate:"required"`
+
+ // The unique identifier for this reserved IP.
+ ID *string `json:"id" validate:"required"`
+
+ // The user-defined or system-provided name for this reserved IP.
+ Name *string `json:"name" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+}
+
+// Constants associated with the LoadBalancerPrivateIpsItem.ResourceType property.
+// The resource type.
+const (
+ LoadBalancerPrivateIpsItemResourceTypeSubnetReservedIPConst = "subnet_reserved_ip"
+)
+
+// UnmarshalLoadBalancerPrivateIpsItem unmarshals an instance of LoadBalancerPrivateIpsItem from the specified map of raw messages.
+func UnmarshalLoadBalancerPrivateIpsItem(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(LoadBalancerPrivateIpsItem)
+ err = core.UnmarshalPrimitive(m, "address", &obj.Address)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalReservedIPReferenceDeleted)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// LoadBalancerProfile : LoadBalancerProfile struct
type LoadBalancerProfile struct {
// The product family this load balancer profile belongs to.
@@ -36244,7 +45803,11 @@ type LoadBalancerProfile struct {
// The globally unique name for this load balancer profile.
Name *string `json:"name" validate:"required"`
+ RouteModeSupported LoadBalancerProfileRouteModeSupportedIntf `json:"route_mode_supported" validate:"required"`
+
SecurityGroupsSupported LoadBalancerProfileSecurityGroupsSupportedIntf `json:"security_groups_supported" validate:"required"`
+
+ UDPSupported LoadBalancerProfileUDPSupportedIntf `json:"udp_supported" validate:"required"`
}
// UnmarshalLoadBalancerProfile unmarshals an instance of LoadBalancerProfile from the specified map of raw messages.
@@ -36266,10 +45829,18 @@ func UnmarshalLoadBalancerProfile(m map[string]json.RawMessage, result interface
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "route_mode_supported", &obj.RouteModeSupported, UnmarshalLoadBalancerProfileRouteModeSupported)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "security_groups_supported", &obj.SecurityGroupsSupported, UnmarshalLoadBalancerProfileSecurityGroupsSupported)
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "udp_supported", &obj.UDPSupported, UnmarshalLoadBalancerProfileUDPSupported)
+ if err != nil {
+ return
+ }
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
@@ -36320,6 +45891,18 @@ func UnmarshalLoadBalancerProfileCollection(m map[string]json.RawMessage, result
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *LoadBalancerProfileCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// LoadBalancerProfileCollectionFirst : A link to the first page of resources.
type LoadBalancerProfileCollectionFirst struct {
// The URL for a page of resources.
@@ -36450,6 +46033,47 @@ func UnmarshalLoadBalancerProfileReference(m map[string]json.RawMessage, result
return
}
+// LoadBalancerProfileRouteModeSupported : LoadBalancerProfileRouteModeSupported struct
+// Models which "extend" this model:
+// - LoadBalancerProfileRouteModeSupportedFixed
+// - LoadBalancerProfileRouteModeSupportedDependent
+type LoadBalancerProfileRouteModeSupported struct {
+ // The type for this profile field.
+ Type *string `json:"type,omitempty"`
+
+ // The value for this profile field.
+ Value *bool `json:"value,omitempty"`
+}
+
+// Constants associated with the LoadBalancerProfileRouteModeSupported.Type property.
+// The type for this profile field.
+const (
+ LoadBalancerProfileRouteModeSupportedTypeFixedConst = "fixed"
+)
+
+func (*LoadBalancerProfileRouteModeSupported) isaLoadBalancerProfileRouteModeSupported() bool {
+ return true
+}
+
+type LoadBalancerProfileRouteModeSupportedIntf interface {
+ isaLoadBalancerProfileRouteModeSupported() bool
+}
+
+// UnmarshalLoadBalancerProfileRouteModeSupported unmarshals an instance of LoadBalancerProfileRouteModeSupported from the specified map of raw messages.
+func UnmarshalLoadBalancerProfileRouteModeSupported(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(LoadBalancerProfileRouteModeSupported)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "value", &obj.Value)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// LoadBalancerProfileSecurityGroupsSupported : LoadBalancerProfileSecurityGroupsSupported struct
// Models which "extend" this model:
// - LoadBalancerProfileSecurityGroupsSupportedFixed
@@ -36491,6 +46115,47 @@ func UnmarshalLoadBalancerProfileSecurityGroupsSupported(m map[string]json.RawMe
return
}
+// LoadBalancerProfileUDPSupported : LoadBalancerProfileUDPSupported struct
+// Models which "extend" this model:
+// - LoadBalancerProfileUDPSupportedFixed
+// - LoadBalancerProfileUDPSupportedDependent
+type LoadBalancerProfileUDPSupported struct {
+ // The type for this profile field.
+ Type *string `json:"type,omitempty"`
+
+ // The value for this profile field.
+ Value *bool `json:"value,omitempty"`
+}
+
+// Constants associated with the LoadBalancerProfileUDPSupported.Type property.
+// The type for this profile field.
+const (
+ LoadBalancerProfileUDPSupportedTypeFixedConst = "fixed"
+)
+
+func (*LoadBalancerProfileUDPSupported) isaLoadBalancerProfileUDPSupported() bool {
+ return true
+}
+
+type LoadBalancerProfileUDPSupportedIntf interface {
+ isaLoadBalancerProfileUDPSupported() bool
+}
+
+// UnmarshalLoadBalancerProfileUDPSupported unmarshals an instance of LoadBalancerProfileUDPSupported from the specified map of raw messages.
+func UnmarshalLoadBalancerProfileUDPSupported(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(LoadBalancerProfileUDPSupported)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "value", &obj.Value)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// LoadBalancerReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type LoadBalancerReferenceDeleted struct {
@@ -36666,6 +46331,18 @@ func UnmarshalNetworkACLCollection(m map[string]json.RawMessage, result interfac
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *NetworkACLCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// NetworkACLCollectionFirst : A link to the first page of resources.
type NetworkACLCollectionFirst struct {
// The URL for a page of resources.
@@ -36761,11 +46438,11 @@ func UnmarshalNetworkACLPatch(m map[string]json.RawMessage, result interface{})
}
// AsPatch returns a generic map representation of the NetworkACLPatch
-func (networkACLPatch *NetworkACLPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (networkACLPatch *NetworkACLPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(networkACLPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -36786,8 +46463,8 @@ type NetworkACLPrototype struct {
// The VPC this network ACL is to be a part of.
VPC VPCIdentityIntf `json:"vpc" validate:"required"`
- // Array of prototype objects for rules to create along with this network ACL. If unspecified, no rules will be
- // created, resulting in all traffic being denied.
+ // The prototype objects for rules to create along with this network ACL. If unspecified, no rules will be created,
+ // resulting in all traffic being denied.
Rules []NetworkACLRulePrototypeNetworkACLContextIntf `json:"rules,omitempty"`
// Network ACL to copy rules from.
@@ -37125,6 +46802,18 @@ func UnmarshalNetworkACLRuleCollection(m map[string]json.RawMessage, result inte
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *NetworkACLRuleCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// NetworkACLRuleCollectionFirst : A link to the first page of resources.
type NetworkACLRuleCollectionFirst struct {
// The URL for a page of resources.
@@ -37386,11 +47075,11 @@ func UnmarshalNetworkACLRulePatch(m map[string]json.RawMessage, result interface
}
// AsPatch returns a generic map representation of the NetworkACLRulePatch
-func (networkACLRulePatch *NetworkACLRulePatch) AsPatch() (patch map[string]interface{}, err error) {
+func (networkACLRulePatch *NetworkACLRulePatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(networkACLRulePatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -37653,7 +47342,7 @@ type NetworkInterface struct {
// The date and time that the network interface was created.
CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
- // Array of references to floating IPs associated with this network interface.
+ // The floating IPs associated with this network interface.
FloatingIps []FloatingIPReference `json:"floating_ips,omitempty"`
// The URL for this network interface.
@@ -37668,13 +47357,12 @@ type NetworkInterface struct {
// The network interface port speed in Mbps.
PortSpeed *int64 `json:"port_speed" validate:"required"`
- // The primary IPv4 address.
- PrimaryIpv4Address *string `json:"primary_ipv4_address" validate:"required"`
+ PrimaryIP *ReservedIPReference `json:"primary_ip" validate:"required"`
// The resource type.
ResourceType *string `json:"resource_type" validate:"required"`
- // Collection of security groups.
+ // The security groups targeting this network interface.
SecurityGroups []SecurityGroupReference `json:"security_groups" validate:"required"`
// The status of the network interface.
@@ -37740,7 +47428,7 @@ func UnmarshalNetworkInterface(m map[string]json.RawMessage, result interface{})
if err != nil {
return
}
- err = core.UnmarshalPrimitive(m, "primary_ipv4_address", &obj.PrimaryIpv4Address)
+ err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference)
if err != nil {
return
}
@@ -37768,45 +47456,64 @@ func UnmarshalNetworkInterface(m map[string]json.RawMessage, result interface{})
return
}
-// NetworkInterfaceCollection : NetworkInterfaceCollection struct
-type NetworkInterfaceCollection struct {
- // A link to the first page of resources.
- First *NetworkInterfaceCollectionFirst `json:"first" validate:"required"`
+// NetworkInterfaceBareMetalServerContextReference : NetworkInterfaceBareMetalServerContextReference struct
+type NetworkInterfaceBareMetalServerContextReference struct {
+ // If present, this property indicates the referenced resource has been deleted and provides
+ // some supplementary information.
+ Deleted *NetworkInterfaceBareMetalServerContextReferenceDeleted `json:"deleted,omitempty"`
- // The maximum number of resources that can be returned by the request.
- Limit *int64 `json:"limit" validate:"required"`
+ // The URL for this network interface.
+ Href *string `json:"href" validate:"required"`
- // Collection of network interfaces.
- NetworkInterfaces []NetworkInterface `json:"network_interfaces" validate:"required"`
+ // The unique identifier for this network interface.
+ ID *string `json:"id" validate:"required"`
- // A link to the next page of resources. This property is present for all pages
- // except the last page.
- Next *NetworkInterfaceCollectionNext `json:"next,omitempty"`
+ // The user-defined name for this network interface.
+ Name *string `json:"name" validate:"required"`
- // The total number of resources across all pages.
- TotalCount *int64 `json:"total_count" validate:"required"`
+ PrimaryIP *ReservedIPReference `json:"primary_ip" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+
+ // The associated subnet.
+ Subnet *SubnetReference `json:"subnet" validate:"required"`
}
-// UnmarshalNetworkInterfaceCollection unmarshals an instance of NetworkInterfaceCollection from the specified map of raw messages.
-func UnmarshalNetworkInterfaceCollection(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(NetworkInterfaceCollection)
- err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalNetworkInterfaceCollectionFirst)
+// Constants associated with the NetworkInterfaceBareMetalServerContextReference.ResourceType property.
+// The resource type.
+const (
+ NetworkInterfaceBareMetalServerContextReferenceResourceTypeNetworkInterfaceConst = "network_interface"
+)
+
+// UnmarshalNetworkInterfaceBareMetalServerContextReference unmarshals an instance of NetworkInterfaceBareMetalServerContextReference from the specified map of raw messages.
+func UnmarshalNetworkInterfaceBareMetalServerContextReference(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(NetworkInterfaceBareMetalServerContextReference)
+ err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceBareMetalServerContextReferenceDeleted)
if err != nil {
return
}
- err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
if err != nil {
return
}
- err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterface)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
if err != nil {
return
}
- err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalNetworkInterfaceCollectionNext)
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
if err != nil {
return
}
- err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
+ err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference)
if err != nil {
return
}
@@ -37814,16 +47521,17 @@ func UnmarshalNetworkInterfaceCollection(m map[string]json.RawMessage, result in
return
}
-// NetworkInterfaceCollectionFirst : A link to the first page of resources.
-type NetworkInterfaceCollectionFirst struct {
- // The URL for a page of resources.
- Href *string `json:"href" validate:"required"`
+// NetworkInterfaceBareMetalServerContextReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
+// information.
+type NetworkInterfaceBareMetalServerContextReferenceDeleted struct {
+ // Link to documentation about deleted resources.
+ MoreInfo *string `json:"more_info" validate:"required"`
}
-// UnmarshalNetworkInterfaceCollectionFirst unmarshals an instance of NetworkInterfaceCollectionFirst from the specified map of raw messages.
-func UnmarshalNetworkInterfaceCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(NetworkInterfaceCollectionFirst)
- err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+// UnmarshalNetworkInterfaceBareMetalServerContextReferenceDeleted unmarshals an instance of NetworkInterfaceBareMetalServerContextReferenceDeleted from the specified map of raw messages.
+func UnmarshalNetworkInterfaceBareMetalServerContextReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(NetworkInterfaceBareMetalServerContextReferenceDeleted)
+ err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
if err != nil {
return
}
@@ -37831,19 +47539,63 @@ func UnmarshalNetworkInterfaceCollectionFirst(m map[string]json.RawMessage, resu
return
}
-// NetworkInterfaceCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
-type NetworkInterfaceCollectionNext struct {
- // The URL for a page of resources.
- Href *string `json:"href" validate:"required"`
+// NetworkInterfaceIPPrototype : NetworkInterfaceIPPrototype struct
+// Models which "extend" this model:
+// - NetworkInterfaceIPPrototypeReservedIPIdentity
+// - NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext
+type NetworkInterfaceIPPrototype struct {
+ // The unique identifier for this reserved IP.
+ ID *string `json:"id,omitempty"`
+
+ // The URL for this reserved IP.
+ Href *string `json:"href,omitempty"`
+
+ // The IP address to reserve, which must not already be reserved on the subnet.
+ //
+ // If unspecified, an available address on the subnet will automatically be selected.
+ Address *string `json:"address,omitempty"`
+
+ // Indicates whether this reserved IP member will be automatically deleted when either
+ // `target` is deleted, or the reserved IP is unbound.
+ AutoDelete *bool `json:"auto_delete,omitempty"`
+
+ // The user-defined name for this reserved IP. If unspecified, the name will be a hyphenated list of randomly-selected
+ // words. Names must be unique within the subnet the reserved IP resides in. Names beginning with `ibm-` are reserved
+ // for provider-owned resources.
+ Name *string `json:"name,omitempty"`
}
-// UnmarshalNetworkInterfaceCollectionNext unmarshals an instance of NetworkInterfaceCollectionNext from the specified map of raw messages.
-func UnmarshalNetworkInterfaceCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(NetworkInterfaceCollectionNext)
+func (*NetworkInterfaceIPPrototype) isaNetworkInterfaceIPPrototype() bool {
+ return true
+}
+
+type NetworkInterfaceIPPrototypeIntf interface {
+ isaNetworkInterfaceIPPrototype() bool
+}
+
+// UnmarshalNetworkInterfaceIPPrototype unmarshals an instance of NetworkInterfaceIPPrototype from the specified map of raw messages.
+func UnmarshalNetworkInterfaceIPPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(NetworkInterfaceIPPrototype)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "href", &obj.Href)
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "address", &obj.Address)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
@@ -37863,8 +47615,7 @@ type NetworkInterfaceInstanceContextReference struct {
// The user-defined name for this network interface.
Name *string `json:"name" validate:"required"`
- // The primary IPv4 address.
- PrimaryIpv4Address *string `json:"primary_ipv4_address" validate:"required"`
+ PrimaryIP *ReservedIPReference `json:"primary_ip" validate:"required"`
// The resource type.
ResourceType *string `json:"resource_type" validate:"required"`
@@ -37898,7 +47649,7 @@ func UnmarshalNetworkInterfaceInstanceContextReference(m map[string]json.RawMess
if err != nil {
return
}
- err = core.UnmarshalPrimitive(m, "primary_ipv4_address", &obj.PrimaryIpv4Address)
+ err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference)
if err != nil {
return
}
@@ -37938,7 +47689,8 @@ type NetworkInterfacePatch struct {
// interface. If true, source IP spoofing is allowed on this interface.
AllowIPSpoofing *bool `json:"allow_ip_spoofing,omitempty"`
- // The user-defined name for this network interface.
+ // The user-defined name for network interface. Names must be unique within the instance the network interface resides
+ // in.
Name *string `json:"name,omitempty"`
}
@@ -37958,11 +47710,11 @@ func UnmarshalNetworkInterfacePatch(m map[string]json.RawMessage, result interfa
}
// AsPatch returns a generic map representation of the NetworkInterfacePatch
-func (networkInterfacePatch *NetworkInterfacePatch) AsPatch() (patch map[string]interface{}, err error) {
+func (networkInterfacePatch *NetworkInterfacePatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(networkInterfacePatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -37973,15 +47725,19 @@ type NetworkInterfacePrototype struct {
// interface. If true, source IP spoofing is allowed on this interface.
AllowIPSpoofing *bool `json:"allow_ip_spoofing,omitempty"`
- // The user-defined name for this network interface. If unspecified, the name will be a hyphenated list of
- // randomly-selected words.
+ // The user-defined name for network interface. Names must be unique within the instance the network interface resides
+ // in. If unspecified, the name will be a hyphenated list of randomly-selected words.
Name *string `json:"name,omitempty"`
- // The primary IPv4 address. If specified, it must be an available address on the network interface's subnet. If
- // unspecified, an available address on the subnet will be automatically selected.
- PrimaryIpv4Address *string `json:"primary_ipv4_address,omitempty"`
+ // The primary IP address to bind to the network interface. This can be specified using
+ // an existing reserved IP, or a prototype object for a new reserved IP.
+ //
+ // If an existing reserved IP or a prototype object with an address is specified, it must
+ // be available on the network interface's subnet. Otherwise, an available address on the
+ // subnet will be automatically selected and reserved.
+ PrimaryIP NetworkInterfaceIPPrototypeIntf `json:"primary_ip,omitempty"`
- // Collection of security groups.
+ // The security groups to use for this network interface. If unspecified, the VPC's default security group is used.
SecurityGroups []SecurityGroupIdentityIntf `json:"security_groups,omitempty"`
// The associated subnet.
@@ -37989,11 +47745,11 @@ type NetworkInterfacePrototype struct {
}
// NewNetworkInterfacePrototype : Instantiate NetworkInterfacePrototype (Generic Model Constructor)
-func (*VpcV1) NewNetworkInterfacePrototype(subnet SubnetIdentityIntf) (model *NetworkInterfacePrototype, err error) {
- model = &NetworkInterfacePrototype{
+func (*VpcV1) NewNetworkInterfacePrototype(subnet SubnetIdentityIntf) (_model *NetworkInterfacePrototype, err error) {
+ _model = &NetworkInterfacePrototype{
Subnet: subnet,
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -38008,7 +47764,7 @@ func UnmarshalNetworkInterfacePrototype(m map[string]json.RawMessage, result int
if err != nil {
return
}
- err = core.UnmarshalPrimitive(m, "primary_ipv4_address", &obj.PrimaryIpv4Address)
+ err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalNetworkInterfaceIPPrototype)
if err != nil {
return
}
@@ -38024,65 +47780,6 @@ func UnmarshalNetworkInterfacePrototype(m map[string]json.RawMessage, result int
return
}
-// NetworkInterfaceReference : NetworkInterfaceReference struct
-type NetworkInterfaceReference struct {
- // If present, this property indicates the referenced resource has been deleted and provides
- // some supplementary information.
- Deleted *NetworkInterfaceReferenceDeleted `json:"deleted,omitempty"`
-
- // The URL for this network interface.
- Href *string `json:"href" validate:"required"`
-
- // The unique identifier for this network interface.
- ID *string `json:"id" validate:"required"`
-
- // The user-defined name for this network interface.
- Name *string `json:"name" validate:"required"`
-
- // The primary IPv4 address.
- PrimaryIpv4Address *string `json:"primary_ipv4_address" validate:"required"`
-
- // The resource type.
- ResourceType *string `json:"resource_type" validate:"required"`
-}
-
-// Constants associated with the NetworkInterfaceReference.ResourceType property.
-// The resource type.
-const (
- NetworkInterfaceReferenceResourceTypeNetworkInterfaceConst = "network_interface"
-)
-
-// UnmarshalNetworkInterfaceReference unmarshals an instance of NetworkInterfaceReference from the specified map of raw messages.
-func UnmarshalNetworkInterfaceReference(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(NetworkInterfaceReference)
- err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceReferenceDeleted)
- if err != nil {
- return
- }
- err = core.UnmarshalPrimitive(m, "href", &obj.Href)
- if err != nil {
- return
- }
- err = core.UnmarshalPrimitive(m, "id", &obj.ID)
- if err != nil {
- return
- }
- err = core.UnmarshalPrimitive(m, "name", &obj.Name)
- if err != nil {
- return
- }
- err = core.UnmarshalPrimitive(m, "primary_ipv4_address", &obj.PrimaryIpv4Address)
- if err != nil {
- return
- }
- err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
- if err != nil {
- return
- }
- reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
- return
-}
-
// NetworkInterfaceReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type NetworkInterfaceReferenceDeleted struct {
@@ -38147,7 +47844,7 @@ type OperatingSystem struct {
// A unique, display-friendly name for the operating system.
DisplayName *string `json:"display_name" validate:"required"`
- // The name of the software family this operating system belongs to.
+ // The software family for this operating system.
Family *string `json:"family" validate:"required"`
// The URL for this operating system.
@@ -38241,6 +47938,18 @@ func UnmarshalOperatingSystemCollection(m map[string]json.RawMessage, result int
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *OperatingSystemCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// OperatingSystemCollectionFirst : A link to the first page of resources.
type OperatingSystemCollectionFirst struct {
// The URL for a page of resources.
@@ -38310,6 +48019,277 @@ func UnmarshalOperatingSystemIdentity(m map[string]json.RawMessage, result inter
return
}
+// OperatingSystemReference : OperatingSystemReference struct
+type OperatingSystemReference struct {
+ // The URL for this operating system.
+ Href *string `json:"href" validate:"required"`
+
+ // The globally unique name for this operating system.
+ Name *string `json:"name" validate:"required"`
+}
+
+// UnmarshalOperatingSystemReference unmarshals an instance of OperatingSystemReference from the specified map of raw messages.
+func UnmarshalOperatingSystemReference(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(OperatingSystemReference)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// PlacementGroup : PlacementGroup struct
+type PlacementGroup struct {
+ // The date and time that the placement group was created.
+ CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
+
+ // The CRN for this placement group.
+ CRN *string `json:"crn" validate:"required"`
+
+ // The URL for this placement group.
+ Href *string `json:"href" validate:"required"`
+
+ // The unique identifier for this placement group.
+ ID *string `json:"id" validate:"required"`
+
+ // The lifecycle state of the placement group.
+ LifecycleState *string `json:"lifecycle_state" validate:"required"`
+
+ // The user-defined name for this placement group.
+ Name *string `json:"name" validate:"required"`
+
+ // The resource group for this placement group.
+ ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+
+ // The strategy for this placement group
+ // - `host_spread`: place on different compute hosts
+ // - `power_spread`: place on compute hosts that use different power sources
+ //
+ // The enumerated values for this property may expand in the future. When processing this property, check for and log
+ // unknown values. Optionally halt processing and surface the error, or bypass the placement group on which the
+ // unexpected strategy was encountered.
+ Strategy *string `json:"strategy" validate:"required"`
+}
+
+// Constants associated with the PlacementGroup.LifecycleState property.
+// The lifecycle state of the placement group.
+const (
+ PlacementGroupLifecycleStateDeletingConst = "deleting"
+ PlacementGroupLifecycleStateFailedConst = "failed"
+ PlacementGroupLifecycleStatePendingConst = "pending"
+ PlacementGroupLifecycleStateStableConst = "stable"
+ PlacementGroupLifecycleStateSuspendedConst = "suspended"
+ PlacementGroupLifecycleStateUpdatingConst = "updating"
+ PlacementGroupLifecycleStateWaitingConst = "waiting"
+)
+
+// Constants associated with the PlacementGroup.ResourceType property.
+// The resource type.
+const (
+ PlacementGroupResourceTypePlacementGroupConst = "placement_group"
+)
+
+// Constants associated with the PlacementGroup.Strategy property.
+// The strategy for this placement group
+// - `host_spread`: place on different compute hosts
+// - `power_spread`: place on compute hosts that use different power sources
+//
+// The enumerated values for this property may expand in the future. When processing this property, check for and log
+// unknown values. Optionally halt processing and surface the error, or bypass the placement group on which the
+// unexpected strategy was encountered.
+const (
+ PlacementGroupStrategyHostSpreadConst = "host_spread"
+ PlacementGroupStrategyPowerSpreadConst = "power_spread"
+)
+
+// UnmarshalPlacementGroup unmarshals an instance of PlacementGroup from the specified map of raw messages.
+func UnmarshalPlacementGroup(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(PlacementGroup)
+ err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "strategy", &obj.Strategy)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// PlacementGroupCollection : PlacementGroupCollection struct
+type PlacementGroupCollection struct {
+ // A link to the first page of resources.
+ First *PlacementGroupCollectionFirst `json:"first" validate:"required"`
+
+ // The maximum number of resources that can be returned by the request.
+ Limit *int64 `json:"limit" validate:"required"`
+
+ // A link to the next page of resources. This property is present for all pages
+ // except the last page.
+ Next *PlacementGroupCollectionNext `json:"next,omitempty"`
+
+ // Collection of placement groups.
+ PlacementGroups []PlacementGroup `json:"placement_groups" validate:"required"`
+
+ // The total number of resources across all pages.
+ TotalCount *int64 `json:"total_count" validate:"required"`
+}
+
+// UnmarshalPlacementGroupCollection unmarshals an instance of PlacementGroupCollection from the specified map of raw messages.
+func UnmarshalPlacementGroupCollection(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(PlacementGroupCollection)
+ err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalPlacementGroupCollectionFirst)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalPlacementGroupCollectionNext)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "placement_groups", &obj.PlacementGroups, UnmarshalPlacementGroup)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *PlacementGroupCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
+// PlacementGroupCollectionFirst : A link to the first page of resources.
+type PlacementGroupCollectionFirst struct {
+ // The URL for a page of resources.
+ Href *string `json:"href" validate:"required"`
+}
+
+// UnmarshalPlacementGroupCollectionFirst unmarshals an instance of PlacementGroupCollectionFirst from the specified map of raw messages.
+func UnmarshalPlacementGroupCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(PlacementGroupCollectionFirst)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// PlacementGroupCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
+type PlacementGroupCollectionNext struct {
+ // The URL for a page of resources.
+ Href *string `json:"href" validate:"required"`
+}
+
+// UnmarshalPlacementGroupCollectionNext unmarshals an instance of PlacementGroupCollectionNext from the specified map of raw messages.
+func UnmarshalPlacementGroupCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(PlacementGroupCollectionNext)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// PlacementGroupPatch : PlacementGroupPatch struct
+type PlacementGroupPatch struct {
+ // The user-defined name for this placement group.
+ Name *string `json:"name,omitempty"`
+}
+
+// UnmarshalPlacementGroupPatch unmarshals an instance of PlacementGroupPatch from the specified map of raw messages.
+func UnmarshalPlacementGroupPatch(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(PlacementGroupPatch)
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// AsPatch returns a generic map representation of the PlacementGroupPatch
+func (placementGroupPatch *PlacementGroupPatch) AsPatch() (_patch map[string]interface{}, err error) {
+ var jsonData []byte
+ jsonData, err = json.Marshal(placementGroupPatch)
+ if err == nil {
+ err = json.Unmarshal(jsonData, &_patch)
+ }
+ return
+}
+
+// PlacementGroupReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
+// information.
+type PlacementGroupReferenceDeleted struct {
+ // Link to documentation about deleted resources.
+ MoreInfo *string `json:"more_info" validate:"required"`
+}
+
+// UnmarshalPlacementGroupReferenceDeleted unmarshals an instance of PlacementGroupReferenceDeleted from the specified map of raw messages.
+func UnmarshalPlacementGroupReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(PlacementGroupReferenceDeleted)
+ err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// PublicGateway : PublicGateway struct
type PublicGateway struct {
// The date and time that the public gateway was created.
@@ -38318,7 +48298,7 @@ type PublicGateway struct {
// The CRN for this public gateway.
CRN *string `json:"crn" validate:"required"`
- // Reference to the floating IP which is bound to this public gateway.
+ // The floating IP bound to this public gateway.
FloatingIP *PublicGatewayFloatingIP `json:"floating_ip" validate:"required"`
// The URL for this public gateway.
@@ -38458,6 +48438,18 @@ func UnmarshalPublicGatewayCollection(m map[string]json.RawMessage, result inter
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *PublicGatewayCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// PublicGatewayCollectionFirst : A link to the first page of resources.
type PublicGatewayCollectionFirst struct {
// The URL for a page of resources.
@@ -38492,7 +48484,7 @@ func UnmarshalPublicGatewayCollectionNext(m map[string]json.RawMessage, result i
return
}
-// PublicGatewayFloatingIP : Reference to the floating IP which is bound to this public gateway.
+// PublicGatewayFloatingIP : The floating IP bound to this public gateway.
type PublicGatewayFloatingIP struct {
// The globally unique IP address.
Address *string `json:"address" validate:"required"`
@@ -38612,9 +48604,9 @@ func UnmarshalPublicGatewayFloatingIPPrototype(m map[string]json.RawMessage, res
// PublicGatewayIdentity : Identifies a public gateway by a unique property.
// Models which "extend" this model:
-// - PublicGatewayIdentityByID
-// - PublicGatewayIdentityByCRN
-// - PublicGatewayIdentityByHref
+// - PublicGatewayIdentityPublicGatewayIdentityByID
+// - PublicGatewayIdentityPublicGatewayIdentityByCRN
+// - PublicGatewayIdentityPublicGatewayIdentityByHref
type PublicGatewayIdentity struct {
// The unique identifier for this public gateway.
ID *string `json:"id,omitempty"`
@@ -38671,11 +48663,11 @@ func UnmarshalPublicGatewayPatch(m map[string]json.RawMessage, result interface{
}
// AsPatch returns a generic map representation of the PublicGatewayPatch
-func (publicGatewayPatch *PublicGatewayPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (publicGatewayPatch *PublicGatewayPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(publicGatewayPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -38843,13 +48835,61 @@ func UnmarshalRegionReference(m map[string]json.RawMessage, result interface{})
return
}
+// RemoveBareMetalServerNetworkInterfaceFloatingIPOptions : The RemoveBareMetalServerNetworkInterfaceFloatingIP options.
+type RemoveBareMetalServerNetworkInterfaceFloatingIPOptions struct {
+ // The bare metal server identifier.
+ BareMetalServerID *string `json:"bare_metal_server_id" validate:"required,ne="`
+
+ // The network interface identifier.
+ NetworkInterfaceID *string `json:"network_interface_id" validate:"required,ne="`
+
+ // The floating IP identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewRemoveBareMetalServerNetworkInterfaceFloatingIPOptions : Instantiate RemoveBareMetalServerNetworkInterfaceFloatingIPOptions
+func (*VpcV1) NewRemoveBareMetalServerNetworkInterfaceFloatingIPOptions(bareMetalServerID string, networkInterfaceID string, id string) *RemoveBareMetalServerNetworkInterfaceFloatingIPOptions {
+ return &RemoveBareMetalServerNetworkInterfaceFloatingIPOptions{
+ BareMetalServerID: core.StringPtr(bareMetalServerID),
+ NetworkInterfaceID: core.StringPtr(networkInterfaceID),
+ ID: core.StringPtr(id),
+ }
+}
+
+// SetBareMetalServerID : Allow user to set BareMetalServerID
+func (_options *RemoveBareMetalServerNetworkInterfaceFloatingIPOptions) SetBareMetalServerID(bareMetalServerID string) *RemoveBareMetalServerNetworkInterfaceFloatingIPOptions {
+ _options.BareMetalServerID = core.StringPtr(bareMetalServerID)
+ return _options
+}
+
+// SetNetworkInterfaceID : Allow user to set NetworkInterfaceID
+func (_options *RemoveBareMetalServerNetworkInterfaceFloatingIPOptions) SetNetworkInterfaceID(networkInterfaceID string) *RemoveBareMetalServerNetworkInterfaceFloatingIPOptions {
+ _options.NetworkInterfaceID = core.StringPtr(networkInterfaceID)
+ return _options
+}
+
+// SetID : Allow user to set ID
+func (_options *RemoveBareMetalServerNetworkInterfaceFloatingIPOptions) SetID(id string) *RemoveBareMetalServerNetworkInterfaceFloatingIPOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *RemoveBareMetalServerNetworkInterfaceFloatingIPOptions) SetHeaders(param map[string]string) *RemoveBareMetalServerNetworkInterfaceFloatingIPOptions {
+ options.Headers = param
+ return options
+}
+
// RemoveEndpointGatewayIPOptions : The RemoveEndpointGatewayIP options.
type RemoveEndpointGatewayIPOptions struct {
// The endpoint gateway identifier.
- EndpointGatewayID *string `validate:"required,ne="`
+ EndpointGatewayID *string `json:"endpoint_gateway_id" validate:"required,ne="`
// The reserved IP identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -38864,15 +48904,15 @@ func (*VpcV1) NewRemoveEndpointGatewayIPOptions(endpointGatewayID string, id str
}
// SetEndpointGatewayID : Allow user to set EndpointGatewayID
-func (options *RemoveEndpointGatewayIPOptions) SetEndpointGatewayID(endpointGatewayID string) *RemoveEndpointGatewayIPOptions {
- options.EndpointGatewayID = core.StringPtr(endpointGatewayID)
- return options
+func (_options *RemoveEndpointGatewayIPOptions) SetEndpointGatewayID(endpointGatewayID string) *RemoveEndpointGatewayIPOptions {
+ _options.EndpointGatewayID = core.StringPtr(endpointGatewayID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *RemoveEndpointGatewayIPOptions) SetID(id string) *RemoveEndpointGatewayIPOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *RemoveEndpointGatewayIPOptions) SetID(id string) *RemoveEndpointGatewayIPOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -38884,13 +48924,13 @@ func (options *RemoveEndpointGatewayIPOptions) SetHeaders(param map[string]strin
// RemoveInstanceNetworkInterfaceFloatingIPOptions : The RemoveInstanceNetworkInterfaceFloatingIP options.
type RemoveInstanceNetworkInterfaceFloatingIPOptions struct {
// The instance identifier.
- InstanceID *string `validate:"required,ne="`
+ InstanceID *string `json:"instance_id" validate:"required,ne="`
// The network interface identifier.
- NetworkInterfaceID *string `validate:"required,ne="`
+ NetworkInterfaceID *string `json:"network_interface_id" validate:"required,ne="`
// The floating IP identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -38906,21 +48946,21 @@ func (*VpcV1) NewRemoveInstanceNetworkInterfaceFloatingIPOptions(instanceID stri
}
// SetInstanceID : Allow user to set InstanceID
-func (options *RemoveInstanceNetworkInterfaceFloatingIPOptions) SetInstanceID(instanceID string) *RemoveInstanceNetworkInterfaceFloatingIPOptions {
- options.InstanceID = core.StringPtr(instanceID)
- return options
+func (_options *RemoveInstanceNetworkInterfaceFloatingIPOptions) SetInstanceID(instanceID string) *RemoveInstanceNetworkInterfaceFloatingIPOptions {
+ _options.InstanceID = core.StringPtr(instanceID)
+ return _options
}
// SetNetworkInterfaceID : Allow user to set NetworkInterfaceID
-func (options *RemoveInstanceNetworkInterfaceFloatingIPOptions) SetNetworkInterfaceID(networkInterfaceID string) *RemoveInstanceNetworkInterfaceFloatingIPOptions {
- options.NetworkInterfaceID = core.StringPtr(networkInterfaceID)
- return options
+func (_options *RemoveInstanceNetworkInterfaceFloatingIPOptions) SetNetworkInterfaceID(networkInterfaceID string) *RemoveInstanceNetworkInterfaceFloatingIPOptions {
+ _options.NetworkInterfaceID = core.StringPtr(networkInterfaceID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *RemoveInstanceNetworkInterfaceFloatingIPOptions) SetID(id string) *RemoveInstanceNetworkInterfaceFloatingIPOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *RemoveInstanceNetworkInterfaceFloatingIPOptions) SetID(id string) *RemoveInstanceNetworkInterfaceFloatingIPOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -38929,57 +48969,19 @@ func (options *RemoveInstanceNetworkInterfaceFloatingIPOptions) SetHeaders(param
return options
}
-// RemoveSecurityGroupNetworkInterfaceOptions : The RemoveSecurityGroupNetworkInterface options.
-type RemoveSecurityGroupNetworkInterfaceOptions struct {
- // The security group identifier.
- SecurityGroupID *string `validate:"required,ne="`
-
- // The network interface identifier.
- ID *string `validate:"required,ne="`
-
- // Allows users to set headers on API requests
- Headers map[string]string
-}
-
-// NewRemoveSecurityGroupNetworkInterfaceOptions : Instantiate RemoveSecurityGroupNetworkInterfaceOptions
-func (*VpcV1) NewRemoveSecurityGroupNetworkInterfaceOptions(securityGroupID string, id string) *RemoveSecurityGroupNetworkInterfaceOptions {
- return &RemoveSecurityGroupNetworkInterfaceOptions{
- SecurityGroupID: core.StringPtr(securityGroupID),
- ID: core.StringPtr(id),
- }
-}
-
-// SetSecurityGroupID : Allow user to set SecurityGroupID
-func (options *RemoveSecurityGroupNetworkInterfaceOptions) SetSecurityGroupID(securityGroupID string) *RemoveSecurityGroupNetworkInterfaceOptions {
- options.SecurityGroupID = core.StringPtr(securityGroupID)
- return options
-}
-
-// SetID : Allow user to set ID
-func (options *RemoveSecurityGroupNetworkInterfaceOptions) SetID(id string) *RemoveSecurityGroupNetworkInterfaceOptions {
- options.ID = core.StringPtr(id)
- return options
-}
-
-// SetHeaders : Allow user to set Headers
-func (options *RemoveSecurityGroupNetworkInterfaceOptions) SetHeaders(param map[string]string) *RemoveSecurityGroupNetworkInterfaceOptions {
- options.Headers = param
- return options
-}
-
// RemoveVPNGatewayConnectionLocalCIDROptions : The RemoveVPNGatewayConnectionLocalCIDR options.
type RemoveVPNGatewayConnectionLocalCIDROptions struct {
// The VPN gateway identifier.
- VPNGatewayID *string `validate:"required,ne="`
+ VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="`
// The VPN gateway connection identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The address prefix part of the CIDR.
- CIDRPrefix *string `validate:"required,ne="`
+ CIDRPrefix *string `json:"cidr_prefix" validate:"required,ne="`
// The prefix length part of the CIDR.
- PrefixLength *string `validate:"required,ne="`
+ PrefixLength *string `json:"prefix_length" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -38996,27 +48998,27 @@ func (*VpcV1) NewRemoveVPNGatewayConnectionLocalCIDROptions(vpnGatewayID string,
}
// SetVPNGatewayID : Allow user to set VPNGatewayID
-func (options *RemoveVPNGatewayConnectionLocalCIDROptions) SetVPNGatewayID(vpnGatewayID string) *RemoveVPNGatewayConnectionLocalCIDROptions {
- options.VPNGatewayID = core.StringPtr(vpnGatewayID)
- return options
+func (_options *RemoveVPNGatewayConnectionLocalCIDROptions) SetVPNGatewayID(vpnGatewayID string) *RemoveVPNGatewayConnectionLocalCIDROptions {
+ _options.VPNGatewayID = core.StringPtr(vpnGatewayID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *RemoveVPNGatewayConnectionLocalCIDROptions) SetID(id string) *RemoveVPNGatewayConnectionLocalCIDROptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *RemoveVPNGatewayConnectionLocalCIDROptions) SetID(id string) *RemoveVPNGatewayConnectionLocalCIDROptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetCIDRPrefix : Allow user to set CIDRPrefix
-func (options *RemoveVPNGatewayConnectionLocalCIDROptions) SetCIDRPrefix(cidrPrefix string) *RemoveVPNGatewayConnectionLocalCIDROptions {
- options.CIDRPrefix = core.StringPtr(cidrPrefix)
- return options
+func (_options *RemoveVPNGatewayConnectionLocalCIDROptions) SetCIDRPrefix(cidrPrefix string) *RemoveVPNGatewayConnectionLocalCIDROptions {
+ _options.CIDRPrefix = core.StringPtr(cidrPrefix)
+ return _options
}
// SetPrefixLength : Allow user to set PrefixLength
-func (options *RemoveVPNGatewayConnectionLocalCIDROptions) SetPrefixLength(prefixLength string) *RemoveVPNGatewayConnectionLocalCIDROptions {
- options.PrefixLength = core.StringPtr(prefixLength)
- return options
+func (_options *RemoveVPNGatewayConnectionLocalCIDROptions) SetPrefixLength(prefixLength string) *RemoveVPNGatewayConnectionLocalCIDROptions {
+ _options.PrefixLength = core.StringPtr(prefixLength)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -39028,16 +49030,16 @@ func (options *RemoveVPNGatewayConnectionLocalCIDROptions) SetHeaders(param map[
// RemoveVPNGatewayConnectionPeerCIDROptions : The RemoveVPNGatewayConnectionPeerCIDR options.
type RemoveVPNGatewayConnectionPeerCIDROptions struct {
// The VPN gateway identifier.
- VPNGatewayID *string `validate:"required,ne="`
+ VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="`
// The VPN gateway connection identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The address prefix part of the CIDR.
- CIDRPrefix *string `validate:"required,ne="`
+ CIDRPrefix *string `json:"cidr_prefix" validate:"required,ne="`
// The prefix length part of the CIDR.
- PrefixLength *string `validate:"required,ne="`
+ PrefixLength *string `json:"prefix_length" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -39054,27 +49056,27 @@ func (*VpcV1) NewRemoveVPNGatewayConnectionPeerCIDROptions(vpnGatewayID string,
}
// SetVPNGatewayID : Allow user to set VPNGatewayID
-func (options *RemoveVPNGatewayConnectionPeerCIDROptions) SetVPNGatewayID(vpnGatewayID string) *RemoveVPNGatewayConnectionPeerCIDROptions {
- options.VPNGatewayID = core.StringPtr(vpnGatewayID)
- return options
+func (_options *RemoveVPNGatewayConnectionPeerCIDROptions) SetVPNGatewayID(vpnGatewayID string) *RemoveVPNGatewayConnectionPeerCIDROptions {
+ _options.VPNGatewayID = core.StringPtr(vpnGatewayID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *RemoveVPNGatewayConnectionPeerCIDROptions) SetID(id string) *RemoveVPNGatewayConnectionPeerCIDROptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *RemoveVPNGatewayConnectionPeerCIDROptions) SetID(id string) *RemoveVPNGatewayConnectionPeerCIDROptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetCIDRPrefix : Allow user to set CIDRPrefix
-func (options *RemoveVPNGatewayConnectionPeerCIDROptions) SetCIDRPrefix(cidrPrefix string) *RemoveVPNGatewayConnectionPeerCIDROptions {
- options.CIDRPrefix = core.StringPtr(cidrPrefix)
- return options
+func (_options *RemoveVPNGatewayConnectionPeerCIDROptions) SetCIDRPrefix(cidrPrefix string) *RemoveVPNGatewayConnectionPeerCIDROptions {
+ _options.CIDRPrefix = core.StringPtr(cidrPrefix)
+ return _options
}
// SetPrefixLength : Allow user to set PrefixLength
-func (options *RemoveVPNGatewayConnectionPeerCIDROptions) SetPrefixLength(prefixLength string) *RemoveVPNGatewayConnectionPeerCIDROptions {
- options.PrefixLength = core.StringPtr(prefixLength)
- return options
+func (_options *RemoveVPNGatewayConnectionPeerCIDROptions) SetPrefixLength(prefixLength string) *RemoveVPNGatewayConnectionPeerCIDROptions {
+ _options.PrefixLength = core.StringPtr(prefixLength)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -39086,13 +49088,13 @@ func (options *RemoveVPNGatewayConnectionPeerCIDROptions) SetHeaders(param map[s
// ReplaceLoadBalancerPoolMembersOptions : The ReplaceLoadBalancerPoolMembers options.
type ReplaceLoadBalancerPoolMembersOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// The pool identifier.
- PoolID *string `validate:"required,ne="`
+ PoolID *string `json:"pool_id" validate:"required,ne="`
- // Array of pool member prototype objects.
- Members []LoadBalancerPoolMemberPrototype `validate:"required"`
+ // The member prototype objects for this pool.
+ Members []LoadBalancerPoolMemberPrototype `json:"members" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -39108,21 +49110,21 @@ func (*VpcV1) NewReplaceLoadBalancerPoolMembersOptions(loadBalancerID string, po
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *ReplaceLoadBalancerPoolMembersOptions) SetLoadBalancerID(loadBalancerID string) *ReplaceLoadBalancerPoolMembersOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *ReplaceLoadBalancerPoolMembersOptions) SetLoadBalancerID(loadBalancerID string) *ReplaceLoadBalancerPoolMembersOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetPoolID : Allow user to set PoolID
-func (options *ReplaceLoadBalancerPoolMembersOptions) SetPoolID(poolID string) *ReplaceLoadBalancerPoolMembersOptions {
- options.PoolID = core.StringPtr(poolID)
- return options
+func (_options *ReplaceLoadBalancerPoolMembersOptions) SetPoolID(poolID string) *ReplaceLoadBalancerPoolMembersOptions {
+ _options.PoolID = core.StringPtr(poolID)
+ return _options
}
// SetMembers : Allow user to set Members
-func (options *ReplaceLoadBalancerPoolMembersOptions) SetMembers(members []LoadBalancerPoolMemberPrototype) *ReplaceLoadBalancerPoolMembersOptions {
- options.Members = members
- return options
+func (_options *ReplaceLoadBalancerPoolMembersOptions) SetMembers(members []LoadBalancerPoolMemberPrototype) *ReplaceLoadBalancerPoolMembersOptions {
+ _options.Members = members
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -39134,10 +49136,10 @@ func (options *ReplaceLoadBalancerPoolMembersOptions) SetHeaders(param map[strin
// ReplaceSubnetNetworkACLOptions : The ReplaceSubnetNetworkACL options.
type ReplaceSubnetNetworkACLOptions struct {
// The subnet identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The network ACL identity.
- NetworkACLIdentity NetworkACLIdentityIntf `validate:"required"`
+ NetworkACLIdentity NetworkACLIdentityIntf `json:"NetworkACLIdentity" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -39152,15 +49154,15 @@ func (*VpcV1) NewReplaceSubnetNetworkACLOptions(id string, networkACLIdentity Ne
}
// SetID : Allow user to set ID
-func (options *ReplaceSubnetNetworkACLOptions) SetID(id string) *ReplaceSubnetNetworkACLOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *ReplaceSubnetNetworkACLOptions) SetID(id string) *ReplaceSubnetNetworkACLOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetNetworkACLIdentity : Allow user to set NetworkACLIdentity
-func (options *ReplaceSubnetNetworkACLOptions) SetNetworkACLIdentity(networkACLIdentity NetworkACLIdentityIntf) *ReplaceSubnetNetworkACLOptions {
- options.NetworkACLIdentity = networkACLIdentity
- return options
+func (_options *ReplaceSubnetNetworkACLOptions) SetNetworkACLIdentity(networkACLIdentity NetworkACLIdentityIntf) *ReplaceSubnetNetworkACLOptions {
+ _options.NetworkACLIdentity = networkACLIdentity
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -39172,10 +49174,10 @@ func (options *ReplaceSubnetNetworkACLOptions) SetHeaders(param map[string]strin
// ReplaceSubnetRoutingTableOptions : The ReplaceSubnetRoutingTable options.
type ReplaceSubnetRoutingTableOptions struct {
// The subnet identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The routing table identity.
- RoutingTableIdentity RoutingTableIdentityIntf `validate:"required"`
+ RoutingTableIdentity RoutingTableIdentityIntf `json:"RoutingTableIdentity" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -39190,15 +49192,15 @@ func (*VpcV1) NewReplaceSubnetRoutingTableOptions(id string, routingTableIdentit
}
// SetID : Allow user to set ID
-func (options *ReplaceSubnetRoutingTableOptions) SetID(id string) *ReplaceSubnetRoutingTableOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *ReplaceSubnetRoutingTableOptions) SetID(id string) *ReplaceSubnetRoutingTableOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetRoutingTableIdentity : Allow user to set RoutingTableIdentity
-func (options *ReplaceSubnetRoutingTableOptions) SetRoutingTableIdentity(routingTableIdentity RoutingTableIdentityIntf) *ReplaceSubnetRoutingTableOptions {
- options.RoutingTableIdentity = routingTableIdentity
- return options
+func (_options *ReplaceSubnetRoutingTableOptions) SetRoutingTableIdentity(routingTableIdentity RoutingTableIdentityIntf) *ReplaceSubnetRoutingTableOptions {
+ _options.RoutingTableIdentity = routingTableIdentity
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -39209,13 +49211,17 @@ func (options *ReplaceSubnetRoutingTableOptions) SetHeaders(param map[string]str
// ReservedIP : ReservedIP struct
type ReservedIP struct {
- // The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
- // property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
- // and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
+ // The IP address.
+ //
+ // If the address has not yet been selected, the value will be `0.0.0.0`.
+ //
+ // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify
+ // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the
+ // error, or bypass the resource on which the unexpected IP address format was encountered.
Address *string `json:"address" validate:"required"`
- // If set to `true`, this reserved IP will be automatically deleted when the target is deleted or when the reserved IP
- // is unbound.
+ // Indicates whether this reserved IP member will be automatically deleted when either
+ // `target` is deleted, or the reserved IP is unbound.
AutoDelete *bool `json:"auto_delete" validate:"required"`
// The date and time that the reserved IP was created.
@@ -39227,21 +49233,38 @@ type ReservedIP struct {
// The unique identifier for this reserved IP.
ID *string `json:"id" validate:"required"`
+ // The lifecycle state of the reserved IP.
+ LifecycleState *string `json:"lifecycle_state" validate:"required"`
+
// The user-defined or system-provided name for this reserved IP.
Name *string `json:"name" validate:"required"`
- // The owner of a reserved IP, defining whether it is managed by the user or the provider.
+ // The owner of the reserved IP.
Owner *string `json:"owner" validate:"required"`
// The resource type.
ResourceType *string `json:"resource_type" validate:"required"`
// The target of this reserved IP.
+ //
+ // If absent, this reserved IP is provider-owned or unbound.
Target ReservedIPTargetIntf `json:"target,omitempty"`
}
+// Constants associated with the ReservedIP.LifecycleState property.
+// The lifecycle state of the reserved IP.
+const (
+ ReservedIPLifecycleStateDeletingConst = "deleting"
+ ReservedIPLifecycleStateFailedConst = "failed"
+ ReservedIPLifecycleStatePendingConst = "pending"
+ ReservedIPLifecycleStateStableConst = "stable"
+ ReservedIPLifecycleStateSuspendedConst = "suspended"
+ ReservedIPLifecycleStateUpdatingConst = "updating"
+ ReservedIPLifecycleStateWaitingConst = "waiting"
+)
+
// Constants associated with the ReservedIP.Owner property.
-// The owner of a reserved IP, defining whether it is managed by the user or the provider.
+// The owner of the reserved IP.
const (
ReservedIPOwnerProviderConst = "provider"
ReservedIPOwnerUserConst = "user"
@@ -39276,6 +49299,10 @@ func UnmarshalReservedIP(m map[string]json.RawMessage, result interface{}) (err
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "name", &obj.Name)
if err != nil {
return
@@ -39342,6 +49369,18 @@ func UnmarshalReservedIPCollection(m map[string]json.RawMessage, result interfac
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *ReservedIPCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// ReservedIPCollectionEndpointGatewayContext : ReservedIPCollectionEndpointGatewayContext struct
type ReservedIPCollectionEndpointGatewayContext struct {
// A link to the first page of resources.
@@ -39388,6 +49427,18 @@ func UnmarshalReservedIPCollectionEndpointGatewayContext(m map[string]json.RawMe
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *ReservedIPCollectionEndpointGatewayContext) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// ReservedIPCollectionEndpointGatewayContextFirst : A link to the first page of resources.
type ReservedIPCollectionEndpointGatewayContextFirst struct {
// The URL for a page of resources.
@@ -39439,6 +49490,98 @@ func UnmarshalReservedIPCollectionFirst(m map[string]json.RawMessage, result int
return
}
+// ReservedIPCollectionNetworkInterfaceContext : ReservedIPCollectionNetworkInterfaceContext struct
+type ReservedIPCollectionNetworkInterfaceContext struct {
+ // A link to the first page of resources.
+ First *ReservedIPCollectionNetworkInterfaceContextFirst `json:"first" validate:"required"`
+
+ // Collection of reserved IPs bound to a network interface.
+ Ips []ReservedIP `json:"ips" validate:"required"`
+
+ // The maximum number of resources that can be returned by the request.
+ Limit *int64 `json:"limit" validate:"required"`
+
+ // A link to the next page of resources. This property is present for all pages
+ // except the last page.
+ Next *ReservedIPCollectionNetworkInterfaceContextNext `json:"next,omitempty"`
+
+ // The total number of resources across all pages.
+ TotalCount *int64 `json:"total_count" validate:"required"`
+}
+
+// UnmarshalReservedIPCollectionNetworkInterfaceContext unmarshals an instance of ReservedIPCollectionNetworkInterfaceContext from the specified map of raw messages.
+func UnmarshalReservedIPCollectionNetworkInterfaceContext(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(ReservedIPCollectionNetworkInterfaceContext)
+ err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalReservedIPCollectionNetworkInterfaceContextFirst)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "ips", &obj.Ips, UnmarshalReservedIP)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalReservedIPCollectionNetworkInterfaceContextNext)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *ReservedIPCollectionNetworkInterfaceContext) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
+// ReservedIPCollectionNetworkInterfaceContextFirst : A link to the first page of resources.
+type ReservedIPCollectionNetworkInterfaceContextFirst struct {
+ // The URL for a page of resources.
+ Href *string `json:"href" validate:"required"`
+}
+
+// UnmarshalReservedIPCollectionNetworkInterfaceContextFirst unmarshals an instance of ReservedIPCollectionNetworkInterfaceContextFirst from the specified map of raw messages.
+func UnmarshalReservedIPCollectionNetworkInterfaceContextFirst(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(ReservedIPCollectionNetworkInterfaceContextFirst)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// ReservedIPCollectionNetworkInterfaceContextNext : A link to the next page of resources. This property is present for all pages except the last page.
+type ReservedIPCollectionNetworkInterfaceContextNext struct {
+ // The URL for a page of resources.
+ Href *string `json:"href" validate:"required"`
+}
+
+// UnmarshalReservedIPCollectionNetworkInterfaceContextNext unmarshals an instance of ReservedIPCollectionNetworkInterfaceContextNext from the specified map of raw messages.
+func UnmarshalReservedIPCollectionNetworkInterfaceContextNext(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(ReservedIPCollectionNetworkInterfaceContextNext)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// ReservedIPCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type ReservedIPCollectionNext struct {
// The URL for a page of resources.
@@ -39458,8 +49601,8 @@ func UnmarshalReservedIPCollectionNext(m map[string]json.RawMessage, result inte
// ReservedIPPatch : ReservedIPPatch struct
type ReservedIPPatch struct {
- // If set to `true`, this reserved IP will be automatically deleted when the target is deleted or when the reserved IP
- // is unbound. The value cannot be set to `true` if the reserved IP is unbound.
+ // Indicates whether this reserved IP member will be automatically deleted when either
+ // `target` is deleted, or the reserved IP is unbound. Must be `false` if the reserved IP is unbound.
AutoDelete *bool `json:"auto_delete,omitempty"`
// The user-defined name for this reserved IP. Names must be unique within the subnet the reserved IP resides in. Names
@@ -39483,20 +49626,24 @@ func UnmarshalReservedIPPatch(m map[string]json.RawMessage, result interface{})
}
// AsPatch returns a generic map representation of the ReservedIPPatch
-func (reservedIPPatch *ReservedIPPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (reservedIPPatch *ReservedIPPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(reservedIPPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
// ReservedIPReference : ReservedIPReference struct
type ReservedIPReference struct {
- // The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
- // property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
- // and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
+ // The IP address.
+ //
+ // If the address has not yet been selected, the value will be `0.0.0.0`.
+ //
+ // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify
+ // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the
+ // error, or bypass the resource on which the unexpected IP address format was encountered.
Address *string `json:"address" validate:"required"`
// If present, this property indicates the referenced resource has been deleted and provides
@@ -39572,8 +49719,14 @@ func UnmarshalReservedIPReferenceDeleted(m map[string]json.RawMessage, result in
}
// ReservedIPTarget : The target of this reserved IP.
+//
+// If absent, this reserved IP is provider-owned or unbound.
// Models which "extend" this model:
// - ReservedIPTargetEndpointGatewayReference
+// - ReservedIPTargetNetworkInterfaceReferenceTargetContext
+// - ReservedIPTargetLoadBalancerReference
+// - ReservedIPTargetVPNGatewayReference
+// - ReservedIPTargetGenericResourceReference
type ReservedIPTarget struct {
// The CRN for this endpoint gateway.
CRN *string `json:"crn,omitempty"`
@@ -39591,12 +49744,12 @@ type ReservedIPTarget struct {
// The unique user-defined name for this endpoint gateway.
Name *string `json:"name,omitempty"`
- // The type of resource referenced.
+ // The resource type.
ResourceType *string `json:"resource_type,omitempty"`
}
// Constants associated with the ReservedIPTarget.ResourceType property.
-// The type of resource referenced.
+// The resource type.
const (
ReservedIPTargetResourceTypeEndpointGatewayConst = "endpoint_gateway"
)
@@ -39640,7 +49793,8 @@ func UnmarshalReservedIPTarget(m map[string]json.RawMessage, result interface{})
return
}
-// ReservedIPTargetPrototype : The target this reserved IP is to be bound to.
+// ReservedIPTargetPrototype : The target this reserved IP is to be bound to. The target must be an endpoint gateway not already bound to a reserved
+// IP in the subnet's zone.
// Models which "extend" this model:
// - ReservedIPTargetPrototypeEndpointGatewayIdentity
type ReservedIPTargetPrototype struct {
@@ -39740,8 +49894,44 @@ func UnmarshalResourceGroupReference(m map[string]json.RawMessage, result interf
return
}
+// RestartBareMetalServerOptions : The RestartBareMetalServer options.
+type RestartBareMetalServerOptions struct {
+ // The bare metal server identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewRestartBareMetalServerOptions : Instantiate RestartBareMetalServerOptions
+func (*VpcV1) NewRestartBareMetalServerOptions(id string) *RestartBareMetalServerOptions {
+ return &RestartBareMetalServerOptions{
+ ID: core.StringPtr(id),
+ }
+}
+
+// SetID : Allow user to set ID
+func (_options *RestartBareMetalServerOptions) SetID(id string) *RestartBareMetalServerOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *RestartBareMetalServerOptions) SetHeaders(param map[string]string) *RestartBareMetalServerOptions {
+ options.Headers = param
+ return options
+}
+
// Route : Route struct
type Route struct {
+ // The action to perform with a packet matching the route:
+ // - `delegate`: delegate to the system's built-in routes
+ // - `delegate_vpc`: delegate to the system's built-in routes, ignoring Internet-bound
+ // routes
+ // - `deliver`: deliver the packet to the specified `next_hop`
+ // - `drop`: drop the packet.
+ Action *string `json:"action" validate:"required"`
+
// The date and time that the route was created.
CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
@@ -39769,10 +49959,23 @@ type Route struct {
Zone *ZoneReference `json:"zone" validate:"required"`
}
+// Constants associated with the Route.Action property.
+// The action to perform with a packet matching the route:
+// - `delegate`: delegate to the system's built-in routes
+// - `delegate_vpc`: delegate to the system's built-in routes, ignoring Internet-bound
+// routes
+// - `deliver`: deliver the packet to the specified `next_hop`
+// - `drop`: drop the packet.
+const (
+ RouteActionDelegateConst = "delegate"
+ RouteActionDelegateVPCConst = "delegate_vpc"
+ RouteActionDeliverConst = "deliver"
+ RouteActionDropConst = "drop"
+)
+
// Constants associated with the Route.LifecycleState property.
// The lifecycle state of the route.
const (
- RouteLifecycleStateDeletedConst = "deleted"
RouteLifecycleStateDeletingConst = "deleting"
RouteLifecycleStateFailedConst = "failed"
RouteLifecycleStatePendingConst = "pending"
@@ -39785,6 +49988,10 @@ const (
// UnmarshalRoute unmarshals an instance of Route from the specified map of raw messages.
func UnmarshalRoute(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(Route)
+ err = core.UnmarshalPrimitive(m, "action", &obj.Action)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
if err != nil {
return
@@ -39867,6 +50074,18 @@ func UnmarshalRouteCollection(m map[string]json.RawMessage, result interface{})
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *RouteCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// RouteCollectionFirst : A link to the first page of resources.
type RouteCollectionFirst struct {
// The URL for a page of resources.
@@ -39906,9 +50125,11 @@ func UnmarshalRouteCollectionNext(m map[string]json.RawMessage, result interface
// - RouteNextHopIP
// - RouteNextHopVPNGatewayConnectionReference
type RouteNextHop struct {
- // The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
- // property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
- // and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
+ // The IP address.
+ //
+ // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify
+ // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the
+ // error, or bypass the resource on which the unexpected IP address format was encountered.
Address *string `json:"address,omitempty"`
// If present, this property indicates the referenced resource has been deleted and provides
@@ -39978,9 +50199,11 @@ func UnmarshalRouteNextHop(m map[string]json.RawMessage, result interface{}) (er
// - RouteNextHopPrototypeRouteNextHopIP
// - RouteNextHopPrototypeVPNGatewayConnectionIdentity
type RouteNextHopPrototype struct {
- // The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
- // property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
- // and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
+ // The IP address.
+ //
+ // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify
+ // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the
+ // error, or bypass the resource on which the unexpected IP address format was encountered.
Address *string `json:"address,omitempty"`
// The unique identifier for this VPN gateway connection.
@@ -40035,11 +50258,11 @@ func UnmarshalRoutePatch(m map[string]json.RawMessage, result interface{}) (err
}
// AsPatch returns a generic map representation of the RoutePatch
-func (routePatch *RoutePatch) AsPatch() (patch map[string]interface{}, err error) {
+func (routePatch *RoutePatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(routePatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -40087,12 +50310,12 @@ const (
)
// NewRoutePrototype : Instantiate RoutePrototype (Generic Model Constructor)
-func (*VpcV1) NewRoutePrototype(destination string, zone ZoneIdentityIntf) (model *RoutePrototype, err error) {
- model = &RoutePrototype{
+func (*VpcV1) NewRoutePrototype(destination string, zone ZoneIdentityIntf) (_model *RoutePrototype, err error) {
+ _model = &RoutePrototype{
Destination: core.StringPtr(destination),
Zone: zone,
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -40207,27 +50430,27 @@ type RoutingTable struct {
// [Direct Link](https://cloud.ibm.com/docs/dl/) to this VPC.
//
// Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
- // `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.
- // Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP address or a VPN gateway
- // connection, the packet will be dropped.
+ // `deliver` are treated as `drop` unless the `next_hop` is an IP address bound to a network interface on a subnet in
+ // the route's `zone`. Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP
+ // address or a VPN gateway connection, the packet will be dropped.
RouteDirectLinkIngress *bool `json:"route_direct_link_ingress" validate:"required"`
// Indicates whether this routing table is used to route traffic that originates from from [Transit
// Gateway](https://cloud.ibm.com/cloud/transit-gateway/) to this VPC.
//
// Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
- // `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.
- // Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP address or a VPN gateway
- // connection, the packet will be dropped.
+ // `deliver` are treated as `drop` unless the `next_hop` is an IP address bound to a network interface on a subnet in
+ // the route's `zone`. Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP
+ // address or a VPN gateway connection, the packet will be dropped.
RouteTransitGatewayIngress *bool `json:"route_transit_gateway_ingress" validate:"required"`
// Indicates whether this routing table is used to route traffic that originates from subnets in other zones in this
// VPC.
//
// Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
- // `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.
- // Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP address or a VPN gateway
- // connection, the packet will be dropped.
+ // `deliver` are treated as `drop` unless the `next_hop` is an IP address bound to a network interface on a subnet in
+ // the route's `zone`. Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP
+ // address or a VPN gateway connection, the packet will be dropped.
RouteVPCZoneIngress *bool `json:"route_vpc_zone_ingress" validate:"required"`
// The routes for this routing table.
@@ -40240,7 +50463,6 @@ type RoutingTable struct {
// Constants associated with the RoutingTable.LifecycleState property.
// The lifecycle state of the routing table.
const (
- RoutingTableLifecycleStateDeletedConst = "deleted"
RoutingTableLifecycleStateDeletingConst = "deleting"
RoutingTableLifecycleStateFailedConst = "failed"
RoutingTableLifecycleStatePendingConst = "pending"
@@ -40357,6 +50579,18 @@ func UnmarshalRoutingTableCollection(m map[string]json.RawMessage, result interf
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *RoutingTableCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// RoutingTableCollectionFirst : A link to the first page of resources.
type RoutingTableCollectionFirst struct {
// The URL for a page of resources.
@@ -40437,9 +50671,9 @@ type RoutingTablePatch struct {
// routing table. Updating to `false` deselects this routing table.
//
// Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
- // `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.
- // Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP address or a VPN gateway
- // connection, the packet will be dropped.
+ // `deliver` are treated as `drop` unless the `next_hop` is an IP address bound to a network interface on a subnet in
+ // the route's `zone`. Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP
+ // address or a VPN gateway connection, the packet will be dropped.
RouteDirectLinkIngress *bool `json:"route_direct_link_ingress,omitempty"`
// Indicates whether this routing table is used to route traffic that originates from
@@ -40448,9 +50682,9 @@ type RoutingTablePatch struct {
// `true`, and no subnets are attached to this routing table. Updating to `false` deselects this routing table.
//
// Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
- // `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.
- // Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP address or a VPN gateway
- // connection, the packet will be dropped.
+ // `deliver` are treated as `drop` unless the `next_hop` is an IP address bound to a network interface on a subnet in
+ // the route's `zone`. Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP
+ // address or a VPN gateway connection, the packet will be dropped.
//
// If [Classic Access](https://cloud.ibm.com/docs/vpc?topic=vpc-setting-up-access-to-classic-infrastructure) is enabled
// for this VPC, and this property is set to `true`, its incoming traffic will also be routed according to this routing
@@ -40463,9 +50697,9 @@ type RoutingTablePatch struct {
// routing table.
//
// Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
- // `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.
- // Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP address or a VPN gateway
- // connection, the packet will be dropped.
+ // `deliver` are treated as `drop` unless the `next_hop` is an IP address bound to a network interface on a subnet in
+ // the route's `zone`. Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP
+ // address or a VPN gateway connection, the packet will be dropped.
RouteVPCZoneIngress *bool `json:"route_vpc_zone_ingress,omitempty"`
}
@@ -40493,11 +50727,11 @@ func UnmarshalRoutingTablePatch(m map[string]json.RawMessage, result interface{}
}
// AsPatch returns a generic map representation of the RoutingTablePatch
-func (routingTablePatch *RoutingTablePatch) AsPatch() (patch map[string]interface{}, err error) {
+func (routingTablePatch *RoutingTablePatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(routingTablePatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -40589,16 +50823,13 @@ type SecurityGroup struct {
// The user-defined name for this security group. Names must be unique within the VPC the security group resides in.
Name *string `json:"name" validate:"required"`
- // Array of references to network interfaces.
- NetworkInterfaces []NetworkInterfaceReference `json:"network_interfaces" validate:"required"`
-
// The resource group for this security group.
ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`
- // Array of rules for this security group. If no rules exist, all traffic will be denied.
+ // The rules for this security group. If no rules exist, all traffic will be denied.
Rules []SecurityGroupRuleIntf `json:"rules" validate:"required"`
- // Array of references to targets.
+ // The targets for this security group.
Targets []SecurityGroupTargetReferenceIntf `json:"targets" validate:"required"`
// The VPC this security group is a part of.
@@ -40628,10 +50859,6 @@ func UnmarshalSecurityGroup(m map[string]json.RawMessage, result interface{}) (e
if err != nil {
return
}
- err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfaceReference)
- if err != nil {
- return
- }
err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
if err != nil {
return
@@ -40698,6 +50925,18 @@ func UnmarshalSecurityGroupCollection(m map[string]json.RawMessage, result inter
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *SecurityGroupCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// SecurityGroupCollectionFirst : A link to the first page of resources.
type SecurityGroupCollectionFirst struct {
// The URL for a page of resources.
@@ -40793,11 +51032,11 @@ func UnmarshalSecurityGroupPatch(m map[string]json.RawMessage, result interface{
}
// AsPatch returns a generic map representation of the SecurityGroupPatch
-func (securityGroupPatch *SecurityGroupPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (securityGroupPatch *SecurityGroupPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(securityGroupPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -40881,13 +51120,13 @@ type SecurityGroupRule struct {
// The unique identifier for this security group rule.
ID *string `json:"id" validate:"required"`
- // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
- // used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
- // interfaces) in that group matching this IP version.
- IPVersion *string `json:"ip_version,omitempty"`
+ // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they
+ // are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses
+ // (network interfaces) in that group matching this IP version.
+ IPVersion *string `json:"ip_version" validate:"required"`
// The protocol to enforce.
- Protocol *string `json:"protocol,omitempty"`
+ Protocol *string `json:"protocol" validate:"required"`
// The IP addresses or security groups from which this rule allows traffic (or to which,
// for outbound rules). Can be specified as an IP address, a CIDR block, or a security
@@ -40916,9 +51155,9 @@ const (
)
// Constants associated with the SecurityGroupRule.IPVersion property.
-// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
-// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
-// interfaces) in that group matching this IP version.
+// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they
+// are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses
+// (network interfaces) in that group matching this IP version.
const (
SecurityGroupRuleIPVersionIpv4Const = "ipv4"
)
@@ -40977,21 +51216,23 @@ func UnmarshalSecurityGroupRuleCollection(m map[string]json.RawMessage, result i
// SecurityGroupRulePatch : SecurityGroupRulePatch struct
type SecurityGroupRulePatch struct {
- // The ICMP traffic code to allow.
+ // The ICMP traffic code to allow. Specify `null` to remove an existing ICMP traffic code value.
Code *int64 `json:"code,omitempty"`
// The direction of traffic to enforce, either `inbound` or `outbound`.
Direction *string `json:"direction,omitempty"`
- // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
- // used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
- // interfaces) in that group matching this IP version.
+ // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they
+ // are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses
+ // (network interfaces) in that group matching this IP version.
IPVersion *string `json:"ip_version,omitempty"`
- // The inclusive upper bound of TCP/UDP port range.
+ // The inclusive upper bound of the protocol port range. Specify `null` to clear an existing upper bound. If a lower
+ // bound has been set, the upper bound must also be set, and must not be smaller.
PortMax *int64 `json:"port_max,omitempty"`
- // The inclusive lower bound of TCP/UDP port range.
+ // The inclusive lower bound of the protocol port range. Specify `null` to clear an existing lower bound. If an upper
+ // bound has been set, the lower bound must also be set, and must not be larger.
PortMin *int64 `json:"port_min,omitempty"`
// The IP addresses or security groups from which this rule will allow traffic (or to
@@ -41000,7 +51241,7 @@ type SecurityGroupRulePatch struct {
// any source, for outbound rules).
Remote SecurityGroupRuleRemotePatchIntf `json:"remote,omitempty"`
- // The ICMP traffic type to allow.
+ // The ICMP traffic type to allow. Specify `null` to remove an existing ICMP traffic type value.
Type *int64 `json:"type,omitempty"`
}
@@ -41012,9 +51253,9 @@ const (
)
// Constants associated with the SecurityGroupRulePatch.IPVersion property.
-// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
-// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
-// interfaces) in that group matching this IP version.
+// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they
+// are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses
+// (network interfaces) in that group matching this IP version.
const (
SecurityGroupRulePatchIPVersionIpv4Const = "ipv4"
)
@@ -41055,11 +51296,11 @@ func UnmarshalSecurityGroupRulePatch(m map[string]json.RawMessage, result interf
}
// AsPatch returns a generic map representation of the SecurityGroupRulePatch
-func (securityGroupRulePatch *SecurityGroupRulePatch) AsPatch() (patch map[string]interface{}, err error) {
+func (securityGroupRulePatch *SecurityGroupRulePatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(securityGroupRulePatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -41073,13 +51314,13 @@ type SecurityGroupRulePrototype struct {
// The direction of traffic to enforce, either `inbound` or `outbound`.
Direction *string `json:"direction" validate:"required"`
- // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
- // used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
- // interfaces) in that group matching this IP version.
+ // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they
+ // are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses
+ // (network interfaces) in that group matching this IP version.
IPVersion *string `json:"ip_version,omitempty"`
// The protocol to enforce.
- Protocol *string `json:"protocol,omitempty"`
+ Protocol *string `json:"protocol" validate:"required"`
// The IP addresses or security groups from which this rule will allow traffic (or to
// which, for outbound rules). Can be specified as an IP address, a CIDR block, or a
@@ -41108,9 +51349,9 @@ const (
)
// Constants associated with the SecurityGroupRulePrototype.IPVersion property.
-// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
-// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
-// interfaces) in that group matching this IP version.
+// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they
+// are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses
+// (network interfaces) in that group matching this IP version.
const (
SecurityGroupRulePrototypeIPVersionIpv4Const = "ipv4"
)
@@ -41158,9 +51399,11 @@ func UnmarshalSecurityGroupRulePrototype(m map[string]json.RawMessage, result in
// - SecurityGroupRuleRemoteCIDR
// - SecurityGroupRuleRemoteSecurityGroupReference
type SecurityGroupRuleRemote struct {
- // The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
- // property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
- // and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
+ // The IP address.
+ //
+ // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify
+ // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the
+ // error, or bypass the resource on which the unexpected IP address format was encountered.
Address *string `json:"address,omitempty"`
// The CIDR block. This property may add support for IPv6 CIDR blocks in the future. When processing a value in this
@@ -41236,9 +51479,11 @@ func UnmarshalSecurityGroupRuleRemote(m map[string]json.RawMessage, result inter
// - SecurityGroupRuleRemotePatchCIDR
// - SecurityGroupRuleRemotePatchSecurityGroupIdentity
type SecurityGroupRuleRemotePatch struct {
- // The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
- // property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
- // and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
+ // The IP address.
+ //
+ // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify
+ // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the
+ // error, or bypass the resource on which the unexpected IP address format was encountered.
Address *string `json:"address,omitempty"`
// The CIDR block. This property may add support for IPv6 CIDR blocks in the future. When processing a value in this
@@ -41299,9 +51544,11 @@ func UnmarshalSecurityGroupRuleRemotePatch(m map[string]json.RawMessage, result
// - SecurityGroupRuleRemotePrototypeCIDR
// - SecurityGroupRuleRemotePrototypeSecurityGroupIdentity
type SecurityGroupRuleRemotePrototype struct {
- // The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
- // property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
- // and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
+ // The IP address.
+ //
+ // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify
+ // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the
+ // error, or bypass the resource on which the unexpected IP address format was encountered.
Address *string `json:"address,omitempty"`
// The CIDR block. This property may add support for IPv6 CIDR blocks in the future. When processing a value in this
@@ -41366,7 +51613,7 @@ type SecurityGroupTargetCollection struct {
// except the last page.
Next *SecurityGroupTargetCollectionNext `json:"next,omitempty"`
- // Collection of security group target references.
+ // Collection of targets for this security group.
Targets []SecurityGroupTargetReferenceIntf `json:"targets" validate:"required"`
// The total number of resources across all pages.
@@ -41400,6 +51647,18 @@ func UnmarshalSecurityGroupTargetCollection(m map[string]json.RawMessage, result
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *SecurityGroupTargetCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// SecurityGroupTargetCollectionFirst : A link to the first page of resources.
type SecurityGroupTargetCollectionFirst struct {
// The URL for a page of resources.
@@ -41440,6 +51699,7 @@ func UnmarshalSecurityGroupTargetCollectionNext(m map[string]json.RawMessage, re
// Models which "extend" this model:
// - SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext
// - SecurityGroupTargetReferenceLoadBalancerReference
+// - SecurityGroupTargetReferenceEndpointGatewayReference
type SecurityGroupTargetReference struct {
// If present, this property indicates the referenced resource has been deleted and provides
// some supplementary information.
@@ -41509,10 +51769,10 @@ func UnmarshalSecurityGroupTargetReference(m map[string]json.RawMessage, result
// SetSubnetPublicGatewayOptions : The SetSubnetPublicGateway options.
type SetSubnetPublicGatewayOptions struct {
// The subnet identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The public gateway identity.
- PublicGatewayIdentity PublicGatewayIdentityIntf `validate:"required"`
+ PublicGatewayIdentity PublicGatewayIdentityIntf `json:"PublicGatewayIdentity" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -41527,15 +51787,15 @@ func (*VpcV1) NewSetSubnetPublicGatewayOptions(id string, publicGatewayIdentity
}
// SetID : Allow user to set ID
-func (options *SetSubnetPublicGatewayOptions) SetID(id string) *SetSubnetPublicGatewayOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *SetSubnetPublicGatewayOptions) SetID(id string) *SetSubnetPublicGatewayOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetPublicGatewayIdentity : Allow user to set PublicGatewayIdentity
-func (options *SetSubnetPublicGatewayOptions) SetPublicGatewayIdentity(publicGatewayIdentity PublicGatewayIdentityIntf) *SetSubnetPublicGatewayOptions {
- options.PublicGatewayIdentity = publicGatewayIdentity
- return options
+func (_options *SetSubnetPublicGatewayOptions) SetPublicGatewayIdentity(publicGatewayIdentity PublicGatewayIdentityIntf) *SetSubnetPublicGatewayOptions {
+ _options.PublicGatewayIdentity = publicGatewayIdentity
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -41544,6 +51804,564 @@ func (options *SetSubnetPublicGatewayOptions) SetHeaders(param map[string]string
return options
}
+// Snapshot : Snapshot struct
+type Snapshot struct {
+ // Indicates if a boot volume attachment can be created with a volume created from this snapshot.
+ Bootable *bool `json:"bootable" validate:"required"`
+
+ // The date and time the data capture for this snapshot was completed.
+ //
+ // If absent, this snapshot's data has not yet been captured. Additionally, this property may be absent for snapshots
+ // created before 1 January 2022.
+ CapturedAt *strfmt.DateTime `json:"captured_at,omitempty"`
+
+ // The date and time that this snapshot was created.
+ CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
+
+ // The CRN of this snapshot.
+ CRN *string `json:"crn" validate:"required"`
+
+ // Indicates whether this snapshot can be deleted. This value will always be `true`.
+ Deletable *bool `json:"deletable" validate:"required"`
+
+ // The type of encryption used on the source volume.
+ Encryption *string `json:"encryption" validate:"required"`
+
+ // The root key used to wrap the data encryption key for the source volume.
+ //
+ // This property will be present for volumes with an `encryption` type of
+ // `user_managed`.
+ EncryptionKey *EncryptionKeyReference `json:"encryption_key,omitempty"`
+
+ // The URL for this snapshot.
+ Href *string `json:"href" validate:"required"`
+
+ // The unique identifier for this snapshot.
+ ID *string `json:"id" validate:"required"`
+
+ // The lifecycle state of this snapshot.
+ LifecycleState *string `json:"lifecycle_state" validate:"required"`
+
+ // The minimum capacity of a volume created from this snapshot. When a snapshot is created, this will be set to the
+ // capacity of the `source_volume`.
+ MinimumCapacity *int64 `json:"minimum_capacity" validate:"required"`
+
+ // The user-defined name for this snapshot.
+ Name *string `json:"name" validate:"required"`
+
+ // The operating system included in this image.
+ OperatingSystem *OperatingSystem `json:"operating_system,omitempty"`
+
+ // The resource group for this snapshot.
+ ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+
+ // The [service tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) prefixed with `is.snapshot:` associated with
+ // this snapshot.
+ ServiceTags []string `json:"service_tags" validate:"required"`
+
+ // The size of this snapshot rounded up to the next gigabyte.
+ Size *int64 `json:"size" validate:"required"`
+
+ // If present, the image from which the data on this snapshot was most directly
+ // provisioned.
+ SourceImage *ImageReference `json:"source_image,omitempty"`
+
+ // The source volume this snapshot was created from (may be
+ // [deleted](https://cloud.ibm.com/apidocs/vpc#deleted-resources)).
+ SourceVolume *VolumeReference `json:"source_volume" validate:"required"`
+
+ // The [user tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this snapshot.
+ UserTags []string `json:"user_tags" validate:"required"`
+}
+
+// Constants associated with the Snapshot.Encryption property.
+// The type of encryption used on the source volume.
+const (
+ SnapshotEncryptionProviderManagedConst = "provider_managed"
+ SnapshotEncryptionUserManagedConst = "user_managed"
+)
+
+// Constants associated with the Snapshot.LifecycleState property.
+// The lifecycle state of this snapshot.
+const (
+ SnapshotLifecycleStateDeletingConst = "deleting"
+ SnapshotLifecycleStateFailedConst = "failed"
+ SnapshotLifecycleStatePendingConst = "pending"
+ SnapshotLifecycleStateStableConst = "stable"
+ SnapshotLifecycleStateSuspendedConst = "suspended"
+ SnapshotLifecycleStateUpdatingConst = "updating"
+ SnapshotLifecycleStateWaitingConst = "waiting"
+)
+
+// Constants associated with the Snapshot.ResourceType property.
+// The resource type.
+const (
+ SnapshotResourceTypeSnapshotConst = "snapshot"
+)
+
+// UnmarshalSnapshot unmarshals an instance of Snapshot from the specified map of raw messages.
+func UnmarshalSnapshot(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(Snapshot)
+ err = core.UnmarshalPrimitive(m, "bootable", &obj.Bootable)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "captured_at", &obj.CapturedAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "deletable", &obj.Deletable)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "encryption", &obj.Encryption)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "minimum_capacity", &obj.MinimumCapacity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "operating_system", &obj.OperatingSystem, UnmarshalOperatingSystem)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "service_tags", &obj.ServiceTags)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "size", &obj.Size)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "source_image", &obj.SourceImage, UnmarshalImageReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "source_volume", &obj.SourceVolume, UnmarshalVolumeReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// SnapshotCollection : SnapshotCollection struct
+type SnapshotCollection struct {
+ // A link to the first page of resources.
+ First *SnapshotCollectionFirst `json:"first" validate:"required"`
+
+ // The maximum number of resources that can be returned by the request.
+ Limit *int64 `json:"limit" validate:"required"`
+
+ // A link to the next page of resources. This property is present for all pages
+ // except the last page.
+ Next *SnapshotCollectionNext `json:"next,omitempty"`
+
+ // Collection of snapshots.
+ Snapshots []Snapshot `json:"snapshots" validate:"required"`
+
+ // The total number of resources across all pages.
+ TotalCount *int64 `json:"total_count" validate:"required"`
+}
+
+// UnmarshalSnapshotCollection unmarshals an instance of SnapshotCollection from the specified map of raw messages.
+func UnmarshalSnapshotCollection(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(SnapshotCollection)
+ err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalSnapshotCollectionFirst)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalSnapshotCollectionNext)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "snapshots", &obj.Snapshots, UnmarshalSnapshot)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *SnapshotCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
+// SnapshotCollectionFirst : A link to the first page of resources.
+type SnapshotCollectionFirst struct {
+ // The URL for a page of resources.
+ Href *string `json:"href" validate:"required"`
+}
+
+// UnmarshalSnapshotCollectionFirst unmarshals an instance of SnapshotCollectionFirst from the specified map of raw messages.
+func UnmarshalSnapshotCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(SnapshotCollectionFirst)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// SnapshotCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
+type SnapshotCollectionNext struct {
+ // The URL for a page of resources.
+ Href *string `json:"href" validate:"required"`
+}
+
+// UnmarshalSnapshotCollectionNext unmarshals an instance of SnapshotCollectionNext from the specified map of raw messages.
+func UnmarshalSnapshotCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(SnapshotCollectionNext)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// SnapshotIdentity : Identifies a snapshot by a unique property.
+// Models which "extend" this model:
+// - SnapshotIdentityByID
+// - SnapshotIdentityByCRN
+// - SnapshotIdentityByHref
+type SnapshotIdentity struct {
+ // The unique identifier for this snapshot.
+ ID *string `json:"id,omitempty"`
+
+ // The CRN of this snapshot.
+ CRN *string `json:"crn,omitempty"`
+
+ // The URL for this snapshot.
+ Href *string `json:"href,omitempty"`
+}
+
+func (*SnapshotIdentity) isaSnapshotIdentity() bool {
+ return true
+}
+
+type SnapshotIdentityIntf interface {
+ isaSnapshotIdentity() bool
+}
+
+// UnmarshalSnapshotIdentity unmarshals an instance of SnapshotIdentity from the specified map of raw messages.
+func UnmarshalSnapshotIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(SnapshotIdentity)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// SnapshotPatch : SnapshotPatch struct
+type SnapshotPatch struct {
+ // The user-defined name for this snapshot.
+ Name *string `json:"name,omitempty"`
+
+ // The [user tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this snapshot.
+ UserTags []string `json:"user_tags,omitempty"`
+}
+
+// UnmarshalSnapshotPatch unmarshals an instance of SnapshotPatch from the specified map of raw messages.
+func UnmarshalSnapshotPatch(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(SnapshotPatch)
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// AsPatch returns a generic map representation of the SnapshotPatch
+func (snapshotPatch *SnapshotPatch) AsPatch() (_patch map[string]interface{}, err error) {
+ var jsonData []byte
+ jsonData, err = json.Marshal(snapshotPatch)
+ if err == nil {
+ err = json.Unmarshal(jsonData, &_patch)
+ }
+ return
+}
+
+// SnapshotPrototype : SnapshotPrototype struct
+// Models which "extend" this model:
+// - SnapshotPrototypeSnapshotBySourceVolume
+type SnapshotPrototype struct {
+ // The unique user-defined name for this snapshot. If unspecified, the name will be a hyphenated list of
+ // randomly-selected words.
+ Name *string `json:"name,omitempty"`
+
+ // The resource group to use. If unspecified, the account's [default resource
+ // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
+ ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
+
+ // The [user tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this snapshot.
+ UserTags []string `json:"user_tags,omitempty"`
+
+ // The volume to create this snapshot from.
+ SourceVolume VolumeIdentityIntf `json:"source_volume,omitempty"`
+}
+
+func (*SnapshotPrototype) isaSnapshotPrototype() bool {
+ return true
+}
+
+type SnapshotPrototypeIntf interface {
+ isaSnapshotPrototype() bool
+}
+
+// UnmarshalSnapshotPrototype unmarshals an instance of SnapshotPrototype from the specified map of raw messages.
+func UnmarshalSnapshotPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(SnapshotPrototype)
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "source_volume", &obj.SourceVolume, UnmarshalVolumeIdentity)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// SnapshotReference : SnapshotReference struct
+type SnapshotReference struct {
+ // The CRN of this snapshot.
+ CRN *string `json:"crn" validate:"required"`
+
+ // If present, this property indicates the referenced resource has been deleted and provides
+ // some supplementary information.
+ Deleted *SnapshotReferenceDeleted `json:"deleted,omitempty"`
+
+ // The URL for this snapshot.
+ Href *string `json:"href" validate:"required"`
+
+ // The unique identifier for this snapshot.
+ ID *string `json:"id" validate:"required"`
+
+ // The user-defined name for this snapshot.
+ Name *string `json:"name" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+}
+
+// Constants associated with the SnapshotReference.ResourceType property.
+// The resource type.
+const (
+ SnapshotReferenceResourceTypeSnapshotConst = "snapshot"
+)
+
+// UnmarshalSnapshotReference unmarshals an instance of SnapshotReference from the specified map of raw messages.
+func UnmarshalSnapshotReference(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(SnapshotReference)
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalSnapshotReferenceDeleted)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// SnapshotReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
+// information.
+type SnapshotReferenceDeleted struct {
+ // Link to documentation about deleted resources.
+ MoreInfo *string `json:"more_info" validate:"required"`
+}
+
+// UnmarshalSnapshotReferenceDeleted unmarshals an instance of SnapshotReferenceDeleted from the specified map of raw messages.
+func UnmarshalSnapshotReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(SnapshotReferenceDeleted)
+ err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// StartBareMetalServerOptions : The StartBareMetalServer options.
+type StartBareMetalServerOptions struct {
+ // The bare metal server identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewStartBareMetalServerOptions : Instantiate StartBareMetalServerOptions
+func (*VpcV1) NewStartBareMetalServerOptions(id string) *StartBareMetalServerOptions {
+ return &StartBareMetalServerOptions{
+ ID: core.StringPtr(id),
+ }
+}
+
+// SetID : Allow user to set ID
+func (_options *StartBareMetalServerOptions) SetID(id string) *StartBareMetalServerOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *StartBareMetalServerOptions) SetHeaders(param map[string]string) *StartBareMetalServerOptions {
+ options.Headers = param
+ return options
+}
+
+// StopBareMetalServerOptions : The StopBareMetalServer options.
+type StopBareMetalServerOptions struct {
+ // The bare metal server identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // The type of stop operation:
+ // - `soft`: signal running operating system to quiesce and shutdown cleanly
+ // - `hard`: immediately stop the server.
+ Type *string `json:"type" validate:"required"`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// Constants associated with the StopBareMetalServerOptions.Type property.
+// The type of stop operation:
+// - `soft`: signal running operating system to quiesce and shutdown cleanly
+// - `hard`: immediately stop the server.
+const (
+ StopBareMetalServerOptionsTypeHardConst = "hard"
+ StopBareMetalServerOptionsTypeSoftConst = "soft"
+)
+
+// NewStopBareMetalServerOptions : Instantiate StopBareMetalServerOptions
+func (*VpcV1) NewStopBareMetalServerOptions(id string, typeVar string) *StopBareMetalServerOptions {
+ return &StopBareMetalServerOptions{
+ ID: core.StringPtr(id),
+ Type: core.StringPtr(typeVar),
+ }
+}
+
+// SetID : Allow user to set ID
+func (_options *StopBareMetalServerOptions) SetID(id string) *StopBareMetalServerOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetType : Allow user to set Type
+func (_options *StopBareMetalServerOptions) SetType(typeVar string) *StopBareMetalServerOptions {
+ _options.Type = core.StringPtr(typeVar)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *StopBareMetalServerOptions) SetHeaders(param map[string]string) *StopBareMetalServerOptions {
+ options.Headers = param
+ return options
+}
+
// Subnet : Subnet struct
type Subnet struct {
// The number of IPv4 addresses in this subnet that are not in-use, and have not been reserved by the user or the
@@ -41574,12 +52392,15 @@ type Subnet struct {
// The network ACL for this subnet.
NetworkACL *NetworkACLReference `json:"network_acl" validate:"required"`
- // The public gateway to handle internet bound traffic for this subnet.
+ // The public gateway to use for internet-bound traffic for this subnet.
PublicGateway *PublicGatewayReference `json:"public_gateway,omitempty"`
// The resource group for this subnet.
ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+
// The routing table for this subnet.
RoutingTable *RoutingTableReference `json:"routing_table" validate:"required"`
@@ -41588,8 +52409,8 @@ type Subnet struct {
// The total number of IPv4 addresses in this subnet.
//
- // Note: This is calculated as 2(32 − prefix length). For example, the prefix length `/24` gives:
- // 2(32 − 24) = 28 = 256 addresses.
+ // Note: This is calculated as 2(32 - prefix length). For example, the prefix length `/24` gives:
+ // 2(32 - 24) = 28 = 256 addresses.
TotalIpv4AddressCount *int64 `json:"total_ipv4_address_count" validate:"required"`
// The VPC this subnet is a part of.
@@ -41605,6 +52426,12 @@ const (
SubnetIPVersionIpv4Const = "ipv4"
)
+// Constants associated with the Subnet.ResourceType property.
+// The resource type.
+const (
+ SubnetResourceTypeSubnetConst = "subnet"
+)
+
// Constants associated with the Subnet.Status property.
// The status of the subnet.
const (
@@ -41661,6 +52488,10 @@ func UnmarshalSubnet(m map[string]json.RawMessage, result interface{}) (err erro
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "routing_table", &obj.RoutingTable, UnmarshalRoutingTableReference)
if err != nil {
return
@@ -41731,6 +52562,18 @@ func UnmarshalSubnetCollection(m map[string]json.RawMessage, result interface{})
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *SubnetCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// SubnetCollectionFirst : A link to the first page of resources.
type SubnetCollectionFirst struct {
// The URL for a page of resources.
@@ -41816,8 +52659,8 @@ type SubnetPatch struct {
// The network ACL to use for this subnet.
NetworkACL NetworkACLIdentityIntf `json:"network_acl,omitempty"`
- // The public gateway to handle internet bound traffic for this subnet.
- PublicGateway PublicGatewayIdentityIntf `json:"public_gateway,omitempty"`
+ // The public gateway to use for internet-bound traffic for this subnet.
+ PublicGateway SubnetPublicGatewayPatchIntf `json:"public_gateway,omitempty"`
// The routing table to use for this subnet. The routing table properties
// `route_direct_link_ingress`, `route_transit_gateway_ingress`, and
@@ -41836,7 +52679,7 @@ func UnmarshalSubnetPatch(m map[string]json.RawMessage, result interface{}) (err
if err != nil {
return
}
- err = core.UnmarshalModel(m, "public_gateway", &obj.PublicGateway, UnmarshalPublicGatewayIdentity)
+ err = core.UnmarshalModel(m, "public_gateway", &obj.PublicGateway, UnmarshalSubnetPublicGatewayPatch)
if err != nil {
return
}
@@ -41849,11 +52692,11 @@ func UnmarshalSubnetPatch(m map[string]json.RawMessage, result interface{}) (err
}
// AsPatch returns a generic map representation of the SubnetPatch
-func (subnetPatch *SubnetPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (subnetPatch *SubnetPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(subnetPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -41873,7 +52716,8 @@ type SubnetPrototype struct {
// The network ACL to use for this subnet.
NetworkACL NetworkACLIdentityIntf `json:"network_acl,omitempty"`
- // The public gateway to handle internet bound traffic for this subnet.
+ // The public gateway to use for internet-bound traffic for this subnet. If
+ // unspecified, the subnet will not be attached to a public gateway.
PublicGateway PublicGatewayIdentityIntf `json:"public_gateway,omitempty"`
// The resource group to use. If unspecified, the account's [default resource
@@ -41897,8 +52741,9 @@ type SubnetPrototype struct {
// The IPv4 range of the subnet, expressed in CIDR format. The prefix length of the subnet's CIDR must be between `/9`
// (8,388,608 addresses) and `/29` (8 addresses). The IPv4 range of the subnet's CIDR must fall within an existing
- // address prefix in the VPC. The subnet will be created in the zone of the address prefix that contains the IPv4 CIDR.
- // If zone is specified, it must match the zone of the address prefix that contains the subnet's IPv4 CIDR.
+ // address prefix in the VPC and must not overlap with any existing subnet. The subnet will be created in the zone of
+ // the address prefix that contains the IPv4 CIDR. If zone is specified, it must match the zone of the address prefix
+ // that contains the subnet's IPv4 CIDR.
Ipv4CIDRBlock *string `json:"ipv4_cidr_block,omitempty"`
}
@@ -41963,6 +52808,49 @@ func UnmarshalSubnetPrototype(m map[string]json.RawMessage, result interface{})
return
}
+// SubnetPublicGatewayPatch : The public gateway to use for internet-bound traffic for this subnet.
+// Models which "extend" this model:
+// - SubnetPublicGatewayPatchPublicGatewayIdentityByID
+// - SubnetPublicGatewayPatchPublicGatewayIdentityByCRN
+// - SubnetPublicGatewayPatchPublicGatewayIdentityByHref
+type SubnetPublicGatewayPatch struct {
+ // The unique identifier for this public gateway.
+ ID *string `json:"id,omitempty"`
+
+ // The CRN for this public gateway.
+ CRN *string `json:"crn,omitempty"`
+
+ // The URL for this public gateway.
+ Href *string `json:"href,omitempty"`
+}
+
+func (*SubnetPublicGatewayPatch) isaSubnetPublicGatewayPatch() bool {
+ return true
+}
+
+type SubnetPublicGatewayPatchIntf interface {
+ isaSubnetPublicGatewayPatch() bool
+}
+
+// UnmarshalSubnetPublicGatewayPatch unmarshals an instance of SubnetPublicGatewayPatch from the specified map of raw messages.
+func UnmarshalSubnetPublicGatewayPatch(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(SubnetPublicGatewayPatch)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// SubnetReference : SubnetReference struct
type SubnetReference struct {
// The CRN for this subnet.
@@ -41980,8 +52868,17 @@ type SubnetReference struct {
// The user-defined name for this subnet.
Name *string `json:"name" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
}
+// Constants associated with the SubnetReference.ResourceType property.
+// The resource type.
+const (
+ SubnetReferenceResourceTypeSubnetConst = "subnet"
+)
+
// UnmarshalSubnetReference unmarshals an instance of SubnetReference from the specified map of raw messages.
func UnmarshalSubnetReference(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(SubnetReference)
@@ -42005,6 +52902,10 @@ func UnmarshalSubnetReference(m map[string]json.RawMessage, result interface{})
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
@@ -42027,10 +52928,82 @@ func UnmarshalSubnetReferenceDeleted(m map[string]json.RawMessage, result interf
return
}
+// TrustedProfileIdentity : Identifies a trusted profile by a unique property.
+// Models which "extend" this model:
+// - TrustedProfileIdentityTrustedProfileByID
+// - TrustedProfileIdentityTrustedProfileByCRN
+type TrustedProfileIdentity struct {
+ // The unique identifier for this trusted profile.
+ ID *string `json:"id,omitempty"`
+
+ // The CRN for this trusted profile.
+ CRN *string `json:"crn,omitempty"`
+}
+
+func (*TrustedProfileIdentity) isaTrustedProfileIdentity() bool {
+ return true
+}
+
+type TrustedProfileIdentityIntf interface {
+ isaTrustedProfileIdentity() bool
+}
+
+// UnmarshalTrustedProfileIdentity unmarshals an instance of TrustedProfileIdentity from the specified map of raw messages.
+func UnmarshalTrustedProfileIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(TrustedProfileIdentity)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// TrustedProfileReference : TrustedProfileReference struct
+type TrustedProfileReference struct {
+ // The CRN for this trusted profile.
+ CRN *string `json:"crn" validate:"required"`
+
+ // The unique identifier for this trusted profile.
+ ID *string `json:"id" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+}
+
+// Constants associated with the TrustedProfileReference.ResourceType property.
+// The resource type.
+const (
+ TrustedProfileReferenceResourceTypeTrustedProfileConst = "trusted_profile"
+)
+
+// UnmarshalTrustedProfileReference unmarshals an instance of TrustedProfileReference from the specified map of raw messages.
+func UnmarshalTrustedProfileReference(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(TrustedProfileReference)
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// UnsetSubnetPublicGatewayOptions : The UnsetSubnetPublicGateway options.
type UnsetSubnetPublicGatewayOptions struct {
// The subnet identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// Allows users to set headers on API requests
Headers map[string]string
@@ -42044,9 +53017,9 @@ func (*VpcV1) NewUnsetSubnetPublicGatewayOptions(id string) *UnsetSubnetPublicGa
}
// SetID : Allow user to set ID
-func (options *UnsetSubnetPublicGatewayOptions) SetID(id string) *UnsetSubnetPublicGatewayOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UnsetSubnetPublicGatewayOptions) SetID(id string) *UnsetSubnetPublicGatewayOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -42055,16 +53028,150 @@ func (options *UnsetSubnetPublicGatewayOptions) SetHeaders(param map[string]stri
return options
}
+// UpdateBareMetalServerDiskOptions : The UpdateBareMetalServerDisk options.
+type UpdateBareMetalServerDiskOptions struct {
+ // The bare metal server identifier.
+ BareMetalServerID *string `json:"bare_metal_server_id" validate:"required,ne="`
+
+ // The bare metal server disk identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // The bare metal server disk patch.
+ BareMetalServerDiskPatch map[string]interface{} `json:"BareMetalServerDisk_patch" validate:"required"`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewUpdateBareMetalServerDiskOptions : Instantiate UpdateBareMetalServerDiskOptions
+func (*VpcV1) NewUpdateBareMetalServerDiskOptions(bareMetalServerID string, id string, bareMetalServerDiskPatch map[string]interface{}) *UpdateBareMetalServerDiskOptions {
+ return &UpdateBareMetalServerDiskOptions{
+ BareMetalServerID: core.StringPtr(bareMetalServerID),
+ ID: core.StringPtr(id),
+ BareMetalServerDiskPatch: bareMetalServerDiskPatch,
+ }
+}
+
+// SetBareMetalServerID : Allow user to set BareMetalServerID
+func (_options *UpdateBareMetalServerDiskOptions) SetBareMetalServerID(bareMetalServerID string) *UpdateBareMetalServerDiskOptions {
+ _options.BareMetalServerID = core.StringPtr(bareMetalServerID)
+ return _options
+}
+
+// SetID : Allow user to set ID
+func (_options *UpdateBareMetalServerDiskOptions) SetID(id string) *UpdateBareMetalServerDiskOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetBareMetalServerDiskPatch : Allow user to set BareMetalServerDiskPatch
+func (_options *UpdateBareMetalServerDiskOptions) SetBareMetalServerDiskPatch(bareMetalServerDiskPatch map[string]interface{}) *UpdateBareMetalServerDiskOptions {
+ _options.BareMetalServerDiskPatch = bareMetalServerDiskPatch
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *UpdateBareMetalServerDiskOptions) SetHeaders(param map[string]string) *UpdateBareMetalServerDiskOptions {
+ options.Headers = param
+ return options
+}
+
+// UpdateBareMetalServerNetworkInterfaceOptions : The UpdateBareMetalServerNetworkInterface options.
+type UpdateBareMetalServerNetworkInterfaceOptions struct {
+ // The bare metal server identifier.
+ BareMetalServerID *string `json:"bare_metal_server_id" validate:"required,ne="`
+
+ // The network interface identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // The network interface patch.
+ BareMetalServerNetworkInterfacePatch map[string]interface{} `json:"BareMetalServerNetworkInterface_patch" validate:"required"`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewUpdateBareMetalServerNetworkInterfaceOptions : Instantiate UpdateBareMetalServerNetworkInterfaceOptions
+func (*VpcV1) NewUpdateBareMetalServerNetworkInterfaceOptions(bareMetalServerID string, id string, bareMetalServerNetworkInterfacePatch map[string]interface{}) *UpdateBareMetalServerNetworkInterfaceOptions {
+ return &UpdateBareMetalServerNetworkInterfaceOptions{
+ BareMetalServerID: core.StringPtr(bareMetalServerID),
+ ID: core.StringPtr(id),
+ BareMetalServerNetworkInterfacePatch: bareMetalServerNetworkInterfacePatch,
+ }
+}
+
+// SetBareMetalServerID : Allow user to set BareMetalServerID
+func (_options *UpdateBareMetalServerNetworkInterfaceOptions) SetBareMetalServerID(bareMetalServerID string) *UpdateBareMetalServerNetworkInterfaceOptions {
+ _options.BareMetalServerID = core.StringPtr(bareMetalServerID)
+ return _options
+}
+
+// SetID : Allow user to set ID
+func (_options *UpdateBareMetalServerNetworkInterfaceOptions) SetID(id string) *UpdateBareMetalServerNetworkInterfaceOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetBareMetalServerNetworkInterfacePatch : Allow user to set BareMetalServerNetworkInterfacePatch
+func (_options *UpdateBareMetalServerNetworkInterfaceOptions) SetBareMetalServerNetworkInterfacePatch(bareMetalServerNetworkInterfacePatch map[string]interface{}) *UpdateBareMetalServerNetworkInterfaceOptions {
+ _options.BareMetalServerNetworkInterfacePatch = bareMetalServerNetworkInterfacePatch
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *UpdateBareMetalServerNetworkInterfaceOptions) SetHeaders(param map[string]string) *UpdateBareMetalServerNetworkInterfaceOptions {
+ options.Headers = param
+ return options
+}
+
+// UpdateBareMetalServerOptions : The UpdateBareMetalServer options.
+type UpdateBareMetalServerOptions struct {
+ // The bare metal server identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // The bare metal server patch.
+ BareMetalServerPatch map[string]interface{} `json:"BareMetalServer_patch" validate:"required"`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewUpdateBareMetalServerOptions : Instantiate UpdateBareMetalServerOptions
+func (*VpcV1) NewUpdateBareMetalServerOptions(id string, bareMetalServerPatch map[string]interface{}) *UpdateBareMetalServerOptions {
+ return &UpdateBareMetalServerOptions{
+ ID: core.StringPtr(id),
+ BareMetalServerPatch: bareMetalServerPatch,
+ }
+}
+
+// SetID : Allow user to set ID
+func (_options *UpdateBareMetalServerOptions) SetID(id string) *UpdateBareMetalServerOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetBareMetalServerPatch : Allow user to set BareMetalServerPatch
+func (_options *UpdateBareMetalServerOptions) SetBareMetalServerPatch(bareMetalServerPatch map[string]interface{}) *UpdateBareMetalServerOptions {
+ _options.BareMetalServerPatch = bareMetalServerPatch
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *UpdateBareMetalServerOptions) SetHeaders(param map[string]string) *UpdateBareMetalServerOptions {
+ options.Headers = param
+ return options
+}
+
// UpdateDedicatedHostDiskOptions : The UpdateDedicatedHostDisk options.
type UpdateDedicatedHostDiskOptions struct {
// The dedicated host identifier.
- DedicatedHostID *string `validate:"required,ne="`
+ DedicatedHostID *string `json:"dedicated_host_id" validate:"required,ne="`
// The dedicated host disk identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The dedicated host disk patch.
- DedicatedHostDiskPatch map[string]interface{} `validate:"required"`
+ DedicatedHostDiskPatch map[string]interface{} `json:"DedicatedHostDisk_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -42080,21 +53187,21 @@ func (*VpcV1) NewUpdateDedicatedHostDiskOptions(dedicatedHostID string, id strin
}
// SetDedicatedHostID : Allow user to set DedicatedHostID
-func (options *UpdateDedicatedHostDiskOptions) SetDedicatedHostID(dedicatedHostID string) *UpdateDedicatedHostDiskOptions {
- options.DedicatedHostID = core.StringPtr(dedicatedHostID)
- return options
+func (_options *UpdateDedicatedHostDiskOptions) SetDedicatedHostID(dedicatedHostID string) *UpdateDedicatedHostDiskOptions {
+ _options.DedicatedHostID = core.StringPtr(dedicatedHostID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *UpdateDedicatedHostDiskOptions) SetID(id string) *UpdateDedicatedHostDiskOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateDedicatedHostDiskOptions) SetID(id string) *UpdateDedicatedHostDiskOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetDedicatedHostDiskPatch : Allow user to set DedicatedHostDiskPatch
-func (options *UpdateDedicatedHostDiskOptions) SetDedicatedHostDiskPatch(dedicatedHostDiskPatch map[string]interface{}) *UpdateDedicatedHostDiskOptions {
- options.DedicatedHostDiskPatch = dedicatedHostDiskPatch
- return options
+func (_options *UpdateDedicatedHostDiskOptions) SetDedicatedHostDiskPatch(dedicatedHostDiskPatch map[string]interface{}) *UpdateDedicatedHostDiskOptions {
+ _options.DedicatedHostDiskPatch = dedicatedHostDiskPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -42106,10 +53213,10 @@ func (options *UpdateDedicatedHostDiskOptions) SetHeaders(param map[string]strin
// UpdateDedicatedHostGroupOptions : The UpdateDedicatedHostGroup options.
type UpdateDedicatedHostGroupOptions struct {
// The dedicated host group identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The dedicated host group patch.
- DedicatedHostGroupPatch map[string]interface{} `validate:"required"`
+ DedicatedHostGroupPatch map[string]interface{} `json:"DedicatedHostGroup_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -42124,15 +53231,15 @@ func (*VpcV1) NewUpdateDedicatedHostGroupOptions(id string, dedicatedHostGroupPa
}
// SetID : Allow user to set ID
-func (options *UpdateDedicatedHostGroupOptions) SetID(id string) *UpdateDedicatedHostGroupOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateDedicatedHostGroupOptions) SetID(id string) *UpdateDedicatedHostGroupOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetDedicatedHostGroupPatch : Allow user to set DedicatedHostGroupPatch
-func (options *UpdateDedicatedHostGroupOptions) SetDedicatedHostGroupPatch(dedicatedHostGroupPatch map[string]interface{}) *UpdateDedicatedHostGroupOptions {
- options.DedicatedHostGroupPatch = dedicatedHostGroupPatch
- return options
+func (_options *UpdateDedicatedHostGroupOptions) SetDedicatedHostGroupPatch(dedicatedHostGroupPatch map[string]interface{}) *UpdateDedicatedHostGroupOptions {
+ _options.DedicatedHostGroupPatch = dedicatedHostGroupPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -42144,10 +53251,10 @@ func (options *UpdateDedicatedHostGroupOptions) SetHeaders(param map[string]stri
// UpdateDedicatedHostOptions : The UpdateDedicatedHost options.
type UpdateDedicatedHostOptions struct {
// The dedicated host identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The dedicated host patch.
- DedicatedHostPatch map[string]interface{} `validate:"required"`
+ DedicatedHostPatch map[string]interface{} `json:"DedicatedHost_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -42162,15 +53269,15 @@ func (*VpcV1) NewUpdateDedicatedHostOptions(id string, dedicatedHostPatch map[st
}
// SetID : Allow user to set ID
-func (options *UpdateDedicatedHostOptions) SetID(id string) *UpdateDedicatedHostOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateDedicatedHostOptions) SetID(id string) *UpdateDedicatedHostOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetDedicatedHostPatch : Allow user to set DedicatedHostPatch
-func (options *UpdateDedicatedHostOptions) SetDedicatedHostPatch(dedicatedHostPatch map[string]interface{}) *UpdateDedicatedHostOptions {
- options.DedicatedHostPatch = dedicatedHostPatch
- return options
+func (_options *UpdateDedicatedHostOptions) SetDedicatedHostPatch(dedicatedHostPatch map[string]interface{}) *UpdateDedicatedHostOptions {
+ _options.DedicatedHostPatch = dedicatedHostPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -42182,10 +53289,10 @@ func (options *UpdateDedicatedHostOptions) SetHeaders(param map[string]string) *
// UpdateEndpointGatewayOptions : The UpdateEndpointGateway options.
type UpdateEndpointGatewayOptions struct {
// The endpoint gateway identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The endpoint gateway patch.
- EndpointGatewayPatch map[string]interface{} `validate:"required"`
+ EndpointGatewayPatch map[string]interface{} `json:"EndpointGateway_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -42200,15 +53307,15 @@ func (*VpcV1) NewUpdateEndpointGatewayOptions(id string, endpointGatewayPatch ma
}
// SetID : Allow user to set ID
-func (options *UpdateEndpointGatewayOptions) SetID(id string) *UpdateEndpointGatewayOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateEndpointGatewayOptions) SetID(id string) *UpdateEndpointGatewayOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetEndpointGatewayPatch : Allow user to set EndpointGatewayPatch
-func (options *UpdateEndpointGatewayOptions) SetEndpointGatewayPatch(endpointGatewayPatch map[string]interface{}) *UpdateEndpointGatewayOptions {
- options.EndpointGatewayPatch = endpointGatewayPatch
- return options
+func (_options *UpdateEndpointGatewayOptions) SetEndpointGatewayPatch(endpointGatewayPatch map[string]interface{}) *UpdateEndpointGatewayOptions {
+ _options.EndpointGatewayPatch = endpointGatewayPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -42220,10 +53327,10 @@ func (options *UpdateEndpointGatewayOptions) SetHeaders(param map[string]string)
// UpdateFloatingIPOptions : The UpdateFloatingIP options.
type UpdateFloatingIPOptions struct {
// The floating IP identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The floating IP patch.
- FloatingIPPatch map[string]interface{} `validate:"required"`
+ FloatingIPPatch map[string]interface{} `json:"FloatingIP_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -42238,15 +53345,15 @@ func (*VpcV1) NewUpdateFloatingIPOptions(id string, floatingIPPatch map[string]i
}
// SetID : Allow user to set ID
-func (options *UpdateFloatingIPOptions) SetID(id string) *UpdateFloatingIPOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateFloatingIPOptions) SetID(id string) *UpdateFloatingIPOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetFloatingIPPatch : Allow user to set FloatingIPPatch
-func (options *UpdateFloatingIPOptions) SetFloatingIPPatch(floatingIPPatch map[string]interface{}) *UpdateFloatingIPOptions {
- options.FloatingIPPatch = floatingIPPatch
- return options
+func (_options *UpdateFloatingIPOptions) SetFloatingIPPatch(floatingIPPatch map[string]interface{}) *UpdateFloatingIPOptions {
+ _options.FloatingIPPatch = floatingIPPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -42258,10 +53365,10 @@ func (options *UpdateFloatingIPOptions) SetHeaders(param map[string]string) *Upd
// UpdateFlowLogCollectorOptions : The UpdateFlowLogCollector options.
type UpdateFlowLogCollectorOptions struct {
// The flow log collector identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The flow log collector patch.
- FlowLogCollectorPatch map[string]interface{} `validate:"required"`
+ FlowLogCollectorPatch map[string]interface{} `json:"FlowLogCollector_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -42276,15 +53383,15 @@ func (*VpcV1) NewUpdateFlowLogCollectorOptions(id string, flowLogCollectorPatch
}
// SetID : Allow user to set ID
-func (options *UpdateFlowLogCollectorOptions) SetID(id string) *UpdateFlowLogCollectorOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateFlowLogCollectorOptions) SetID(id string) *UpdateFlowLogCollectorOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetFlowLogCollectorPatch : Allow user to set FlowLogCollectorPatch
-func (options *UpdateFlowLogCollectorOptions) SetFlowLogCollectorPatch(flowLogCollectorPatch map[string]interface{}) *UpdateFlowLogCollectorOptions {
- options.FlowLogCollectorPatch = flowLogCollectorPatch
- return options
+func (_options *UpdateFlowLogCollectorOptions) SetFlowLogCollectorPatch(flowLogCollectorPatch map[string]interface{}) *UpdateFlowLogCollectorOptions {
+ _options.FlowLogCollectorPatch = flowLogCollectorPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -42296,10 +53403,10 @@ func (options *UpdateFlowLogCollectorOptions) SetHeaders(param map[string]string
// UpdateIkePolicyOptions : The UpdateIkePolicy options.
type UpdateIkePolicyOptions struct {
// The IKE policy identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The IKE policy patch.
- IkePolicyPatch map[string]interface{} `validate:"required"`
+ IkePolicyPatch map[string]interface{} `json:"IKEPolicy_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -42314,15 +53421,15 @@ func (*VpcV1) NewUpdateIkePolicyOptions(id string, ikePolicyPatch map[string]int
}
// SetID : Allow user to set ID
-func (options *UpdateIkePolicyOptions) SetID(id string) *UpdateIkePolicyOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateIkePolicyOptions) SetID(id string) *UpdateIkePolicyOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetIkePolicyPatch : Allow user to set IkePolicyPatch
-func (options *UpdateIkePolicyOptions) SetIkePolicyPatch(ikePolicyPatch map[string]interface{}) *UpdateIkePolicyOptions {
- options.IkePolicyPatch = ikePolicyPatch
- return options
+func (_options *UpdateIkePolicyOptions) SetIkePolicyPatch(ikePolicyPatch map[string]interface{}) *UpdateIkePolicyOptions {
+ _options.IkePolicyPatch = ikePolicyPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -42334,10 +53441,10 @@ func (options *UpdateIkePolicyOptions) SetHeaders(param map[string]string) *Upda
// UpdateImageOptions : The UpdateImage options.
type UpdateImageOptions struct {
// The image identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The image patch.
- ImagePatch map[string]interface{} `validate:"required"`
+ ImagePatch map[string]interface{} `json:"Image_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -42352,15 +53459,15 @@ func (*VpcV1) NewUpdateImageOptions(id string, imagePatch map[string]interface{}
}
// SetID : Allow user to set ID
-func (options *UpdateImageOptions) SetID(id string) *UpdateImageOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateImageOptions) SetID(id string) *UpdateImageOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetImagePatch : Allow user to set ImagePatch
-func (options *UpdateImageOptions) SetImagePatch(imagePatch map[string]interface{}) *UpdateImageOptions {
- options.ImagePatch = imagePatch
- return options
+func (_options *UpdateImageOptions) SetImagePatch(imagePatch map[string]interface{}) *UpdateImageOptions {
+ _options.ImagePatch = imagePatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -42372,13 +53479,13 @@ func (options *UpdateImageOptions) SetHeaders(param map[string]string) *UpdateIm
// UpdateInstanceDiskOptions : The UpdateInstanceDisk options.
type UpdateInstanceDiskOptions struct {
// The instance identifier.
- InstanceID *string `validate:"required,ne="`
+ InstanceID *string `json:"instance_id" validate:"required,ne="`
// The instance disk identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The instance disk patch.
- InstanceDiskPatch map[string]interface{} `validate:"required"`
+ InstanceDiskPatch map[string]interface{} `json:"InstanceDisk_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -42394,21 +53501,21 @@ func (*VpcV1) NewUpdateInstanceDiskOptions(instanceID string, id string, instanc
}
// SetInstanceID : Allow user to set InstanceID
-func (options *UpdateInstanceDiskOptions) SetInstanceID(instanceID string) *UpdateInstanceDiskOptions {
- options.InstanceID = core.StringPtr(instanceID)
- return options
+func (_options *UpdateInstanceDiskOptions) SetInstanceID(instanceID string) *UpdateInstanceDiskOptions {
+ _options.InstanceID = core.StringPtr(instanceID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *UpdateInstanceDiskOptions) SetID(id string) *UpdateInstanceDiskOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateInstanceDiskOptions) SetID(id string) *UpdateInstanceDiskOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetInstanceDiskPatch : Allow user to set InstanceDiskPatch
-func (options *UpdateInstanceDiskOptions) SetInstanceDiskPatch(instanceDiskPatch map[string]interface{}) *UpdateInstanceDiskOptions {
- options.InstanceDiskPatch = instanceDiskPatch
- return options
+func (_options *UpdateInstanceDiskOptions) SetInstanceDiskPatch(instanceDiskPatch map[string]interface{}) *UpdateInstanceDiskOptions {
+ _options.InstanceDiskPatch = instanceDiskPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -42417,16 +53524,74 @@ func (options *UpdateInstanceDiskOptions) SetHeaders(param map[string]string) *U
return options
}
+// UpdateInstanceGroupManagerActionOptions : The UpdateInstanceGroupManagerAction options.
+type UpdateInstanceGroupManagerActionOptions struct {
+ // The instance group identifier.
+ InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="`
+
+ // The instance group manager identifier.
+ InstanceGroupManagerID *string `json:"instance_group_manager_id" validate:"required,ne="`
+
+ // The instance group manager action identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // The instance group manager action patch.
+ InstanceGroupManagerActionPatch map[string]interface{} `json:"InstanceGroupManagerAction_patch" validate:"required"`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewUpdateInstanceGroupManagerActionOptions : Instantiate UpdateInstanceGroupManagerActionOptions
+func (*VpcV1) NewUpdateInstanceGroupManagerActionOptions(instanceGroupID string, instanceGroupManagerID string, id string, instanceGroupManagerActionPatch map[string]interface{}) *UpdateInstanceGroupManagerActionOptions {
+ return &UpdateInstanceGroupManagerActionOptions{
+ InstanceGroupID: core.StringPtr(instanceGroupID),
+ InstanceGroupManagerID: core.StringPtr(instanceGroupManagerID),
+ ID: core.StringPtr(id),
+ InstanceGroupManagerActionPatch: instanceGroupManagerActionPatch,
+ }
+}
+
+// SetInstanceGroupID : Allow user to set InstanceGroupID
+func (_options *UpdateInstanceGroupManagerActionOptions) SetInstanceGroupID(instanceGroupID string) *UpdateInstanceGroupManagerActionOptions {
+ _options.InstanceGroupID = core.StringPtr(instanceGroupID)
+ return _options
+}
+
+// SetInstanceGroupManagerID : Allow user to set InstanceGroupManagerID
+func (_options *UpdateInstanceGroupManagerActionOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *UpdateInstanceGroupManagerActionOptions {
+ _options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
+ return _options
+}
+
+// SetID : Allow user to set ID
+func (_options *UpdateInstanceGroupManagerActionOptions) SetID(id string) *UpdateInstanceGroupManagerActionOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetInstanceGroupManagerActionPatch : Allow user to set InstanceGroupManagerActionPatch
+func (_options *UpdateInstanceGroupManagerActionOptions) SetInstanceGroupManagerActionPatch(instanceGroupManagerActionPatch map[string]interface{}) *UpdateInstanceGroupManagerActionOptions {
+ _options.InstanceGroupManagerActionPatch = instanceGroupManagerActionPatch
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *UpdateInstanceGroupManagerActionOptions) SetHeaders(param map[string]string) *UpdateInstanceGroupManagerActionOptions {
+ options.Headers = param
+ return options
+}
+
// UpdateInstanceGroupManagerOptions : The UpdateInstanceGroupManager options.
type UpdateInstanceGroupManagerOptions struct {
// The instance group identifier.
- InstanceGroupID *string `validate:"required,ne="`
+ InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="`
// The instance group manager identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The instance group manager patch.
- InstanceGroupManagerPatch map[string]interface{} `validate:"required"`
+ InstanceGroupManagerPatch map[string]interface{} `json:"InstanceGroupManager_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -42442,21 +53607,21 @@ func (*VpcV1) NewUpdateInstanceGroupManagerOptions(instanceGroupID string, id st
}
// SetInstanceGroupID : Allow user to set InstanceGroupID
-func (options *UpdateInstanceGroupManagerOptions) SetInstanceGroupID(instanceGroupID string) *UpdateInstanceGroupManagerOptions {
- options.InstanceGroupID = core.StringPtr(instanceGroupID)
- return options
+func (_options *UpdateInstanceGroupManagerOptions) SetInstanceGroupID(instanceGroupID string) *UpdateInstanceGroupManagerOptions {
+ _options.InstanceGroupID = core.StringPtr(instanceGroupID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *UpdateInstanceGroupManagerOptions) SetID(id string) *UpdateInstanceGroupManagerOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateInstanceGroupManagerOptions) SetID(id string) *UpdateInstanceGroupManagerOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetInstanceGroupManagerPatch : Allow user to set InstanceGroupManagerPatch
-func (options *UpdateInstanceGroupManagerOptions) SetInstanceGroupManagerPatch(instanceGroupManagerPatch map[string]interface{}) *UpdateInstanceGroupManagerOptions {
- options.InstanceGroupManagerPatch = instanceGroupManagerPatch
- return options
+func (_options *UpdateInstanceGroupManagerOptions) SetInstanceGroupManagerPatch(instanceGroupManagerPatch map[string]interface{}) *UpdateInstanceGroupManagerOptions {
+ _options.InstanceGroupManagerPatch = instanceGroupManagerPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -42468,16 +53633,16 @@ func (options *UpdateInstanceGroupManagerOptions) SetHeaders(param map[string]st
// UpdateInstanceGroupManagerPolicyOptions : The UpdateInstanceGroupManagerPolicy options.
type UpdateInstanceGroupManagerPolicyOptions struct {
// The instance group identifier.
- InstanceGroupID *string `validate:"required,ne="`
+ InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="`
// The instance group manager identifier.
- InstanceGroupManagerID *string `validate:"required,ne="`
+ InstanceGroupManagerID *string `json:"instance_group_manager_id" validate:"required,ne="`
// The instance group manager policy identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The instance group manager policy patch.
- InstanceGroupManagerPolicyPatch map[string]interface{} `validate:"required"`
+ InstanceGroupManagerPolicyPatch map[string]interface{} `json:"InstanceGroupManagerPolicy_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -42494,27 +53659,27 @@ func (*VpcV1) NewUpdateInstanceGroupManagerPolicyOptions(instanceGroupID string,
}
// SetInstanceGroupID : Allow user to set InstanceGroupID
-func (options *UpdateInstanceGroupManagerPolicyOptions) SetInstanceGroupID(instanceGroupID string) *UpdateInstanceGroupManagerPolicyOptions {
- options.InstanceGroupID = core.StringPtr(instanceGroupID)
- return options
+func (_options *UpdateInstanceGroupManagerPolicyOptions) SetInstanceGroupID(instanceGroupID string) *UpdateInstanceGroupManagerPolicyOptions {
+ _options.InstanceGroupID = core.StringPtr(instanceGroupID)
+ return _options
}
// SetInstanceGroupManagerID : Allow user to set InstanceGroupManagerID
-func (options *UpdateInstanceGroupManagerPolicyOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *UpdateInstanceGroupManagerPolicyOptions {
- options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
- return options
+func (_options *UpdateInstanceGroupManagerPolicyOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *UpdateInstanceGroupManagerPolicyOptions {
+ _options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *UpdateInstanceGroupManagerPolicyOptions) SetID(id string) *UpdateInstanceGroupManagerPolicyOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateInstanceGroupManagerPolicyOptions) SetID(id string) *UpdateInstanceGroupManagerPolicyOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetInstanceGroupManagerPolicyPatch : Allow user to set InstanceGroupManagerPolicyPatch
-func (options *UpdateInstanceGroupManagerPolicyOptions) SetInstanceGroupManagerPolicyPatch(instanceGroupManagerPolicyPatch map[string]interface{}) *UpdateInstanceGroupManagerPolicyOptions {
- options.InstanceGroupManagerPolicyPatch = instanceGroupManagerPolicyPatch
- return options
+func (_options *UpdateInstanceGroupManagerPolicyOptions) SetInstanceGroupManagerPolicyPatch(instanceGroupManagerPolicyPatch map[string]interface{}) *UpdateInstanceGroupManagerPolicyOptions {
+ _options.InstanceGroupManagerPolicyPatch = instanceGroupManagerPolicyPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -42526,13 +53691,13 @@ func (options *UpdateInstanceGroupManagerPolicyOptions) SetHeaders(param map[str
// UpdateInstanceGroupMembershipOptions : The UpdateInstanceGroupMembership options.
type UpdateInstanceGroupMembershipOptions struct {
// The instance group identifier.
- InstanceGroupID *string `validate:"required,ne="`
+ InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="`
// The instance group membership identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The instance group membership patch.
- InstanceGroupMembershipPatch map[string]interface{} `validate:"required"`
+ InstanceGroupMembershipPatch map[string]interface{} `json:"InstanceGroupMembership_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -42548,21 +53713,21 @@ func (*VpcV1) NewUpdateInstanceGroupMembershipOptions(instanceGroupID string, id
}
// SetInstanceGroupID : Allow user to set InstanceGroupID
-func (options *UpdateInstanceGroupMembershipOptions) SetInstanceGroupID(instanceGroupID string) *UpdateInstanceGroupMembershipOptions {
- options.InstanceGroupID = core.StringPtr(instanceGroupID)
- return options
+func (_options *UpdateInstanceGroupMembershipOptions) SetInstanceGroupID(instanceGroupID string) *UpdateInstanceGroupMembershipOptions {
+ _options.InstanceGroupID = core.StringPtr(instanceGroupID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *UpdateInstanceGroupMembershipOptions) SetID(id string) *UpdateInstanceGroupMembershipOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateInstanceGroupMembershipOptions) SetID(id string) *UpdateInstanceGroupMembershipOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetInstanceGroupMembershipPatch : Allow user to set InstanceGroupMembershipPatch
-func (options *UpdateInstanceGroupMembershipOptions) SetInstanceGroupMembershipPatch(instanceGroupMembershipPatch map[string]interface{}) *UpdateInstanceGroupMembershipOptions {
- options.InstanceGroupMembershipPatch = instanceGroupMembershipPatch
- return options
+func (_options *UpdateInstanceGroupMembershipOptions) SetInstanceGroupMembershipPatch(instanceGroupMembershipPatch map[string]interface{}) *UpdateInstanceGroupMembershipOptions {
+ _options.InstanceGroupMembershipPatch = instanceGroupMembershipPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -42574,10 +53739,10 @@ func (options *UpdateInstanceGroupMembershipOptions) SetHeaders(param map[string
// UpdateInstanceGroupOptions : The UpdateInstanceGroup options.
type UpdateInstanceGroupOptions struct {
// The instance group identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The instance group patch.
- InstanceGroupPatch map[string]interface{} `validate:"required"`
+ InstanceGroupPatch map[string]interface{} `json:"InstanceGroup_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -42592,15 +53757,15 @@ func (*VpcV1) NewUpdateInstanceGroupOptions(id string, instanceGroupPatch map[st
}
// SetID : Allow user to set ID
-func (options *UpdateInstanceGroupOptions) SetID(id string) *UpdateInstanceGroupOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateInstanceGroupOptions) SetID(id string) *UpdateInstanceGroupOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetInstanceGroupPatch : Allow user to set InstanceGroupPatch
-func (options *UpdateInstanceGroupOptions) SetInstanceGroupPatch(instanceGroupPatch map[string]interface{}) *UpdateInstanceGroupOptions {
- options.InstanceGroupPatch = instanceGroupPatch
- return options
+func (_options *UpdateInstanceGroupOptions) SetInstanceGroupPatch(instanceGroupPatch map[string]interface{}) *UpdateInstanceGroupOptions {
+ _options.InstanceGroupPatch = instanceGroupPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -42612,13 +53777,13 @@ func (options *UpdateInstanceGroupOptions) SetHeaders(param map[string]string) *
// UpdateInstanceNetworkInterfaceOptions : The UpdateInstanceNetworkInterface options.
type UpdateInstanceNetworkInterfaceOptions struct {
// The instance identifier.
- InstanceID *string `validate:"required,ne="`
+ InstanceID *string `json:"instance_id" validate:"required,ne="`
// The network interface identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The network interface patch.
- NetworkInterfacePatch map[string]interface{} `validate:"required"`
+ NetworkInterfacePatch map[string]interface{} `json:"NetworkInterface_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -42634,21 +53799,21 @@ func (*VpcV1) NewUpdateInstanceNetworkInterfaceOptions(instanceID string, id str
}
// SetInstanceID : Allow user to set InstanceID
-func (options *UpdateInstanceNetworkInterfaceOptions) SetInstanceID(instanceID string) *UpdateInstanceNetworkInterfaceOptions {
- options.InstanceID = core.StringPtr(instanceID)
- return options
+func (_options *UpdateInstanceNetworkInterfaceOptions) SetInstanceID(instanceID string) *UpdateInstanceNetworkInterfaceOptions {
+ _options.InstanceID = core.StringPtr(instanceID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *UpdateInstanceNetworkInterfaceOptions) SetID(id string) *UpdateInstanceNetworkInterfaceOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateInstanceNetworkInterfaceOptions) SetID(id string) *UpdateInstanceNetworkInterfaceOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetNetworkInterfacePatch : Allow user to set NetworkInterfacePatch
-func (options *UpdateInstanceNetworkInterfaceOptions) SetNetworkInterfacePatch(networkInterfacePatch map[string]interface{}) *UpdateInstanceNetworkInterfaceOptions {
- options.NetworkInterfacePatch = networkInterfacePatch
- return options
+func (_options *UpdateInstanceNetworkInterfaceOptions) SetNetworkInterfacePatch(networkInterfacePatch map[string]interface{}) *UpdateInstanceNetworkInterfaceOptions {
+ _options.NetworkInterfacePatch = networkInterfacePatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -42660,10 +53825,10 @@ func (options *UpdateInstanceNetworkInterfaceOptions) SetHeaders(param map[strin
// UpdateInstanceOptions : The UpdateInstance options.
type UpdateInstanceOptions struct {
// The instance identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The instance patch.
- InstancePatch map[string]interface{} `validate:"required"`
+ InstancePatch map[string]interface{} `json:"Instance_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -42678,15 +53843,15 @@ func (*VpcV1) NewUpdateInstanceOptions(id string, instancePatch map[string]inter
}
// SetID : Allow user to set ID
-func (options *UpdateInstanceOptions) SetID(id string) *UpdateInstanceOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateInstanceOptions) SetID(id string) *UpdateInstanceOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetInstancePatch : Allow user to set InstancePatch
-func (options *UpdateInstanceOptions) SetInstancePatch(instancePatch map[string]interface{}) *UpdateInstanceOptions {
- options.InstancePatch = instancePatch
- return options
+func (_options *UpdateInstanceOptions) SetInstancePatch(instancePatch map[string]interface{}) *UpdateInstanceOptions {
+ _options.InstancePatch = instancePatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -42698,10 +53863,10 @@ func (options *UpdateInstanceOptions) SetHeaders(param map[string]string) *Updat
// UpdateInstanceTemplateOptions : The UpdateInstanceTemplate options.
type UpdateInstanceTemplateOptions struct {
// The instance template identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The instance template patch.
- InstanceTemplatePatch map[string]interface{} `validate:"required"`
+ InstanceTemplatePatch map[string]interface{} `json:"InstanceTemplate_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -42716,15 +53881,15 @@ func (*VpcV1) NewUpdateInstanceTemplateOptions(id string, instanceTemplatePatch
}
// SetID : Allow user to set ID
-func (options *UpdateInstanceTemplateOptions) SetID(id string) *UpdateInstanceTemplateOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateInstanceTemplateOptions) SetID(id string) *UpdateInstanceTemplateOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetInstanceTemplatePatch : Allow user to set InstanceTemplatePatch
-func (options *UpdateInstanceTemplateOptions) SetInstanceTemplatePatch(instanceTemplatePatch map[string]interface{}) *UpdateInstanceTemplateOptions {
- options.InstanceTemplatePatch = instanceTemplatePatch
- return options
+func (_options *UpdateInstanceTemplateOptions) SetInstanceTemplatePatch(instanceTemplatePatch map[string]interface{}) *UpdateInstanceTemplateOptions {
+ _options.InstanceTemplatePatch = instanceTemplatePatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -42736,13 +53901,13 @@ func (options *UpdateInstanceTemplateOptions) SetHeaders(param map[string]string
// UpdateInstanceVolumeAttachmentOptions : The UpdateInstanceVolumeAttachment options.
type UpdateInstanceVolumeAttachmentOptions struct {
// The instance identifier.
- InstanceID *string `validate:"required,ne="`
+ InstanceID *string `json:"instance_id" validate:"required,ne="`
// The volume attachment identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The volume attachment patch.
- VolumeAttachmentPatch map[string]interface{} `validate:"required"`
+ VolumeAttachmentPatch map[string]interface{} `json:"VolumeAttachment_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -42758,21 +53923,21 @@ func (*VpcV1) NewUpdateInstanceVolumeAttachmentOptions(instanceID string, id str
}
// SetInstanceID : Allow user to set InstanceID
-func (options *UpdateInstanceVolumeAttachmentOptions) SetInstanceID(instanceID string) *UpdateInstanceVolumeAttachmentOptions {
- options.InstanceID = core.StringPtr(instanceID)
- return options
+func (_options *UpdateInstanceVolumeAttachmentOptions) SetInstanceID(instanceID string) *UpdateInstanceVolumeAttachmentOptions {
+ _options.InstanceID = core.StringPtr(instanceID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *UpdateInstanceVolumeAttachmentOptions) SetID(id string) *UpdateInstanceVolumeAttachmentOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateInstanceVolumeAttachmentOptions) SetID(id string) *UpdateInstanceVolumeAttachmentOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetVolumeAttachmentPatch : Allow user to set VolumeAttachmentPatch
-func (options *UpdateInstanceVolumeAttachmentOptions) SetVolumeAttachmentPatch(volumeAttachmentPatch map[string]interface{}) *UpdateInstanceVolumeAttachmentOptions {
- options.VolumeAttachmentPatch = volumeAttachmentPatch
- return options
+func (_options *UpdateInstanceVolumeAttachmentOptions) SetVolumeAttachmentPatch(volumeAttachmentPatch map[string]interface{}) *UpdateInstanceVolumeAttachmentOptions {
+ _options.VolumeAttachmentPatch = volumeAttachmentPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -42784,10 +53949,10 @@ func (options *UpdateInstanceVolumeAttachmentOptions) SetHeaders(param map[strin
// UpdateIpsecPolicyOptions : The UpdateIpsecPolicy options.
type UpdateIpsecPolicyOptions struct {
// The IPsec policy identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The IPsec policy patch.
- IPsecPolicyPatch map[string]interface{} `validate:"required"`
+ IPsecPolicyPatch map[string]interface{} `json:"IPsecPolicy_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -42802,15 +53967,15 @@ func (*VpcV1) NewUpdateIpsecPolicyOptions(id string, iPsecPolicyPatch map[string
}
// SetID : Allow user to set ID
-func (options *UpdateIpsecPolicyOptions) SetID(id string) *UpdateIpsecPolicyOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateIpsecPolicyOptions) SetID(id string) *UpdateIpsecPolicyOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetIPsecPolicyPatch : Allow user to set IPsecPolicyPatch
-func (options *UpdateIpsecPolicyOptions) SetIPsecPolicyPatch(iPsecPolicyPatch map[string]interface{}) *UpdateIpsecPolicyOptions {
- options.IPsecPolicyPatch = iPsecPolicyPatch
- return options
+func (_options *UpdateIpsecPolicyOptions) SetIPsecPolicyPatch(iPsecPolicyPatch map[string]interface{}) *UpdateIpsecPolicyOptions {
+ _options.IPsecPolicyPatch = iPsecPolicyPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -42822,10 +53987,10 @@ func (options *UpdateIpsecPolicyOptions) SetHeaders(param map[string]string) *Up
// UpdateKeyOptions : The UpdateKey options.
type UpdateKeyOptions struct {
// The key identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The key patch.
- KeyPatch map[string]interface{} `validate:"required"`
+ KeyPatch map[string]interface{} `json:"Key_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -42840,15 +54005,15 @@ func (*VpcV1) NewUpdateKeyOptions(id string, keyPatch map[string]interface{}) *U
}
// SetID : Allow user to set ID
-func (options *UpdateKeyOptions) SetID(id string) *UpdateKeyOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateKeyOptions) SetID(id string) *UpdateKeyOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetKeyPatch : Allow user to set KeyPatch
-func (options *UpdateKeyOptions) SetKeyPatch(keyPatch map[string]interface{}) *UpdateKeyOptions {
- options.KeyPatch = keyPatch
- return options
+func (_options *UpdateKeyOptions) SetKeyPatch(keyPatch map[string]interface{}) *UpdateKeyOptions {
+ _options.KeyPatch = keyPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -42860,13 +54025,13 @@ func (options *UpdateKeyOptions) SetHeaders(param map[string]string) *UpdateKeyO
// UpdateLoadBalancerListenerOptions : The UpdateLoadBalancerListener options.
type UpdateLoadBalancerListenerOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// The listener identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The load balancer listener patch.
- LoadBalancerListenerPatch map[string]interface{} `validate:"required"`
+ LoadBalancerListenerPatch map[string]interface{} `json:"LoadBalancerListener_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -42882,21 +54047,21 @@ func (*VpcV1) NewUpdateLoadBalancerListenerOptions(loadBalancerID string, id str
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *UpdateLoadBalancerListenerOptions) SetLoadBalancerID(loadBalancerID string) *UpdateLoadBalancerListenerOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *UpdateLoadBalancerListenerOptions) SetLoadBalancerID(loadBalancerID string) *UpdateLoadBalancerListenerOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *UpdateLoadBalancerListenerOptions) SetID(id string) *UpdateLoadBalancerListenerOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateLoadBalancerListenerOptions) SetID(id string) *UpdateLoadBalancerListenerOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetLoadBalancerListenerPatch : Allow user to set LoadBalancerListenerPatch
-func (options *UpdateLoadBalancerListenerOptions) SetLoadBalancerListenerPatch(loadBalancerListenerPatch map[string]interface{}) *UpdateLoadBalancerListenerOptions {
- options.LoadBalancerListenerPatch = loadBalancerListenerPatch
- return options
+func (_options *UpdateLoadBalancerListenerOptions) SetLoadBalancerListenerPatch(loadBalancerListenerPatch map[string]interface{}) *UpdateLoadBalancerListenerOptions {
+ _options.LoadBalancerListenerPatch = loadBalancerListenerPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -42908,16 +54073,16 @@ func (options *UpdateLoadBalancerListenerOptions) SetHeaders(param map[string]st
// UpdateLoadBalancerListenerPolicyOptions : The UpdateLoadBalancerListenerPolicy options.
type UpdateLoadBalancerListenerPolicyOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// The listener identifier.
- ListenerID *string `validate:"required,ne="`
+ ListenerID *string `json:"listener_id" validate:"required,ne="`
// The policy identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The listener policy patch.
- LoadBalancerListenerPolicyPatch map[string]interface{} `validate:"required"`
+ LoadBalancerListenerPolicyPatch map[string]interface{} `json:"LoadBalancerListenerPolicy_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -42934,27 +54099,27 @@ func (*VpcV1) NewUpdateLoadBalancerListenerPolicyOptions(loadBalancerID string,
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *UpdateLoadBalancerListenerPolicyOptions) SetLoadBalancerID(loadBalancerID string) *UpdateLoadBalancerListenerPolicyOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *UpdateLoadBalancerListenerPolicyOptions) SetLoadBalancerID(loadBalancerID string) *UpdateLoadBalancerListenerPolicyOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetListenerID : Allow user to set ListenerID
-func (options *UpdateLoadBalancerListenerPolicyOptions) SetListenerID(listenerID string) *UpdateLoadBalancerListenerPolicyOptions {
- options.ListenerID = core.StringPtr(listenerID)
- return options
+func (_options *UpdateLoadBalancerListenerPolicyOptions) SetListenerID(listenerID string) *UpdateLoadBalancerListenerPolicyOptions {
+ _options.ListenerID = core.StringPtr(listenerID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *UpdateLoadBalancerListenerPolicyOptions) SetID(id string) *UpdateLoadBalancerListenerPolicyOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateLoadBalancerListenerPolicyOptions) SetID(id string) *UpdateLoadBalancerListenerPolicyOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetLoadBalancerListenerPolicyPatch : Allow user to set LoadBalancerListenerPolicyPatch
-func (options *UpdateLoadBalancerListenerPolicyOptions) SetLoadBalancerListenerPolicyPatch(loadBalancerListenerPolicyPatch map[string]interface{}) *UpdateLoadBalancerListenerPolicyOptions {
- options.LoadBalancerListenerPolicyPatch = loadBalancerListenerPolicyPatch
- return options
+func (_options *UpdateLoadBalancerListenerPolicyOptions) SetLoadBalancerListenerPolicyPatch(loadBalancerListenerPolicyPatch map[string]interface{}) *UpdateLoadBalancerListenerPolicyOptions {
+ _options.LoadBalancerListenerPolicyPatch = loadBalancerListenerPolicyPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -42966,19 +54131,19 @@ func (options *UpdateLoadBalancerListenerPolicyOptions) SetHeaders(param map[str
// UpdateLoadBalancerListenerPolicyRuleOptions : The UpdateLoadBalancerListenerPolicyRule options.
type UpdateLoadBalancerListenerPolicyRuleOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// The listener identifier.
- ListenerID *string `validate:"required,ne="`
+ ListenerID *string `json:"listener_id" validate:"required,ne="`
// The policy identifier.
- PolicyID *string `validate:"required,ne="`
+ PolicyID *string `json:"policy_id" validate:"required,ne="`
// The rule identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The listener policy rule patch.
- LoadBalancerListenerPolicyRulePatch map[string]interface{} `validate:"required"`
+ LoadBalancerListenerPolicyRulePatch map[string]interface{} `json:"LoadBalancerListenerPolicyRule_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -42996,33 +54161,33 @@ func (*VpcV1) NewUpdateLoadBalancerListenerPolicyRuleOptions(loadBalancerID stri
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetLoadBalancerID(loadBalancerID string) *UpdateLoadBalancerListenerPolicyRuleOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *UpdateLoadBalancerListenerPolicyRuleOptions) SetLoadBalancerID(loadBalancerID string) *UpdateLoadBalancerListenerPolicyRuleOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetListenerID : Allow user to set ListenerID
-func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetListenerID(listenerID string) *UpdateLoadBalancerListenerPolicyRuleOptions {
- options.ListenerID = core.StringPtr(listenerID)
- return options
+func (_options *UpdateLoadBalancerListenerPolicyRuleOptions) SetListenerID(listenerID string) *UpdateLoadBalancerListenerPolicyRuleOptions {
+ _options.ListenerID = core.StringPtr(listenerID)
+ return _options
}
// SetPolicyID : Allow user to set PolicyID
-func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetPolicyID(policyID string) *UpdateLoadBalancerListenerPolicyRuleOptions {
- options.PolicyID = core.StringPtr(policyID)
- return options
+func (_options *UpdateLoadBalancerListenerPolicyRuleOptions) SetPolicyID(policyID string) *UpdateLoadBalancerListenerPolicyRuleOptions {
+ _options.PolicyID = core.StringPtr(policyID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetID(id string) *UpdateLoadBalancerListenerPolicyRuleOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateLoadBalancerListenerPolicyRuleOptions) SetID(id string) *UpdateLoadBalancerListenerPolicyRuleOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetLoadBalancerListenerPolicyRulePatch : Allow user to set LoadBalancerListenerPolicyRulePatch
-func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetLoadBalancerListenerPolicyRulePatch(loadBalancerListenerPolicyRulePatch map[string]interface{}) *UpdateLoadBalancerListenerPolicyRuleOptions {
- options.LoadBalancerListenerPolicyRulePatch = loadBalancerListenerPolicyRulePatch
- return options
+func (_options *UpdateLoadBalancerListenerPolicyRuleOptions) SetLoadBalancerListenerPolicyRulePatch(loadBalancerListenerPolicyRulePatch map[string]interface{}) *UpdateLoadBalancerListenerPolicyRuleOptions {
+ _options.LoadBalancerListenerPolicyRulePatch = loadBalancerListenerPolicyRulePatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -43034,10 +54199,10 @@ func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetHeaders(param map
// UpdateLoadBalancerOptions : The UpdateLoadBalancer options.
type UpdateLoadBalancerOptions struct {
// The load balancer identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The load balancer patch.
- LoadBalancerPatch map[string]interface{} `validate:"required"`
+ LoadBalancerPatch map[string]interface{} `json:"LoadBalancer_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -43052,15 +54217,15 @@ func (*VpcV1) NewUpdateLoadBalancerOptions(id string, loadBalancerPatch map[stri
}
// SetID : Allow user to set ID
-func (options *UpdateLoadBalancerOptions) SetID(id string) *UpdateLoadBalancerOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateLoadBalancerOptions) SetID(id string) *UpdateLoadBalancerOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetLoadBalancerPatch : Allow user to set LoadBalancerPatch
-func (options *UpdateLoadBalancerOptions) SetLoadBalancerPatch(loadBalancerPatch map[string]interface{}) *UpdateLoadBalancerOptions {
- options.LoadBalancerPatch = loadBalancerPatch
- return options
+func (_options *UpdateLoadBalancerOptions) SetLoadBalancerPatch(loadBalancerPatch map[string]interface{}) *UpdateLoadBalancerOptions {
+ _options.LoadBalancerPatch = loadBalancerPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -43072,16 +54237,16 @@ func (options *UpdateLoadBalancerOptions) SetHeaders(param map[string]string) *U
// UpdateLoadBalancerPoolMemberOptions : The UpdateLoadBalancerPoolMember options.
type UpdateLoadBalancerPoolMemberOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// The pool identifier.
- PoolID *string `validate:"required,ne="`
+ PoolID *string `json:"pool_id" validate:"required,ne="`
// The member identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The load balancer pool member patch.
- LoadBalancerPoolMemberPatch map[string]interface{} `validate:"required"`
+ LoadBalancerPoolMemberPatch map[string]interface{} `json:"LoadBalancerPoolMember_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -43098,27 +54263,27 @@ func (*VpcV1) NewUpdateLoadBalancerPoolMemberOptions(loadBalancerID string, pool
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *UpdateLoadBalancerPoolMemberOptions) SetLoadBalancerID(loadBalancerID string) *UpdateLoadBalancerPoolMemberOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *UpdateLoadBalancerPoolMemberOptions) SetLoadBalancerID(loadBalancerID string) *UpdateLoadBalancerPoolMemberOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetPoolID : Allow user to set PoolID
-func (options *UpdateLoadBalancerPoolMemberOptions) SetPoolID(poolID string) *UpdateLoadBalancerPoolMemberOptions {
- options.PoolID = core.StringPtr(poolID)
- return options
+func (_options *UpdateLoadBalancerPoolMemberOptions) SetPoolID(poolID string) *UpdateLoadBalancerPoolMemberOptions {
+ _options.PoolID = core.StringPtr(poolID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *UpdateLoadBalancerPoolMemberOptions) SetID(id string) *UpdateLoadBalancerPoolMemberOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateLoadBalancerPoolMemberOptions) SetID(id string) *UpdateLoadBalancerPoolMemberOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetLoadBalancerPoolMemberPatch : Allow user to set LoadBalancerPoolMemberPatch
-func (options *UpdateLoadBalancerPoolMemberOptions) SetLoadBalancerPoolMemberPatch(loadBalancerPoolMemberPatch map[string]interface{}) *UpdateLoadBalancerPoolMemberOptions {
- options.LoadBalancerPoolMemberPatch = loadBalancerPoolMemberPatch
- return options
+func (_options *UpdateLoadBalancerPoolMemberOptions) SetLoadBalancerPoolMemberPatch(loadBalancerPoolMemberPatch map[string]interface{}) *UpdateLoadBalancerPoolMemberOptions {
+ _options.LoadBalancerPoolMemberPatch = loadBalancerPoolMemberPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -43130,13 +54295,13 @@ func (options *UpdateLoadBalancerPoolMemberOptions) SetHeaders(param map[string]
// UpdateLoadBalancerPoolOptions : The UpdateLoadBalancerPool options.
type UpdateLoadBalancerPoolOptions struct {
// The load balancer identifier.
- LoadBalancerID *string `validate:"required,ne="`
+ LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="`
// The pool identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The load balancer pool patch.
- LoadBalancerPoolPatch map[string]interface{} `validate:"required"`
+ LoadBalancerPoolPatch map[string]interface{} `json:"LoadBalancerPool_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -43152,21 +54317,21 @@ func (*VpcV1) NewUpdateLoadBalancerPoolOptions(loadBalancerID string, id string,
}
// SetLoadBalancerID : Allow user to set LoadBalancerID
-func (options *UpdateLoadBalancerPoolOptions) SetLoadBalancerID(loadBalancerID string) *UpdateLoadBalancerPoolOptions {
- options.LoadBalancerID = core.StringPtr(loadBalancerID)
- return options
+func (_options *UpdateLoadBalancerPoolOptions) SetLoadBalancerID(loadBalancerID string) *UpdateLoadBalancerPoolOptions {
+ _options.LoadBalancerID = core.StringPtr(loadBalancerID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *UpdateLoadBalancerPoolOptions) SetID(id string) *UpdateLoadBalancerPoolOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateLoadBalancerPoolOptions) SetID(id string) *UpdateLoadBalancerPoolOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetLoadBalancerPoolPatch : Allow user to set LoadBalancerPoolPatch
-func (options *UpdateLoadBalancerPoolOptions) SetLoadBalancerPoolPatch(loadBalancerPoolPatch map[string]interface{}) *UpdateLoadBalancerPoolOptions {
- options.LoadBalancerPoolPatch = loadBalancerPoolPatch
- return options
+func (_options *UpdateLoadBalancerPoolOptions) SetLoadBalancerPoolPatch(loadBalancerPoolPatch map[string]interface{}) *UpdateLoadBalancerPoolOptions {
+ _options.LoadBalancerPoolPatch = loadBalancerPoolPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -43178,10 +54343,10 @@ func (options *UpdateLoadBalancerPoolOptions) SetHeaders(param map[string]string
// UpdateNetworkACLOptions : The UpdateNetworkACL options.
type UpdateNetworkACLOptions struct {
// The network ACL identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The network ACL patch.
- NetworkACLPatch map[string]interface{} `validate:"required"`
+ NetworkACLPatch map[string]interface{} `json:"NetworkACL_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -43196,15 +54361,15 @@ func (*VpcV1) NewUpdateNetworkACLOptions(id string, networkACLPatch map[string]i
}
// SetID : Allow user to set ID
-func (options *UpdateNetworkACLOptions) SetID(id string) *UpdateNetworkACLOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateNetworkACLOptions) SetID(id string) *UpdateNetworkACLOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetNetworkACLPatch : Allow user to set NetworkACLPatch
-func (options *UpdateNetworkACLOptions) SetNetworkACLPatch(networkACLPatch map[string]interface{}) *UpdateNetworkACLOptions {
- options.NetworkACLPatch = networkACLPatch
- return options
+func (_options *UpdateNetworkACLOptions) SetNetworkACLPatch(networkACLPatch map[string]interface{}) *UpdateNetworkACLOptions {
+ _options.NetworkACLPatch = networkACLPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -43216,13 +54381,13 @@ func (options *UpdateNetworkACLOptions) SetHeaders(param map[string]string) *Upd
// UpdateNetworkACLRuleOptions : The UpdateNetworkACLRule options.
type UpdateNetworkACLRuleOptions struct {
// The network ACL identifier.
- NetworkACLID *string `validate:"required,ne="`
+ NetworkACLID *string `json:"network_acl_id" validate:"required,ne="`
// The rule identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The network ACL rule patch.
- NetworkACLRulePatch map[string]interface{} `validate:"required"`
+ NetworkACLRulePatch map[string]interface{} `json:"NetworkACLRule_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -43238,21 +54403,21 @@ func (*VpcV1) NewUpdateNetworkACLRuleOptions(networkACLID string, id string, net
}
// SetNetworkACLID : Allow user to set NetworkACLID
-func (options *UpdateNetworkACLRuleOptions) SetNetworkACLID(networkACLID string) *UpdateNetworkACLRuleOptions {
- options.NetworkACLID = core.StringPtr(networkACLID)
- return options
+func (_options *UpdateNetworkACLRuleOptions) SetNetworkACLID(networkACLID string) *UpdateNetworkACLRuleOptions {
+ _options.NetworkACLID = core.StringPtr(networkACLID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *UpdateNetworkACLRuleOptions) SetID(id string) *UpdateNetworkACLRuleOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateNetworkACLRuleOptions) SetID(id string) *UpdateNetworkACLRuleOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetNetworkACLRulePatch : Allow user to set NetworkACLRulePatch
-func (options *UpdateNetworkACLRuleOptions) SetNetworkACLRulePatch(networkACLRulePatch map[string]interface{}) *UpdateNetworkACLRuleOptions {
- options.NetworkACLRulePatch = networkACLRulePatch
- return options
+func (_options *UpdateNetworkACLRuleOptions) SetNetworkACLRulePatch(networkACLRulePatch map[string]interface{}) *UpdateNetworkACLRuleOptions {
+ _options.NetworkACLRulePatch = networkACLRulePatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -43261,13 +54426,51 @@ func (options *UpdateNetworkACLRuleOptions) SetHeaders(param map[string]string)
return options
}
+// UpdatePlacementGroupOptions : The UpdatePlacementGroup options.
+type UpdatePlacementGroupOptions struct {
+ // The placement group identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // The placement group patch.
+ PlacementGroupPatch map[string]interface{} `json:"PlacementGroup_patch" validate:"required"`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewUpdatePlacementGroupOptions : Instantiate UpdatePlacementGroupOptions
+func (*VpcV1) NewUpdatePlacementGroupOptions(id string, placementGroupPatch map[string]interface{}) *UpdatePlacementGroupOptions {
+ return &UpdatePlacementGroupOptions{
+ ID: core.StringPtr(id),
+ PlacementGroupPatch: placementGroupPatch,
+ }
+}
+
+// SetID : Allow user to set ID
+func (_options *UpdatePlacementGroupOptions) SetID(id string) *UpdatePlacementGroupOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetPlacementGroupPatch : Allow user to set PlacementGroupPatch
+func (_options *UpdatePlacementGroupOptions) SetPlacementGroupPatch(placementGroupPatch map[string]interface{}) *UpdatePlacementGroupOptions {
+ _options.PlacementGroupPatch = placementGroupPatch
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *UpdatePlacementGroupOptions) SetHeaders(param map[string]string) *UpdatePlacementGroupOptions {
+ options.Headers = param
+ return options
+}
+
// UpdatePublicGatewayOptions : The UpdatePublicGateway options.
type UpdatePublicGatewayOptions struct {
// The public gateway identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The public gateway patch.
- PublicGatewayPatch map[string]interface{} `validate:"required"`
+ PublicGatewayPatch map[string]interface{} `json:"PublicGateway_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -43282,15 +54485,15 @@ func (*VpcV1) NewUpdatePublicGatewayOptions(id string, publicGatewayPatch map[st
}
// SetID : Allow user to set ID
-func (options *UpdatePublicGatewayOptions) SetID(id string) *UpdatePublicGatewayOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdatePublicGatewayOptions) SetID(id string) *UpdatePublicGatewayOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetPublicGatewayPatch : Allow user to set PublicGatewayPatch
-func (options *UpdatePublicGatewayOptions) SetPublicGatewayPatch(publicGatewayPatch map[string]interface{}) *UpdatePublicGatewayOptions {
- options.PublicGatewayPatch = publicGatewayPatch
- return options
+func (_options *UpdatePublicGatewayOptions) SetPublicGatewayPatch(publicGatewayPatch map[string]interface{}) *UpdatePublicGatewayOptions {
+ _options.PublicGatewayPatch = publicGatewayPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -43302,10 +54505,10 @@ func (options *UpdatePublicGatewayOptions) SetHeaders(param map[string]string) *
// UpdateSecurityGroupOptions : The UpdateSecurityGroup options.
type UpdateSecurityGroupOptions struct {
// The security group identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The security group patch.
- SecurityGroupPatch map[string]interface{} `validate:"required"`
+ SecurityGroupPatch map[string]interface{} `json:"SecurityGroup_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -43320,15 +54523,15 @@ func (*VpcV1) NewUpdateSecurityGroupOptions(id string, securityGroupPatch map[st
}
// SetID : Allow user to set ID
-func (options *UpdateSecurityGroupOptions) SetID(id string) *UpdateSecurityGroupOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateSecurityGroupOptions) SetID(id string) *UpdateSecurityGroupOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetSecurityGroupPatch : Allow user to set SecurityGroupPatch
-func (options *UpdateSecurityGroupOptions) SetSecurityGroupPatch(securityGroupPatch map[string]interface{}) *UpdateSecurityGroupOptions {
- options.SecurityGroupPatch = securityGroupPatch
- return options
+func (_options *UpdateSecurityGroupOptions) SetSecurityGroupPatch(securityGroupPatch map[string]interface{}) *UpdateSecurityGroupOptions {
+ _options.SecurityGroupPatch = securityGroupPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -43340,13 +54543,13 @@ func (options *UpdateSecurityGroupOptions) SetHeaders(param map[string]string) *
// UpdateSecurityGroupRuleOptions : The UpdateSecurityGroupRule options.
type UpdateSecurityGroupRuleOptions struct {
// The security group identifier.
- SecurityGroupID *string `validate:"required,ne="`
+ SecurityGroupID *string `json:"security_group_id" validate:"required,ne="`
// The rule identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The security group rule patch.
- SecurityGroupRulePatch map[string]interface{} `validate:"required"`
+ SecurityGroupRulePatch map[string]interface{} `json:"SecurityGroupRule_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -43362,21 +54565,21 @@ func (*VpcV1) NewUpdateSecurityGroupRuleOptions(securityGroupID string, id strin
}
// SetSecurityGroupID : Allow user to set SecurityGroupID
-func (options *UpdateSecurityGroupRuleOptions) SetSecurityGroupID(securityGroupID string) *UpdateSecurityGroupRuleOptions {
- options.SecurityGroupID = core.StringPtr(securityGroupID)
- return options
+func (_options *UpdateSecurityGroupRuleOptions) SetSecurityGroupID(securityGroupID string) *UpdateSecurityGroupRuleOptions {
+ _options.SecurityGroupID = core.StringPtr(securityGroupID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *UpdateSecurityGroupRuleOptions) SetID(id string) *UpdateSecurityGroupRuleOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateSecurityGroupRuleOptions) SetID(id string) *UpdateSecurityGroupRuleOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetSecurityGroupRulePatch : Allow user to set SecurityGroupRulePatch
-func (options *UpdateSecurityGroupRuleOptions) SetSecurityGroupRulePatch(securityGroupRulePatch map[string]interface{}) *UpdateSecurityGroupRuleOptions {
- options.SecurityGroupRulePatch = securityGroupRulePatch
- return options
+func (_options *UpdateSecurityGroupRuleOptions) SetSecurityGroupRulePatch(securityGroupRulePatch map[string]interface{}) *UpdateSecurityGroupRuleOptions {
+ _options.SecurityGroupRulePatch = securityGroupRulePatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -43385,13 +54588,61 @@ func (options *UpdateSecurityGroupRuleOptions) SetHeaders(param map[string]strin
return options
}
+// UpdateSnapshotOptions : The UpdateSnapshot options.
+type UpdateSnapshotOptions struct {
+ // The snapshot identifier.
+ ID *string `json:"id" validate:"required,ne="`
+
+ // The snapshot patch.
+ SnapshotPatch map[string]interface{} `json:"Snapshot_patch" validate:"required"`
+
+ // If present, the request will fail if the specified ETag value does not match the resource's current ETag value.
+ // Required if the request body includes an array.
+ IfMatch *string `json:"If-Match,omitempty"`
+
+ // Allows users to set headers on API requests
+ Headers map[string]string
+}
+
+// NewUpdateSnapshotOptions : Instantiate UpdateSnapshotOptions
+func (*VpcV1) NewUpdateSnapshotOptions(id string, snapshotPatch map[string]interface{}) *UpdateSnapshotOptions {
+ return &UpdateSnapshotOptions{
+ ID: core.StringPtr(id),
+ SnapshotPatch: snapshotPatch,
+ }
+}
+
+// SetID : Allow user to set ID
+func (_options *UpdateSnapshotOptions) SetID(id string) *UpdateSnapshotOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
+}
+
+// SetSnapshotPatch : Allow user to set SnapshotPatch
+func (_options *UpdateSnapshotOptions) SetSnapshotPatch(snapshotPatch map[string]interface{}) *UpdateSnapshotOptions {
+ _options.SnapshotPatch = snapshotPatch
+ return _options
+}
+
+// SetIfMatch : Allow user to set IfMatch
+func (_options *UpdateSnapshotOptions) SetIfMatch(ifMatch string) *UpdateSnapshotOptions {
+ _options.IfMatch = core.StringPtr(ifMatch)
+ return _options
+}
+
+// SetHeaders : Allow user to set Headers
+func (options *UpdateSnapshotOptions) SetHeaders(param map[string]string) *UpdateSnapshotOptions {
+ options.Headers = param
+ return options
+}
+
// UpdateSubnetOptions : The UpdateSubnet options.
type UpdateSubnetOptions struct {
// The subnet identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The subnet patch.
- SubnetPatch map[string]interface{} `validate:"required"`
+ SubnetPatch map[string]interface{} `json:"Subnet_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -43406,15 +54657,15 @@ func (*VpcV1) NewUpdateSubnetOptions(id string, subnetPatch map[string]interface
}
// SetID : Allow user to set ID
-func (options *UpdateSubnetOptions) SetID(id string) *UpdateSubnetOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateSubnetOptions) SetID(id string) *UpdateSubnetOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetSubnetPatch : Allow user to set SubnetPatch
-func (options *UpdateSubnetOptions) SetSubnetPatch(subnetPatch map[string]interface{}) *UpdateSubnetOptions {
- options.SubnetPatch = subnetPatch
- return options
+func (_options *UpdateSubnetOptions) SetSubnetPatch(subnetPatch map[string]interface{}) *UpdateSubnetOptions {
+ _options.SubnetPatch = subnetPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -43426,13 +54677,13 @@ func (options *UpdateSubnetOptions) SetHeaders(param map[string]string) *UpdateS
// UpdateSubnetReservedIPOptions : The UpdateSubnetReservedIP options.
type UpdateSubnetReservedIPOptions struct {
// The subnet identifier.
- SubnetID *string `validate:"required,ne="`
+ SubnetID *string `json:"subnet_id" validate:"required,ne="`
// The reserved IP identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The reserved IP patch.
- ReservedIPPatch map[string]interface{} `validate:"required"`
+ ReservedIPPatch map[string]interface{} `json:"ReservedIP_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -43448,21 +54699,21 @@ func (*VpcV1) NewUpdateSubnetReservedIPOptions(subnetID string, id string, reser
}
// SetSubnetID : Allow user to set SubnetID
-func (options *UpdateSubnetReservedIPOptions) SetSubnetID(subnetID string) *UpdateSubnetReservedIPOptions {
- options.SubnetID = core.StringPtr(subnetID)
- return options
+func (_options *UpdateSubnetReservedIPOptions) SetSubnetID(subnetID string) *UpdateSubnetReservedIPOptions {
+ _options.SubnetID = core.StringPtr(subnetID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *UpdateSubnetReservedIPOptions) SetID(id string) *UpdateSubnetReservedIPOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateSubnetReservedIPOptions) SetID(id string) *UpdateSubnetReservedIPOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetReservedIPPatch : Allow user to set ReservedIPPatch
-func (options *UpdateSubnetReservedIPOptions) SetReservedIPPatch(reservedIPPatch map[string]interface{}) *UpdateSubnetReservedIPOptions {
- options.ReservedIPPatch = reservedIPPatch
- return options
+func (_options *UpdateSubnetReservedIPOptions) SetReservedIPPatch(reservedIPPatch map[string]interface{}) *UpdateSubnetReservedIPOptions {
+ _options.ReservedIPPatch = reservedIPPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -43474,10 +54725,14 @@ func (options *UpdateSubnetReservedIPOptions) SetHeaders(param map[string]string
// UpdateVolumeOptions : The UpdateVolume options.
type UpdateVolumeOptions struct {
// The volume identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The volume patch.
- VolumePatch map[string]interface{} `validate:"required"`
+ VolumePatch map[string]interface{} `json:"Volume_patch" validate:"required"`
+
+ // If present, the request will fail if the specified ETag value does not match the resource's current ETag value.
+ // Required if the request body includes an array.
+ IfMatch *string `json:"If-Match,omitempty"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -43492,15 +54747,21 @@ func (*VpcV1) NewUpdateVolumeOptions(id string, volumePatch map[string]interface
}
// SetID : Allow user to set ID
-func (options *UpdateVolumeOptions) SetID(id string) *UpdateVolumeOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateVolumeOptions) SetID(id string) *UpdateVolumeOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetVolumePatch : Allow user to set VolumePatch
-func (options *UpdateVolumeOptions) SetVolumePatch(volumePatch map[string]interface{}) *UpdateVolumeOptions {
- options.VolumePatch = volumePatch
- return options
+func (_options *UpdateVolumeOptions) SetVolumePatch(volumePatch map[string]interface{}) *UpdateVolumeOptions {
+ _options.VolumePatch = volumePatch
+ return _options
+}
+
+// SetIfMatch : Allow user to set IfMatch
+func (_options *UpdateVolumeOptions) SetIfMatch(ifMatch string) *UpdateVolumeOptions {
+ _options.IfMatch = core.StringPtr(ifMatch)
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -43512,13 +54773,13 @@ func (options *UpdateVolumeOptions) SetHeaders(param map[string]string) *UpdateV
// UpdateVPCAddressPrefixOptions : The UpdateVPCAddressPrefix options.
type UpdateVPCAddressPrefixOptions struct {
// The VPC identifier.
- VPCID *string `validate:"required,ne="`
+ VPCID *string `json:"vpc_id" validate:"required,ne="`
// The prefix identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The prefix patch.
- AddressPrefixPatch map[string]interface{} `validate:"required"`
+ AddressPrefixPatch map[string]interface{} `json:"AddressPrefix_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -43534,21 +54795,21 @@ func (*VpcV1) NewUpdateVPCAddressPrefixOptions(vpcID string, id string, addressP
}
// SetVPCID : Allow user to set VPCID
-func (options *UpdateVPCAddressPrefixOptions) SetVPCID(vpcID string) *UpdateVPCAddressPrefixOptions {
- options.VPCID = core.StringPtr(vpcID)
- return options
+func (_options *UpdateVPCAddressPrefixOptions) SetVPCID(vpcID string) *UpdateVPCAddressPrefixOptions {
+ _options.VPCID = core.StringPtr(vpcID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *UpdateVPCAddressPrefixOptions) SetID(id string) *UpdateVPCAddressPrefixOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateVPCAddressPrefixOptions) SetID(id string) *UpdateVPCAddressPrefixOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetAddressPrefixPatch : Allow user to set AddressPrefixPatch
-func (options *UpdateVPCAddressPrefixOptions) SetAddressPrefixPatch(addressPrefixPatch map[string]interface{}) *UpdateVPCAddressPrefixOptions {
- options.AddressPrefixPatch = addressPrefixPatch
- return options
+func (_options *UpdateVPCAddressPrefixOptions) SetAddressPrefixPatch(addressPrefixPatch map[string]interface{}) *UpdateVPCAddressPrefixOptions {
+ _options.AddressPrefixPatch = addressPrefixPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -43560,10 +54821,10 @@ func (options *UpdateVPCAddressPrefixOptions) SetHeaders(param map[string]string
// UpdateVPCOptions : The UpdateVPC options.
type UpdateVPCOptions struct {
// The VPC identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The VPC patch.
- VPCPatch map[string]interface{} `validate:"required"`
+ VPCPatch map[string]interface{} `json:"VPC_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -43578,15 +54839,15 @@ func (*VpcV1) NewUpdateVPCOptions(id string, vpcPatch map[string]interface{}) *U
}
// SetID : Allow user to set ID
-func (options *UpdateVPCOptions) SetID(id string) *UpdateVPCOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateVPCOptions) SetID(id string) *UpdateVPCOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetVPCPatch : Allow user to set VPCPatch
-func (options *UpdateVPCOptions) SetVPCPatch(vpcPatch map[string]interface{}) *UpdateVPCOptions {
- options.VPCPatch = vpcPatch
- return options
+func (_options *UpdateVPCOptions) SetVPCPatch(vpcPatch map[string]interface{}) *UpdateVPCOptions {
+ _options.VPCPatch = vpcPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -43598,13 +54859,13 @@ func (options *UpdateVPCOptions) SetHeaders(param map[string]string) *UpdateVPCO
// UpdateVPCRouteOptions : The UpdateVPCRoute options.
type UpdateVPCRouteOptions struct {
// The VPC identifier.
- VPCID *string `validate:"required,ne="`
+ VPCID *string `json:"vpc_id" validate:"required,ne="`
// The route identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The route patch.
- RoutePatch map[string]interface{} `validate:"required"`
+ RoutePatch map[string]interface{} `json:"Route_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -43620,21 +54881,21 @@ func (*VpcV1) NewUpdateVPCRouteOptions(vpcID string, id string, routePatch map[s
}
// SetVPCID : Allow user to set VPCID
-func (options *UpdateVPCRouteOptions) SetVPCID(vpcID string) *UpdateVPCRouteOptions {
- options.VPCID = core.StringPtr(vpcID)
- return options
+func (_options *UpdateVPCRouteOptions) SetVPCID(vpcID string) *UpdateVPCRouteOptions {
+ _options.VPCID = core.StringPtr(vpcID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *UpdateVPCRouteOptions) SetID(id string) *UpdateVPCRouteOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateVPCRouteOptions) SetID(id string) *UpdateVPCRouteOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetRoutePatch : Allow user to set RoutePatch
-func (options *UpdateVPCRouteOptions) SetRoutePatch(routePatch map[string]interface{}) *UpdateVPCRouteOptions {
- options.RoutePatch = routePatch
- return options
+func (_options *UpdateVPCRouteOptions) SetRoutePatch(routePatch map[string]interface{}) *UpdateVPCRouteOptions {
+ _options.RoutePatch = routePatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -43646,13 +54907,13 @@ func (options *UpdateVPCRouteOptions) SetHeaders(param map[string]string) *Updat
// UpdateVPCRoutingTableOptions : The UpdateVPCRoutingTable options.
type UpdateVPCRoutingTableOptions struct {
// The VPC identifier.
- VPCID *string `validate:"required,ne="`
+ VPCID *string `json:"vpc_id" validate:"required,ne="`
// The routing table identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The routing table patch.
- RoutingTablePatch map[string]interface{} `validate:"required"`
+ RoutingTablePatch map[string]interface{} `json:"RoutingTable_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -43668,21 +54929,21 @@ func (*VpcV1) NewUpdateVPCRoutingTableOptions(vpcID string, id string, routingTa
}
// SetVPCID : Allow user to set VPCID
-func (options *UpdateVPCRoutingTableOptions) SetVPCID(vpcID string) *UpdateVPCRoutingTableOptions {
- options.VPCID = core.StringPtr(vpcID)
- return options
+func (_options *UpdateVPCRoutingTableOptions) SetVPCID(vpcID string) *UpdateVPCRoutingTableOptions {
+ _options.VPCID = core.StringPtr(vpcID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *UpdateVPCRoutingTableOptions) SetID(id string) *UpdateVPCRoutingTableOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateVPCRoutingTableOptions) SetID(id string) *UpdateVPCRoutingTableOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetRoutingTablePatch : Allow user to set RoutingTablePatch
-func (options *UpdateVPCRoutingTableOptions) SetRoutingTablePatch(routingTablePatch map[string]interface{}) *UpdateVPCRoutingTableOptions {
- options.RoutingTablePatch = routingTablePatch
- return options
+func (_options *UpdateVPCRoutingTableOptions) SetRoutingTablePatch(routingTablePatch map[string]interface{}) *UpdateVPCRoutingTableOptions {
+ _options.RoutingTablePatch = routingTablePatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -43694,16 +54955,16 @@ func (options *UpdateVPCRoutingTableOptions) SetHeaders(param map[string]string)
// UpdateVPCRoutingTableRouteOptions : The UpdateVPCRoutingTableRoute options.
type UpdateVPCRoutingTableRouteOptions struct {
// The VPC identifier.
- VPCID *string `validate:"required,ne="`
+ VPCID *string `json:"vpc_id" validate:"required,ne="`
// The routing table identifier.
- RoutingTableID *string `validate:"required,ne="`
+ RoutingTableID *string `json:"routing_table_id" validate:"required,ne="`
// The VPC routing table route identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The VPC route patch.
- RoutePatch map[string]interface{} `validate:"required"`
+ RoutePatch map[string]interface{} `json:"Route_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -43720,27 +54981,27 @@ func (*VpcV1) NewUpdateVPCRoutingTableRouteOptions(vpcID string, routingTableID
}
// SetVPCID : Allow user to set VPCID
-func (options *UpdateVPCRoutingTableRouteOptions) SetVPCID(vpcID string) *UpdateVPCRoutingTableRouteOptions {
- options.VPCID = core.StringPtr(vpcID)
- return options
+func (_options *UpdateVPCRoutingTableRouteOptions) SetVPCID(vpcID string) *UpdateVPCRoutingTableRouteOptions {
+ _options.VPCID = core.StringPtr(vpcID)
+ return _options
}
// SetRoutingTableID : Allow user to set RoutingTableID
-func (options *UpdateVPCRoutingTableRouteOptions) SetRoutingTableID(routingTableID string) *UpdateVPCRoutingTableRouteOptions {
- options.RoutingTableID = core.StringPtr(routingTableID)
- return options
+func (_options *UpdateVPCRoutingTableRouteOptions) SetRoutingTableID(routingTableID string) *UpdateVPCRoutingTableRouteOptions {
+ _options.RoutingTableID = core.StringPtr(routingTableID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *UpdateVPCRoutingTableRouteOptions) SetID(id string) *UpdateVPCRoutingTableRouteOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateVPCRoutingTableRouteOptions) SetID(id string) *UpdateVPCRoutingTableRouteOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetRoutePatch : Allow user to set RoutePatch
-func (options *UpdateVPCRoutingTableRouteOptions) SetRoutePatch(routePatch map[string]interface{}) *UpdateVPCRoutingTableRouteOptions {
- options.RoutePatch = routePatch
- return options
+func (_options *UpdateVPCRoutingTableRouteOptions) SetRoutePatch(routePatch map[string]interface{}) *UpdateVPCRoutingTableRouteOptions {
+ _options.RoutePatch = routePatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -43752,13 +55013,13 @@ func (options *UpdateVPCRoutingTableRouteOptions) SetHeaders(param map[string]st
// UpdateVPNGatewayConnectionOptions : The UpdateVPNGatewayConnection options.
type UpdateVPNGatewayConnectionOptions struct {
// The VPN gateway identifier.
- VPNGatewayID *string `validate:"required,ne="`
+ VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="`
// The VPN gateway connection identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The VPN gateway connection patch.
- VPNGatewayConnectionPatch map[string]interface{} `validate:"required"`
+ VPNGatewayConnectionPatch map[string]interface{} `json:"VPNGatewayConnection_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -43774,21 +55035,21 @@ func (*VpcV1) NewUpdateVPNGatewayConnectionOptions(vpnGatewayID string, id strin
}
// SetVPNGatewayID : Allow user to set VPNGatewayID
-func (options *UpdateVPNGatewayConnectionOptions) SetVPNGatewayID(vpnGatewayID string) *UpdateVPNGatewayConnectionOptions {
- options.VPNGatewayID = core.StringPtr(vpnGatewayID)
- return options
+func (_options *UpdateVPNGatewayConnectionOptions) SetVPNGatewayID(vpnGatewayID string) *UpdateVPNGatewayConnectionOptions {
+ _options.VPNGatewayID = core.StringPtr(vpnGatewayID)
+ return _options
}
// SetID : Allow user to set ID
-func (options *UpdateVPNGatewayConnectionOptions) SetID(id string) *UpdateVPNGatewayConnectionOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateVPNGatewayConnectionOptions) SetID(id string) *UpdateVPNGatewayConnectionOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetVPNGatewayConnectionPatch : Allow user to set VPNGatewayConnectionPatch
-func (options *UpdateVPNGatewayConnectionOptions) SetVPNGatewayConnectionPatch(vpnGatewayConnectionPatch map[string]interface{}) *UpdateVPNGatewayConnectionOptions {
- options.VPNGatewayConnectionPatch = vpnGatewayConnectionPatch
- return options
+func (_options *UpdateVPNGatewayConnectionOptions) SetVPNGatewayConnectionPatch(vpnGatewayConnectionPatch map[string]interface{}) *UpdateVPNGatewayConnectionOptions {
+ _options.VPNGatewayConnectionPatch = vpnGatewayConnectionPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -43800,10 +55061,10 @@ func (options *UpdateVPNGatewayConnectionOptions) SetHeaders(param map[string]st
// UpdateVPNGatewayOptions : The UpdateVPNGateway options.
type UpdateVPNGatewayOptions struct {
// The VPN gateway identifier.
- ID *string `validate:"required,ne="`
+ ID *string `json:"id" validate:"required,ne="`
// The VPN gateway patch.
- VPNGatewayPatch map[string]interface{} `validate:"required"`
+ VPNGatewayPatch map[string]interface{} `json:"VPNGateway_patch" validate:"required"`
// Allows users to set headers on API requests
Headers map[string]string
@@ -43818,15 +55079,15 @@ func (*VpcV1) NewUpdateVPNGatewayOptions(id string, vpnGatewayPatch map[string]i
}
// SetID : Allow user to set ID
-func (options *UpdateVPNGatewayOptions) SetID(id string) *UpdateVPNGatewayOptions {
- options.ID = core.StringPtr(id)
- return options
+func (_options *UpdateVPNGatewayOptions) SetID(id string) *UpdateVPNGatewayOptions {
+ _options.ID = core.StringPtr(id)
+ return _options
}
// SetVPNGatewayPatch : Allow user to set VPNGatewayPatch
-func (options *UpdateVPNGatewayOptions) SetVPNGatewayPatch(vpnGatewayPatch map[string]interface{}) *UpdateVPNGatewayOptions {
- options.VPNGatewayPatch = vpnGatewayPatch
- return options
+func (_options *UpdateVPNGatewayOptions) SetVPNGatewayPatch(vpnGatewayPatch map[string]interface{}) *UpdateVPNGatewayOptions {
+ _options.VPNGatewayPatch = vpnGatewayPatch
+ return _options
}
// SetHeaders : Allow user to set Headers
@@ -43872,8 +55133,8 @@ type VPC struct {
// The CRN for this VPC.
CRN *string `json:"crn" validate:"required"`
- // Array of CSE ([Cloud Service Endpoint](https://cloud.ibm.com/docs/resources?topic=resources-service-endpoints))
- // source IP addresses for the VPC. The VPC will have one CSE source IP address per zone.
+ // The CSE ([Cloud Service Endpoint](https://cloud.ibm.com/docs/resources?topic=resources-service-endpoints)) source IP
+ // addresses for the VPC. The VPC will have one CSE source IP address per zone.
CseSourceIps []VpccseSourceIP `json:"cse_source_ips,omitempty"`
// The default network ACL to use for subnets created in this VPC.
@@ -43897,10 +55158,19 @@ type VPC struct {
// The resource group for this VPC.
ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+
// The status of this VPC.
Status *string `json:"status" validate:"required"`
}
+// Constants associated with the VPC.ResourceType property.
+// The resource type.
+const (
+ VPCResourceTypeVPCConst = "vpc"
+)
+
// Constants associated with the VPC.Status property.
// The status of this VPC.
const (
@@ -43957,6 +55227,10 @@ func UnmarshalVPC(m map[string]json.RawMessage, result interface{}) (err error)
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "status", &obj.Status)
if err != nil {
return
@@ -44035,6 +55309,18 @@ func UnmarshalVPCCollection(m map[string]json.RawMessage, result interface{}) (e
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *VPCCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// VPCCollectionFirst : A link to the first page of resources.
type VPCCollectionFirst struct {
// The URL for a page of resources.
@@ -44130,11 +55416,11 @@ func UnmarshalVPCPatch(m map[string]json.RawMessage, result interface{}) (err er
}
// AsPatch returns a generic map representation of the VPCPatch
-func (vpcPatch *VPCPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (vpcPatch *VPCPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(vpcPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -44156,8 +55442,17 @@ type VPCReference struct {
// The unique user-defined name for this VPC.
Name *string `json:"name" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
}
+// Constants associated with the VPCReference.ResourceType property.
+// The resource type.
+const (
+ VPCReferenceResourceTypeVPCConst = "vpc"
+)
+
// UnmarshalVPCReference unmarshals an instance of VPCReference from the specified map of raw messages.
func UnmarshalVPCReference(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(VPCReference)
@@ -44181,6 +55476,10 @@ func UnmarshalVPCReference(m map[string]json.RawMessage, result interface{}) (er
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
@@ -44208,7 +55507,7 @@ func UnmarshalVPCReferenceDeleted(m map[string]json.RawMessage, result interface
// - VPNGatewayRouteMode
// - VPNGatewayPolicyMode
type VPNGateway struct {
- // Collection of references to VPN gateway connections.
+ // Connections for this VPN gateway.
Connections []VPNGatewayConnectionReference `json:"connections" validate:"required"`
// The date and time that this VPN gateway was created.
@@ -44374,6 +55673,18 @@ func UnmarshalVPNGatewayCollection(m map[string]json.RawMessage, result interfac
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *VPNGatewayCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// VPNGatewayCollectionFirst : A link to the first page of resources.
type VPNGatewayCollectionFirst struct {
// The URL for a page of resources.
@@ -44431,11 +55742,12 @@ type VPNGatewayConnection struct {
// The unique identifier for this VPN gateway connection.
ID *string `json:"id" validate:"required"`
- // Optional IKE policy configuration. The absence of a policy indicates autonegotiation.
+ // The IKE policy. If absent, [auto-negotiation is
+ // used](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ike-auto-negotiation-phase-1).
IkePolicy *IkePolicyReference `json:"ike_policy,omitempty"`
- // Optional IPsec policy configuration. The absence of a policy indicates
- // autonegotiation.
+ // The IPsec policy. If absent, [auto-negotiation is
+ // used](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ipsec-auto-negotiation-phase-2).
IpsecPolicy *IPsecPolicyReference `json:"ipsec_policy,omitempty"`
// The mode of the VPN gateway.
@@ -44462,10 +55774,10 @@ type VPNGatewayConnection struct {
// The VPN tunnel configuration for this VPN gateway connection (in static route mode).
Tunnels []VPNGatewayConnectionStaticRouteModeTunnel `json:"tunnels,omitempty"`
- // A collection of local CIDRs for this resource.
+ // The local CIDRs for this resource.
LocalCIDRs []string `json:"local_cidrs,omitempty"`
- // A collection of peer CIDRs for this resource.
+ // The peer CIDRs for this resource.
PeerCIDRs []string `json:"peer_cidrs,omitempty"`
}
@@ -44645,6 +55957,46 @@ func UnmarshalVPNGatewayConnectionDpd(m map[string]json.RawMessage, result inter
return
}
+// VPNGatewayConnectionDpdPatch : The Dead Peer Detection settings.
+type VPNGatewayConnectionDpdPatch struct {
+ // Dead Peer Detection actions.
+ Action *string `json:"action,omitempty"`
+
+ // Dead Peer Detection interval in seconds.
+ Interval *int64 `json:"interval,omitempty"`
+
+ // Dead Peer Detection timeout in seconds. Must be at least the interval.
+ Timeout *int64 `json:"timeout,omitempty"`
+}
+
+// Constants associated with the VPNGatewayConnectionDpdPatch.Action property.
+// Dead Peer Detection actions.
+const (
+ VPNGatewayConnectionDpdPatchActionClearConst = "clear"
+ VPNGatewayConnectionDpdPatchActionHoldConst = "hold"
+ VPNGatewayConnectionDpdPatchActionNoneConst = "none"
+ VPNGatewayConnectionDpdPatchActionRestartConst = "restart"
+)
+
+// UnmarshalVPNGatewayConnectionDpdPatch unmarshals an instance of VPNGatewayConnectionDpdPatch from the specified map of raw messages.
+func UnmarshalVPNGatewayConnectionDpdPatch(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VPNGatewayConnectionDpdPatch)
+ err = core.UnmarshalPrimitive(m, "action", &obj.Action)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "interval", &obj.Interval)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "timeout", &obj.Timeout)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// VPNGatewayConnectionDpdPrototype : The Dead Peer Detection settings.
type VPNGatewayConnectionDpdPrototype struct {
// Dead Peer Detection actions.
@@ -44685,9 +56037,153 @@ func UnmarshalVPNGatewayConnectionDpdPrototype(m map[string]json.RawMessage, res
return
}
+// VPNGatewayConnectionIkePolicyPatch : The IKE policy to use. Specify `null` to remove any existing policy, [resulting in
+// auto-negotiation](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ike-auto-negotiation-phase-1).
+// Models which "extend" this model:
+// - VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID
+// - VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref
+type VPNGatewayConnectionIkePolicyPatch struct {
+ // The unique identifier for this IKE policy.
+ ID *string `json:"id,omitempty"`
+
+ // The IKE policy's canonical URL.
+ Href *string `json:"href,omitempty"`
+}
+
+func (*VPNGatewayConnectionIkePolicyPatch) isaVPNGatewayConnectionIkePolicyPatch() bool {
+ return true
+}
+
+type VPNGatewayConnectionIkePolicyPatchIntf interface {
+ isaVPNGatewayConnectionIkePolicyPatch() bool
+}
+
+// UnmarshalVPNGatewayConnectionIkePolicyPatch unmarshals an instance of VPNGatewayConnectionIkePolicyPatch from the specified map of raw messages.
+func UnmarshalVPNGatewayConnectionIkePolicyPatch(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VPNGatewayConnectionIkePolicyPatch)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// VPNGatewayConnectionIkePolicyPrototype : The IKE policy to use. If unspecified, [auto-negotiation will be
+// used](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ike-auto-negotiation-phase-1).
+// Models which "extend" this model:
+// - VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID
+// - VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref
+type VPNGatewayConnectionIkePolicyPrototype struct {
+ // The unique identifier for this IKE policy.
+ ID *string `json:"id,omitempty"`
+
+ // The IKE policy's canonical URL.
+ Href *string `json:"href,omitempty"`
+}
+
+func (*VPNGatewayConnectionIkePolicyPrototype) isaVPNGatewayConnectionIkePolicyPrototype() bool {
+ return true
+}
+
+type VPNGatewayConnectionIkePolicyPrototypeIntf interface {
+ isaVPNGatewayConnectionIkePolicyPrototype() bool
+}
+
+// UnmarshalVPNGatewayConnectionIkePolicyPrototype unmarshals an instance of VPNGatewayConnectionIkePolicyPrototype from the specified map of raw messages.
+func UnmarshalVPNGatewayConnectionIkePolicyPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VPNGatewayConnectionIkePolicyPrototype)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// VPNGatewayConnectionIPsecPolicyPatch : The IPsec policy to use. Specify `null` to remove any existing policy, [resulting in
+// auto-negotiation](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ipsec-auto-negotiation-phase-2).
+// Models which "extend" this model:
+// - VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID
+// - VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref
+type VPNGatewayConnectionIPsecPolicyPatch struct {
+ // The unique identifier for this IPsec policy.
+ ID *string `json:"id,omitempty"`
+
+ // The IPsec policy's canonical URL.
+ Href *string `json:"href,omitempty"`
+}
+
+func (*VPNGatewayConnectionIPsecPolicyPatch) isaVPNGatewayConnectionIPsecPolicyPatch() bool {
+ return true
+}
+
+type VPNGatewayConnectionIPsecPolicyPatchIntf interface {
+ isaVPNGatewayConnectionIPsecPolicyPatch() bool
+}
+
+// UnmarshalVPNGatewayConnectionIPsecPolicyPatch unmarshals an instance of VPNGatewayConnectionIPsecPolicyPatch from the specified map of raw messages.
+func UnmarshalVPNGatewayConnectionIPsecPolicyPatch(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VPNGatewayConnectionIPsecPolicyPatch)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// VPNGatewayConnectionIPsecPolicyPrototype : The IPsec policy to use. If unspecified, [auto-negotiation will be
+// used](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ipsec-auto-negotiation-phase-2).
+// Models which "extend" this model:
+// - VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID
+// - VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref
+type VPNGatewayConnectionIPsecPolicyPrototype struct {
+ // The unique identifier for this IPsec policy.
+ ID *string `json:"id,omitempty"`
+
+ // The IPsec policy's canonical URL.
+ Href *string `json:"href,omitempty"`
+}
+
+func (*VPNGatewayConnectionIPsecPolicyPrototype) isaVPNGatewayConnectionIPsecPolicyPrototype() bool {
+ return true
+}
+
+type VPNGatewayConnectionIPsecPolicyPrototypeIntf interface {
+ isaVPNGatewayConnectionIPsecPolicyPrototype() bool
+}
+
+// UnmarshalVPNGatewayConnectionIPsecPolicyPrototype unmarshals an instance of VPNGatewayConnectionIPsecPolicyPrototype from the specified map of raw messages.
+func UnmarshalVPNGatewayConnectionIPsecPolicyPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VPNGatewayConnectionIPsecPolicyPrototype)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// VPNGatewayConnectionLocalCIDRs : VPNGatewayConnectionLocalCIDRs struct
type VPNGatewayConnectionLocalCIDRs struct {
- // A collection of local CIDRs for this resource.
+ // The local CIDRs for this resource.
LocalCIDRs []string `json:"local_cidrs,omitempty"`
}
@@ -44710,14 +56206,15 @@ type VPNGatewayConnectionPatch struct {
AdminStateUp *bool `json:"admin_state_up,omitempty"`
// The Dead Peer Detection settings.
- DeadPeerDetection *VPNGatewayConnectionDpdPrototype `json:"dead_peer_detection,omitempty"`
+ DeadPeerDetection *VPNGatewayConnectionDpdPatch `json:"dead_peer_detection,omitempty"`
- // Optional IKE policy configuration. The absence of a policy indicates autonegotiation.
- IkePolicy IkePolicyIdentityIntf `json:"ike_policy,omitempty"`
+ // The IKE policy to use. Specify `null` to remove any existing policy, [resulting in
+ // auto-negotiation](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ike-auto-negotiation-phase-1).
+ IkePolicy VPNGatewayConnectionIkePolicyPatchIntf `json:"ike_policy,omitempty"`
- // Optional IPsec policy configuration. The absence of a policy indicates
- // autonegotiation.
- IpsecPolicy IPsecPolicyIdentityIntf `json:"ipsec_policy,omitempty"`
+ // The IPsec policy to use. Specify `null` to remove any existing policy, [resulting in
+ // auto-negotiation](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ipsec-auto-negotiation-phase-2).
+ IpsecPolicy VPNGatewayConnectionIPsecPolicyPatchIntf `json:"ipsec_policy,omitempty"`
// The user-defined name for this VPN gateway connection.
Name *string `json:"name,omitempty"`
@@ -44753,15 +56250,15 @@ func UnmarshalVPNGatewayConnectionPatch(m map[string]json.RawMessage, result int
if err != nil {
return
}
- err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpdPrototype)
+ err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpdPatch)
if err != nil {
return
}
- err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyIdentity)
+ err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalVPNGatewayConnectionIkePolicyPatch)
if err != nil {
return
}
- err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyIdentity)
+ err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalVPNGatewayConnectionIPsecPolicyPatch)
if err != nil {
return
}
@@ -44786,18 +56283,18 @@ func UnmarshalVPNGatewayConnectionPatch(m map[string]json.RawMessage, result int
}
// AsPatch returns a generic map representation of the VPNGatewayConnectionPatch
-func (vpnGatewayConnectionPatch *VPNGatewayConnectionPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (vpnGatewayConnectionPatch *VPNGatewayConnectionPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(vpnGatewayConnectionPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
// VPNGatewayConnectionPeerCIDRs : VPNGatewayConnectionPeerCIDRs struct
type VPNGatewayConnectionPeerCIDRs struct {
- // A collection of peer CIDRs for this resource.
+ // The peer CIDRs for this resource.
PeerCIDRs []string `json:"peer_cidrs,omitempty"`
}
@@ -44823,12 +56320,13 @@ type VPNGatewayConnectionPrototype struct {
// The Dead Peer Detection settings.
DeadPeerDetection *VPNGatewayConnectionDpdPrototype `json:"dead_peer_detection,omitempty"`
- // Optional IKE policy configuration. The absence of a policy indicates autonegotiation.
- IkePolicy IkePolicyIdentityIntf `json:"ike_policy,omitempty"`
+ // The IKE policy to use. If unspecified, [auto-negotiation will be
+ // used](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ike-auto-negotiation-phase-1).
+ IkePolicy VPNGatewayConnectionIkePolicyPrototypeIntf `json:"ike_policy,omitempty"`
- // Optional IPsec policy configuration. The absence of a policy indicates
- // autonegotiation.
- IpsecPolicy IPsecPolicyIdentityIntf `json:"ipsec_policy,omitempty"`
+ // The IPsec policy to use. If unspecified, [auto-negotiation will be
+ // used](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ipsec-auto-negotiation-phase-2).
+ IpsecPolicy VPNGatewayConnectionIPsecPolicyPrototypeIntf `json:"ipsec_policy,omitempty"`
// The user-defined name for this VPN gateway connection.
Name *string `json:"name,omitempty"`
@@ -44842,10 +56340,10 @@ type VPNGatewayConnectionPrototype struct {
// Routing protocols are disabled for this VPN gateway connection.
RoutingProtocol *string `json:"routing_protocol,omitempty"`
- // A collection of local CIDRs for this resource.
+ // The local CIDRs for this resource.
LocalCIDRs []string `json:"local_cidrs,omitempty"`
- // A collection of peer CIDRs for this resource.
+ // The peer CIDRs for this resource.
PeerCIDRs []string `json:"peer_cidrs,omitempty"`
}
@@ -44874,11 +56372,11 @@ func UnmarshalVPNGatewayConnectionPrototype(m map[string]json.RawMessage, result
if err != nil {
return
}
- err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyIdentity)
+ err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalVPNGatewayConnectionIkePolicyPrototype)
if err != nil {
return
}
- err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyIdentity)
+ err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalVPNGatewayConnectionIPsecPolicyPrototype)
if err != nil {
return
}
@@ -45013,9 +56511,9 @@ func UnmarshalVPNGatewayConnectionStaticRouteModeTunnel(m map[string]json.RawMes
// VPNGatewayMember : VPNGatewayMember struct
type VPNGatewayMember struct {
- // The private IP address assigned to the VPN gateway member. This
- // property will be present only when the VPN gateway status is
- // `available`.
+ // The private IP address assigned to the VPN gateway member.
+ //
+ // This property will be present only when the VPN gateway status is `available`.
PrivateIP *IP `json:"private_ip,omitempty"`
// The public IP address assigned to the VPN gateway member.
@@ -45085,11 +56583,11 @@ func UnmarshalVPNGatewayPatch(m map[string]json.RawMessage, result interface{})
}
// AsPatch returns a generic map representation of the VPNGatewayPatch
-func (vpnGatewayPatch *VPNGatewayPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (vpnGatewayPatch *VPNGatewayPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(vpnGatewayPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -45150,10 +56648,38 @@ func UnmarshalVPNGatewayPrototype(m map[string]json.RawMessage, result interface
return
}
+// VPNGatewayReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
+// information.
+type VPNGatewayReferenceDeleted struct {
+ // Link to documentation about deleted resources.
+ MoreInfo *string `json:"more_info" validate:"required"`
+}
+
+// UnmarshalVPNGatewayReferenceDeleted unmarshals an instance of VPNGatewayReferenceDeleted from the specified map of raw messages.
+func UnmarshalVPNGatewayReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VPNGatewayReferenceDeleted)
+ err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// Volume : Volume struct
type Volume struct {
- // The capacity of the volume in gigabytes. The specified minimum and maximum capacity values for creating or updating
- // volumes may expand in the future.
+ // Indicates whether a running virtual server instance has an attachment to this volume.
+ Active *bool `json:"active" validate:"required"`
+
+ // The maximum bandwidth (in megabits per second) for the volume.
+ Bandwidth *int64 `json:"bandwidth" validate:"required"`
+
+ // Indicates whether this volume is performing an operation that must be serialized. This must be `false` to perform an
+ // operation that is specified to require serialization.
+ Busy *bool `json:"busy" validate:"required"`
+
+ // The capacity to use for the volume (in gigabytes). The specified minimum and maximum capacity values for creating or
+ // updating volumes may expand in the future.
Capacity *int64 `json:"capacity" validate:"required"`
// The date and time that the volume was created.
@@ -45165,7 +56691,7 @@ type Volume struct {
// The type of encryption used on the volume.
Encryption *string `json:"encryption" validate:"required"`
- // A reference to the root key used to wrap the data encryption key for the volume.
+ // The root key used to wrap the data encryption key for the volume.
//
// This property will be present for volumes with an `encryption` type of
// `user_managed`.
@@ -45177,18 +56703,31 @@ type Volume struct {
// The unique identifier for this volume.
ID *string `json:"id" validate:"required"`
- // The bandwidth for the volume.
+ // The maximum I/O operations per second (IOPS) to use for the volume. Applicable only to volumes using a profile
+ // `family` of `custom`.
Iops *int64 `json:"iops" validate:"required"`
// The unique user-defined name for this volume.
Name *string `json:"name" validate:"required"`
+ // The operating system associated with this volume. If absent, this volume was not
+ // created from an image, or the image did not include an operating system.
+ OperatingSystem *OperatingSystemReference `json:"operating_system,omitempty"`
+
// The profile this volume uses.
Profile *VolumeProfileReference `json:"profile" validate:"required"`
// The resource group for this volume.
ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`
+ // The image from which this volume was created (this may be
+ // [deleted](https://cloud.ibm.com/apidocs/vpc#deleted-resources)).
+ // If absent, this volume was not created from an image.
+ SourceImage *ImageReference `json:"source_image,omitempty"`
+
+ // The snapshot from which this volume was cloned.
+ SourceSnapshot *SnapshotReference `json:"source_snapshot,omitempty"`
+
// The status of the volume.
//
// The enumerated values for this property will expand in the future. When processing this property, check for and log
@@ -45196,14 +56735,17 @@ type Volume struct {
// property value was encountered.
Status *string `json:"status" validate:"required"`
- // Array of reasons for the current status (if any).
+ // The reasons for the current status (if any).
//
// The enumerated reason code values for this property will expand in the future. When processing this property, check
// for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
// unexpected reason code was encountered.
StatusReasons []VolumeStatusReason `json:"status_reasons" validate:"required"`
- // The collection of volume attachments attaching instances to the volume.
+ // The [user tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this volume.
+ UserTags []string `json:"user_tags" validate:"required"`
+
+ // The volume attachments for this volume.
VolumeAttachments []VolumeAttachmentReferenceVolumeContext `json:"volume_attachments" validate:"required"`
// The zone this volume resides in.
@@ -45229,11 +56771,24 @@ const (
VolumeStatusPendingConst = "pending"
VolumeStatusPendingDeletionConst = "pending_deletion"
VolumeStatusUnusableConst = "unusable"
+ VolumeStatusUpdatingConst = "updating"
)
// UnmarshalVolume unmarshals an instance of Volume from the specified map of raw messages.
func UnmarshalVolume(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(Volume)
+ err = core.UnmarshalPrimitive(m, "active", &obj.Active)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "bandwidth", &obj.Bandwidth)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "busy", &obj.Busy)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity)
if err != nil {
return
@@ -45270,6 +56825,10 @@ func UnmarshalVolume(m map[string]json.RawMessage, result interface{}) (err erro
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "operating_system", &obj.OperatingSystem, UnmarshalOperatingSystemReference)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileReference)
if err != nil {
return
@@ -45278,6 +56837,14 @@ func UnmarshalVolume(m map[string]json.RawMessage, result interface{}) (err erro
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "source_image", &obj.SourceImage, UnmarshalImageReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotReference)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "status", &obj.Status)
if err != nil {
return
@@ -45286,6 +56853,10 @@ func UnmarshalVolume(m map[string]json.RawMessage, result interface{}) (err erro
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentReferenceVolumeContext)
if err != nil {
return
@@ -45300,11 +56871,15 @@ func UnmarshalVolume(m map[string]json.RawMessage, result interface{}) (err erro
// VolumeAttachment : VolumeAttachment struct
type VolumeAttachment struct {
+ // The maximum bandwidth (in megabits per second) for the volume when attached to this instance. This may be lower than
+ // the volume bandwidth depending on the configuration of the instance.
+ Bandwidth *int64 `json:"bandwidth" validate:"required"`
+
// The date and time that the volume was attached.
CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
// If set to true, when deleting the instance the volume will also be deleted.
- DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"`
+ DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete" validate:"required"`
// Information about how the volume is exposed to the instance operating system.
//
@@ -45349,6 +56924,10 @@ const (
// UnmarshalVolumeAttachment unmarshals an instance of VolumeAttachment from the specified map of raw messages.
func UnmarshalVolumeAttachment(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(VolumeAttachment)
+ err = core.UnmarshalPrimitive(m, "bandwidth", &obj.Bandwidth)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
if err != nil {
return
@@ -45428,7 +57007,8 @@ type VolumeAttachmentPatch struct {
// If set to true, when deleting the instance the volume will also be deleted.
DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"`
- // The user-defined name for this volume attachment.
+ // The user-defined name for this volume attachment. Names must be unique within the instance the volume attachment
+ // resides in.
Name *string `json:"name,omitempty"`
}
@@ -45448,11 +57028,11 @@ func UnmarshalVolumeAttachmentPatch(m map[string]json.RawMessage, result interfa
}
// AsPatch returns a generic map representation of the VolumeAttachmentPatch
-func (volumeAttachmentPatch *VolumeAttachmentPatch) AsPatch() (patch map[string]interface{}, err error) {
+func (volumeAttachmentPatch *VolumeAttachmentPatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(volumeAttachmentPatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -45462,7 +57042,8 @@ type VolumeAttachmentPrototypeInstanceByImageContext struct {
// If set to true, when deleting the instance the volume will also be deleted.
DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"`
- // The user-defined name for this volume attachment.
+ // The user-defined name for this volume attachment. Names must be unique within the instance the volume attachment
+ // resides in.
Name *string `json:"name,omitempty"`
// A prototype object for a new volume.
@@ -45470,11 +57051,11 @@ type VolumeAttachmentPrototypeInstanceByImageContext struct {
}
// NewVolumeAttachmentPrototypeInstanceByImageContext : Instantiate VolumeAttachmentPrototypeInstanceByImageContext (Generic Model Constructor)
-func (*VpcV1) NewVolumeAttachmentPrototypeInstanceByImageContext(volume *VolumePrototypeInstanceByImageContext) (model *VolumeAttachmentPrototypeInstanceByImageContext, err error) {
- model = &VolumeAttachmentPrototypeInstanceByImageContext{
+func (*VpcV1) NewVolumeAttachmentPrototypeInstanceByImageContext(volume *VolumePrototypeInstanceByImageContext) (_model *VolumeAttachmentPrototypeInstanceByImageContext, err error) {
+ _model = &VolumeAttachmentPrototypeInstanceByImageContext{
Volume: volume,
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -45497,25 +57078,66 @@ func UnmarshalVolumeAttachmentPrototypeInstanceByImageContext(m map[string]json.
return
}
+// VolumeAttachmentPrototypeInstanceBySourceSnapshotContext : VolumeAttachmentPrototypeInstanceBySourceSnapshotContext struct
+type VolumeAttachmentPrototypeInstanceBySourceSnapshotContext struct {
+ // If set to true, when deleting the instance the volume will also be deleted.
+ DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"`
+
+ // The user-defined name for this volume attachment. Names must be unique within the instance the volume attachment
+ // resides in.
+ Name *string `json:"name,omitempty"`
+
+ // A prototype object for a new volume from a snapshot.
+ Volume *VolumePrototypeInstanceBySourceSnapshotContext `json:"volume" validate:"required"`
+}
+
+// NewVolumeAttachmentPrototypeInstanceBySourceSnapshotContext : Instantiate VolumeAttachmentPrototypeInstanceBySourceSnapshotContext (Generic Model Constructor)
+func (*VpcV1) NewVolumeAttachmentPrototypeInstanceBySourceSnapshotContext(volume *VolumePrototypeInstanceBySourceSnapshotContext) (_model *VolumeAttachmentPrototypeInstanceBySourceSnapshotContext, err error) {
+ _model = &VolumeAttachmentPrototypeInstanceBySourceSnapshotContext{
+ Volume: volume,
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+// UnmarshalVolumeAttachmentPrototypeInstanceBySourceSnapshotContext unmarshals an instance of VolumeAttachmentPrototypeInstanceBySourceSnapshotContext from the specified map of raw messages.
+func UnmarshalVolumeAttachmentPrototypeInstanceBySourceSnapshotContext(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VolumeAttachmentPrototypeInstanceBySourceSnapshotContext)
+ err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "volume", &obj.Volume, UnmarshalVolumePrototypeInstanceBySourceSnapshotContext)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// VolumeAttachmentPrototypeInstanceContext : VolumeAttachmentPrototypeInstanceContext struct
type VolumeAttachmentPrototypeInstanceContext struct {
// If set to true, when deleting the instance the volume will also be deleted.
DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"`
- // The user-defined name for this volume attachment.
+ // The user-defined name for this volume attachment. Names must be unique within the instance the volume attachment
+ // resides in.
Name *string `json:"name,omitempty"`
- // The identity of the volume to attach to the instance, or a prototype object for a new
- // volume.
+ // An existing volume to attach to the instance, or a prototype object for a new volume.
Volume VolumeAttachmentVolumePrototypeInstanceContextIntf `json:"volume" validate:"required"`
}
// NewVolumeAttachmentPrototypeInstanceContext : Instantiate VolumeAttachmentPrototypeInstanceContext (Generic Model Constructor)
-func (*VpcV1) NewVolumeAttachmentPrototypeInstanceContext(volume VolumeAttachmentVolumePrototypeInstanceContextIntf) (model *VolumeAttachmentPrototypeInstanceContext, err error) {
- model = &VolumeAttachmentPrototypeInstanceContext{
+func (*VpcV1) NewVolumeAttachmentPrototypeInstanceContext(volume VolumeAttachmentVolumePrototypeInstanceContextIntf) (_model *VolumeAttachmentPrototypeInstanceContext, err error) {
+ _model = &VolumeAttachmentPrototypeInstanceContext{
Volume: volume,
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -45538,6 +57160,94 @@ func UnmarshalVolumeAttachmentPrototypeInstanceContext(m map[string]json.RawMess
return
}
+// VolumeAttachmentPrototypeVolume : An existing volume to attach to the instance, or a prototype object for a new volume.
+// Models which "extend" this model:
+// - VolumeAttachmentPrototypeVolumeVolumeIdentity
+// - VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext
+type VolumeAttachmentPrototypeVolume struct {
+ // The unique identifier for this volume.
+ ID *string `json:"id,omitempty"`
+
+ // The CRN for this volume.
+ CRN *string `json:"crn,omitempty"`
+
+ // The URL for this volume.
+ Href *string `json:"href,omitempty"`
+
+ // The maximum I/O operations per second (IOPS) to use for the volume. Applicable only to volumes using a profile
+ // `family` of `custom`.
+ Iops *int64 `json:"iops,omitempty"`
+
+ // The unique user-defined name for this volume.
+ Name *string `json:"name,omitempty"`
+
+ // The profile to use for this volume.
+ Profile VolumeProfileIdentityIntf `json:"profile,omitempty"`
+
+ // The capacity to use for the volume (in gigabytes). The specified minimum and maximum capacity values for creating or
+ // updating volumes may expand in the future.
+ Capacity *int64 `json:"capacity,omitempty"`
+
+ // The root key to use to wrap the data encryption key for the volume.
+ //
+ // If unspecified, the `encryption` type for the volume will be `provider_managed`.
+ EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
+
+ // The snapshot from which to clone the volume.
+ SourceSnapshot SnapshotIdentityIntf `json:"source_snapshot,omitempty"`
+}
+
+func (*VolumeAttachmentPrototypeVolume) isaVolumeAttachmentPrototypeVolume() bool {
+ return true
+}
+
+type VolumeAttachmentPrototypeVolumeIntf interface {
+ isaVolumeAttachmentPrototypeVolume() bool
+}
+
+// UnmarshalVolumeAttachmentPrototypeVolume unmarshals an instance of VolumeAttachmentPrototypeVolume from the specified map of raw messages.
+func UnmarshalVolumeAttachmentPrototypeVolume(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VolumeAttachmentPrototypeVolume)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "iops", &obj.Iops)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotIdentity)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// VolumeAttachmentReferenceInstanceContext : VolumeAttachmentReferenceInstanceContext struct
type VolumeAttachmentReferenceInstanceContext struct {
// If present, this property indicates the referenced resource has been deleted and provides
@@ -45705,7 +57415,7 @@ func UnmarshalVolumeAttachmentReferenceVolumeContextDeleted(m map[string]json.Ra
return
}
-// VolumeAttachmentVolumePrototypeInstanceContext : The identity of the volume to attach to the instance, or a prototype object for a new volume.
+// VolumeAttachmentVolumePrototypeInstanceContext : An existing volume to attach to the instance, or a prototype object for a new volume.
// Models which "extend" this model:
// - VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentity
// - VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext
@@ -45719,13 +57429,8 @@ type VolumeAttachmentVolumePrototypeInstanceContext struct {
// The URL for this volume.
Href *string `json:"href,omitempty"`
- // The identity of the root key to use to wrap the data encryption key for the volume.
- //
- // If this property is not provided, the `encryption` type for the volume will be
- // `provider_managed`.
- EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
-
- // The bandwidth for the volume.
+ // The maximum I/O operations per second (IOPS) to use for the volume. Applicable only to volumes using a profile
+ // `family` of `custom`.
Iops *int64 `json:"iops,omitempty"`
// The unique user-defined name for this volume.
@@ -45734,9 +57439,17 @@ type VolumeAttachmentVolumePrototypeInstanceContext struct {
// The profile to use for this volume.
Profile VolumeProfileIdentityIntf `json:"profile,omitempty"`
- // The capacity of the volume in gigabytes. The specified minimum and maximum capacity values for creating or updating
- // volumes may expand in the future.
+ // The capacity to use for the volume (in gigabytes). The specified minimum and maximum capacity values for creating or
+ // updating volumes may expand in the future.
Capacity *int64 `json:"capacity,omitempty"`
+
+ // The root key to use to wrap the data encryption key for the volume.
+ //
+ // If unspecified, the `encryption` type for the volume will be `provider_managed`.
+ EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
+
+ // The snapshot from which to clone the volume.
+ SourceSnapshot SnapshotIdentityIntf `json:"source_snapshot,omitempty"`
}
func (*VolumeAttachmentVolumePrototypeInstanceContext) isaVolumeAttachmentVolumePrototypeInstanceContext() bool {
@@ -45762,10 +57475,6 @@ func UnmarshalVolumeAttachmentVolumePrototypeInstanceContext(m map[string]json.R
if err != nil {
return
}
- err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
- if err != nil {
- return
- }
err = core.UnmarshalPrimitive(m, "iops", &obj.Iops)
if err != nil {
return
@@ -45782,6 +57491,14 @@ func UnmarshalVolumeAttachmentVolumePrototypeInstanceContext(m map[string]json.R
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotIdentity)
+ if err != nil {
+ return
+ }
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
@@ -45825,6 +57542,18 @@ func UnmarshalVolumeCollection(m map[string]json.RawMessage, result interface{})
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *VolumeCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// VolumeCollectionFirst : A link to the first page of resources.
type VolumeCollectionFirst struct {
// The URL for a page of resources.
@@ -45904,27 +57633,63 @@ func UnmarshalVolumeIdentity(m map[string]json.RawMessage, result interface{}) (
// VolumePatch : VolumePatch struct
type VolumePatch struct {
+ // The capacity to use for the volume (in gigabytes). The volume must be attached to a running virtual server instance,
+ // and the specified value must not be less than the current capacity. Additionally, if the volume is attached as a
+ // boot volume, the maximum value is 250 gigabytes.
+ //
+ // The minimum and maximum capacity limits for creating or updating volumes may expand in the future.
+ Capacity *int64 `json:"capacity,omitempty"`
+
+ // The maximum I/O operations per second (IOPS) to use for the volume. Applicable only to volumes using a profile
+ // `family` of `custom`. The volume must be attached as a data volume to a running virtual server instance.
+ Iops *int64 `json:"iops,omitempty"`
+
// The unique user-defined name for this volume.
Name *string `json:"name,omitempty"`
+
+ // The profile to use for this volume. The requested profile must be in the same
+ // `family` as the current profile. The volume must be attached as a data volume to a
+ // running virtual server instance, and must have a `capacity` within the range
+ // supported by the specified profile.
+ Profile VolumeProfileIdentityIntf `json:"profile,omitempty"`
+
+ // The [user tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this volume.
+ UserTags []string `json:"user_tags,omitempty"`
}
// UnmarshalVolumePatch unmarshals an instance of VolumePatch from the specified map of raw messages.
func UnmarshalVolumePatch(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(VolumePatch)
+ err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "iops", &obj.Iops)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "name", &obj.Name)
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags)
+ if err != nil {
+ return
+ }
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
// AsPatch returns a generic map representation of the VolumePatch
-func (volumePatch *VolumePatch) AsPatch() (patch map[string]interface{}, err error) {
+func (volumePatch *VolumePatch) AsPatch() (_patch map[string]interface{}, err error) {
var jsonData []byte
jsonData, err = json.Marshal(volumePatch)
if err == nil {
- err = json.Unmarshal(jsonData, &patch)
+ err = json.Unmarshal(jsonData, &_patch)
}
return
}
@@ -45932,7 +57697,11 @@ func (volumePatch *VolumePatch) AsPatch() (patch map[string]interface{}, err err
// VolumeProfile : VolumeProfile struct
type VolumeProfile struct {
// The product family this volume profile belongs to.
- Family *string `json:"family,omitempty"`
+ //
+ // The enumerated values for this property will expand in the future. When processing this property, check for and log
+ // unknown values. Optionally halt processing and surface the error, or bypass the volume profile on which the
+ // unexpected property value was encountered.
+ Family *string `json:"family" validate:"required"`
// The URL for this volume profile.
Href *string `json:"href" validate:"required"`
@@ -45941,6 +57710,17 @@ type VolumeProfile struct {
Name *string `json:"name" validate:"required"`
}
+// Constants associated with the VolumeProfile.Family property.
+// The product family this volume profile belongs to.
+//
+// The enumerated values for this property will expand in the future. When processing this property, check for and log
+// unknown values. Optionally halt processing and surface the error, or bypass the volume profile on which the
+// unexpected property value was encountered.
+const (
+ VolumeProfileFamilyCustomConst = "custom"
+ VolumeProfileFamilyTieredConst = "tiered"
+)
+
// UnmarshalVolumeProfile unmarshals an instance of VolumeProfile from the specified map of raw messages.
func UnmarshalVolumeProfile(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(VolumeProfile)
@@ -46006,6 +57786,18 @@ func UnmarshalVolumeProfileCollection(m map[string]json.RawMessage, result inter
return
}
+// Retrieve the value to be passed to a request to access the next page of results
+func (resp *VolumeProfileCollection) GetNextStart() (*string, error) {
+ if core.IsNil(resp.Next) {
+ return nil, nil
+ }
+ start, err := core.GetQueryParam(resp.Next.Href, "start")
+ if err != nil || start == nil {
+ return nil, err
+ }
+ return start, nil
+}
+
// VolumeProfileCollectionFirst : A link to the first page of resources.
type VolumeProfileCollectionFirst struct {
// The URL for a page of resources.
@@ -46103,13 +57895,8 @@ func UnmarshalVolumeProfileReference(m map[string]json.RawMessage, result interf
// Models which "extend" this model:
// - VolumePrototypeVolumeByCapacity
type VolumePrototype struct {
- // The identity of the root key to use to wrap the data encryption key for the volume.
- //
- // If this property is not provided, the `encryption` type for the volume will be
- // `provider_managed`.
- EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
-
- // The bandwidth for the volume.
+ // The maximum I/O operations per second (IOPS) to use for the volume. Applicable only to volumes using a profile
+ // `family` of `custom`.
Iops *int64 `json:"iops,omitempty"`
// The unique user-defined name for this volume.
@@ -46122,12 +57909,20 @@ type VolumePrototype struct {
// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
+ // The [user tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this volume.
+ UserTags []string `json:"user_tags,omitempty"`
+
// The zone this volume will reside in.
Zone ZoneIdentityIntf `json:"zone" validate:"required"`
- // The capacity of the volume in gigabytes. The specified minimum and maximum capacity values for creating or updating
- // volumes may expand in the future.
+ // The capacity to use for the volume (in gigabytes). The specified minimum and maximum capacity values for creating or
+ // updating volumes may expand in the future.
Capacity *int64 `json:"capacity,omitempty"`
+
+ // The root key to use to wrap the data encryption key for the volume.
+ //
+ // If unspecified, the `encryption` type for the volume will be `provider_managed`.
+ EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
}
func (*VolumePrototype) isaVolumePrototype() bool {
@@ -46141,10 +57936,6 @@ type VolumePrototypeIntf interface {
// UnmarshalVolumePrototype unmarshals an instance of VolumePrototype from the specified map of raw messages.
func UnmarshalVolumePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(VolumePrototype)
- err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
- if err != nil {
- return
- }
err = core.UnmarshalPrimitive(m, "iops", &obj.Iops)
if err != nil {
return
@@ -46161,6 +57952,10 @@ func UnmarshalVolumePrototype(m map[string]json.RawMessage, result interface{})
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity)
if err != nil {
return
@@ -46169,24 +57964,30 @@ func UnmarshalVolumePrototype(m map[string]json.RawMessage, result interface{})
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
+ if err != nil {
+ return
+ }
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
// VolumePrototypeInstanceByImageContext : VolumePrototypeInstanceByImageContext struct
type VolumePrototypeInstanceByImageContext struct {
- // The capacity of the volume in gigabytes. The specified minimum and maximum capacity values for creating or updating
- // volumes may expand in the future.
+ // The capacity to use for the volume (in gigabytes). Must be at least the image's
+ // `minimum_provisioned_size`. The maximum value may increase in the future.
+ //
+ // If unspecified, the capacity will be the image's `minimum_provisioned_size`.
Capacity *int64 `json:"capacity,omitempty"`
- // The identity of the root key to use to wrap the data encryption key for the volume.
+ // The root key to use to wrap the data encryption key for the volume.
//
- // If this property is not provided but the image is encrypted, the image's
- // `encryption_key` will be used. Otherwise, the `encryption` type for the
- // volume will be `provider_managed`.
+ // If unspecified, and the image is encrypted, the image's `encryption_key` will be
+ // used. Otherwise, the `encryption` type for the volume will be `provider_managed`.
EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
- // The bandwidth for the volume.
+ // The maximum I/O operations per second (IOPS) to use for the volume. Applicable only to volumes using a profile
+ // `family` of `custom`.
Iops *int64 `json:"iops,omitempty"`
// The unique user-defined name for this volume.
@@ -46197,11 +57998,11 @@ type VolumePrototypeInstanceByImageContext struct {
}
// NewVolumePrototypeInstanceByImageContext : Instantiate VolumePrototypeInstanceByImageContext (Generic Model Constructor)
-func (*VpcV1) NewVolumePrototypeInstanceByImageContext(profile VolumeProfileIdentityIntf) (model *VolumePrototypeInstanceByImageContext, err error) {
- model = &VolumePrototypeInstanceByImageContext{
+func (*VpcV1) NewVolumePrototypeInstanceByImageContext(profile VolumeProfileIdentityIntf) (_model *VolumePrototypeInstanceByImageContext, err error) {
+ _model = &VolumePrototypeInstanceByImageContext{
Profile: profile,
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -46232,6 +58033,74 @@ func UnmarshalVolumePrototypeInstanceByImageContext(m map[string]json.RawMessage
return
}
+// VolumePrototypeInstanceBySourceSnapshotContext : VolumePrototypeInstanceBySourceSnapshotContext struct
+type VolumePrototypeInstanceBySourceSnapshotContext struct {
+ // The capacity to use for the volume (in gigabytes). Must be at least the snapshot's
+ // `minimum_capacity`. The maximum value may increase in the future.
+ //
+ // If unspecified, the capacity will be the source snapshot's `minimum_capacity`.
+ Capacity *int64 `json:"capacity,omitempty"`
+
+ // The root key to use to wrap the data encryption key for the volume.
+ //
+ // If unspecified, the snapshot's `encryption_key` will be used.
+ EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
+
+ // The maximum I/O operations per second (IOPS) to use for the volume. Applicable only to volumes using a profile
+ // `family` of `custom`.
+ Iops *int64 `json:"iops,omitempty"`
+
+ // The unique user-defined name for this volume.
+ Name *string `json:"name,omitempty"`
+
+ // The profile to use for this volume.
+ Profile VolumeProfileIdentityIntf `json:"profile" validate:"required"`
+
+ // The snapshot from which to clone the volume.
+ SourceSnapshot SnapshotIdentityIntf `json:"source_snapshot" validate:"required"`
+}
+
+// NewVolumePrototypeInstanceBySourceSnapshotContext : Instantiate VolumePrototypeInstanceBySourceSnapshotContext (Generic Model Constructor)
+func (*VpcV1) NewVolumePrototypeInstanceBySourceSnapshotContext(profile VolumeProfileIdentityIntf, sourceSnapshot SnapshotIdentityIntf) (_model *VolumePrototypeInstanceBySourceSnapshotContext, err error) {
+ _model = &VolumePrototypeInstanceBySourceSnapshotContext{
+ Profile: profile,
+ SourceSnapshot: sourceSnapshot,
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+// UnmarshalVolumePrototypeInstanceBySourceSnapshotContext unmarshals an instance of VolumePrototypeInstanceBySourceSnapshotContext from the specified map of raw messages.
+func UnmarshalVolumePrototypeInstanceBySourceSnapshotContext(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VolumePrototypeInstanceBySourceSnapshotContext)
+ err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "iops", &obj.Iops)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotIdentity)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// VolumeReference : VolumeReference struct
type VolumeReference struct {
// The CRN for this volume.
@@ -46455,6 +58324,1742 @@ func UnmarshalZoneReference(m map[string]json.RawMessage, result interface{}) (e
return
}
+// BareMetalServerBootTargetBareMetalServerDiskReference : BareMetalServerBootTargetBareMetalServerDiskReference struct
+// This model "extends" BareMetalServerBootTarget
+type BareMetalServerBootTargetBareMetalServerDiskReference struct {
+ // If present, this property indicates the referenced resource has been deleted and provides
+ // some supplementary information.
+ Deleted *BareMetalServerDiskReferenceDeleted `json:"deleted,omitempty"`
+
+ // The URL for this bare metal server disk.
+ Href *string `json:"href" validate:"required"`
+
+ // The unique identifier for this bare metal server disk.
+ ID *string `json:"id" validate:"required"`
+
+ // The user-defined name for this disk.
+ Name *string `json:"name" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerBootTargetBareMetalServerDiskReference.ResourceType property.
+// The resource type.
+const (
+ BareMetalServerBootTargetBareMetalServerDiskReferenceResourceTypeBareMetalServerDiskConst = "bare_metal_server_disk"
+)
+
+func (*BareMetalServerBootTargetBareMetalServerDiskReference) isaBareMetalServerBootTarget() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerBootTargetBareMetalServerDiskReference unmarshals an instance of BareMetalServerBootTargetBareMetalServerDiskReference from the specified map of raw messages.
+func UnmarshalBareMetalServerBootTargetBareMetalServerDiskReference(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerBootTargetBareMetalServerDiskReference)
+ err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalBareMetalServerDiskReferenceDeleted)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount : BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount struct
+// This model "extends" BareMetalServerInitializationUserAccount
+type BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount struct {
+ // The password at initialization, encrypted using `encryption_key`, and returned base64-encoded.
+ EncryptedPassword *[]byte `json:"encrypted_password" validate:"required"`
+
+ // The public SSH key used to encrypt the password.
+ EncryptionKey *KeyReference `json:"encryption_key" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+
+ // The username for the account created at initialization.
+ Username *string `json:"username" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount.ResourceType property.
+// The resource type.
+const (
+ BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccountResourceTypeHostUserAccountConst = "host_user_account"
+)
+
+func (*BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount) isaBareMetalServerInitializationUserAccount() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount unmarshals an instance of BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount from the specified map of raw messages.
+func UnmarshalBareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount)
+ err = core.UnmarshalPrimitive(m, "encrypted_password", &obj.EncryptedPassword)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalKeyReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "username", &obj.Username)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerNetworkInterfaceByPci : BareMetalServerNetworkInterfaceByPci struct
+// This model "extends" BareMetalServerNetworkInterface
+type BareMetalServerNetworkInterfaceByPci struct {
+ // Indicates whether source IP spoofing is allowed on this interface. If false, source IP spoofing is prevented on this
+ // interface. If true, source IP spoofing is allowed on this interface.
+ AllowIPSpoofing *bool `json:"allow_ip_spoofing" validate:"required"`
+
+ // The date and time that the network interface was created.
+ CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
+
+ // If `true`:
+ // - The VPC infrastructure performs any needed NAT operations.
+ // - A single floating IP can be assigned to the network interface.
+ //
+ // If `false`:
+ // - Packets are passed unmodified to/from the network interface,
+ // allowing the workload to perform any needed NAT operations.
+ // - Multiple floating IPs can be assigned to the network interface.
+ // - `allow_ip_spoofing` must be set to `false`.
+ EnableInfrastructureNat *bool `json:"enable_infrastructure_nat" validate:"required"`
+
+ // The floating IPs associated with this network interface.
+ FloatingIps []FloatingIPReference `json:"floating_ips,omitempty"`
+
+ // The URL for this network interface.
+ Href *string `json:"href" validate:"required"`
+
+ // The unique identifier for this network interface.
+ ID *string `json:"id" validate:"required"`
+
+ // The MAC address of the interface. If absent, the value is not known.
+ MacAddress *string `json:"mac_address" validate:"required"`
+
+ // The user-defined name for this network interface.
+ Name *string `json:"name" validate:"required"`
+
+ // The network interface port speed in Mbps.
+ PortSpeed *int64 `json:"port_speed" validate:"required"`
+
+ PrimaryIP *ReservedIPReference `json:"primary_ip" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+
+ // The security groups targeting this network interface.
+ SecurityGroups []SecurityGroupReference `json:"security_groups" validate:"required"`
+
+ // The status of the network interface.
+ Status *string `json:"status" validate:"required"`
+
+ // The associated subnet.
+ Subnet *SubnetReference `json:"subnet" validate:"required"`
+
+ // The type of this bare metal server network interface.
+ Type *string `json:"type" validate:"required"`
+
+ // Indicates what VLAN IDs (for VLAN type only) can use this physical (PCI type) interface. A given VLAN can only be
+ // in the `allowed_vlans` array for one PCI type adapter per bare metal server.
+ AllowedVlans []int64 `json:"allowed_vlans" validate:"required"`
+
+ // - `pci`: a physical PCI device which can only be created or deleted when the bare metal
+ // server is stopped
+ // - Has an `allowed_vlans` property which controls the VLANs that will be permitted
+ // to use the PCI interface
+ // - Cannot directly use an IEEE 802.1q VLAN tag.
+ InterfaceType *string `json:"interface_type" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerNetworkInterfaceByPci.ResourceType property.
+// The resource type.
+const (
+ BareMetalServerNetworkInterfaceByPciResourceTypeNetworkInterfaceConst = "network_interface"
+)
+
+// Constants associated with the BareMetalServerNetworkInterfaceByPci.Status property.
+// The status of the network interface.
+const (
+ BareMetalServerNetworkInterfaceByPciStatusAvailableConst = "available"
+ BareMetalServerNetworkInterfaceByPciStatusDeletingConst = "deleting"
+ BareMetalServerNetworkInterfaceByPciStatusFailedConst = "failed"
+ BareMetalServerNetworkInterfaceByPciStatusPendingConst = "pending"
+)
+
+// Constants associated with the BareMetalServerNetworkInterfaceByPci.Type property.
+// The type of this bare metal server network interface.
+const (
+ BareMetalServerNetworkInterfaceByPciTypePrimaryConst = "primary"
+ BareMetalServerNetworkInterfaceByPciTypeSecondaryConst = "secondary"
+)
+
+// Constants associated with the BareMetalServerNetworkInterfaceByPci.InterfaceType property.
+// - `pci`: a physical PCI device which can only be created or deleted when the bare metal
+// server is stopped
+// - Has an `allowed_vlans` property which controls the VLANs that will be permitted
+// to use the PCI interface
+// - Cannot directly use an IEEE 802.1q VLAN tag.
+const (
+ BareMetalServerNetworkInterfaceByPciInterfaceTypePciConst = "pci"
+)
+
+func (*BareMetalServerNetworkInterfaceByPci) isaBareMetalServerNetworkInterface() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerNetworkInterfaceByPci unmarshals an instance of BareMetalServerNetworkInterfaceByPci from the specified map of raw messages.
+func UnmarshalBareMetalServerNetworkInterfaceByPci(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerNetworkInterfaceByPci)
+ err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "floating_ips", &obj.FloatingIps, UnmarshalFloatingIPReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "mac_address", &obj.MacAddress)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "port_speed", &obj.PortSpeed)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "status", &obj.Status)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "allowed_vlans", &obj.AllowedVlans)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerNetworkInterfaceByVlan : BareMetalServerNetworkInterfaceByVlan struct
+// This model "extends" BareMetalServerNetworkInterface
+type BareMetalServerNetworkInterfaceByVlan struct {
+ // Indicates whether source IP spoofing is allowed on this interface. If false, source IP spoofing is prevented on this
+ // interface. If true, source IP spoofing is allowed on this interface.
+ AllowIPSpoofing *bool `json:"allow_ip_spoofing" validate:"required"`
+
+ // The date and time that the network interface was created.
+ CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
+
+ // If `true`:
+ // - The VPC infrastructure performs any needed NAT operations.
+ // - A single floating IP can be assigned to the network interface.
+ //
+ // If `false`:
+ // - Packets are passed unmodified to/from the network interface,
+ // allowing the workload to perform any needed NAT operations.
+ // - Multiple floating IPs can be assigned to the network interface.
+ // - `allow_ip_spoofing` must be set to `false`.
+ EnableInfrastructureNat *bool `json:"enable_infrastructure_nat" validate:"required"`
+
+ // The floating IPs associated with this network interface.
+ FloatingIps []FloatingIPReference `json:"floating_ips,omitempty"`
+
+ // The URL for this network interface.
+ Href *string `json:"href" validate:"required"`
+
+ // The unique identifier for this network interface.
+ ID *string `json:"id" validate:"required"`
+
+ // The MAC address of the interface. If absent, the value is not known.
+ MacAddress *string `json:"mac_address" validate:"required"`
+
+ // The user-defined name for this network interface.
+ Name *string `json:"name" validate:"required"`
+
+ // The network interface port speed in Mbps.
+ PortSpeed *int64 `json:"port_speed" validate:"required"`
+
+ PrimaryIP *ReservedIPReference `json:"primary_ip" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+
+ // The security groups targeting this network interface.
+ SecurityGroups []SecurityGroupReference `json:"security_groups" validate:"required"`
+
+ // The status of the network interface.
+ Status *string `json:"status" validate:"required"`
+
+ // The associated subnet.
+ Subnet *SubnetReference `json:"subnet" validate:"required"`
+
+ // The type of this bare metal server network interface.
+ Type *string `json:"type" validate:"required"`
+
+ // Indicates if the interface can float to any other server within the same
+ // `resource_group`. The interface will float automatically if the network detects a GARP or RARP on another bare metal
+ // server in the resource group. Applies only to `vlan` type interfaces.
+ AllowInterfaceToFloat *bool `json:"allow_interface_to_float" validate:"required"`
+
+ // - `vlan`: a virtual device, used through a `pci` device that has the `vlan` in its array
+ // of `allowed_vlans`.
+ // - Must use an IEEE 802.1q tag.
+ // - Has its own security groups and does not inherit those of the PCI device through
+ // which traffic flows.
+ InterfaceType *string `json:"interface_type" validate:"required"`
+
+ // Indicates the 802.1Q VLAN ID tag that must be used for all traffic on this interface.
+ Vlan *int64 `json:"vlan" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerNetworkInterfaceByVlan.ResourceType property.
+// The resource type.
+const (
+ BareMetalServerNetworkInterfaceByVlanResourceTypeNetworkInterfaceConst = "network_interface"
+)
+
+// Constants associated with the BareMetalServerNetworkInterfaceByVlan.Status property.
+// The status of the network interface.
+const (
+ BareMetalServerNetworkInterfaceByVlanStatusAvailableConst = "available"
+ BareMetalServerNetworkInterfaceByVlanStatusDeletingConst = "deleting"
+ BareMetalServerNetworkInterfaceByVlanStatusFailedConst = "failed"
+ BareMetalServerNetworkInterfaceByVlanStatusPendingConst = "pending"
+)
+
+// Constants associated with the BareMetalServerNetworkInterfaceByVlan.Type property.
+// The type of this bare metal server network interface.
+const (
+ BareMetalServerNetworkInterfaceByVlanTypePrimaryConst = "primary"
+ BareMetalServerNetworkInterfaceByVlanTypeSecondaryConst = "secondary"
+)
+
+// Constants associated with the BareMetalServerNetworkInterfaceByVlan.InterfaceType property.
+// - `vlan`: a virtual device, used through a `pci` device that has the `vlan` in its array
+// of `allowed_vlans`.
+// - Must use an IEEE 802.1q tag.
+// - Has its own security groups and does not inherit those of the PCI device through
+// which traffic flows.
+const (
+ BareMetalServerNetworkInterfaceByVlanInterfaceTypeVlanConst = "vlan"
+)
+
+func (*BareMetalServerNetworkInterfaceByVlan) isaBareMetalServerNetworkInterface() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerNetworkInterfaceByVlan unmarshals an instance of BareMetalServerNetworkInterfaceByVlan from the specified map of raw messages.
+func UnmarshalBareMetalServerNetworkInterfaceByVlan(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerNetworkInterfaceByVlan)
+ err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "floating_ips", &obj.FloatingIps, UnmarshalFloatingIPReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "mac_address", &obj.MacAddress)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "port_speed", &obj.PortSpeed)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "status", &obj.Status)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "allow_interface_to_float", &obj.AllowInterfaceToFloat)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "vlan", &obj.Vlan)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype : BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype struct
+// This model "extends" BareMetalServerNetworkInterfacePrototype
+type BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype struct {
+ // Indicates whether source IP spoofing is allowed on this interface. If false, source IP spoofing is prevented on this
+ // interface. If true, source IP spoofing is allowed on this interface.
+ AllowIPSpoofing *bool `json:"allow_ip_spoofing,omitempty"`
+
+ // If `true`:
+ // - The VPC infrastructure performs any needed NAT operations.
+ // - A single floating IP can be assigned to the network interface.
+ //
+ // If `false`:
+ // - Packets are passed unmodified to/from the network interface,
+ // allowing the workload to perform any needed NAT operations.
+ // - Multiple floating IPs can be assigned to the network interface.
+ // - `allow_ip_spoofing` must be set to `false`.
+ EnableInfrastructureNat *bool `json:"enable_infrastructure_nat,omitempty"`
+
+ // The user-defined name for network interface. Names must be unique within the instance the network interface resides
+ // in. If unspecified, the name will be a hyphenated list of randomly-selected words.
+ Name *string `json:"name,omitempty"`
+
+ // The primary IP address to bind to the network interface. This can be specified using an existing reserved IP, or a
+ // prototype object for a new reserved IP.
+ //
+ // If an existing reserved IP or a prototype object with an address is specified, it must be available on the network
+ // interface's subnet. Otherwise, an available address on the subnet will be automatically selected and reserved.
+ PrimaryIP NetworkInterfaceIPPrototypeIntf `json:"primary_ip,omitempty"`
+
+ // The security groups to use for this network interface. If unspecified, the VPC's default security group is used.
+ SecurityGroups []SecurityGroupIdentityIntf `json:"security_groups,omitempty"`
+
+ // The associated subnet.
+ Subnet SubnetIdentityIntf `json:"subnet" validate:"required"`
+
+ // Indicates what VLAN IDs (for VLAN type only) can use this physical (PCI type) interface. A given VLAN can only be
+ // in the `allowed_vlans` array for one PCI type adapter per bare metal server.
+ AllowedVlans []int64 `json:"allowed_vlans,omitempty"`
+
+ // - `pci`: a physical PCI device which can only be created or deleted when the bare metal
+ // server is stopped
+ // - Has an `allowed_vlans` property which controls the VLANs that will be permitted
+ // to use the PCI interface
+ // - Cannot directly use an IEEE 802.1q VLAN tag.
+ InterfaceType *string `json:"interface_type" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype.InterfaceType property.
+// - `pci`: a physical PCI device which can only be created or deleted when the bare metal
+// server is stopped
+// - Has an `allowed_vlans` property which controls the VLANs that will be permitted
+// to use the PCI interface
+// - Cannot directly use an IEEE 802.1q VLAN tag.
+const (
+ BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototypeInterfaceTypePciConst = "pci"
+)
+
+// NewBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype : Instantiate BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype (Generic Model Constructor)
+func (*VpcV1) NewBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype(subnet SubnetIdentityIntf, interfaceType string) (_model *BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype, err error) {
+ _model = &BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype{
+ Subnet: subnet,
+ InterfaceType: core.StringPtr(interfaceType),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype) isaBareMetalServerNetworkInterfacePrototype() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype unmarshals an instance of BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype from the specified map of raw messages.
+func UnmarshalBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype)
+ err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalNetworkInterfaceIPPrototype)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "allowed_vlans", &obj.AllowedVlans)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype : BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype struct
+// This model "extends" BareMetalServerNetworkInterfacePrototype
+type BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype struct {
+ // Indicates whether source IP spoofing is allowed on this interface. If false, source IP spoofing is prevented on this
+ // interface. If true, source IP spoofing is allowed on this interface.
+ AllowIPSpoofing *bool `json:"allow_ip_spoofing,omitempty"`
+
+ // If `true`:
+ // - The VPC infrastructure performs any needed NAT operations.
+ // - A single floating IP can be assigned to the network interface.
+ //
+ // If `false`:
+ // - Packets are passed unmodified to/from the network interface,
+ // allowing the workload to perform any needed NAT operations.
+ // - Multiple floating IPs can be assigned to the network interface.
+ // - `allow_ip_spoofing` must be set to `false`.
+ EnableInfrastructureNat *bool `json:"enable_infrastructure_nat,omitempty"`
+
+ // The user-defined name for network interface. Names must be unique within the instance the network interface resides
+ // in. If unspecified, the name will be a hyphenated list of randomly-selected words.
+ Name *string `json:"name,omitempty"`
+
+ // The primary IP address to bind to the network interface. This can be specified using an existing reserved IP, or a
+ // prototype object for a new reserved IP.
+ //
+ // If an existing reserved IP or a prototype object with an address is specified, it must be available on the network
+ // interface's subnet. Otherwise, an available address on the subnet will be automatically selected and reserved.
+ PrimaryIP NetworkInterfaceIPPrototypeIntf `json:"primary_ip,omitempty"`
+
+ // The security groups to use for this network interface. If unspecified, the VPC's default security group is used.
+ SecurityGroups []SecurityGroupIdentityIntf `json:"security_groups,omitempty"`
+
+ // The associated subnet.
+ Subnet SubnetIdentityIntf `json:"subnet" validate:"required"`
+
+ // Indicates if the interface can float to any other server within the same
+ // `resource_group`. The interface will float automatically if the network detects a GARP or RARP on another bare metal
+ // server in the resource group. Applies only to `vlan` type interfaces.
+ AllowInterfaceToFloat *bool `json:"allow_interface_to_float,omitempty"`
+
+ // - `vlan`: a virtual device, used through a `pci` device that has the `vlan` in its array
+ // of `allowed_vlans`.
+ // - Must use an IEEE 802.1q tag.
+ // - Has its own security groups and does not inherit those of the PCI device through
+ // which traffic flows.
+ InterfaceType *string `json:"interface_type" validate:"required"`
+
+ // Indicates the 802.1Q VLAN ID tag that must be used for all traffic on this interface.
+ Vlan *int64 `json:"vlan" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype.InterfaceType property.
+// - `vlan`: a virtual device, used through a `pci` device that has the `vlan` in its array
+// of `allowed_vlans`.
+// - Must use an IEEE 802.1q tag.
+// - Has its own security groups and does not inherit those of the PCI device through
+// which traffic flows.
+const (
+ BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototypeInterfaceTypeVlanConst = "vlan"
+)
+
+// NewBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype : Instantiate BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype (Generic Model Constructor)
+func (*VpcV1) NewBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype(subnet SubnetIdentityIntf, interfaceType string, vlan int64) (_model *BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype, err error) {
+ _model = &BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype{
+ Subnet: subnet,
+ InterfaceType: core.StringPtr(interfaceType),
+ Vlan: core.Int64Ptr(vlan),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype) isaBareMetalServerNetworkInterfacePrototype() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype unmarshals an instance of BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype from the specified map of raw messages.
+func UnmarshalBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype)
+ err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalNetworkInterfaceIPPrototype)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "allow_interface_to_float", &obj.AllowInterfaceToFloat)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "vlan", &obj.Vlan)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileBandwidthDependent : The total bandwidth shared across the network interfaces of a bare metal server with this profile depends on its
+// configuration.
+// This model "extends" BareMetalServerProfileBandwidth
+type BareMetalServerProfileBandwidthDependent struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileBandwidthDependent.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileBandwidthDependentTypeDependentConst = "dependent"
+)
+
+func (*BareMetalServerProfileBandwidthDependent) isaBareMetalServerProfileBandwidth() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileBandwidthDependent unmarshals an instance of BareMetalServerProfileBandwidthDependent from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileBandwidthDependent(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileBandwidthDependent)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileBandwidthEnum : The permitted total bandwidth values (in megabits per second) shared across the network interfaces of a bare metal
+// server with this profile.
+// This model "extends" BareMetalServerProfileBandwidth
+type BareMetalServerProfileBandwidthEnum struct {
+ // The default value for this profile field.
+ Default *int64 `json:"default" validate:"required"`
+
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The permitted values for this profile field.
+ Values []int64 `json:"values" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileBandwidthEnum.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileBandwidthEnumTypeEnumConst = "enum"
+)
+
+func (*BareMetalServerProfileBandwidthEnum) isaBareMetalServerProfileBandwidth() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileBandwidthEnum unmarshals an instance of BareMetalServerProfileBandwidthEnum from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileBandwidthEnum(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileBandwidthEnum)
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "values", &obj.Values)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileBandwidthFixed : The total bandwidth (in megabits per second) shared across the network interfaces of a bare metal server with this
+// profile.
+// This model "extends" BareMetalServerProfileBandwidth
+type BareMetalServerProfileBandwidthFixed struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The value for this profile field.
+ Value *int64 `json:"value" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileBandwidthFixed.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileBandwidthFixedTypeFixedConst = "fixed"
+)
+
+func (*BareMetalServerProfileBandwidthFixed) isaBareMetalServerProfileBandwidth() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileBandwidthFixed unmarshals an instance of BareMetalServerProfileBandwidthFixed from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileBandwidthFixed(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileBandwidthFixed)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "value", &obj.Value)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileBandwidthRange : The permitted total bandwidth range (in megabits per second) shared across the network interfaces of a bare metal
+// server with this profile.
+// This model "extends" BareMetalServerProfileBandwidth
+type BareMetalServerProfileBandwidthRange struct {
+ // The default value for this profile field.
+ Default *int64 `json:"default" validate:"required"`
+
+ // The maximum value for this profile field.
+ Max *int64 `json:"max" validate:"required"`
+
+ // The minimum value for this profile field.
+ Min *int64 `json:"min" validate:"required"`
+
+ // The increment step value for this profile field.
+ Step *int64 `json:"step" validate:"required"`
+
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileBandwidthRange.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileBandwidthRangeTypeRangeConst = "range"
+)
+
+func (*BareMetalServerProfileBandwidthRange) isaBareMetalServerProfileBandwidth() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileBandwidthRange unmarshals an instance of BareMetalServerProfileBandwidthRange from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileBandwidthRange(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileBandwidthRange)
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "max", &obj.Max)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min", &obj.Min)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "step", &obj.Step)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileCpuCoreCountDependent : The CPU core count for a bare metal server with this profile depends on its configuration.
+// This model "extends" BareMetalServerProfileCpuCoreCount
+type BareMetalServerProfileCpuCoreCountDependent struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileCpuCoreCountDependent.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileCpuCoreCountDependentTypeDependentConst = "dependent"
+)
+
+func (*BareMetalServerProfileCpuCoreCountDependent) isaBareMetalServerProfileCpuCoreCount() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileCpuCoreCountDependent unmarshals an instance of BareMetalServerProfileCpuCoreCountDependent from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileCpuCoreCountDependent(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileCpuCoreCountDependent)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileCpuCoreCountEnum : The permitted values for CPU cores for a bare metal server with this profile.
+// This model "extends" BareMetalServerProfileCpuCoreCount
+type BareMetalServerProfileCpuCoreCountEnum struct {
+ // The default value for this profile field.
+ Default *int64 `json:"default" validate:"required"`
+
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The permitted values for this profile field.
+ Values []int64 `json:"values" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileCpuCoreCountEnum.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileCpuCoreCountEnumTypeEnumConst = "enum"
+)
+
+func (*BareMetalServerProfileCpuCoreCountEnum) isaBareMetalServerProfileCpuCoreCount() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileCpuCoreCountEnum unmarshals an instance of BareMetalServerProfileCpuCoreCountEnum from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileCpuCoreCountEnum(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileCpuCoreCountEnum)
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "values", &obj.Values)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileCpuCoreCountFixed : The CPU core count for a bare metal server with this profile.
+// This model "extends" BareMetalServerProfileCpuCoreCount
+type BareMetalServerProfileCpuCoreCountFixed struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The value for this profile field.
+ Value *int64 `json:"value" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileCpuCoreCountFixed.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileCpuCoreCountFixedTypeFixedConst = "fixed"
+)
+
+func (*BareMetalServerProfileCpuCoreCountFixed) isaBareMetalServerProfileCpuCoreCount() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileCpuCoreCountFixed unmarshals an instance of BareMetalServerProfileCpuCoreCountFixed from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileCpuCoreCountFixed(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileCpuCoreCountFixed)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "value", &obj.Value)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileCpuCoreCountRange : The permitted range for the number of CPU cores for a bare metal server with this profile.
+// This model "extends" BareMetalServerProfileCpuCoreCount
+type BareMetalServerProfileCpuCoreCountRange struct {
+ // The default value for this profile field.
+ Default *int64 `json:"default" validate:"required"`
+
+ // The maximum value for this profile field.
+ Max *int64 `json:"max" validate:"required"`
+
+ // The minimum value for this profile field.
+ Min *int64 `json:"min" validate:"required"`
+
+ // The increment step value for this profile field.
+ Step *int64 `json:"step" validate:"required"`
+
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileCpuCoreCountRange.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileCpuCoreCountRangeTypeRangeConst = "range"
+)
+
+func (*BareMetalServerProfileCpuCoreCountRange) isaBareMetalServerProfileCpuCoreCount() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileCpuCoreCountRange unmarshals an instance of BareMetalServerProfileCpuCoreCountRange from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileCpuCoreCountRange(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileCpuCoreCountRange)
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "max", &obj.Max)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min", &obj.Min)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "step", &obj.Step)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileCpuSocketCountDependent : The CPU socket count for a bare metal server with this profile depends on its configuration.
+// This model "extends" BareMetalServerProfileCpuSocketCount
+type BareMetalServerProfileCpuSocketCountDependent struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileCpuSocketCountDependent.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileCpuSocketCountDependentTypeDependentConst = "dependent"
+)
+
+func (*BareMetalServerProfileCpuSocketCountDependent) isaBareMetalServerProfileCpuSocketCount() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileCpuSocketCountDependent unmarshals an instance of BareMetalServerProfileCpuSocketCountDependent from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileCpuSocketCountDependent(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileCpuSocketCountDependent)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileCpuSocketCountEnum : The permitted values for CPU sockets for a bare metal server with this profile.
+// This model "extends" BareMetalServerProfileCpuSocketCount
+type BareMetalServerProfileCpuSocketCountEnum struct {
+ // The default value for this profile field.
+ Default *int64 `json:"default" validate:"required"`
+
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The permitted values for this profile field.
+ Values []int64 `json:"values" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileCpuSocketCountEnum.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileCpuSocketCountEnumTypeEnumConst = "enum"
+)
+
+func (*BareMetalServerProfileCpuSocketCountEnum) isaBareMetalServerProfileCpuSocketCount() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileCpuSocketCountEnum unmarshals an instance of BareMetalServerProfileCpuSocketCountEnum from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileCpuSocketCountEnum(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileCpuSocketCountEnum)
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "values", &obj.Values)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileCpuSocketCountFixed : The number of CPU sockets for a bare metal server with this profile.
+// This model "extends" BareMetalServerProfileCpuSocketCount
+type BareMetalServerProfileCpuSocketCountFixed struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The value for this profile field.
+ Value *int64 `json:"value" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileCpuSocketCountFixed.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileCpuSocketCountFixedTypeFixedConst = "fixed"
+)
+
+func (*BareMetalServerProfileCpuSocketCountFixed) isaBareMetalServerProfileCpuSocketCount() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileCpuSocketCountFixed unmarshals an instance of BareMetalServerProfileCpuSocketCountFixed from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileCpuSocketCountFixed(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileCpuSocketCountFixed)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "value", &obj.Value)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileCpuSocketCountRange : The permitted range for the number of CPU sockets for a bare metal server with this profile.
+// This model "extends" BareMetalServerProfileCpuSocketCount
+type BareMetalServerProfileCpuSocketCountRange struct {
+ // The default value for this profile field.
+ Default *int64 `json:"default" validate:"required"`
+
+ // The maximum value for this profile field.
+ Max *int64 `json:"max" validate:"required"`
+
+ // The minimum value for this profile field.
+ Min *int64 `json:"min" validate:"required"`
+
+ // The increment step value for this profile field.
+ Step *int64 `json:"step" validate:"required"`
+
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileCpuSocketCountRange.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileCpuSocketCountRangeTypeRangeConst = "range"
+)
+
+func (*BareMetalServerProfileCpuSocketCountRange) isaBareMetalServerProfileCpuSocketCount() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileCpuSocketCountRange unmarshals an instance of BareMetalServerProfileCpuSocketCountRange from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileCpuSocketCountRange(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileCpuSocketCountRange)
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "max", &obj.Max)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min", &obj.Min)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "step", &obj.Step)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileDiskQuantityDependent : The number of disks of this configuration for a bare metal server with this profile depends on its bare metal server
+// configuration.
+// This model "extends" BareMetalServerProfileDiskQuantity
+type BareMetalServerProfileDiskQuantityDependent struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileDiskQuantityDependent.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileDiskQuantityDependentTypeDependentConst = "dependent"
+)
+
+func (*BareMetalServerProfileDiskQuantityDependent) isaBareMetalServerProfileDiskQuantity() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileDiskQuantityDependent unmarshals an instance of BareMetalServerProfileDiskQuantityDependent from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileDiskQuantityDependent(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileDiskQuantityDependent)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileDiskQuantityEnum : The permitted the number of disks of this configuration for a bare metal server with this profile.
+// This model "extends" BareMetalServerProfileDiskQuantity
+type BareMetalServerProfileDiskQuantityEnum struct {
+ // The default value for this profile field.
+ Default *int64 `json:"default" validate:"required"`
+
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The permitted values for this profile field.
+ Values []int64 `json:"values" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileDiskQuantityEnum.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileDiskQuantityEnumTypeEnumConst = "enum"
+)
+
+func (*BareMetalServerProfileDiskQuantityEnum) isaBareMetalServerProfileDiskQuantity() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileDiskQuantityEnum unmarshals an instance of BareMetalServerProfileDiskQuantityEnum from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileDiskQuantityEnum(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileDiskQuantityEnum)
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "values", &obj.Values)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileDiskQuantityFixed : The number of disks of this configuration for a bare metal server with this profile.
+// This model "extends" BareMetalServerProfileDiskQuantity
+type BareMetalServerProfileDiskQuantityFixed struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The value for this profile field.
+ Value *int64 `json:"value" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileDiskQuantityFixed.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileDiskQuantityFixedTypeFixedConst = "fixed"
+)
+
+func (*BareMetalServerProfileDiskQuantityFixed) isaBareMetalServerProfileDiskQuantity() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileDiskQuantityFixed unmarshals an instance of BareMetalServerProfileDiskQuantityFixed from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileDiskQuantityFixed(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileDiskQuantityFixed)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "value", &obj.Value)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileDiskQuantityRange : The permitted range for the number of disks of this configuration for a bare metal server with this profile.
+// This model "extends" BareMetalServerProfileDiskQuantity
+type BareMetalServerProfileDiskQuantityRange struct {
+ // The default value for this profile field.
+ Default *int64 `json:"default" validate:"required"`
+
+ // The maximum value for this profile field.
+ Max *int64 `json:"max" validate:"required"`
+
+ // The minimum value for this profile field.
+ Min *int64 `json:"min" validate:"required"`
+
+ // The increment step value for this profile field.
+ Step *int64 `json:"step" validate:"required"`
+
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileDiskQuantityRange.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileDiskQuantityRangeTypeRangeConst = "range"
+)
+
+func (*BareMetalServerProfileDiskQuantityRange) isaBareMetalServerProfileDiskQuantity() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileDiskQuantityRange unmarshals an instance of BareMetalServerProfileDiskQuantityRange from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileDiskQuantityRange(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileDiskQuantityRange)
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "max", &obj.Max)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min", &obj.Min)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "step", &obj.Step)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileDiskSizeDependent : The disk size in GB (gigabytes) of this configuration for a bare metal server with this profile depends on its bare
+// metal server configuration.
+// This model "extends" BareMetalServerProfileDiskSize
+type BareMetalServerProfileDiskSizeDependent struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileDiskSizeDependent.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileDiskSizeDependentTypeDependentConst = "dependent"
+)
+
+func (*BareMetalServerProfileDiskSizeDependent) isaBareMetalServerProfileDiskSize() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileDiskSizeDependent unmarshals an instance of BareMetalServerProfileDiskSizeDependent from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileDiskSizeDependent(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileDiskSizeDependent)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileDiskSizeEnum : The permitted disk size in GB (gigabytes) of this configuration for a bare metal server with this profile.
+// This model "extends" BareMetalServerProfileDiskSize
+type BareMetalServerProfileDiskSizeEnum struct {
+ // The default value for this profile field.
+ Default *int64 `json:"default" validate:"required"`
+
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The permitted values for this profile field.
+ Values []int64 `json:"values" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileDiskSizeEnum.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileDiskSizeEnumTypeEnumConst = "enum"
+)
+
+func (*BareMetalServerProfileDiskSizeEnum) isaBareMetalServerProfileDiskSize() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileDiskSizeEnum unmarshals an instance of BareMetalServerProfileDiskSizeEnum from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileDiskSizeEnum(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileDiskSizeEnum)
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "values", &obj.Values)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileDiskSizeFixed : The size of the disk in GB (gigabytes).
+// This model "extends" BareMetalServerProfileDiskSize
+type BareMetalServerProfileDiskSizeFixed struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The value for this profile field.
+ Value *int64 `json:"value" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileDiskSizeFixed.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileDiskSizeFixedTypeFixedConst = "fixed"
+)
+
+func (*BareMetalServerProfileDiskSizeFixed) isaBareMetalServerProfileDiskSize() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileDiskSizeFixed unmarshals an instance of BareMetalServerProfileDiskSizeFixed from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileDiskSizeFixed(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileDiskSizeFixed)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "value", &obj.Value)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileDiskSizeRange : The permitted range for the disk size of this configuration in GB (gigabytes) for a bare metal server with this
+// profile.
+// This model "extends" BareMetalServerProfileDiskSize
+type BareMetalServerProfileDiskSizeRange struct {
+ // The default value for this profile field.
+ Default *int64 `json:"default" validate:"required"`
+
+ // The maximum value for this profile field.
+ Max *int64 `json:"max" validate:"required"`
+
+ // The minimum value for this profile field.
+ Min *int64 `json:"min" validate:"required"`
+
+ // The increment step value for this profile field.
+ Step *int64 `json:"step" validate:"required"`
+
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileDiskSizeRange.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileDiskSizeRangeTypeRangeConst = "range"
+)
+
+func (*BareMetalServerProfileDiskSizeRange) isaBareMetalServerProfileDiskSize() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileDiskSizeRange unmarshals an instance of BareMetalServerProfileDiskSizeRange from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileDiskSizeRange(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileDiskSizeRange)
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "max", &obj.Max)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min", &obj.Min)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "step", &obj.Step)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileIdentityByHref : BareMetalServerProfileIdentityByHref struct
+// This model "extends" BareMetalServerProfileIdentity
+type BareMetalServerProfileIdentityByHref struct {
+ // The URL for this bare metal server profile.
+ Href *string `json:"href" validate:"required"`
+}
+
+// NewBareMetalServerProfileIdentityByHref : Instantiate BareMetalServerProfileIdentityByHref (Generic Model Constructor)
+func (*VpcV1) NewBareMetalServerProfileIdentityByHref(href string) (_model *BareMetalServerProfileIdentityByHref, err error) {
+ _model = &BareMetalServerProfileIdentityByHref{
+ Href: core.StringPtr(href),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*BareMetalServerProfileIdentityByHref) isaBareMetalServerProfileIdentity() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileIdentityByHref unmarshals an instance of BareMetalServerProfileIdentityByHref from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileIdentityByHref)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileIdentityByName : BareMetalServerProfileIdentityByName struct
+// This model "extends" BareMetalServerProfileIdentity
+type BareMetalServerProfileIdentityByName struct {
+ // The name for this bare metal server profile.
+ Name *string `json:"name" validate:"required"`
+}
+
+// NewBareMetalServerProfileIdentityByName : Instantiate BareMetalServerProfileIdentityByName (Generic Model Constructor)
+func (*VpcV1) NewBareMetalServerProfileIdentityByName(name string) (_model *BareMetalServerProfileIdentityByName, err error) {
+ _model = &BareMetalServerProfileIdentityByName{
+ Name: core.StringPtr(name),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*BareMetalServerProfileIdentityByName) isaBareMetalServerProfileIdentity() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileIdentityByName unmarshals an instance of BareMetalServerProfileIdentityByName from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileIdentityByName)
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileMemoryDependent : The memory value for a bare metal server with this profile depends on its configuration.
+// This model "extends" BareMetalServerProfileMemory
+type BareMetalServerProfileMemoryDependent struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileMemoryDependent.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileMemoryDependentTypeDependentConst = "dependent"
+)
+
+func (*BareMetalServerProfileMemoryDependent) isaBareMetalServerProfileMemory() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileMemoryDependent unmarshals an instance of BareMetalServerProfileMemoryDependent from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileMemoryDependent(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileMemoryDependent)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileMemoryEnum : The permitted memory values (in gibibytes) for a bare metal server with this profile.
+// This model "extends" BareMetalServerProfileMemory
+type BareMetalServerProfileMemoryEnum struct {
+ // The default value for this profile field.
+ Default *int64 `json:"default" validate:"required"`
+
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The permitted values for this profile field.
+ Values []int64 `json:"values" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileMemoryEnum.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileMemoryEnumTypeEnumConst = "enum"
+)
+
+func (*BareMetalServerProfileMemoryEnum) isaBareMetalServerProfileMemory() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileMemoryEnum unmarshals an instance of BareMetalServerProfileMemoryEnum from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileMemoryEnum(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileMemoryEnum)
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "values", &obj.Values)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileMemoryFixed : The memory (in gibibytes) for a bare metal server with this profile.
+// This model "extends" BareMetalServerProfileMemory
+type BareMetalServerProfileMemoryFixed struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The value for this profile field.
+ Value *int64 `json:"value" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileMemoryFixed.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileMemoryFixedTypeFixedConst = "fixed"
+)
+
+func (*BareMetalServerProfileMemoryFixed) isaBareMetalServerProfileMemory() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileMemoryFixed unmarshals an instance of BareMetalServerProfileMemoryFixed from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileMemoryFixed(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileMemoryFixed)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "value", &obj.Value)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// BareMetalServerProfileMemoryRange : The permitted memory range (in gibibytes) for a bare metal server with this profile.
+// This model "extends" BareMetalServerProfileMemory
+type BareMetalServerProfileMemoryRange struct {
+ // The default value for this profile field.
+ Default *int64 `json:"default" validate:"required"`
+
+ // The maximum value for this profile field.
+ Max *int64 `json:"max" validate:"required"`
+
+ // The minimum value for this profile field.
+ Min *int64 `json:"min" validate:"required"`
+
+ // The increment step value for this profile field.
+ Step *int64 `json:"step" validate:"required"`
+
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+}
+
+// Constants associated with the BareMetalServerProfileMemoryRange.Type property.
+// The type for this profile field.
+const (
+ BareMetalServerProfileMemoryRangeTypeRangeConst = "range"
+)
+
+func (*BareMetalServerProfileMemoryRange) isaBareMetalServerProfileMemory() bool {
+ return true
+}
+
+// UnmarshalBareMetalServerProfileMemoryRange unmarshals an instance of BareMetalServerProfileMemoryRange from the specified map of raw messages.
+func UnmarshalBareMetalServerProfileMemoryRange(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(BareMetalServerProfileMemoryRange)
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "max", &obj.Max)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min", &obj.Min)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "step", &obj.Step)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// CertificateInstanceIdentityByCRN : CertificateInstanceIdentityByCRN struct
// This model "extends" CertificateInstanceIdentity
type CertificateInstanceIdentityByCRN struct {
@@ -46463,11 +60068,11 @@ type CertificateInstanceIdentityByCRN struct {
}
// NewCertificateInstanceIdentityByCRN : Instantiate CertificateInstanceIdentityByCRN (Generic Model Constructor)
-func (*VpcV1) NewCertificateInstanceIdentityByCRN(crn string) (model *CertificateInstanceIdentityByCRN, err error) {
- model = &CertificateInstanceIdentityByCRN{
+func (*VpcV1) NewCertificateInstanceIdentityByCRN(crn string) (_model *CertificateInstanceIdentityByCRN, err error) {
+ _model = &CertificateInstanceIdentityByCRN{
CRN: core.StringPtr(crn),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -46486,37 +60091,6 @@ func UnmarshalCertificateInstanceIdentityByCRN(m map[string]json.RawMessage, res
return
}
-// CloudObjectStorageBucketIdentityByName : CloudObjectStorageBucketIdentityByName struct
-// This model "extends" CloudObjectStorageBucketIdentity
-type CloudObjectStorageBucketIdentityByName struct {
- // The globally unique name of this COS bucket.
- Name *string `json:"name" validate:"required"`
-}
-
-// NewCloudObjectStorageBucketIdentityByName : Instantiate CloudObjectStorageBucketIdentityByName (Generic Model Constructor)
-func (*VpcV1) NewCloudObjectStorageBucketIdentityByName(name string) (model *CloudObjectStorageBucketIdentityByName, err error) {
- model = &CloudObjectStorageBucketIdentityByName{
- Name: core.StringPtr(name),
- }
- err = core.ValidateStruct(model, "required parameters")
- return
-}
-
-func (*CloudObjectStorageBucketIdentityByName) isaCloudObjectStorageBucketIdentity() bool {
- return true
-}
-
-// UnmarshalCloudObjectStorageBucketIdentityByName unmarshals an instance of CloudObjectStorageBucketIdentityByName from the specified map of raw messages.
-func UnmarshalCloudObjectStorageBucketIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(CloudObjectStorageBucketIdentityByName)
- err = core.UnmarshalPrimitive(m, "name", &obj.Name)
- if err != nil {
- return
- }
- reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
- return
-}
-
// DedicatedHostGroupIdentityByCRN : DedicatedHostGroupIdentityByCRN struct
// This model "extends" DedicatedHostGroupIdentity
type DedicatedHostGroupIdentityByCRN struct {
@@ -46525,11 +60099,11 @@ type DedicatedHostGroupIdentityByCRN struct {
}
// NewDedicatedHostGroupIdentityByCRN : Instantiate DedicatedHostGroupIdentityByCRN (Generic Model Constructor)
-func (*VpcV1) NewDedicatedHostGroupIdentityByCRN(crn string) (model *DedicatedHostGroupIdentityByCRN, err error) {
- model = &DedicatedHostGroupIdentityByCRN{
+func (*VpcV1) NewDedicatedHostGroupIdentityByCRN(crn string) (_model *DedicatedHostGroupIdentityByCRN, err error) {
+ _model = &DedicatedHostGroupIdentityByCRN{
CRN: core.StringPtr(crn),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -46556,11 +60130,11 @@ type DedicatedHostGroupIdentityByHref struct {
}
// NewDedicatedHostGroupIdentityByHref : Instantiate DedicatedHostGroupIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewDedicatedHostGroupIdentityByHref(href string) (model *DedicatedHostGroupIdentityByHref, err error) {
- model = &DedicatedHostGroupIdentityByHref{
+func (*VpcV1) NewDedicatedHostGroupIdentityByHref(href string) (_model *DedicatedHostGroupIdentityByHref, err error) {
+ _model = &DedicatedHostGroupIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -46587,11 +60161,11 @@ type DedicatedHostGroupIdentityByID struct {
}
// NewDedicatedHostGroupIdentityByID : Instantiate DedicatedHostGroupIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewDedicatedHostGroupIdentityByID(id string) (model *DedicatedHostGroupIdentityByID, err error) {
- model = &DedicatedHostGroupIdentityByID{
+func (*VpcV1) NewDedicatedHostGroupIdentityByID(id string) (_model *DedicatedHostGroupIdentityByID, err error) {
+ _model = &DedicatedHostGroupIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -46618,11 +60192,11 @@ type DedicatedHostProfileIdentityByHref struct {
}
// NewDedicatedHostProfileIdentityByHref : Instantiate DedicatedHostProfileIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewDedicatedHostProfileIdentityByHref(href string) (model *DedicatedHostProfileIdentityByHref, err error) {
- model = &DedicatedHostProfileIdentityByHref{
+func (*VpcV1) NewDedicatedHostProfileIdentityByHref(href string) (_model *DedicatedHostProfileIdentityByHref, err error) {
+ _model = &DedicatedHostProfileIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -46649,11 +60223,11 @@ type DedicatedHostProfileIdentityByName struct {
}
// NewDedicatedHostProfileIdentityByName : Instantiate DedicatedHostProfileIdentityByName (Generic Model Constructor)
-func (*VpcV1) NewDedicatedHostProfileIdentityByName(name string) (model *DedicatedHostProfileIdentityByName, err error) {
- model = &DedicatedHostProfileIdentityByName{
+func (*VpcV1) NewDedicatedHostProfileIdentityByName(name string) (_model *DedicatedHostProfileIdentityByName, err error) {
+ _model = &DedicatedHostProfileIdentityByName{
Name: core.StringPtr(name),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -47175,12 +60749,12 @@ type DedicatedHostPrototypeDedicatedHostByGroup struct {
}
// NewDedicatedHostPrototypeDedicatedHostByGroup : Instantiate DedicatedHostPrototypeDedicatedHostByGroup (Generic Model Constructor)
-func (*VpcV1) NewDedicatedHostPrototypeDedicatedHostByGroup(profile DedicatedHostProfileIdentityIntf, group DedicatedHostGroupIdentityIntf) (model *DedicatedHostPrototypeDedicatedHostByGroup, err error) {
- model = &DedicatedHostPrototypeDedicatedHostByGroup{
+func (*VpcV1) NewDedicatedHostPrototypeDedicatedHostByGroup(profile DedicatedHostProfileIdentityIntf, group DedicatedHostGroupIdentityIntf) (_model *DedicatedHostPrototypeDedicatedHostByGroup, err error) {
+ _model = &DedicatedHostPrototypeDedicatedHostByGroup{
Profile: profile,
Group: group,
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -47237,12 +60811,12 @@ type DedicatedHostPrototypeDedicatedHostByZone struct {
}
// NewDedicatedHostPrototypeDedicatedHostByZone : Instantiate DedicatedHostPrototypeDedicatedHostByZone (Generic Model Constructor)
-func (*VpcV1) NewDedicatedHostPrototypeDedicatedHostByZone(profile DedicatedHostProfileIdentityIntf, zone ZoneIdentityIntf) (model *DedicatedHostPrototypeDedicatedHostByZone, err error) {
- model = &DedicatedHostPrototypeDedicatedHostByZone{
+func (*VpcV1) NewDedicatedHostPrototypeDedicatedHostByZone(profile DedicatedHostProfileIdentityIntf, zone ZoneIdentityIntf) (_model *DedicatedHostPrototypeDedicatedHostByZone, err error) {
+ _model = &DedicatedHostPrototypeDedicatedHostByZone{
Profile: profile,
Zone: zone,
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -47291,11 +60865,11 @@ type EncryptionKeyIdentityByCRN struct {
}
// NewEncryptionKeyIdentityByCRN : Instantiate EncryptionKeyIdentityByCRN (Generic Model Constructor)
-func (*VpcV1) NewEncryptionKeyIdentityByCRN(crn string) (model *EncryptionKeyIdentityByCRN, err error) {
- model = &EncryptionKeyIdentityByCRN{
+func (*VpcV1) NewEncryptionKeyIdentityByCRN(crn string) (_model *EncryptionKeyIdentityByCRN, err error) {
+ _model = &EncryptionKeyIdentityByCRN{
CRN: core.StringPtr(crn),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -47358,13 +60932,18 @@ func UnmarshalEndpointGatewayReservedIPReservedIPIdentity(m map[string]json.RawM
// EndpointGatewayReservedIPReservedIPPrototypeTargetContext : EndpointGatewayReservedIPReservedIPPrototypeTargetContext struct
// This model "extends" EndpointGatewayReservedIP
type EndpointGatewayReservedIPReservedIPPrototypeTargetContext struct {
- // If set to `true`, this reserved IP will be automatically deleted when the target is deleted or when the reserved IP
- // is unbound.
+ // The IP address to reserve, which must not already be reserved on the subnet.
+ //
+ // If unspecified, an available address on the subnet will automatically be selected.
+ Address *string `json:"address,omitempty"`
+
+ // Indicates whether this reserved IP member will be automatically deleted when either
+ // `target` is deleted, or the reserved IP is unbound.
AutoDelete *bool `json:"auto_delete,omitempty"`
- // The user-defined name for this reserved IP. If not specified, the name will be a hyphenated list of
- // randomly-selected words. Names must be unique within the subnet the reserved IP resides in. Names beginning with
- // `ibm-` are reserved for provider-owned resources.
+ // The user-defined name for this reserved IP. If unspecified, the name will be a hyphenated list of randomly-selected
+ // words. Names must be unique within the subnet the reserved IP resides in. Names beginning with `ibm-` are reserved
+ // for provider-owned resources.
Name *string `json:"name,omitempty"`
// The subnet in which to create this reserved IP.
@@ -47372,11 +60951,11 @@ type EndpointGatewayReservedIPReservedIPPrototypeTargetContext struct {
}
// NewEndpointGatewayReservedIPReservedIPPrototypeTargetContext : Instantiate EndpointGatewayReservedIPReservedIPPrototypeTargetContext (Generic Model Constructor)
-func (*VpcV1) NewEndpointGatewayReservedIPReservedIPPrototypeTargetContext(subnet SubnetIdentityIntf) (model *EndpointGatewayReservedIPReservedIPPrototypeTargetContext, err error) {
- model = &EndpointGatewayReservedIPReservedIPPrototypeTargetContext{
+func (*VpcV1) NewEndpointGatewayReservedIPReservedIPPrototypeTargetContext(subnet SubnetIdentityIntf) (_model *EndpointGatewayReservedIPReservedIPPrototypeTargetContext, err error) {
+ _model = &EndpointGatewayReservedIPReservedIPPrototypeTargetContext{
Subnet: subnet,
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -47387,6 +60966,10 @@ func (*EndpointGatewayReservedIPReservedIPPrototypeTargetContext) isaEndpointGat
// UnmarshalEndpointGatewayReservedIPReservedIPPrototypeTargetContext unmarshals an instance of EndpointGatewayReservedIPReservedIPPrototypeTargetContext from the specified map of raw messages.
func UnmarshalEndpointGatewayReservedIPReservedIPPrototypeTargetContext(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(EndpointGatewayReservedIPReservedIPPrototypeTargetContext)
+ err = core.UnmarshalPrimitive(m, "address", &obj.Address)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete)
if err != nil {
return
@@ -47577,11 +61160,11 @@ type FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref st
}
// NewFloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref : Instantiate FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewFloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(href string) (model *FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref, err error) {
- model = &FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref{
+func (*VpcV1) NewFloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(href string) (_model *FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref, err error) {
+ _model = &FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -47608,11 +61191,11 @@ type FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID stru
}
// NewFloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID : Instantiate FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewFloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID(id string) (model *FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID, err error) {
- model = &FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID{
+func (*VpcV1) NewFloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID(id string) (_model *FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID, err error) {
+ _model = &FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -47631,68 +61214,6 @@ func UnmarshalFloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentity
return
}
-// FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref : FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref struct
-// This model "extends" FloatingIPPatchTargetNetworkInterfaceIdentity
-type FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref struct {
- // The URL for this network interface.
- Href *string `json:"href" validate:"required"`
-}
-
-// NewFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref : Instantiate FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(href string) (model *FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref, err error) {
- model = &FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref{
- Href: core.StringPtr(href),
- }
- err = core.ValidateStruct(model, "required parameters")
- return
-}
-
-func (*FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) isaFloatingIPPatchTargetNetworkInterfaceIdentity() bool {
- return true
-}
-
-// UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref unmarshals an instance of FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref from the specified map of raw messages.
-func UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref)
- err = core.UnmarshalPrimitive(m, "href", &obj.Href)
- if err != nil {
- return
- }
- reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
- return
-}
-
-// FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID : FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID struct
-// This model "extends" FloatingIPPatchTargetNetworkInterfaceIdentity
-type FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID struct {
- // The unique identifier for this network interface.
- ID *string `json:"id" validate:"required"`
-}
-
-// NewFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID : Instantiate FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID(id string) (model *FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID, err error) {
- model = &FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID{
- ID: core.StringPtr(id),
- }
- err = core.ValidateStruct(model, "required parameters")
- return
-}
-
-func (*FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) isaFloatingIPPatchTargetNetworkInterfaceIdentity() bool {
- return true
-}
-
-// UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID unmarshals an instance of FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID from the specified map of raw messages.
-func UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID)
- err = core.UnmarshalPrimitive(m, "id", &obj.ID)
- if err != nil {
- return
- }
- reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
- return
-}
-
// FloatingIPPrototypeFloatingIPByTarget : FloatingIPPrototypeFloatingIPByTarget struct
// This model "extends" FloatingIPPrototype
type FloatingIPPrototypeFloatingIPByTarget struct {
@@ -47707,11 +61228,11 @@ type FloatingIPPrototypeFloatingIPByTarget struct {
}
// NewFloatingIPPrototypeFloatingIPByTarget : Instantiate FloatingIPPrototypeFloatingIPByTarget (Generic Model Constructor)
-func (*VpcV1) NewFloatingIPPrototypeFloatingIPByTarget(target FloatingIPByTargetNetworkInterfaceIdentityIntf) (model *FloatingIPPrototypeFloatingIPByTarget, err error) {
- model = &FloatingIPPrototypeFloatingIPByTarget{
+func (*VpcV1) NewFloatingIPPrototypeFloatingIPByTarget(target FloatingIPByTargetNetworkInterfaceIdentityIntf) (_model *FloatingIPPrototypeFloatingIPByTarget, err error) {
+ _model = &FloatingIPPrototypeFloatingIPByTarget{
Target: target,
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -47752,11 +61273,11 @@ type FloatingIPPrototypeFloatingIPByZone struct {
}
// NewFloatingIPPrototypeFloatingIPByZone : Instantiate FloatingIPPrototypeFloatingIPByZone (Generic Model Constructor)
-func (*VpcV1) NewFloatingIPPrototypeFloatingIPByZone(zone ZoneIdentityIntf) (model *FloatingIPPrototypeFloatingIPByZone, err error) {
- model = &FloatingIPPrototypeFloatingIPByZone{
+func (*VpcV1) NewFloatingIPPrototypeFloatingIPByZone(zone ZoneIdentityIntf) (_model *FloatingIPPrototypeFloatingIPByZone, err error) {
+ _model = &FloatingIPPrototypeFloatingIPByZone{
Zone: zone,
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -47783,6 +61304,68 @@ func UnmarshalFloatingIPPrototypeFloatingIPByZone(m map[string]json.RawMessage,
return
}
+// FloatingIPTargetPatchNetworkInterfaceIdentityByHref : FloatingIPTargetPatchNetworkInterfaceIdentityByHref struct
+// This model "extends" FloatingIPTargetPatch
+type FloatingIPTargetPatchNetworkInterfaceIdentityByHref struct {
+ // The URL for this network interface.
+ Href *string `json:"href" validate:"required"`
+}
+
+// NewFloatingIPTargetPatchNetworkInterfaceIdentityByHref : Instantiate FloatingIPTargetPatchNetworkInterfaceIdentityByHref (Generic Model Constructor)
+func (*VpcV1) NewFloatingIPTargetPatchNetworkInterfaceIdentityByHref(href string) (_model *FloatingIPTargetPatchNetworkInterfaceIdentityByHref, err error) {
+ _model = &FloatingIPTargetPatchNetworkInterfaceIdentityByHref{
+ Href: core.StringPtr(href),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*FloatingIPTargetPatchNetworkInterfaceIdentityByHref) isaFloatingIPTargetPatch() bool {
+ return true
+}
+
+// UnmarshalFloatingIPTargetPatchNetworkInterfaceIdentityByHref unmarshals an instance of FloatingIPTargetPatchNetworkInterfaceIdentityByHref from the specified map of raw messages.
+func UnmarshalFloatingIPTargetPatchNetworkInterfaceIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(FloatingIPTargetPatchNetworkInterfaceIdentityByHref)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// FloatingIPTargetPatchNetworkInterfaceIdentityByID : FloatingIPTargetPatchNetworkInterfaceIdentityByID struct
+// This model "extends" FloatingIPTargetPatch
+type FloatingIPTargetPatchNetworkInterfaceIdentityByID struct {
+ // The unique identifier for this network interface.
+ ID *string `json:"id" validate:"required"`
+}
+
+// NewFloatingIPTargetPatchNetworkInterfaceIdentityByID : Instantiate FloatingIPTargetPatchNetworkInterfaceIdentityByID (Generic Model Constructor)
+func (*VpcV1) NewFloatingIPTargetPatchNetworkInterfaceIdentityByID(id string) (_model *FloatingIPTargetPatchNetworkInterfaceIdentityByID, err error) {
+ _model = &FloatingIPTargetPatchNetworkInterfaceIdentityByID{
+ ID: core.StringPtr(id),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*FloatingIPTargetPatchNetworkInterfaceIdentityByID) isaFloatingIPTargetPatch() bool {
+ return true
+}
+
+// UnmarshalFloatingIPTargetPatchNetworkInterfaceIdentityByID unmarshals an instance of FloatingIPTargetPatchNetworkInterfaceIdentityByID from the specified map of raw messages.
+func UnmarshalFloatingIPTargetPatchNetworkInterfaceIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(FloatingIPTargetPatchNetworkInterfaceIdentityByID)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// FloatingIPTargetNetworkInterfaceReference : FloatingIPTargetNetworkInterfaceReference struct
// This model "extends" FloatingIPTarget
type FloatingIPTargetNetworkInterfaceReference struct {
@@ -47799,8 +61382,7 @@ type FloatingIPTargetNetworkInterfaceReference struct {
// The user-defined name for this network interface.
Name *string `json:"name" validate:"required"`
- // The primary IPv4 address.
- PrimaryIpv4Address *string `json:"primary_ipv4_address" validate:"required"`
+ PrimaryIP *ReservedIPReference `json:"primary_ip" validate:"required"`
// The resource type.
ResourceType *string `json:"resource_type" validate:"required"`
@@ -47835,7 +61417,7 @@ func UnmarshalFloatingIPTargetNetworkInterfaceReference(m map[string]json.RawMes
if err != nil {
return
}
- err = core.UnmarshalPrimitive(m, "primary_ipv4_address", &obj.PrimaryIpv4Address)
+ err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference)
if err != nil {
return
}
@@ -48225,8 +61807,17 @@ type FlowLogCollectorTargetSubnetReference struct {
// The user-defined name for this subnet.
Name *string `json:"name" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
}
+// Constants associated with the FlowLogCollectorTargetSubnetReference.ResourceType property.
+// The resource type.
+const (
+ FlowLogCollectorTargetSubnetReferenceResourceTypeSubnetConst = "subnet"
+)
+
func (*FlowLogCollectorTargetSubnetReference) isaFlowLogCollectorTarget() bool {
return true
}
@@ -48254,6 +61845,10 @@ func UnmarshalFlowLogCollectorTargetSubnetReference(m map[string]json.RawMessage
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
@@ -48276,8 +61871,17 @@ type FlowLogCollectorTargetVPCReference struct {
// The unique user-defined name for this VPC.
Name *string `json:"name" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
}
+// Constants associated with the FlowLogCollectorTargetVPCReference.ResourceType property.
+// The resource type.
+const (
+ FlowLogCollectorTargetVPCReferenceResourceTypeVPCConst = "vpc"
+)
+
func (*FlowLogCollectorTargetVPCReference) isaFlowLogCollectorTarget() bool {
return true
}
@@ -48305,127 +61909,7 @@ func UnmarshalFlowLogCollectorTargetVPCReference(m map[string]json.RawMessage, r
if err != nil {
return
}
- reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
- return
-}
-
-// IkePolicyIdentityByHref : IkePolicyIdentityByHref struct
-// This model "extends" IkePolicyIdentity
-type IkePolicyIdentityByHref struct {
- // The IKE policy's canonical URL.
- Href *string `json:"href" validate:"required"`
-}
-
-// NewIkePolicyIdentityByHref : Instantiate IkePolicyIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewIkePolicyIdentityByHref(href string) (model *IkePolicyIdentityByHref, err error) {
- model = &IkePolicyIdentityByHref{
- Href: core.StringPtr(href),
- }
- err = core.ValidateStruct(model, "required parameters")
- return
-}
-
-func (*IkePolicyIdentityByHref) isaIkePolicyIdentity() bool {
- return true
-}
-
-// UnmarshalIkePolicyIdentityByHref unmarshals an instance of IkePolicyIdentityByHref from the specified map of raw messages.
-func UnmarshalIkePolicyIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(IkePolicyIdentityByHref)
- err = core.UnmarshalPrimitive(m, "href", &obj.Href)
- if err != nil {
- return
- }
- reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
- return
-}
-
-// IkePolicyIdentityByID : IkePolicyIdentityByID struct
-// This model "extends" IkePolicyIdentity
-type IkePolicyIdentityByID struct {
- // The unique identifier for this IKE policy.
- ID *string `json:"id" validate:"required"`
-}
-
-// NewIkePolicyIdentityByID : Instantiate IkePolicyIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewIkePolicyIdentityByID(id string) (model *IkePolicyIdentityByID, err error) {
- model = &IkePolicyIdentityByID{
- ID: core.StringPtr(id),
- }
- err = core.ValidateStruct(model, "required parameters")
- return
-}
-
-func (*IkePolicyIdentityByID) isaIkePolicyIdentity() bool {
- return true
-}
-
-// UnmarshalIkePolicyIdentityByID unmarshals an instance of IkePolicyIdentityByID from the specified map of raw messages.
-func UnmarshalIkePolicyIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(IkePolicyIdentityByID)
- err = core.UnmarshalPrimitive(m, "id", &obj.ID)
- if err != nil {
- return
- }
- reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
- return
-}
-
-// IPsecPolicyIdentityByHref : IPsecPolicyIdentityByHref struct
-// This model "extends" IPsecPolicyIdentity
-type IPsecPolicyIdentityByHref struct {
- // The IPsec policy's canonical URL.
- Href *string `json:"href" validate:"required"`
-}
-
-// NewIPsecPolicyIdentityByHref : Instantiate IPsecPolicyIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewIPsecPolicyIdentityByHref(href string) (model *IPsecPolicyIdentityByHref, err error) {
- model = &IPsecPolicyIdentityByHref{
- Href: core.StringPtr(href),
- }
- err = core.ValidateStruct(model, "required parameters")
- return
-}
-
-func (*IPsecPolicyIdentityByHref) isaIPsecPolicyIdentity() bool {
- return true
-}
-
-// UnmarshalIPsecPolicyIdentityByHref unmarshals an instance of IPsecPolicyIdentityByHref from the specified map of raw messages.
-func UnmarshalIPsecPolicyIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(IPsecPolicyIdentityByHref)
- err = core.UnmarshalPrimitive(m, "href", &obj.Href)
- if err != nil {
- return
- }
- reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
- return
-}
-
-// IPsecPolicyIdentityByID : IPsecPolicyIdentityByID struct
-// This model "extends" IPsecPolicyIdentity
-type IPsecPolicyIdentityByID struct {
- // The unique identifier for this IPsec policy.
- ID *string `json:"id" validate:"required"`
-}
-
-// NewIPsecPolicyIdentityByID : Instantiate IPsecPolicyIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewIPsecPolicyIdentityByID(id string) (model *IPsecPolicyIdentityByID, err error) {
- model = &IPsecPolicyIdentityByID{
- ID: core.StringPtr(id),
- }
- err = core.ValidateStruct(model, "required parameters")
- return
-}
-
-func (*IPsecPolicyIdentityByID) isaIPsecPolicyIdentity() bool {
- return true
-}
-
-// UnmarshalIPsecPolicyIdentityByID unmarshals an instance of IPsecPolicyIdentityByID from the specified map of raw messages.
-func UnmarshalIPsecPolicyIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(IPsecPolicyIdentityByID)
- err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
if err != nil {
return
}
@@ -48441,11 +61925,11 @@ type ImageIdentityByCRN struct {
}
// NewImageIdentityByCRN : Instantiate ImageIdentityByCRN (Generic Model Constructor)
-func (*VpcV1) NewImageIdentityByCRN(crn string) (model *ImageIdentityByCRN, err error) {
- model = &ImageIdentityByCRN{
+func (*VpcV1) NewImageIdentityByCRN(crn string) (_model *ImageIdentityByCRN, err error) {
+ _model = &ImageIdentityByCRN{
CRN: core.StringPtr(crn),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -48472,11 +61956,11 @@ type ImageIdentityByHref struct {
}
// NewImageIdentityByHref : Instantiate ImageIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewImageIdentityByHref(href string) (model *ImageIdentityByHref, err error) {
- model = &ImageIdentityByHref{
+func (*VpcV1) NewImageIdentityByHref(href string) (_model *ImageIdentityByHref, err error) {
+ _model = &ImageIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -48503,11 +61987,11 @@ type ImageIdentityByID struct {
}
// NewImageIdentityByID : Instantiate ImageIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewImageIdentityByID(id string) (model *ImageIdentityByID, err error) {
- model = &ImageIdentityByID{
+func (*VpcV1) NewImageIdentityByID(id string) (_model *ImageIdentityByID, err error) {
+ _model = &ImageIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -48529,7 +62013,7 @@ func UnmarshalImageIdentityByID(m map[string]json.RawMessage, result interface{}
// ImagePrototypeImageByFile : ImagePrototypeImageByFile struct
// This model "extends" ImagePrototype
type ImagePrototypeImageByFile struct {
- // The unique user-defined name for this image. Names starting with "ibm-" are not allowed. If unspecified, the name
+ // The unique user-defined name for this image. Names starting with `ibm-` are not allowed. If unspecified, the name
// will be a hyphenated list of randomly-selected words.
Name *string `json:"name,omitempty"`
@@ -48538,36 +62022,36 @@ type ImagePrototypeImageByFile struct {
// A base64-encoded, encrypted representation of the key that was used to encrypt the data for this image.
//
// That representation is created by wrapping the key's value with the `encryption_key` root key (which must also be
- // provided), using either [Key Protect](https://cloud.ibm.com/docs/key-protect?topic=key-protect-wrap-keys) or the
+ // specified), using either [Key Protect](https://cloud.ibm.com/docs/key-protect?topic=key-protect-wrap-keys) or the
// [Hyper Protect Crypto Service](https://cloud.ibm.com/docs/services/hs-crypto?topic=hs-crypto-wrap-keys).
//
- // If this property is not provided, the imported image is treated as unencrypted.
+ // If unspecified, the imported image is treated as unencrypted.
EncryptedDataKey *string `json:"encrypted_data_key,omitempty"`
- // The identity of the root key that was used to wrap the data key (which is ultimately
- // represented as `encrypted_data_key`). Additionally, the root key will be used to encrypt
- // volumes created from this image (unless an alternate `encryption_key` is provided at
- // volume creation).
+ // The root key that was used to wrap the data key (which is ultimately represented as
+ // `encrypted_data_key`). Additionally, the root key will be used to encrypt volumes
+ // created from this image (unless an alternate `encryption_key` is specified at volume
+ // creation).
//
- // If this property is not provided, the imported image is treated as unencrypted.
+ // If unspecified, the imported image is treated as unencrypted.
EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
// The file from which to create the image.
File *ImageFilePrototype `json:"file" validate:"required"`
- // The identity of the [supported operating
- // system](https://cloud.ibm.com/apidocs/vpc#list-operating-systems) included in
- // this image.
+ // The [supported operating
+ // system](https://cloud.ibm.com/apidocs/vpc#list-operating-systems) included in this
+ // image.
OperatingSystem OperatingSystemIdentityIntf `json:"operating_system" validate:"required"`
}
// NewImagePrototypeImageByFile : Instantiate ImagePrototypeImageByFile (Generic Model Constructor)
-func (*VpcV1) NewImagePrototypeImageByFile(file *ImageFilePrototype, operatingSystem OperatingSystemIdentityIntf) (model *ImagePrototypeImageByFile, err error) {
- model = &ImagePrototypeImageByFile{
+func (*VpcV1) NewImagePrototypeImageByFile(file *ImageFilePrototype, operatingSystem OperatingSystemIdentityIntf) (_model *ImagePrototypeImageByFile, err error) {
+ _model = &ImagePrototypeImageByFile{
File: file,
OperatingSystem: operatingSystem,
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -48606,21 +62090,316 @@ func UnmarshalImagePrototypeImageByFile(m map[string]json.RawMessage, result int
return
}
+// ImagePrototypeImageBySourceVolume : ImagePrototypeImageBySourceVolume struct
+// This model "extends" ImagePrototype
+type ImagePrototypeImageBySourceVolume struct {
+ // The unique user-defined name for this image. Names starting with `ibm-` are not allowed. If unspecified, the name
+ // will be a hyphenated list of randomly-selected words.
+ Name *string `json:"name,omitempty"`
+
+ ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
+
+ // The root key used to wrap the system-generated data encryption key for the image.
+ //
+ // If unspecified, the root key from `source_volume` will be used.
+ EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
+
+ // The volume from which to create the image. The specified volume must:
+ // - Originate from an image, which will be used to populate this image's
+ // operating system information.
+ // - Not be `active` or `busy`.
+ //
+ // During image creation, the specified volume may briefly become `busy`.
+ SourceVolume VolumeIdentityIntf `json:"source_volume" validate:"required"`
+}
+
+// NewImagePrototypeImageBySourceVolume : Instantiate ImagePrototypeImageBySourceVolume (Generic Model Constructor)
+func (*VpcV1) NewImagePrototypeImageBySourceVolume(sourceVolume VolumeIdentityIntf) (_model *ImagePrototypeImageBySourceVolume, err error) {
+ _model = &ImagePrototypeImageBySourceVolume{
+ SourceVolume: sourceVolume,
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*ImagePrototypeImageBySourceVolume) isaImagePrototype() bool {
+ return true
+}
+
+// UnmarshalImagePrototypeImageBySourceVolume unmarshals an instance of ImagePrototypeImageBySourceVolume from the specified map of raw messages.
+func UnmarshalImagePrototypeImageBySourceVolume(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(ImagePrototypeImageBySourceVolume)
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "source_volume", &obj.SourceVolume, UnmarshalVolumeIdentity)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerActionPrototypeScheduledActionPrototype : InstanceGroupManagerActionPrototypeScheduledActionPrototype struct
+// Models which "extend" this model:
+// - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt
+// - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec
+// This model "extends" InstanceGroupManagerActionPrototype
+type InstanceGroupManagerActionPrototypeScheduledActionPrototype struct {
+ // The user-defined name for this instance group manager action. Names must be unique within the instance group
+ // manager. If unspecified, the name will be a hyphenated list of randomly-selected words.
+ Name *string `json:"name,omitempty"`
+
+ // The date and time the scheduled action will run.
+ RunAt *strfmt.DateTime `json:"run_at,omitempty"`
+
+ Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group,omitempty"`
+
+ Manager InstanceGroupManagerScheduledActionManagerPrototypeIntf `json:"manager,omitempty"`
+
+ // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min
+ // period.
+ CronSpec *string `json:"cron_spec,omitempty"`
+}
+
+func (*InstanceGroupManagerActionPrototypeScheduledActionPrototype) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool {
+ return true
+}
+
+type InstanceGroupManagerActionPrototypeScheduledActionPrototypeIntf interface {
+ InstanceGroupManagerActionPrototypeIntf
+ isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool
+}
+
+func (*InstanceGroupManagerActionPrototypeScheduledActionPrototype) isaInstanceGroupManagerActionPrototype() bool {
+ return true
+}
+
+// UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototype unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototype from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototype)
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManagerPrototype)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerActionScheduledAction : InstanceGroupManagerActionScheduledAction struct
+// Models which "extend" this model:
+// - InstanceGroupManagerActionScheduledActionGroupTarget
+// - InstanceGroupManagerActionScheduledActionManagerTarget
+// This model "extends" InstanceGroupManagerAction
+type InstanceGroupManagerActionScheduledAction struct {
+ // Indicates whether this scheduled action will be automatically deleted after it has completed and
+ // `auto_delete_timeout` hours have passed. At present, this is always
+ // `true`, but may be modifiable in the future.
+ AutoDelete *bool `json:"auto_delete" validate:"required"`
+
+ // If `auto_delete` is `true`, and this scheduled action has finished, the hours after which it will be automatically
+ // deleted. If the value is `0`, the action will be deleted once it has finished. This value may be modifiable in the
+ // future.
+ AutoDeleteTimeout *int64 `json:"auto_delete_timeout" validate:"required"`
+
+ // The date and time that the instance group manager action was created.
+ CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
+
+ // The URL for this instance group manager action.
+ Href *string `json:"href" validate:"required"`
+
+ // The unique identifier for this instance group manager action.
+ ID *string `json:"id" validate:"required"`
+
+ // The user-defined name for this instance group manager action.
+ Name *string `json:"name" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+
+ // The status of the instance group action
+ // - `active`: Action is ready to be run
+ // - `completed`: Action was completed successfully
+ // - `failed`: Action could not be completed successfully
+ // - `incompatible`: Action parameters are not compatible with the group or manager
+ // - `omitted`: Action was not applied because this action's manager was disabled.
+ Status *string `json:"status" validate:"required"`
+
+ // The date and time that the instance group manager action was modified.
+ UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"`
+
+ // The type of action for the instance group.
+ ActionType *string `json:"action_type" validate:"required"`
+
+ // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min
+ // period.
+ CronSpec *string `json:"cron_spec,omitempty"`
+
+ // The date and time the scheduled action was last applied. If absent, the action has never been applied.
+ LastAppliedAt *strfmt.DateTime `json:"last_applied_at,omitempty"`
+
+ // The date and time the scheduled action will next run. If absent, the system is currently calculating the next run
+ // time.
+ NextRunAt *strfmt.DateTime `json:"next_run_at,omitempty"`
+
+ Group *InstanceGroupManagerScheduledActionGroup `json:"group,omitempty"`
+
+ Manager InstanceGroupManagerScheduledActionManagerIntf `json:"manager,omitempty"`
+}
+
+// Constants associated with the InstanceGroupManagerActionScheduledAction.ResourceType property.
+// The resource type.
+const (
+ InstanceGroupManagerActionScheduledActionResourceTypeInstanceGroupManagerActionConst = "instance_group_manager_action"
+)
+
+// Constants associated with the InstanceGroupManagerActionScheduledAction.Status property.
+// The status of the instance group action
+// - `active`: Action is ready to be run
+// - `completed`: Action was completed successfully
+// - `failed`: Action could not be completed successfully
+// - `incompatible`: Action parameters are not compatible with the group or manager
+// - `omitted`: Action was not applied because this action's manager was disabled.
+const (
+ InstanceGroupManagerActionScheduledActionStatusActiveConst = "active"
+ InstanceGroupManagerActionScheduledActionStatusCompletedConst = "completed"
+ InstanceGroupManagerActionScheduledActionStatusFailedConst = "failed"
+ InstanceGroupManagerActionScheduledActionStatusIncompatibleConst = "incompatible"
+ InstanceGroupManagerActionScheduledActionStatusOmittedConst = "omitted"
+)
+
+// Constants associated with the InstanceGroupManagerActionScheduledAction.ActionType property.
+// The type of action for the instance group.
+const (
+ InstanceGroupManagerActionScheduledActionActionTypeScheduledConst = "scheduled"
+)
+
+func (*InstanceGroupManagerActionScheduledAction) isaInstanceGroupManagerActionScheduledAction() bool {
+ return true
+}
+
+type InstanceGroupManagerActionScheduledActionIntf interface {
+ InstanceGroupManagerActionIntf
+ isaInstanceGroupManagerActionScheduledAction() bool
+}
+
+func (*InstanceGroupManagerActionScheduledAction) isaInstanceGroupManagerAction() bool {
+ return true
+}
+
+// UnmarshalInstanceGroupManagerActionScheduledAction unmarshals an instance of InstanceGroupManagerActionScheduledAction from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerActionScheduledAction(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerActionScheduledAction)
+ err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "auto_delete_timeout", &obj.AutoDeleteTimeout)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "status", &obj.Status)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "action_type", &obj.ActionType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "last_applied_at", &obj.LastAppliedAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "next_run_at", &obj.NextRunAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroup)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManager)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// InstanceGroupManagerAutoScale : InstanceGroupManagerAutoScale struct
// This model "extends" InstanceGroupManager
type InstanceGroupManagerAutoScale struct {
+ // The date and time that the instance group manager was created.
+ CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
+
// The URL for this instance group manager.
Href *string `json:"href" validate:"required"`
// The unique identifier for this instance group manager.
ID *string `json:"id" validate:"required"`
- // If set to `true`, this manager will control the instance group.
+ // Indicates whether this manager will control the instance group.
ManagementEnabled *bool `json:"management_enabled" validate:"required"`
- // The user-defined name for this instance group manager. Names must be unique within the instance group.
+ // The user-defined name for this instance group manager.
Name *string `json:"name" validate:"required"`
+ // The date and time that the instance group manager was updated.
+ UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"`
+
// The time window in seconds to aggregate metrics prior to evaluation.
AggregationWindow *int64 `json:"aggregation_window" validate:"required"`
@@ -48653,6 +62432,10 @@ func (*InstanceGroupManagerAutoScale) isaInstanceGroupManager() bool {
// UnmarshalInstanceGroupManagerAutoScale unmarshals an instance of InstanceGroupManagerAutoScale from the specified map of raw messages.
func UnmarshalInstanceGroupManagerAutoScale(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(InstanceGroupManagerAutoScale)
+ err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "href", &obj.Href)
if err != nil {
return
@@ -48669,6 +62452,10 @@ func UnmarshalInstanceGroupManagerAutoScale(m map[string]json.RawMessage, result
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "aggregation_window", &obj.AggregationWindow)
if err != nil {
return
@@ -48701,7 +62488,7 @@ func UnmarshalInstanceGroupManagerAutoScale(m map[string]json.RawMessage, result
// This model "extends" InstanceGroupManagerPolicyPrototype
type InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype struct {
// The user-defined name for this instance group manager policy. Names must be unique within the instance group
- // manager.
+ // manager. If unspecified, the name will be a hyphenated list of randomly-selected words.
Name *string `json:"name,omitempty"`
// The type of metric to be evaluated.
@@ -48730,13 +62517,13 @@ const (
)
// NewInstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype : Instantiate InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype (Generic Model Constructor)
-func (*VpcV1) NewInstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype(metricType string, metricValue int64, policyType string) (model *InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype, err error) {
- model = &InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype{
+func (*VpcV1) NewInstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype(metricType string, metricValue int64, policyType string) (_model *InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype, err error) {
+ _model = &InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype{
MetricType: core.StringPtr(metricType),
MetricValue: core.Int64Ptr(metricValue),
PolicyType: core.StringPtr(policyType),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -48770,16 +62557,21 @@ func UnmarshalInstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolic
// InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy : InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy struct
// This model "extends" InstanceGroupManagerPolicy
type InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy struct {
+ // The date and time that the instance group manager policy was created.
+ CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
+
// The URL for this instance group manager policy.
Href *string `json:"href" validate:"required"`
// The unique identifier for this instance group manager policy.
ID *string `json:"id" validate:"required"`
- // The user-defined name for this instance group manager policy. Names must be unique within the instance group
- // manager.
+ // The user-defined name for this instance group manager policy.
Name *string `json:"name" validate:"required"`
+ // The date and time that the instance group manager policy was updated.
+ UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"`
+
// The type of metric to be evaluated.
MetricType *string `json:"metric_type" validate:"required"`
@@ -48812,6 +62604,10 @@ func (*InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy) isaInstanceGr
// UnmarshalInstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy unmarshals an instance of InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy from the specified map of raw messages.
func UnmarshalInstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy)
+ err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "href", &obj.Href)
if err != nil {
return
@@ -48824,6 +62620,10 @@ func UnmarshalInstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy(m map[s
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "metric_type", &obj.MetricType)
if err != nil {
return
@@ -48843,10 +62643,11 @@ func UnmarshalInstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy(m map[s
// InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype : InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype struct
// This model "extends" InstanceGroupManagerPrototype
type InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype struct {
- // If set to `true`, this manager will control the instance group.
+ // Indicates whether this manager will control the instance group.
ManagementEnabled *bool `json:"management_enabled,omitempty"`
- // The user-defined name for this instance group manager. Names must be unique within the instance group.
+ // The user-defined name for this instance group manager. Names must be unique within the instance group. If
+ // unspecified, the name will be a hyphenated list of randomly-selected words.
Name *string `json:"name,omitempty"`
// The time window in seconds to aggregate metrics prior to evaluation.
@@ -48872,12 +62673,12 @@ const (
)
// NewInstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype : Instantiate InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype (Generic Model Constructor)
-func (*VpcV1) NewInstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype(managerType string, maxMembershipCount int64) (model *InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype, err error) {
- model = &InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype{
+func (*VpcV1) NewInstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype(managerType string, maxMembershipCount int64) (_model *InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype, err error) {
+ _model = &InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype{
ManagerType: core.StringPtr(managerType),
MaxMembershipCount: core.Int64Ptr(maxMembershipCount),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -48920,6 +62721,250 @@ func UnmarshalInstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototyp
return
}
+// InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype : InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype struct
+// This model "extends" InstanceGroupManagerPrototype
+type InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype struct {
+ // Indicates whether this manager will control the instance group.
+ ManagementEnabled *bool `json:"management_enabled,omitempty"`
+
+ // The user-defined name for this instance group manager. Names must be unique within the instance group. If
+ // unspecified, the name will be a hyphenated list of randomly-selected words.
+ Name *string `json:"name,omitempty"`
+
+ // The type of instance group manager.
+ ManagerType *string `json:"manager_type" validate:"required"`
+}
+
+// Constants associated with the InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype.ManagerType property.
+// The type of instance group manager.
+const (
+ InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototypeManagerTypeScheduledConst = "scheduled"
+)
+
+// NewInstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype : Instantiate InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype (Generic Model Constructor)
+func (*VpcV1) NewInstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype(managerType string) (_model *InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype, err error) {
+ _model = &InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype{
+ ManagerType: core.StringPtr(managerType),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype) isaInstanceGroupManagerPrototype() bool {
+ return true
+}
+
+// UnmarshalInstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype unmarshals an instance of InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype)
+ err = core.UnmarshalPrimitive(m, "management_enabled", &obj.ManagementEnabled)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "manager_type", &obj.ManagerType)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerScheduled : InstanceGroupManagerScheduled struct
+// This model "extends" InstanceGroupManager
+type InstanceGroupManagerScheduled struct {
+ // The date and time that the instance group manager was created.
+ CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
+
+ // The URL for this instance group manager.
+ Href *string `json:"href" validate:"required"`
+
+ // The unique identifier for this instance group manager.
+ ID *string `json:"id" validate:"required"`
+
+ // Indicates whether this manager will control the instance group.
+ ManagementEnabled *bool `json:"management_enabled" validate:"required"`
+
+ // The user-defined name for this instance group manager.
+ Name *string `json:"name" validate:"required"`
+
+ // The date and time that the instance group manager was updated.
+ UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"`
+
+ // The actions of the instance group manager.
+ Actions []InstanceGroupManagerActionReference `json:"actions" validate:"required"`
+
+ // The type of instance group manager.
+ ManagerType *string `json:"manager_type" validate:"required"`
+}
+
+// Constants associated with the InstanceGroupManagerScheduled.ManagerType property.
+// The type of instance group manager.
+const (
+ InstanceGroupManagerScheduledManagerTypeScheduledConst = "scheduled"
+)
+
+func (*InstanceGroupManagerScheduled) isaInstanceGroupManager() bool {
+ return true
+}
+
+// UnmarshalInstanceGroupManagerScheduled unmarshals an instance of InstanceGroupManagerScheduled from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerScheduled(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerScheduled)
+ err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "management_enabled", &obj.ManagementEnabled)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "actions", &obj.Actions, UnmarshalInstanceGroupManagerActionReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "manager_type", &obj.ManagerType)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerScheduledActionManagerAutoScale : InstanceGroupManagerScheduledActionManagerAutoScale struct
+// This model "extends" InstanceGroupManagerScheduledActionManager
+type InstanceGroupManagerScheduledActionManagerAutoScale struct {
+ // If present, this property indicates the referenced resource has been deleted and provides
+ // some supplementary information.
+ Deleted *InstanceGroupManagerReferenceDeleted `json:"deleted,omitempty"`
+
+ // The URL for this instance group manager.
+ Href *string `json:"href" validate:"required"`
+
+ // The unique identifier for this instance group manager.
+ ID *string `json:"id" validate:"required"`
+
+ // The user-defined name for this instance group manager.
+ Name *string `json:"name" validate:"required"`
+
+ // The desired maximum number of instance group members at the scheduled time.
+ MaxMembershipCount *int64 `json:"max_membership_count,omitempty"`
+
+ // The desired minimum number of instance group members at the scheduled time.
+ MinMembershipCount *int64 `json:"min_membership_count,omitempty"`
+}
+
+func (*InstanceGroupManagerScheduledActionManagerAutoScale) isaInstanceGroupManagerScheduledActionManager() bool {
+ return true
+}
+
+// UnmarshalInstanceGroupManagerScheduledActionManagerAutoScale unmarshals an instance of InstanceGroupManagerScheduledActionManagerAutoScale from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerScheduledActionManagerAutoScale(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerScheduledActionManagerAutoScale)
+ err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceGroupManagerReferenceDeleted)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype : The auto scale manager to update, and one or more properties to be updated. Either `id` or `href` must be specified,
+// in addition to at least one of `min_membership_count` and
+// `max_membership_count`.
+// Models which "extend" this model:
+// - InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID
+// - InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref
+// This model "extends" InstanceGroupManagerScheduledActionManagerPrototype
+type InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype struct {
+ // The desired maximum number of instance group members at the scheduled time.
+ MaxMembershipCount *int64 `json:"max_membership_count,omitempty"`
+
+ // The desired minimum number of instance group members at the scheduled time.
+ MinMembershipCount *int64 `json:"min_membership_count,omitempty"`
+
+ // The unique identifier for this instance group manager.
+ ID *string `json:"id,omitempty"`
+
+ // The URL for this instance group manager.
+ Href *string `json:"href,omitempty"`
+}
+
+func (*InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype) isaInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype() bool {
+ return true
+}
+
+type InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeIntf interface {
+ InstanceGroupManagerScheduledActionManagerPrototypeIntf
+ isaInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype() bool
+}
+
+func (*InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype) isaInstanceGroupManagerScheduledActionManagerPrototype() bool {
+ return true
+}
+
+// UnmarshalInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype unmarshals an instance of InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype)
+ err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// InstancePatchProfileInstanceProfileIdentityByHref : InstancePatchProfileInstanceProfileIdentityByHref struct
// This model "extends" InstancePatchProfile
type InstancePatchProfileInstanceProfileIdentityByHref struct {
@@ -48928,11 +62973,11 @@ type InstancePatchProfileInstanceProfileIdentityByHref struct {
}
// NewInstancePatchProfileInstanceProfileIdentityByHref : Instantiate InstancePatchProfileInstanceProfileIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewInstancePatchProfileInstanceProfileIdentityByHref(href string) (model *InstancePatchProfileInstanceProfileIdentityByHref, err error) {
- model = &InstancePatchProfileInstanceProfileIdentityByHref{
+func (*VpcV1) NewInstancePatchProfileInstanceProfileIdentityByHref(href string) (_model *InstancePatchProfileInstanceProfileIdentityByHref, err error) {
+ _model = &InstancePatchProfileInstanceProfileIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -48959,11 +63004,11 @@ type InstancePatchProfileInstanceProfileIdentityByName struct {
}
// NewInstancePatchProfileInstanceProfileIdentityByName : Instantiate InstancePatchProfileInstanceProfileIdentityByName (Generic Model Constructor)
-func (*VpcV1) NewInstancePatchProfileInstanceProfileIdentityByName(name string) (model *InstancePatchProfileInstanceProfileIdentityByName, err error) {
- model = &InstancePatchProfileInstanceProfileIdentityByName{
+func (*VpcV1) NewInstancePatchProfileInstanceProfileIdentityByName(name string) (_model *InstancePatchProfileInstanceProfileIdentityByName, err error) {
+ _model = &InstancePatchProfileInstanceProfileIdentityByName{
Name: core.StringPtr(name),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -48982,8 +63027,445 @@ func UnmarshalInstancePatchProfileInstanceProfileIdentityByName(m map[string]jso
return
}
-// InstanceProfileBandwidthDependent : The total bandwidth shared across the network interfaces of an instance with this profile depends on its
-// configuration.
+// InstancePlacementTargetPatchDedicatedHostGroupIdentity : Identifies a dedicated host group by a unique property.
+// Models which "extend" this model:
+// - InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID
+// - InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN
+// - InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref
+// This model "extends" InstancePlacementTargetPatch
+type InstancePlacementTargetPatchDedicatedHostGroupIdentity struct {
+ // The unique identifier for this dedicated host group.
+ ID *string `json:"id,omitempty"`
+
+ // The CRN for this dedicated host group.
+ CRN *string `json:"crn,omitempty"`
+
+ // The URL for this dedicated host group.
+ Href *string `json:"href,omitempty"`
+}
+
+func (*InstancePlacementTargetPatchDedicatedHostGroupIdentity) isaInstancePlacementTargetPatchDedicatedHostGroupIdentity() bool {
+ return true
+}
+
+type InstancePlacementTargetPatchDedicatedHostGroupIdentityIntf interface {
+ InstancePlacementTargetPatchIntf
+ isaInstancePlacementTargetPatchDedicatedHostGroupIdentity() bool
+}
+
+func (*InstancePlacementTargetPatchDedicatedHostGroupIdentity) isaInstancePlacementTargetPatch() bool {
+ return true
+}
+
+// UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentity unmarshals an instance of InstancePlacementTargetPatchDedicatedHostGroupIdentity from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetPatchDedicatedHostGroupIdentity)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePlacementTargetPatchDedicatedHostIdentity : Identifies a dedicated host by a unique property.
+// Models which "extend" this model:
+// - InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID
+// - InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN
+// - InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref
+// This model "extends" InstancePlacementTargetPatch
+type InstancePlacementTargetPatchDedicatedHostIdentity struct {
+ // The unique identifier for this dedicated host.
+ ID *string `json:"id,omitempty"`
+
+ // The CRN for this dedicated host.
+ CRN *string `json:"crn,omitempty"`
+
+ // The URL for this dedicated host.
+ Href *string `json:"href,omitempty"`
+}
+
+func (*InstancePlacementTargetPatchDedicatedHostIdentity) isaInstancePlacementTargetPatchDedicatedHostIdentity() bool {
+ return true
+}
+
+type InstancePlacementTargetPatchDedicatedHostIdentityIntf interface {
+ InstancePlacementTargetPatchIntf
+ isaInstancePlacementTargetPatchDedicatedHostIdentity() bool
+}
+
+func (*InstancePlacementTargetPatchDedicatedHostIdentity) isaInstancePlacementTargetPatch() bool {
+ return true
+}
+
+// UnmarshalInstancePlacementTargetPatchDedicatedHostIdentity unmarshals an instance of InstancePlacementTargetPatchDedicatedHostIdentity from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetPatchDedicatedHostIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetPatchDedicatedHostIdentity)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePlacementTargetPrototypeDedicatedHostGroupIdentity : Identifies a dedicated host group by a unique property.
+// Models which "extend" this model:
+// - InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID
+// - InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN
+// - InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref
+// This model "extends" InstancePlacementTargetPrototype
+type InstancePlacementTargetPrototypeDedicatedHostGroupIdentity struct {
+ // The unique identifier for this dedicated host group.
+ ID *string `json:"id,omitempty"`
+
+ // The CRN for this dedicated host group.
+ CRN *string `json:"crn,omitempty"`
+
+ // The URL for this dedicated host group.
+ Href *string `json:"href,omitempty"`
+}
+
+func (*InstancePlacementTargetPrototypeDedicatedHostGroupIdentity) isaInstancePlacementTargetPrototypeDedicatedHostGroupIdentity() bool {
+ return true
+}
+
+type InstancePlacementTargetPrototypeDedicatedHostGroupIdentityIntf interface {
+ InstancePlacementTargetPrototypeIntf
+ isaInstancePlacementTargetPrototypeDedicatedHostGroupIdentity() bool
+}
+
+func (*InstancePlacementTargetPrototypeDedicatedHostGroupIdentity) isaInstancePlacementTargetPrototype() bool {
+ return true
+}
+
+// UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentity unmarshals an instance of InstancePlacementTargetPrototypeDedicatedHostGroupIdentity from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetPrototypeDedicatedHostGroupIdentity)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePlacementTargetPrototypeDedicatedHostIdentity : Identifies a dedicated host by a unique property.
+// Models which "extend" this model:
+// - InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID
+// - InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN
+// - InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref
+// This model "extends" InstancePlacementTargetPrototype
+type InstancePlacementTargetPrototypeDedicatedHostIdentity struct {
+ // The unique identifier for this dedicated host.
+ ID *string `json:"id,omitempty"`
+
+ // The CRN for this dedicated host.
+ CRN *string `json:"crn,omitempty"`
+
+ // The URL for this dedicated host.
+ Href *string `json:"href,omitempty"`
+}
+
+func (*InstancePlacementTargetPrototypeDedicatedHostIdentity) isaInstancePlacementTargetPrototypeDedicatedHostIdentity() bool {
+ return true
+}
+
+type InstancePlacementTargetPrototypeDedicatedHostIdentityIntf interface {
+ InstancePlacementTargetPrototypeIntf
+ isaInstancePlacementTargetPrototypeDedicatedHostIdentity() bool
+}
+
+func (*InstancePlacementTargetPrototypeDedicatedHostIdentity) isaInstancePlacementTargetPrototype() bool {
+ return true
+}
+
+// UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentity unmarshals an instance of InstancePlacementTargetPrototypeDedicatedHostIdentity from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetPrototypeDedicatedHostIdentity)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePlacementTargetPrototypePlacementGroupIdentity : Identifies a placement group by a unique property.
+// Models which "extend" this model:
+// - InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID
+// - InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN
+// - InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref
+// This model "extends" InstancePlacementTargetPrototype
+type InstancePlacementTargetPrototypePlacementGroupIdentity struct {
+ // The unique identifier for this placement group.
+ ID *string `json:"id,omitempty"`
+
+ // The CRN for this placement group.
+ CRN *string `json:"crn,omitempty"`
+
+ // The URL for this placement group.
+ Href *string `json:"href,omitempty"`
+}
+
+func (*InstancePlacementTargetPrototypePlacementGroupIdentity) isaInstancePlacementTargetPrototypePlacementGroupIdentity() bool {
+ return true
+}
+
+type InstancePlacementTargetPrototypePlacementGroupIdentityIntf interface {
+ InstancePlacementTargetPrototypeIntf
+ isaInstancePlacementTargetPrototypePlacementGroupIdentity() bool
+}
+
+func (*InstancePlacementTargetPrototypePlacementGroupIdentity) isaInstancePlacementTargetPrototype() bool {
+ return true
+}
+
+// UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentity unmarshals an instance of InstancePlacementTargetPrototypePlacementGroupIdentity from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetPrototypePlacementGroupIdentity)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePlacementTargetDedicatedHostGroupReference : InstancePlacementTargetDedicatedHostGroupReference struct
+// This model "extends" InstancePlacementTarget
+type InstancePlacementTargetDedicatedHostGroupReference struct {
+ // The CRN for this dedicated host group.
+ CRN *string `json:"crn" validate:"required"`
+
+ // If present, this property indicates the referenced resource has been deleted and provides
+ // some supplementary information.
+ Deleted *DedicatedHostGroupReferenceDeleted `json:"deleted,omitempty"`
+
+ // The URL for this dedicated host group.
+ Href *string `json:"href" validate:"required"`
+
+ // The unique identifier for this dedicated host group.
+ ID *string `json:"id" validate:"required"`
+
+ // The unique user-defined name for this dedicated host group.
+ Name *string `json:"name" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+}
+
+// Constants associated with the InstancePlacementTargetDedicatedHostGroupReference.ResourceType property.
+// The resource type.
+const (
+ InstancePlacementTargetDedicatedHostGroupReferenceResourceTypeDedicatedHostGroupConst = "dedicated_host_group"
+)
+
+func (*InstancePlacementTargetDedicatedHostGroupReference) isaInstancePlacementTarget() bool {
+ return true
+}
+
+// UnmarshalInstancePlacementTargetDedicatedHostGroupReference unmarshals an instance of InstancePlacementTargetDedicatedHostGroupReference from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetDedicatedHostGroupReference(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetDedicatedHostGroupReference)
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalDedicatedHostGroupReferenceDeleted)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePlacementTargetDedicatedHostReference : InstancePlacementTargetDedicatedHostReference struct
+// This model "extends" InstancePlacementTarget
+type InstancePlacementTargetDedicatedHostReference struct {
+ // The CRN for this dedicated host.
+ CRN *string `json:"crn" validate:"required"`
+
+ // If present, this property indicates the referenced resource has been deleted and provides
+ // some supplementary information.
+ Deleted *DedicatedHostReferenceDeleted `json:"deleted,omitempty"`
+
+ // The URL for this dedicated host.
+ Href *string `json:"href" validate:"required"`
+
+ // The unique identifier for this dedicated host.
+ ID *string `json:"id" validate:"required"`
+
+ // The unique user-defined name for this dedicated host.
+ Name *string `json:"name" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+}
+
+// Constants associated with the InstancePlacementTargetDedicatedHostReference.ResourceType property.
+// The resource type.
+const (
+ InstancePlacementTargetDedicatedHostReferenceResourceTypeDedicatedHostConst = "dedicated_host"
+)
+
+func (*InstancePlacementTargetDedicatedHostReference) isaInstancePlacementTarget() bool {
+ return true
+}
+
+// UnmarshalInstancePlacementTargetDedicatedHostReference unmarshals an instance of InstancePlacementTargetDedicatedHostReference from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetDedicatedHostReference(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetDedicatedHostReference)
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalDedicatedHostReferenceDeleted)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePlacementTargetPlacementGroupReference : InstancePlacementTargetPlacementGroupReference struct
+// This model "extends" InstancePlacementTarget
+type InstancePlacementTargetPlacementGroupReference struct {
+ // The CRN for this placement group.
+ CRN *string `json:"crn" validate:"required"`
+
+ // If present, this property indicates the referenced resource has been deleted and provides
+ // some supplementary information.
+ Deleted *PlacementGroupReferenceDeleted `json:"deleted,omitempty"`
+
+ // The URL for this placement group.
+ Href *string `json:"href" validate:"required"`
+
+ // The unique identifier for this placement group.
+ ID *string `json:"id" validate:"required"`
+
+ // The user-defined name for this placement group.
+ Name *string `json:"name" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+}
+
+// Constants associated with the InstancePlacementTargetPlacementGroupReference.ResourceType property.
+// The resource type.
+const (
+ InstancePlacementTargetPlacementGroupReferenceResourceTypePlacementGroupConst = "placement_group"
+)
+
+func (*InstancePlacementTargetPlacementGroupReference) isaInstancePlacementTarget() bool {
+ return true
+}
+
+// UnmarshalInstancePlacementTargetPlacementGroupReference unmarshals an instance of InstancePlacementTargetPlacementGroupReference from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetPlacementGroupReference(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetPlacementGroupReference)
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalPlacementGroupReferenceDeleted)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceProfileBandwidthDependent : The total bandwidth shared across the network interfaces and storage volumes of an instance with this profile depends
+// on its configuration.
// This model "extends" InstanceProfileBandwidth
type InstanceProfileBandwidthDependent struct {
// The type for this profile field.
@@ -49011,8 +63493,8 @@ func UnmarshalInstanceProfileBandwidthDependent(m map[string]json.RawMessage, re
return
}
-// InstanceProfileBandwidthEnum : The permitted total bandwidth values (in megabits per second) shared across the network interfaces of an instance
-// with this profile.
+// InstanceProfileBandwidthEnum : The permitted total bandwidth values (in megabits per second) shared across the network interfaces and storage
+// volumes of an instance with this profile.
// This model "extends" InstanceProfileBandwidth
type InstanceProfileBandwidthEnum struct {
// The default value for this profile field.
@@ -49054,7 +63536,8 @@ func UnmarshalInstanceProfileBandwidthEnum(m map[string]json.RawMessage, result
return
}
-// InstanceProfileBandwidthFixed : The total bandwidth (in megabits per second) shared across the network interfaces of an instance with this profile.
+// InstanceProfileBandwidthFixed : The total bandwidth (in megabits per second) shared across the network interfaces and storage volumes of an instance
+// with this profile.
// This model "extends" InstanceProfileBandwidth
type InstanceProfileBandwidthFixed struct {
// The type for this profile field.
@@ -49089,8 +63572,8 @@ func UnmarshalInstanceProfileBandwidthFixed(m map[string]json.RawMessage, result
return
}
-// InstanceProfileBandwidthRange : The permitted total bandwidth range (in megabits per second) shared across the network interfaces of an instance with
-// this profile.
+// InstanceProfileBandwidthRange : The permitted total bandwidth range (in megabits per second) shared across the network interfaces and storage volumes
+// of an instance with this profile.
// This model "extends" InstanceProfileBandwidth
type InstanceProfileBandwidthRange struct {
// The default value for this profile field.
@@ -49469,6 +63952,328 @@ func UnmarshalInstanceProfileDiskSizeRange(m map[string]json.RawMessage, result
return
}
+// InstanceProfileGpuDependent : The GPU count for an instance with this profile depends on its configuration.
+// This model "extends" InstanceProfileGpu
+type InstanceProfileGpuDependent struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+}
+
+// Constants associated with the InstanceProfileGpuDependent.Type property.
+// The type for this profile field.
+const (
+ InstanceProfileGpuDependentTypeDependentConst = "dependent"
+)
+
+func (*InstanceProfileGpuDependent) isaInstanceProfileGpu() bool {
+ return true
+}
+
+// UnmarshalInstanceProfileGpuDependent unmarshals an instance of InstanceProfileGpuDependent from the specified map of raw messages.
+func UnmarshalInstanceProfileGpuDependent(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceProfileGpuDependent)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceProfileGpuEnum : The permitted GPU count values for an instance with this profile.
+// This model "extends" InstanceProfileGpu
+type InstanceProfileGpuEnum struct {
+ // The default value for this profile field.
+ Default *int64 `json:"default" validate:"required"`
+
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The permitted values for this profile field.
+ Values []int64 `json:"values" validate:"required"`
+}
+
+// Constants associated with the InstanceProfileGpuEnum.Type property.
+// The type for this profile field.
+const (
+ InstanceProfileGpuEnumTypeEnumConst = "enum"
+)
+
+func (*InstanceProfileGpuEnum) isaInstanceProfileGpu() bool {
+ return true
+}
+
+// UnmarshalInstanceProfileGpuEnum unmarshals an instance of InstanceProfileGpuEnum from the specified map of raw messages.
+func UnmarshalInstanceProfileGpuEnum(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceProfileGpuEnum)
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "values", &obj.Values)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceProfileGpuFixed : The GPU count for an instance with this profile.
+// This model "extends" InstanceProfileGpu
+type InstanceProfileGpuFixed struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The value for this profile field.
+ Value *int64 `json:"value" validate:"required"`
+}
+
+// Constants associated with the InstanceProfileGpuFixed.Type property.
+// The type for this profile field.
+const (
+ InstanceProfileGpuFixedTypeFixedConst = "fixed"
+)
+
+func (*InstanceProfileGpuFixed) isaInstanceProfileGpu() bool {
+ return true
+}
+
+// UnmarshalInstanceProfileGpuFixed unmarshals an instance of InstanceProfileGpuFixed from the specified map of raw messages.
+func UnmarshalInstanceProfileGpuFixed(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceProfileGpuFixed)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "value", &obj.Value)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceProfileGpuMemoryDependent : The overall GPU memory value for an instance with this profile depends on its configuration.
+// This model "extends" InstanceProfileGpuMemory
+type InstanceProfileGpuMemoryDependent struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+}
+
+// Constants associated with the InstanceProfileGpuMemoryDependent.Type property.
+// The type for this profile field.
+const (
+ InstanceProfileGpuMemoryDependentTypeDependentConst = "dependent"
+)
+
+func (*InstanceProfileGpuMemoryDependent) isaInstanceProfileGpuMemory() bool {
+ return true
+}
+
+// UnmarshalInstanceProfileGpuMemoryDependent unmarshals an instance of InstanceProfileGpuMemoryDependent from the specified map of raw messages.
+func UnmarshalInstanceProfileGpuMemoryDependent(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceProfileGpuMemoryDependent)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceProfileGpuMemoryEnum : The permitted overall GPU memory values in GiB (gibibytes) for an instance with this profile.
+// This model "extends" InstanceProfileGpuMemory
+type InstanceProfileGpuMemoryEnum struct {
+ // The default value for this profile field.
+ Default *int64 `json:"default" validate:"required"`
+
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The permitted values for this profile field.
+ Values []int64 `json:"values" validate:"required"`
+}
+
+// Constants associated with the InstanceProfileGpuMemoryEnum.Type property.
+// The type for this profile field.
+const (
+ InstanceProfileGpuMemoryEnumTypeEnumConst = "enum"
+)
+
+func (*InstanceProfileGpuMemoryEnum) isaInstanceProfileGpuMemory() bool {
+ return true
+}
+
+// UnmarshalInstanceProfileGpuMemoryEnum unmarshals an instance of InstanceProfileGpuMemoryEnum from the specified map of raw messages.
+func UnmarshalInstanceProfileGpuMemoryEnum(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceProfileGpuMemoryEnum)
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "values", &obj.Values)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceProfileGpuMemoryFixed : The overall GPU memory in GiB (gibibytes) for an instance with this profile.
+// This model "extends" InstanceProfileGpuMemory
+type InstanceProfileGpuMemoryFixed struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The value for this profile field.
+ Value *int64 `json:"value" validate:"required"`
+}
+
+// Constants associated with the InstanceProfileGpuMemoryFixed.Type property.
+// The type for this profile field.
+const (
+ InstanceProfileGpuMemoryFixedTypeFixedConst = "fixed"
+)
+
+func (*InstanceProfileGpuMemoryFixed) isaInstanceProfileGpuMemory() bool {
+ return true
+}
+
+// UnmarshalInstanceProfileGpuMemoryFixed unmarshals an instance of InstanceProfileGpuMemoryFixed from the specified map of raw messages.
+func UnmarshalInstanceProfileGpuMemoryFixed(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceProfileGpuMemoryFixed)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "value", &obj.Value)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceProfileGpuMemoryRange : The permitted overall GPU memory range in GiB (gibibytes) for an instance with this profile.
+// This model "extends" InstanceProfileGpuMemory
+type InstanceProfileGpuMemoryRange struct {
+ // The default value for this profile field.
+ Default *int64 `json:"default" validate:"required"`
+
+ // The maximum value for this profile field.
+ Max *int64 `json:"max" validate:"required"`
+
+ // The minimum value for this profile field.
+ Min *int64 `json:"min" validate:"required"`
+
+ // The increment step value for this profile field.
+ Step *int64 `json:"step" validate:"required"`
+
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+}
+
+// Constants associated with the InstanceProfileGpuMemoryRange.Type property.
+// The type for this profile field.
+const (
+ InstanceProfileGpuMemoryRangeTypeRangeConst = "range"
+)
+
+func (*InstanceProfileGpuMemoryRange) isaInstanceProfileGpuMemory() bool {
+ return true
+}
+
+// UnmarshalInstanceProfileGpuMemoryRange unmarshals an instance of InstanceProfileGpuMemoryRange from the specified map of raw messages.
+func UnmarshalInstanceProfileGpuMemoryRange(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceProfileGpuMemoryRange)
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "max", &obj.Max)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min", &obj.Min)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "step", &obj.Step)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceProfileGpuRange : The permitted GPU count range for an instance with this profile.
+// This model "extends" InstanceProfileGpu
+type InstanceProfileGpuRange struct {
+ // The default value for this profile field.
+ Default *int64 `json:"default" validate:"required"`
+
+ // The maximum value for this profile field.
+ Max *int64 `json:"max" validate:"required"`
+
+ // The minimum value for this profile field.
+ Min *int64 `json:"min" validate:"required"`
+
+ // The increment step value for this profile field.
+ Step *int64 `json:"step" validate:"required"`
+
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+}
+
+// Constants associated with the InstanceProfileGpuRange.Type property.
+// The type for this profile field.
+const (
+ InstanceProfileGpuRangeTypeRangeConst = "range"
+)
+
+func (*InstanceProfileGpuRange) isaInstanceProfileGpu() bool {
+ return true
+}
+
+// UnmarshalInstanceProfileGpuRange unmarshals an instance of InstanceProfileGpuRange from the specified map of raw messages.
+func UnmarshalInstanceProfileGpuRange(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceProfileGpuRange)
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "max", &obj.Max)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min", &obj.Min)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "step", &obj.Step)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// InstanceProfileIdentityByHref : InstanceProfileIdentityByHref struct
// This model "extends" InstanceProfileIdentity
type InstanceProfileIdentityByHref struct {
@@ -49477,11 +64282,11 @@ type InstanceProfileIdentityByHref struct {
}
// NewInstanceProfileIdentityByHref : Instantiate InstanceProfileIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewInstanceProfileIdentityByHref(href string) (model *InstanceProfileIdentityByHref, err error) {
- model = &InstanceProfileIdentityByHref{
+func (*VpcV1) NewInstanceProfileIdentityByHref(href string) (_model *InstanceProfileIdentityByHref, err error) {
+ _model = &InstanceProfileIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -49508,11 +64313,11 @@ type InstanceProfileIdentityByName struct {
}
// NewInstanceProfileIdentityByName : Instantiate InstanceProfileIdentityByName (Generic Model Constructor)
-func (*VpcV1) NewInstanceProfileIdentityByName(name string) (model *InstanceProfileIdentityByName, err error) {
- model = &InstanceProfileIdentityByName{
+func (*VpcV1) NewInstanceProfileIdentityByName(name string) (_model *InstanceProfileIdentityByName, err error) {
+ _model = &InstanceProfileIdentityByName{
Name: core.StringPtr(name),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -49916,43 +64721,232 @@ func UnmarshalInstanceProfileVcpuRange(m map[string]json.RawMessage, result inte
return
}
+// InstanceProfileVolumeBandwidthDependent : The storage bandwidth shared across the storage volumes of an instance with this profile depends on its
+// configuration.
+// This model "extends" InstanceProfileVolumeBandwidth
+type InstanceProfileVolumeBandwidthDependent struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+}
+
+// Constants associated with the InstanceProfileVolumeBandwidthDependent.Type property.
+// The type for this profile field.
+const (
+ InstanceProfileVolumeBandwidthDependentTypeDependentConst = "dependent"
+)
+
+func (*InstanceProfileVolumeBandwidthDependent) isaInstanceProfileVolumeBandwidth() bool {
+ return true
+}
+
+// UnmarshalInstanceProfileVolumeBandwidthDependent unmarshals an instance of InstanceProfileVolumeBandwidthDependent from the specified map of raw messages.
+func UnmarshalInstanceProfileVolumeBandwidthDependent(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceProfileVolumeBandwidthDependent)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceProfileVolumeBandwidthEnum : The permitted storage bandwidth values (in megabits per second) shared across the storage volumes of an instance with
+// this profile.
+// This model "extends" InstanceProfileVolumeBandwidth
+type InstanceProfileVolumeBandwidthEnum struct {
+ // The default value for this profile field.
+ Default *int64 `json:"default" validate:"required"`
+
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The permitted values for this profile field.
+ Values []int64 `json:"values" validate:"required"`
+}
+
+// Constants associated with the InstanceProfileVolumeBandwidthEnum.Type property.
+// The type for this profile field.
+const (
+ InstanceProfileVolumeBandwidthEnumTypeEnumConst = "enum"
+)
+
+func (*InstanceProfileVolumeBandwidthEnum) isaInstanceProfileVolumeBandwidth() bool {
+ return true
+}
+
+// UnmarshalInstanceProfileVolumeBandwidthEnum unmarshals an instance of InstanceProfileVolumeBandwidthEnum from the specified map of raw messages.
+func UnmarshalInstanceProfileVolumeBandwidthEnum(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceProfileVolumeBandwidthEnum)
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "values", &obj.Values)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceProfileVolumeBandwidthFixed : The storage bandwidth (in megabits per second) shared across the storage volumes of an instance with this profile.
+// This model "extends" InstanceProfileVolumeBandwidth
+type InstanceProfileVolumeBandwidthFixed struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The value for this profile field.
+ Value *int64 `json:"value" validate:"required"`
+}
+
+// Constants associated with the InstanceProfileVolumeBandwidthFixed.Type property.
+// The type for this profile field.
+const (
+ InstanceProfileVolumeBandwidthFixedTypeFixedConst = "fixed"
+)
+
+func (*InstanceProfileVolumeBandwidthFixed) isaInstanceProfileVolumeBandwidth() bool {
+ return true
+}
+
+// UnmarshalInstanceProfileVolumeBandwidthFixed unmarshals an instance of InstanceProfileVolumeBandwidthFixed from the specified map of raw messages.
+func UnmarshalInstanceProfileVolumeBandwidthFixed(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceProfileVolumeBandwidthFixed)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "value", &obj.Value)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceProfileVolumeBandwidthRange : The permitted storage bandwidth range (in megabits per second) shared across the storage volumes of an instance with
+// this profile.
+// This model "extends" InstanceProfileVolumeBandwidth
+type InstanceProfileVolumeBandwidthRange struct {
+ // The default value for this profile field.
+ Default *int64 `json:"default" validate:"required"`
+
+ // The maximum value for this profile field.
+ Max *int64 `json:"max" validate:"required"`
+
+ // The minimum value for this profile field.
+ Min *int64 `json:"min" validate:"required"`
+
+ // The increment step value for this profile field.
+ Step *int64 `json:"step" validate:"required"`
+
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+}
+
+// Constants associated with the InstanceProfileVolumeBandwidthRange.Type property.
+// The type for this profile field.
+const (
+ InstanceProfileVolumeBandwidthRangeTypeRangeConst = "range"
+)
+
+func (*InstanceProfileVolumeBandwidthRange) isaInstanceProfileVolumeBandwidth() bool {
+ return true
+}
+
+// UnmarshalInstanceProfileVolumeBandwidthRange unmarshals an instance of InstanceProfileVolumeBandwidthRange from the specified map of raw messages.
+func UnmarshalInstanceProfileVolumeBandwidthRange(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceProfileVolumeBandwidthRange)
+ err = core.UnmarshalPrimitive(m, "default", &obj.Default)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "max", &obj.Max)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min", &obj.Min)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "step", &obj.Step)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// InstancePrototypeInstanceByImage : InstancePrototypeInstanceByImage struct
// This model "extends" InstancePrototype
type InstancePrototypeInstanceByImage struct {
- // The public SSH keys for the administrative user of the virtual server instance. Up to 10 keys may be provided; if no
- // keys are provided the instance will be inaccessible unless the image used provides another means of access. For
- // Windows instances, one of the keys will be used to encrypt the administrator password.
+ // The availability policy to use for this virtual server instance.
+ AvailabilityPolicy *InstanceAvailabilityPrototype `json:"availability_policy,omitempty"`
+
+ // The default trusted profile configuration to use for this virtual server instance This property's value is used
+ // when provisioning the virtual server instance, but not subsequently managed. Accordingly, it is reflected as an
+ // [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property.
+ DefaultTrustedProfile *InstanceDefaultTrustedProfilePrototype `json:"default_trusted_profile,omitempty"`
+
+ // The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the
+ // virtual server instance as cloud-init vendor data. For cloud-init enabled images, these keys will also be added as
+ // SSH authorized keys for the administrative user.
//
- // Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled images,
- // these keys will also be added as SSH authorized keys for the administrative user.
+ // For Windows images, at least one key must be specified, and one will be chosen to encrypt [the administrator
+ // password](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization). Keys are optional for other images, but if
+ // no keys are specified, the instance will be inaccessible unless the specified image provides another means of
+ // access.
+ //
+ // This property's value is used when provisioning the virtual server instance, but not subsequently managed.
+ // Accordingly, it is reflected as an [instance
+ // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property.
Keys []KeyIdentityIntf `json:"keys,omitempty"`
+ MetadataService *InstanceMetadataServicePrototype `json:"metadata_service,omitempty"`
+
// The unique user-defined name for this virtual server instance (and default system hostname). If unspecified, the
// name will be a hyphenated list of randomly-selected words.
Name *string `json:"name,omitempty"`
- // Collection of additional network interfaces to create for the virtual server instance.
+ // The additional network interfaces to create for the virtual server instance.
NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"`
- // The profile to use for this virtual server instance.
+ // The placement restrictions to use for the virtual server instance.
+ PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"`
+
+ // The profile to use for this virtual server instance. If unspecified, `bx2-2x8` will be used, but this default value
+ // is expected to change in the future.
Profile InstanceProfileIdentityIntf `json:"profile,omitempty"`
ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
+ // The amount of bandwidth (in megabits per second) allocated exclusively to instance storage volumes. An increase in
+ // this value will result in a corresponding decrease to
+ // `total_network_bandwidth`.
+ TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth,omitempty"`
+
// User data to be made available when setting up the virtual server instance.
UserData *string `json:"user_data,omitempty"`
- // Collection of volume attachments.
+ // The volume attachments for this virtual server instance.
VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"`
- // The VPC the virtual server instance is to be a part of. If provided, must match the VPC tied to the subnets of the
- // instance's network interfaces.
+ // The VPC the virtual server instance is to be a part of. If specified, it must match the VPC referenced by the
+ // subnets of the instance's network interfaces.
VPC VPCIdentityIntf `json:"vpc,omitempty"`
// The boot volume attachment for the virtual server instance.
BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"`
- // The identity of the image to use when provisioning the virtual server instance.
+ // The image to use when provisioning the virtual server instance.
Image ImageIdentityIntf `json:"image" validate:"required"`
// Primary network interface.
@@ -49963,13 +64957,13 @@ type InstancePrototypeInstanceByImage struct {
}
// NewInstancePrototypeInstanceByImage : Instantiate InstancePrototypeInstanceByImage (Generic Model Constructor)
-func (*VpcV1) NewInstancePrototypeInstanceByImage(image ImageIdentityIntf, primaryNetworkInterface *NetworkInterfacePrototype, zone ZoneIdentityIntf) (model *InstancePrototypeInstanceByImage, err error) {
- model = &InstancePrototypeInstanceByImage{
+func (*VpcV1) NewInstancePrototypeInstanceByImage(image ImageIdentityIntf, primaryNetworkInterface *NetworkInterfacePrototype, zone ZoneIdentityIntf) (_model *InstancePrototypeInstanceByImage, err error) {
+ _model = &InstancePrototypeInstanceByImage{
Image: image,
PrimaryNetworkInterface: primaryNetworkInterface,
Zone: zone,
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -49980,10 +64974,22 @@ func (*InstancePrototypeInstanceByImage) isaInstancePrototype() bool {
// UnmarshalInstancePrototypeInstanceByImage unmarshals an instance of InstancePrototypeInstanceByImage from the specified map of raw messages.
func UnmarshalInstancePrototypeInstanceByImage(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(InstancePrototypeInstanceByImage)
+ err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPrototype)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity)
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "name", &obj.Name)
if err != nil {
return
@@ -49992,6 +64998,10 @@ func UnmarshalInstancePrototypeInstanceByImage(m map[string]json.RawMessage, res
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity)
if err != nil {
return
@@ -50000,6 +65010,10 @@ func UnmarshalInstancePrototypeInstanceByImage(m map[string]json.RawMessage, res
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData)
if err != nil {
return
@@ -50032,75 +65046,108 @@ func UnmarshalInstancePrototypeInstanceByImage(m map[string]json.RawMessage, res
return
}
-// InstancePrototypeInstanceBySourceTemplate : InstancePrototypeInstanceBySourceTemplate struct
+// InstancePrototypeInstanceBySourceSnapshot : InstancePrototypeInstanceBySourceSnapshot struct
// This model "extends" InstancePrototype
-type InstancePrototypeInstanceBySourceTemplate struct {
- // The public SSH keys for the administrative user of the virtual server instance. Up to 10 keys may be provided; if no
- // keys are provided the instance will be inaccessible unless the image used provides another means of access. For
- // Windows instances, one of the keys will be used to encrypt the administrator password.
+type InstancePrototypeInstanceBySourceSnapshot struct {
+ // The availability policy to use for this virtual server instance.
+ AvailabilityPolicy *InstanceAvailabilityPrototype `json:"availability_policy,omitempty"`
+
+ // The default trusted profile configuration to use for this virtual server instance This property's value is used
+ // when provisioning the virtual server instance, but not subsequently managed. Accordingly, it is reflected as an
+ // [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property.
+ DefaultTrustedProfile *InstanceDefaultTrustedProfilePrototype `json:"default_trusted_profile,omitempty"`
+
+ // The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the
+ // virtual server instance as cloud-init vendor data. For cloud-init enabled images, these keys will also be added as
+ // SSH authorized keys for the administrative user.
//
- // Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled images,
- // these keys will also be added as SSH authorized keys for the administrative user.
+ // For Windows images, at least one key must be specified, and one will be chosen to encrypt [the administrator
+ // password](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization). Keys are optional for other images, but if
+ // no keys are specified, the instance will be inaccessible unless the specified image provides another means of
+ // access.
+ //
+ // This property's value is used when provisioning the virtual server instance, but not subsequently managed.
+ // Accordingly, it is reflected as an [instance
+ // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property.
Keys []KeyIdentityIntf `json:"keys,omitempty"`
+ MetadataService *InstanceMetadataServicePrototype `json:"metadata_service,omitempty"`
+
// The unique user-defined name for this virtual server instance (and default system hostname). If unspecified, the
// name will be a hyphenated list of randomly-selected words.
Name *string `json:"name,omitempty"`
- // Collection of additional network interfaces to create for the virtual server instance.
+ // The additional network interfaces to create for the virtual server instance.
NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"`
- // The profile to use for this virtual server instance.
+ // The placement restrictions to use for the virtual server instance.
+ PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"`
+
+ // The profile to use for this virtual server instance. If unspecified, `bx2-2x8` will be used, but this default value
+ // is expected to change in the future.
Profile InstanceProfileIdentityIntf `json:"profile,omitempty"`
ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
+ // The amount of bandwidth (in megabits per second) allocated exclusively to instance storage volumes. An increase in
+ // this value will result in a corresponding decrease to
+ // `total_network_bandwidth`.
+ TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth,omitempty"`
+
// User data to be made available when setting up the virtual server instance.
UserData *string `json:"user_data,omitempty"`
- // Collection of volume attachments.
+ // The volume attachments for this virtual server instance.
VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"`
- // The VPC the virtual server instance is to be a part of. If provided, must match the VPC tied to the subnets of the
- // instance's network interfaces.
+ // The VPC the virtual server instance is to be a part of. If specified, it must match the VPC referenced by the
+ // subnets of the instance's network interfaces.
VPC VPCIdentityIntf `json:"vpc,omitempty"`
// The boot volume attachment for the virtual server instance.
- BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"`
-
- // The identity of the image to use when provisioning the virtual server instance.
- Image ImageIdentityIntf `json:"image,omitempty"`
+ BootVolumeAttachment *VolumeAttachmentPrototypeInstanceBySourceSnapshotContext `json:"boot_volume_attachment" validate:"required"`
// Primary network interface.
- PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface,omitempty"`
-
- // Identifies an instance template by a unique property.
- SourceTemplate InstanceTemplateIdentityIntf `json:"source_template" validate:"required"`
+ PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface" validate:"required"`
// The zone this virtual server instance will reside in.
- Zone ZoneIdentityIntf `json:"zone,omitempty"`
+ Zone ZoneIdentityIntf `json:"zone" validate:"required"`
}
-// NewInstancePrototypeInstanceBySourceTemplate : Instantiate InstancePrototypeInstanceBySourceTemplate (Generic Model Constructor)
-func (*VpcV1) NewInstancePrototypeInstanceBySourceTemplate(sourceTemplate InstanceTemplateIdentityIntf) (model *InstancePrototypeInstanceBySourceTemplate, err error) {
- model = &InstancePrototypeInstanceBySourceTemplate{
- SourceTemplate: sourceTemplate,
+// NewInstancePrototypeInstanceBySourceSnapshot : Instantiate InstancePrototypeInstanceBySourceSnapshot (Generic Model Constructor)
+func (*VpcV1) NewInstancePrototypeInstanceBySourceSnapshot(bootVolumeAttachment *VolumeAttachmentPrototypeInstanceBySourceSnapshotContext, primaryNetworkInterface *NetworkInterfacePrototype, zone ZoneIdentityIntf) (_model *InstancePrototypeInstanceBySourceSnapshot, err error) {
+ _model = &InstancePrototypeInstanceBySourceSnapshot{
+ BootVolumeAttachment: bootVolumeAttachment,
+ PrimaryNetworkInterface: primaryNetworkInterface,
+ Zone: zone,
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
-func (*InstancePrototypeInstanceBySourceTemplate) isaInstancePrototype() bool {
+func (*InstancePrototypeInstanceBySourceSnapshot) isaInstancePrototype() bool {
return true
}
-// UnmarshalInstancePrototypeInstanceBySourceTemplate unmarshals an instance of InstancePrototypeInstanceBySourceTemplate from the specified map of raw messages.
-func UnmarshalInstancePrototypeInstanceBySourceTemplate(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(InstancePrototypeInstanceBySourceTemplate)
+// UnmarshalInstancePrototypeInstanceBySourceSnapshot unmarshals an instance of InstancePrototypeInstanceBySourceSnapshot from the specified map of raw messages.
+func UnmarshalInstancePrototypeInstanceBySourceSnapshot(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePrototypeInstanceBySourceSnapshot)
+ err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPrototype)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity)
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "name", &obj.Name)
if err != nil {
return
@@ -50109,6 +65156,10 @@ func UnmarshalInstancePrototypeInstanceBySourceTemplate(m map[string]json.RawMes
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity)
if err != nil {
return
@@ -50117,6 +65168,168 @@ func UnmarshalInstancePrototypeInstanceBySourceTemplate(m map[string]json.RawMes
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototypeInstanceContext)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceBySourceSnapshotContext)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePrototypeInstanceBySourceTemplate : InstancePrototypeInstanceBySourceTemplate struct
+// This model "extends" InstancePrototype
+type InstancePrototypeInstanceBySourceTemplate struct {
+ // The availability policy to use for this virtual server instance.
+ AvailabilityPolicy *InstanceAvailabilityPrototype `json:"availability_policy,omitempty"`
+
+ // The default trusted profile configuration to use for this virtual server instance This property's value is used
+ // when provisioning the virtual server instance, but not subsequently managed. Accordingly, it is reflected as an
+ // [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property.
+ DefaultTrustedProfile *InstanceDefaultTrustedProfilePrototype `json:"default_trusted_profile,omitempty"`
+
+ // The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the
+ // virtual server instance as cloud-init vendor data. For cloud-init enabled images, these keys will also be added as
+ // SSH authorized keys for the administrative user.
+ //
+ // For Windows images, at least one key must be specified, and one will be chosen to encrypt [the administrator
+ // password](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization). Keys are optional for other images, but if
+ // no keys are specified, the instance will be inaccessible unless the specified image provides another means of
+ // access.
+ //
+ // This property's value is used when provisioning the virtual server instance, but not subsequently managed.
+ // Accordingly, it is reflected as an [instance
+ // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property.
+ Keys []KeyIdentityIntf `json:"keys,omitempty"`
+
+ MetadataService *InstanceMetadataServicePrototype `json:"metadata_service,omitempty"`
+
+ // The unique user-defined name for this virtual server instance (and default system hostname). If unspecified, the
+ // name will be a hyphenated list of randomly-selected words.
+ Name *string `json:"name,omitempty"`
+
+ // The additional network interfaces to create for the virtual server instance.
+ NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"`
+
+ // The placement restrictions to use for the virtual server instance.
+ PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"`
+
+ // The profile to use for this virtual server instance. If unspecified, `bx2-2x8` will be used, but this default value
+ // is expected to change in the future.
+ Profile InstanceProfileIdentityIntf `json:"profile,omitempty"`
+
+ ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
+
+ // The amount of bandwidth (in megabits per second) allocated exclusively to instance storage volumes. An increase in
+ // this value will result in a corresponding decrease to
+ // `total_network_bandwidth`.
+ TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth,omitempty"`
+
+ // User data to be made available when setting up the virtual server instance.
+ UserData *string `json:"user_data,omitempty"`
+
+ // The volume attachments for this virtual server instance.
+ VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"`
+
+ // The VPC the virtual server instance is to be a part of. If specified, it must match the VPC referenced by the
+ // subnets of the instance's network interfaces.
+ VPC VPCIdentityIntf `json:"vpc,omitempty"`
+
+ // The boot volume attachment for the virtual server instance.
+ BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"`
+
+ // The image to use when provisioning the virtual server instance.
+ Image ImageIdentityIntf `json:"image,omitempty"`
+
+ // Primary network interface.
+ PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface,omitempty"`
+
+ // The template to create this virtual server instance from.
+ SourceTemplate InstanceTemplateIdentityIntf `json:"source_template" validate:"required"`
+
+ // The zone this virtual server instance will reside in.
+ Zone ZoneIdentityIntf `json:"zone,omitempty"`
+}
+
+// NewInstancePrototypeInstanceBySourceTemplate : Instantiate InstancePrototypeInstanceBySourceTemplate (Generic Model Constructor)
+func (*VpcV1) NewInstancePrototypeInstanceBySourceTemplate(sourceTemplate InstanceTemplateIdentityIntf) (_model *InstancePrototypeInstanceBySourceTemplate, err error) {
+ _model = &InstancePrototypeInstanceBySourceTemplate{
+ SourceTemplate: sourceTemplate,
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*InstancePrototypeInstanceBySourceTemplate) isaInstancePrototype() bool {
+ return true
+}
+
+// UnmarshalInstancePrototypeInstanceBySourceTemplate unmarshals an instance of InstancePrototypeInstanceBySourceTemplate from the specified map of raw messages.
+func UnmarshalInstancePrototypeInstanceBySourceTemplate(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePrototypeInstanceBySourceTemplate)
+ err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPrototype)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData)
if err != nil {
return
@@ -50161,11 +65374,11 @@ type InstanceTemplateIdentityByCRN struct {
}
// NewInstanceTemplateIdentityByCRN : Instantiate InstanceTemplateIdentityByCRN (Generic Model Constructor)
-func (*VpcV1) NewInstanceTemplateIdentityByCRN(crn string) (model *InstanceTemplateIdentityByCRN, err error) {
- model = &InstanceTemplateIdentityByCRN{
+func (*VpcV1) NewInstanceTemplateIdentityByCRN(crn string) (_model *InstanceTemplateIdentityByCRN, err error) {
+ _model = &InstanceTemplateIdentityByCRN{
CRN: core.StringPtr(crn),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -50192,11 +65405,11 @@ type InstanceTemplateIdentityByHref struct {
}
// NewInstanceTemplateIdentityByHref : Instantiate InstanceTemplateIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewInstanceTemplateIdentityByHref(href string) (model *InstanceTemplateIdentityByHref, err error) {
- model = &InstanceTemplateIdentityByHref{
+func (*VpcV1) NewInstanceTemplateIdentityByHref(href string) (_model *InstanceTemplateIdentityByHref, err error) {
+ _model = &InstanceTemplateIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -50223,11 +65436,11 @@ type InstanceTemplateIdentityByID struct {
}
// NewInstanceTemplateIdentityByID : Instantiate InstanceTemplateIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewInstanceTemplateIdentityByID(id string) (model *InstanceTemplateIdentityByID, err error) {
- model = &InstanceTemplateIdentityByID{
+func (*VpcV1) NewInstanceTemplateIdentityByID(id string) (_model *InstanceTemplateIdentityByID, err error) {
+ _model = &InstanceTemplateIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -50249,40 +65462,65 @@ func UnmarshalInstanceTemplateIdentityByID(m map[string]json.RawMessage, result
// InstanceTemplatePrototypeInstanceByImage : InstanceTemplatePrototypeInstanceByImage struct
// This model "extends" InstanceTemplatePrototype
type InstanceTemplatePrototypeInstanceByImage struct {
- // The public SSH keys for the administrative user of the virtual server instance. Up to 10 keys may be provided; if no
- // keys are provided the instance will be inaccessible unless the image used provides another means of access. For
- // Windows instances, one of the keys will be used to encrypt the administrator password.
+ // The availability policy to use for this virtual server instance.
+ AvailabilityPolicy *InstanceAvailabilityPrototype `json:"availability_policy,omitempty"`
+
+ // The default trusted profile configuration to use for this virtual server instance This property's value is used
+ // when provisioning the virtual server instance, but not subsequently managed. Accordingly, it is reflected as an
+ // [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property.
+ DefaultTrustedProfile *InstanceDefaultTrustedProfilePrototype `json:"default_trusted_profile,omitempty"`
+
+ // The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the
+ // virtual server instance as cloud-init vendor data. For cloud-init enabled images, these keys will also be added as
+ // SSH authorized keys for the administrative user.
//
- // Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled images,
- // these keys will also be added as SSH authorized keys for the administrative user.
+ // For Windows images, at least one key must be specified, and one will be chosen to encrypt [the administrator
+ // password](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization). Keys are optional for other images, but if
+ // no keys are specified, the instance will be inaccessible unless the specified image provides another means of
+ // access.
+ //
+ // This property's value is used when provisioning the virtual server instance, but not subsequently managed.
+ // Accordingly, it is reflected as an [instance
+ // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property.
Keys []KeyIdentityIntf `json:"keys,omitempty"`
+ MetadataService *InstanceMetadataServicePrototype `json:"metadata_service,omitempty"`
+
// The unique user-defined name for this virtual server instance (and default system hostname). If unspecified, the
// name will be a hyphenated list of randomly-selected words.
Name *string `json:"name,omitempty"`
- // Collection of additional network interfaces to create for the virtual server instance.
+ // The additional network interfaces to create for the virtual server instance.
NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"`
- // The profile to use for this virtual server instance.
+ // The placement restrictions to use for the virtual server instance.
+ PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"`
+
+ // The profile to use for this virtual server instance. If unspecified, `bx2-2x8` will be used, but this default value
+ // is expected to change in the future.
Profile InstanceProfileIdentityIntf `json:"profile,omitempty"`
ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
+ // The amount of bandwidth (in megabits per second) allocated exclusively to instance storage volumes. An increase in
+ // this value will result in a corresponding decrease to
+ // `total_network_bandwidth`.
+ TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth,omitempty"`
+
// User data to be made available when setting up the virtual server instance.
UserData *string `json:"user_data,omitempty"`
- // Collection of volume attachments.
+ // The volume attachments for this virtual server instance.
VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"`
- // The VPC the virtual server instance is to be a part of. If provided, must match the VPC tied to the subnets of the
- // instance's network interfaces.
+ // The VPC the virtual server instance is to be a part of. If specified, it must match the VPC referenced by the
+ // subnets of the instance's network interfaces.
VPC VPCIdentityIntf `json:"vpc,omitempty"`
// The boot volume attachment for the virtual server instance.
BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"`
- // The identity of the image to use when provisioning the virtual server instance.
+ // The image to use when provisioning the virtual server instance.
Image ImageIdentityIntf `json:"image" validate:"required"`
// Primary network interface.
@@ -50293,13 +65531,13 @@ type InstanceTemplatePrototypeInstanceByImage struct {
}
// NewInstanceTemplatePrototypeInstanceByImage : Instantiate InstanceTemplatePrototypeInstanceByImage (Generic Model Constructor)
-func (*VpcV1) NewInstanceTemplatePrototypeInstanceByImage(image ImageIdentityIntf, primaryNetworkInterface *NetworkInterfacePrototype, zone ZoneIdentityIntf) (model *InstanceTemplatePrototypeInstanceByImage, err error) {
- model = &InstanceTemplatePrototypeInstanceByImage{
+func (*VpcV1) NewInstanceTemplatePrototypeInstanceByImage(image ImageIdentityIntf, primaryNetworkInterface *NetworkInterfacePrototype, zone ZoneIdentityIntf) (_model *InstanceTemplatePrototypeInstanceByImage, err error) {
+ _model = &InstanceTemplatePrototypeInstanceByImage{
Image: image,
PrimaryNetworkInterface: primaryNetworkInterface,
Zone: zone,
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -50310,10 +65548,22 @@ func (*InstanceTemplatePrototypeInstanceByImage) isaInstanceTemplatePrototype()
// UnmarshalInstanceTemplatePrototypeInstanceByImage unmarshals an instance of InstanceTemplatePrototypeInstanceByImage from the specified map of raw messages.
func UnmarshalInstanceTemplatePrototypeInstanceByImage(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(InstanceTemplatePrototypeInstanceByImage)
+ err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPrototype)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity)
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "name", &obj.Name)
if err != nil {
return
@@ -50322,6 +65572,10 @@ func UnmarshalInstanceTemplatePrototypeInstanceByImage(m map[string]json.RawMess
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity)
if err != nil {
return
@@ -50330,6 +65584,10 @@ func UnmarshalInstanceTemplatePrototypeInstanceByImage(m map[string]json.RawMess
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData)
if err != nil {
return
@@ -50365,46 +65623,71 @@ func UnmarshalInstanceTemplatePrototypeInstanceByImage(m map[string]json.RawMess
// InstanceTemplatePrototypeInstanceBySourceTemplate : InstanceTemplatePrototypeInstanceBySourceTemplate struct
// This model "extends" InstanceTemplatePrototype
type InstanceTemplatePrototypeInstanceBySourceTemplate struct {
- // The public SSH keys for the administrative user of the virtual server instance. Up to 10 keys may be provided; if no
- // keys are provided the instance will be inaccessible unless the image used provides another means of access. For
- // Windows instances, one of the keys will be used to encrypt the administrator password.
+ // The availability policy to use for this virtual server instance.
+ AvailabilityPolicy *InstanceAvailabilityPrototype `json:"availability_policy,omitempty"`
+
+ // The default trusted profile configuration to use for this virtual server instance This property's value is used
+ // when provisioning the virtual server instance, but not subsequently managed. Accordingly, it is reflected as an
+ // [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property.
+ DefaultTrustedProfile *InstanceDefaultTrustedProfilePrototype `json:"default_trusted_profile,omitempty"`
+
+ // The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the
+ // virtual server instance as cloud-init vendor data. For cloud-init enabled images, these keys will also be added as
+ // SSH authorized keys for the administrative user.
//
- // Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled images,
- // these keys will also be added as SSH authorized keys for the administrative user.
+ // For Windows images, at least one key must be specified, and one will be chosen to encrypt [the administrator
+ // password](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization). Keys are optional for other images, but if
+ // no keys are specified, the instance will be inaccessible unless the specified image provides another means of
+ // access.
+ //
+ // This property's value is used when provisioning the virtual server instance, but not subsequently managed.
+ // Accordingly, it is reflected as an [instance
+ // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property.
Keys []KeyIdentityIntf `json:"keys,omitempty"`
+ MetadataService *InstanceMetadataServicePrototype `json:"metadata_service,omitempty"`
+
// The unique user-defined name for this virtual server instance (and default system hostname). If unspecified, the
// name will be a hyphenated list of randomly-selected words.
Name *string `json:"name,omitempty"`
- // Collection of additional network interfaces to create for the virtual server instance.
+ // The additional network interfaces to create for the virtual server instance.
NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"`
- // The profile to use for this virtual server instance.
+ // The placement restrictions to use for the virtual server instance.
+ PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"`
+
+ // The profile to use for this virtual server instance. If unspecified, `bx2-2x8` will be used, but this default value
+ // is expected to change in the future.
Profile InstanceProfileIdentityIntf `json:"profile,omitempty"`
ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
+ // The amount of bandwidth (in megabits per second) allocated exclusively to instance storage volumes. An increase in
+ // this value will result in a corresponding decrease to
+ // `total_network_bandwidth`.
+ TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth,omitempty"`
+
// User data to be made available when setting up the virtual server instance.
UserData *string `json:"user_data,omitempty"`
- // Collection of volume attachments.
+ // The volume attachments for this virtual server instance.
VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"`
- // The VPC the virtual server instance is to be a part of. If provided, must match the VPC tied to the subnets of the
- // instance's network interfaces.
+ // The VPC the virtual server instance is to be a part of. If specified, it must match the VPC referenced by the
+ // subnets of the instance's network interfaces.
VPC VPCIdentityIntf `json:"vpc,omitempty"`
// The boot volume attachment for the virtual server instance.
BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"`
- // The identity of the image to use when provisioning the virtual server instance.
+ // The image to use when provisioning the virtual server instance.
Image ImageIdentityIntf `json:"image,omitempty"`
// Primary network interface.
PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface,omitempty"`
- // Identifies an instance template by a unique property.
+ // The template to create this virtual server instance from.
SourceTemplate InstanceTemplateIdentityIntf `json:"source_template" validate:"required"`
// The zone this virtual server instance will reside in.
@@ -50412,11 +65695,11 @@ type InstanceTemplatePrototypeInstanceBySourceTemplate struct {
}
// NewInstanceTemplatePrototypeInstanceBySourceTemplate : Instantiate InstanceTemplatePrototypeInstanceBySourceTemplate (Generic Model Constructor)
-func (*VpcV1) NewInstanceTemplatePrototypeInstanceBySourceTemplate(sourceTemplate InstanceTemplateIdentityIntf) (model *InstanceTemplatePrototypeInstanceBySourceTemplate, err error) {
- model = &InstanceTemplatePrototypeInstanceBySourceTemplate{
+func (*VpcV1) NewInstanceTemplatePrototypeInstanceBySourceTemplate(sourceTemplate InstanceTemplateIdentityIntf) (_model *InstanceTemplatePrototypeInstanceBySourceTemplate, err error) {
+ _model = &InstanceTemplatePrototypeInstanceBySourceTemplate{
SourceTemplate: sourceTemplate,
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -50427,10 +65710,22 @@ func (*InstanceTemplatePrototypeInstanceBySourceTemplate) isaInstanceTemplatePro
// UnmarshalInstanceTemplatePrototypeInstanceBySourceTemplate unmarshals an instance of InstanceTemplatePrototypeInstanceBySourceTemplate from the specified map of raw messages.
func UnmarshalInstanceTemplatePrototypeInstanceBySourceTemplate(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(InstanceTemplatePrototypeInstanceBySourceTemplate)
+ err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPrototype)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity)
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "name", &obj.Name)
if err != nil {
return
@@ -50439,6 +65734,10 @@ func UnmarshalInstanceTemplatePrototypeInstanceBySourceTemplate(m map[string]jso
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity)
if err != nil {
return
@@ -50447,6 +65746,10 @@ func UnmarshalInstanceTemplatePrototypeInstanceBySourceTemplate(m map[string]jso
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData)
if err != nil {
return
@@ -50486,52 +65789,77 @@ func UnmarshalInstanceTemplatePrototypeInstanceBySourceTemplate(m map[string]jso
// InstanceTemplateInstanceByImage : InstanceTemplateInstanceByImage struct
// This model "extends" InstanceTemplate
type InstanceTemplateInstanceByImage struct {
+ // The availability policy to use for this virtual server instance.
+ AvailabilityPolicy *InstanceAvailabilityPrototype `json:"availability_policy,omitempty"`
+
// The date and time that the instance template was created.
CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
// The CRN for this instance template.
CRN *string `json:"crn" validate:"required"`
+ // The default trusted profile configuration to use for this virtual server instance This property's value is used
+ // when provisioning the virtual server instance, but not subsequently managed. Accordingly, it is reflected as an
+ // [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property.
+ DefaultTrustedProfile *InstanceDefaultTrustedProfilePrototype `json:"default_trusted_profile,omitempty"`
+
// The URL for this instance template.
Href *string `json:"href" validate:"required"`
// The unique identifier for this instance template.
ID *string `json:"id" validate:"required"`
- // The public SSH keys for the administrative user of the virtual server instance. Up to 10 keys may be provided; if no
- // keys are provided the instance will be inaccessible unless the image used provides another means of access. For
- // Windows instances, one of the keys will be used to encrypt the administrator password.
+ // The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the
+ // virtual server instance as cloud-init vendor data. For cloud-init enabled images, these keys will also be added as
+ // SSH authorized keys for the administrative user.
//
- // Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled images,
- // these keys will also be added as SSH authorized keys for the administrative user.
+ // For Windows images, at least one key must be specified, and one will be chosen to encrypt [the administrator
+ // password](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization). Keys are optional for other images, but if
+ // no keys are specified, the instance will be inaccessible unless the specified image provides another means of
+ // access.
+ //
+ // This property's value is used when provisioning the virtual server instance, but not subsequently managed.
+ // Accordingly, it is reflected as an [instance
+ // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property.
Keys []KeyIdentityIntf `json:"keys,omitempty"`
+ MetadataService *InstanceMetadataServicePrototype `json:"metadata_service,omitempty"`
+
// The unique user-defined name for this instance template.
Name *string `json:"name" validate:"required"`
- // Collection of additional network interfaces to create for the virtual server instance.
+ // The additional network interfaces to create for the virtual server instance.
NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"`
- // The profile to use for this virtual server instance.
+ // The placement restrictions to use for the virtual server instance.
+ PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"`
+
+ // The profile to use for this virtual server instance. If unspecified, `bx2-2x8` will be used, but this default value
+ // is expected to change in the future.
Profile InstanceProfileIdentityIntf `json:"profile,omitempty"`
// The resource group for this instance template.
ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`
+ // The amount of bandwidth (in megabits per second) allocated exclusively to instance storage volumes. An increase in
+ // this value will result in a corresponding decrease to
+ // `total_network_bandwidth`.
+ TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth,omitempty"`
+
// User data to be made available when setting up the virtual server instance.
UserData *string `json:"user_data,omitempty"`
- // Collection of volume attachments.
+ // The volume attachments for this virtual server instance.
VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"`
- // The VPC the virtual server instance is to be a part of. If provided, must match the VPC tied to the subnets of the
- // instance's network interfaces.
+ // The VPC the virtual server instance is to be a part of. If specified, it must match the VPC referenced by the
+ // subnets of the instance's network interfaces.
VPC VPCIdentityIntf `json:"vpc,omitempty"`
// The boot volume attachment for the virtual server instance.
BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"`
- // The identity of the image to use when provisioning the virtual server instance.
+ // The image to use when provisioning the virtual server instance.
Image ImageIdentityIntf `json:"image" validate:"required"`
// Primary network interface.
@@ -50548,6 +65876,10 @@ func (*InstanceTemplateInstanceByImage) isaInstanceTemplate() bool {
// UnmarshalInstanceTemplateInstanceByImage unmarshals an instance of InstanceTemplateInstanceByImage from the specified map of raw messages.
func UnmarshalInstanceTemplateInstanceByImage(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(InstanceTemplateInstanceByImage)
+ err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
if err != nil {
return
@@ -50556,6 +65888,10 @@ func UnmarshalInstanceTemplateInstanceByImage(m map[string]json.RawMessage, resu
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "href", &obj.Href)
if err != nil {
return
@@ -50568,6 +65904,10 @@ func UnmarshalInstanceTemplateInstanceByImage(m map[string]json.RawMessage, resu
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "name", &obj.Name)
if err != nil {
return
@@ -50576,6 +65916,10 @@ func UnmarshalInstanceTemplateInstanceByImage(m map[string]json.RawMessage, resu
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity)
if err != nil {
return
@@ -50584,6 +65928,10 @@ func UnmarshalInstanceTemplateInstanceByImage(m map[string]json.RawMessage, resu
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData)
if err != nil {
return
@@ -50616,74 +65964,97 @@ func UnmarshalInstanceTemplateInstanceByImage(m map[string]json.RawMessage, resu
return
}
-// InstanceTemplateInstanceBySourceTemplate : InstanceTemplateInstanceBySourceTemplate struct
+// InstanceTemplateInstanceBySourceSnapshot : InstanceTemplateInstanceBySourceSnapshot struct
// This model "extends" InstanceTemplate
-type InstanceTemplateInstanceBySourceTemplate struct {
+type InstanceTemplateInstanceBySourceSnapshot struct {
+ // The availability policy to use for this virtual server instance.
+ AvailabilityPolicy *InstanceAvailabilityPrototype `json:"availability_policy,omitempty"`
+
// The date and time that the instance template was created.
CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
// The CRN for this instance template.
CRN *string `json:"crn" validate:"required"`
+ // The default trusted profile configuration to use for this virtual server instance This property's value is used
+ // when provisioning the virtual server instance, but not subsequently managed. Accordingly, it is reflected as an
+ // [instance initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property.
+ DefaultTrustedProfile *InstanceDefaultTrustedProfilePrototype `json:"default_trusted_profile,omitempty"`
+
// The URL for this instance template.
Href *string `json:"href" validate:"required"`
// The unique identifier for this instance template.
ID *string `json:"id" validate:"required"`
- // The public SSH keys for the administrative user of the virtual server instance. Up to 10 keys may be provided; if no
- // keys are provided the instance will be inaccessible unless the image used provides another means of access. For
- // Windows instances, one of the keys will be used to encrypt the administrator password.
+ // The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the
+ // virtual server instance as cloud-init vendor data. For cloud-init enabled images, these keys will also be added as
+ // SSH authorized keys for the administrative user.
//
- // Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled images,
- // these keys will also be added as SSH authorized keys for the administrative user.
+ // For Windows images, at least one key must be specified, and one will be chosen to encrypt [the administrator
+ // password](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization). Keys are optional for other images, but if
+ // no keys are specified, the instance will be inaccessible unless the specified image provides another means of
+ // access.
+ //
+ // This property's value is used when provisioning the virtual server instance, but not subsequently managed.
+ // Accordingly, it is reflected as an [instance
+ // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property.
Keys []KeyIdentityIntf `json:"keys,omitempty"`
+ MetadataService *InstanceMetadataServicePrototype `json:"metadata_service,omitempty"`
+
// The unique user-defined name for this instance template.
Name *string `json:"name" validate:"required"`
- // Collection of additional network interfaces to create for the virtual server instance.
+ // The additional network interfaces to create for the virtual server instance.
NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"`
- // The profile to use for this virtual server instance.
+ // The placement restrictions to use for the virtual server instance.
+ PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"`
+
+ // The profile to use for this virtual server instance. If unspecified, `bx2-2x8` will be used, but this default value
+ // is expected to change in the future.
Profile InstanceProfileIdentityIntf `json:"profile,omitempty"`
// The resource group for this instance template.
ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`
+ // The amount of bandwidth (in megabits per second) allocated exclusively to instance storage volumes. An increase in
+ // this value will result in a corresponding decrease to
+ // `total_network_bandwidth`.
+ TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth,omitempty"`
+
// User data to be made available when setting up the virtual server instance.
UserData *string `json:"user_data,omitempty"`
- // Collection of volume attachments.
+ // The volume attachments for this virtual server instance.
VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"`
- // The VPC the virtual server instance is to be a part of. If provided, must match the VPC tied to the subnets of the
- // instance's network interfaces.
+ // The VPC the virtual server instance is to be a part of. If specified, it must match the VPC referenced by the
+ // subnets of the instance's network interfaces.
VPC VPCIdentityIntf `json:"vpc,omitempty"`
// The boot volume attachment for the virtual server instance.
- BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"`
-
- // The identity of the image to use when provisioning the virtual server instance.
- Image ImageIdentityIntf `json:"image,omitempty"`
+ BootVolumeAttachment *VolumeAttachmentPrototypeInstanceBySourceSnapshotContext `json:"boot_volume_attachment" validate:"required"`
// Primary network interface.
- PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface,omitempty"`
-
- // Identifies an instance template by a unique property.
- SourceTemplate InstanceTemplateIdentityIntf `json:"source_template" validate:"required"`
+ PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface" validate:"required"`
// The zone this virtual server instance will reside in.
- Zone ZoneIdentityIntf `json:"zone,omitempty"`
+ Zone ZoneIdentityIntf `json:"zone" validate:"required"`
}
-func (*InstanceTemplateInstanceBySourceTemplate) isaInstanceTemplate() bool {
+func (*InstanceTemplateInstanceBySourceSnapshot) isaInstanceTemplate() bool {
return true
}
-// UnmarshalInstanceTemplateInstanceBySourceTemplate unmarshals an instance of InstanceTemplateInstanceBySourceTemplate from the specified map of raw messages.
-func UnmarshalInstanceTemplateInstanceBySourceTemplate(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(InstanceTemplateInstanceBySourceTemplate)
+// UnmarshalInstanceTemplateInstanceBySourceSnapshot unmarshals an instance of InstanceTemplateInstanceBySourceSnapshot from the specified map of raw messages.
+func UnmarshalInstanceTemplateInstanceBySourceSnapshot(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceTemplateInstanceBySourceSnapshot)
+ err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
if err != nil {
return
@@ -50692,6 +66063,10 @@ func UnmarshalInstanceTemplateInstanceBySourceTemplate(m map[string]json.RawMess
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "href", &obj.Href)
if err != nil {
return
@@ -50704,6 +66079,10 @@ func UnmarshalInstanceTemplateInstanceBySourceTemplate(m map[string]json.RawMess
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "name", &obj.Name)
if err != nil {
return
@@ -50712,6 +66091,10 @@ func UnmarshalInstanceTemplateInstanceBySourceTemplate(m map[string]json.RawMess
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity)
if err != nil {
return
@@ -50720,6 +66103,10 @@ func UnmarshalInstanceTemplateInstanceBySourceTemplate(m map[string]json.RawMess
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData)
if err != nil {
return
@@ -50732,11 +66119,7 @@ func UnmarshalInstanceTemplateInstanceBySourceTemplate(m map[string]json.RawMess
if err != nil {
return
}
- err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext)
- if err != nil {
- return
- }
- err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity)
+ err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceBySourceSnapshotContext)
if err != nil {
return
}
@@ -50744,10 +66127,6 @@ func UnmarshalInstanceTemplateInstanceBySourceTemplate(m map[string]json.RawMess
if err != nil {
return
}
- err = core.UnmarshalModel(m, "source_template", &obj.SourceTemplate, UnmarshalInstanceTemplateIdentity)
- if err != nil {
- return
- }
err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity)
if err != nil {
return
@@ -50764,11 +66143,11 @@ type KeyIdentityByCRN struct {
}
// NewKeyIdentityByCRN : Instantiate KeyIdentityByCRN (Generic Model Constructor)
-func (*VpcV1) NewKeyIdentityByCRN(crn string) (model *KeyIdentityByCRN, err error) {
- model = &KeyIdentityByCRN{
+func (*VpcV1) NewKeyIdentityByCRN(crn string) (_model *KeyIdentityByCRN, err error) {
+ _model = &KeyIdentityByCRN{
CRN: core.StringPtr(crn),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -50787,6 +66166,38 @@ func UnmarshalKeyIdentityByCRN(m map[string]json.RawMessage, result interface{})
return
}
+// KeyIdentityByFingerprint : KeyIdentityByFingerprint struct
+// This model "extends" KeyIdentity
+type KeyIdentityByFingerprint struct {
+ // The fingerprint for this key. The value is returned base64-encoded and prefixed with the hash algorithm (always
+ // `SHA256`).
+ Fingerprint *string `json:"fingerprint" validate:"required"`
+}
+
+// NewKeyIdentityByFingerprint : Instantiate KeyIdentityByFingerprint (Generic Model Constructor)
+func (*VpcV1) NewKeyIdentityByFingerprint(fingerprint string) (_model *KeyIdentityByFingerprint, err error) {
+ _model = &KeyIdentityByFingerprint{
+ Fingerprint: core.StringPtr(fingerprint),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*KeyIdentityByFingerprint) isaKeyIdentity() bool {
+ return true
+}
+
+// UnmarshalKeyIdentityByFingerprint unmarshals an instance of KeyIdentityByFingerprint from the specified map of raw messages.
+func UnmarshalKeyIdentityByFingerprint(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(KeyIdentityByFingerprint)
+ err = core.UnmarshalPrimitive(m, "fingerprint", &obj.Fingerprint)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// KeyIdentityByHref : KeyIdentityByHref struct
// This model "extends" KeyIdentity
type KeyIdentityByHref struct {
@@ -50795,11 +66206,11 @@ type KeyIdentityByHref struct {
}
// NewKeyIdentityByHref : Instantiate KeyIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewKeyIdentityByHref(href string) (model *KeyIdentityByHref, err error) {
- model = &KeyIdentityByHref{
+func (*VpcV1) NewKeyIdentityByHref(href string) (_model *KeyIdentityByHref, err error) {
+ _model = &KeyIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -50826,11 +66237,11 @@ type KeyIdentityByID struct {
}
// NewKeyIdentityByID : Instantiate KeyIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewKeyIdentityByID(id string) (model *KeyIdentityByID, err error) {
- model = &KeyIdentityByID{
+func (*VpcV1) NewKeyIdentityByID(id string) (_model *KeyIdentityByID, err error) {
+ _model = &KeyIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -50849,112 +66260,29 @@ func UnmarshalKeyIdentityByID(m map[string]json.RawMessage, result interface{})
return
}
-// KeyIdentityKeyIdentityByFingerprint : KeyIdentityKeyIdentityByFingerprint struct
-// This model "extends" KeyIdentity
-type KeyIdentityKeyIdentityByFingerprint struct {
- // The fingerprint for this key. The value is returned base64-encoded and prefixed with the hash algorithm (always
- // `SHA256`).
- Fingerprint *string `json:"fingerprint" validate:"required"`
-}
-
-// NewKeyIdentityKeyIdentityByFingerprint : Instantiate KeyIdentityKeyIdentityByFingerprint (Generic Model Constructor)
-func (*VpcV1) NewKeyIdentityKeyIdentityByFingerprint(fingerprint string) (model *KeyIdentityKeyIdentityByFingerprint, err error) {
- model = &KeyIdentityKeyIdentityByFingerprint{
- Fingerprint: core.StringPtr(fingerprint),
- }
- err = core.ValidateStruct(model, "required parameters")
- return
-}
-
-func (*KeyIdentityKeyIdentityByFingerprint) isaKeyIdentity() bool {
- return true
-}
-
-// UnmarshalKeyIdentityKeyIdentityByFingerprint unmarshals an instance of KeyIdentityKeyIdentityByFingerprint from the specified map of raw messages.
-func UnmarshalKeyIdentityKeyIdentityByFingerprint(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(KeyIdentityKeyIdentityByFingerprint)
- err = core.UnmarshalPrimitive(m, "fingerprint", &obj.Fingerprint)
- if err != nil {
- return
- }
- reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
- return
-}
-
-// KeyReferenceInstanceInitializationContextKeyIdentityByFingerprint : KeyReferenceInstanceInitializationContextKeyIdentityByFingerprint struct
-// This model "extends" KeyReferenceInstanceInitializationContext
-type KeyReferenceInstanceInitializationContextKeyIdentityByFingerprint struct {
- // The fingerprint for this key. The value is returned base64-encoded and prefixed with the hash algorithm (always
- // `SHA256`).
- Fingerprint *string `json:"fingerprint" validate:"required"`
-}
-
-func (*KeyReferenceInstanceInitializationContextKeyIdentityByFingerprint) isaKeyReferenceInstanceInitializationContext() bool {
- return true
-}
-
-// UnmarshalKeyReferenceInstanceInitializationContextKeyIdentityByFingerprint unmarshals an instance of KeyReferenceInstanceInitializationContextKeyIdentityByFingerprint from the specified map of raw messages.
-func UnmarshalKeyReferenceInstanceInitializationContextKeyIdentityByFingerprint(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(KeyReferenceInstanceInitializationContextKeyIdentityByFingerprint)
- err = core.UnmarshalPrimitive(m, "fingerprint", &obj.Fingerprint)
- if err != nil {
- return
- }
- reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
- return
-}
-
-// KeyReferenceInstanceInitializationContextKeyReference : KeyReferenceInstanceInitializationContextKeyReference struct
-// This model "extends" KeyReferenceInstanceInitializationContext
-type KeyReferenceInstanceInitializationContextKeyReference struct {
- // The CRN for this key.
- CRN *string `json:"crn" validate:"required"`
-
- // If present, this property indicates the referenced resource has been deleted and provides
- // some supplementary information.
- Deleted *KeyReferenceDeleted `json:"deleted,omitempty"`
-
- // The fingerprint for this key. The value is returned base64-encoded and prefixed with the hash algorithm (always
- // `SHA256`).
- Fingerprint *string `json:"fingerprint" validate:"required"`
-
- // The URL for this key.
- Href *string `json:"href" validate:"required"`
-
- // The unique identifier for this key.
- ID *string `json:"id" validate:"required"`
-
- // The user-defined name for this key.
+// LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName : LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName struct
+// This model "extends" LegacyCloudObjectStorageBucketIdentity
+type LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName struct {
+ // The globally unique name of this Cloud Object Storage bucket.
Name *string `json:"name" validate:"required"`
}
-func (*KeyReferenceInstanceInitializationContextKeyReference) isaKeyReferenceInstanceInitializationContext() bool {
+// NewLegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName : Instantiate LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName (Generic Model Constructor)
+func (*VpcV1) NewLegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName(name string) (_model *LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName, err error) {
+ _model = &LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName{
+ Name: core.StringPtr(name),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName) isaLegacyCloudObjectStorageBucketIdentity() bool {
return true
}
-// UnmarshalKeyReferenceInstanceInitializationContextKeyReference unmarshals an instance of KeyReferenceInstanceInitializationContextKeyReference from the specified map of raw messages.
-func UnmarshalKeyReferenceInstanceInitializationContextKeyReference(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(KeyReferenceInstanceInitializationContextKeyReference)
- err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
- if err != nil {
- return
- }
- err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalKeyReferenceDeleted)
- if err != nil {
- return
- }
- err = core.UnmarshalPrimitive(m, "fingerprint", &obj.Fingerprint)
- if err != nil {
- return
- }
- err = core.UnmarshalPrimitive(m, "href", &obj.Href)
- if err != nil {
- return
- }
- err = core.UnmarshalPrimitive(m, "id", &obj.ID)
- if err != nil {
- return
- }
+// UnmarshalLegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName unmarshals an instance of LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName from the specified map of raw messages.
+func UnmarshalLegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName)
err = core.UnmarshalPrimitive(m, "name", &obj.Name)
if err != nil {
return
@@ -50971,11 +66299,11 @@ type LoadBalancerIdentityByCRN struct {
}
// NewLoadBalancerIdentityByCRN : Instantiate LoadBalancerIdentityByCRN (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerIdentityByCRN(crn string) (model *LoadBalancerIdentityByCRN, err error) {
- model = &LoadBalancerIdentityByCRN{
+func (*VpcV1) NewLoadBalancerIdentityByCRN(crn string) (_model *LoadBalancerIdentityByCRN, err error) {
+ _model = &LoadBalancerIdentityByCRN{
CRN: core.StringPtr(crn),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -51002,11 +66330,11 @@ type LoadBalancerIdentityByHref struct {
}
// NewLoadBalancerIdentityByHref : Instantiate LoadBalancerIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerIdentityByHref(href string) (model *LoadBalancerIdentityByHref, err error) {
- model = &LoadBalancerIdentityByHref{
+func (*VpcV1) NewLoadBalancerIdentityByHref(href string) (_model *LoadBalancerIdentityByHref, err error) {
+ _model = &LoadBalancerIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -51033,11 +66361,11 @@ type LoadBalancerIdentityByID struct {
}
// NewLoadBalancerIdentityByID : Instantiate LoadBalancerIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerIdentityByID(id string) (model *LoadBalancerIdentityByID, err error) {
- model = &LoadBalancerIdentityByID{
+func (*VpcV1) NewLoadBalancerIdentityByID(id string) (_model *LoadBalancerIdentityByID, err error) {
+ _model = &LoadBalancerIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -51056,10 +66384,108 @@ func UnmarshalLoadBalancerIdentityByID(m map[string]json.RawMessage, result inte
return
}
+// LoadBalancerListenerIdentityByHref : LoadBalancerListenerIdentityByHref struct
+// This model "extends" LoadBalancerListenerIdentity
+type LoadBalancerListenerIdentityByHref struct {
+ // The listener's canonical URL.
+ Href *string `json:"href" validate:"required"`
+}
+
+// NewLoadBalancerListenerIdentityByHref : Instantiate LoadBalancerListenerIdentityByHref (Generic Model Constructor)
+func (*VpcV1) NewLoadBalancerListenerIdentityByHref(href string) (_model *LoadBalancerListenerIdentityByHref, err error) {
+ _model = &LoadBalancerListenerIdentityByHref{
+ Href: core.StringPtr(href),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*LoadBalancerListenerIdentityByHref) isaLoadBalancerListenerIdentity() bool {
+ return true
+}
+
+// UnmarshalLoadBalancerListenerIdentityByHref unmarshals an instance of LoadBalancerListenerIdentityByHref from the specified map of raw messages.
+func UnmarshalLoadBalancerListenerIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(LoadBalancerListenerIdentityByHref)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// LoadBalancerListenerIdentityByID : LoadBalancerListenerIdentityByID struct
+// This model "extends" LoadBalancerListenerIdentity
+type LoadBalancerListenerIdentityByID struct {
+ // The unique identifier for this load balancer listener.
+ ID *string `json:"id" validate:"required"`
+}
+
+// NewLoadBalancerListenerIdentityByID : Instantiate LoadBalancerListenerIdentityByID (Generic Model Constructor)
+func (*VpcV1) NewLoadBalancerListenerIdentityByID(id string) (_model *LoadBalancerListenerIdentityByID, err error) {
+ _model = &LoadBalancerListenerIdentityByID{
+ ID: core.StringPtr(id),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*LoadBalancerListenerIdentityByID) isaLoadBalancerListenerIdentity() bool {
+ return true
+}
+
+// UnmarshalLoadBalancerListenerIdentityByID unmarshals an instance of LoadBalancerListenerIdentityByID from the specified map of raw messages.
+func UnmarshalLoadBalancerListenerIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(LoadBalancerListenerIdentityByID)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch : LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch struct
+// This model "extends" LoadBalancerListenerPolicyTargetPatch
+type LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch struct {
+ // The HTTP status code for this redirect.
+ HTTPStatusCode *int64 `json:"http_status_code,omitempty"`
+
+ // Identifies a load balancer listener by a unique property.
+ Listener LoadBalancerListenerIdentityIntf `json:"listener,omitempty"`
+
+ // The redirect relative target URI.
+ URI *string `json:"uri,omitempty"`
+}
+
+func (*LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch) isaLoadBalancerListenerPolicyTargetPatch() bool {
+ return true
+}
+
+// UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch unmarshals an instance of LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch from the specified map of raw messages.
+func UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch)
+ err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "listener", &obj.Listener, UnmarshalLoadBalancerListenerIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "uri", &obj.URI)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch : LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch struct
// This model "extends" LoadBalancerListenerPolicyTargetPatch
type LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch struct {
- // The http status code in the redirect response.
+ // The HTTP status code for this redirect.
HTTPStatusCode *int64 `json:"http_status_code,omitempty"`
// The redirect target URL.
@@ -51126,10 +66552,56 @@ func UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity(m ma
return
}
+// LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype : LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype struct
+// This model "extends" LoadBalancerListenerPolicyTargetPrototype
+type LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype struct {
+ // The HTTP status code for this redirect.
+ HTTPStatusCode *int64 `json:"http_status_code" validate:"required"`
+
+ // Identifies a load balancer listener by a unique property.
+ Listener LoadBalancerListenerIdentityIntf `json:"listener" validate:"required"`
+
+ // The redirect relative target URI.
+ URI *string `json:"uri,omitempty"`
+}
+
+// NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype : Instantiate LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype (Generic Model Constructor)
+func (*VpcV1) NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype(httpStatusCode int64, listener LoadBalancerListenerIdentityIntf) (_model *LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype, err error) {
+ _model = &LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype{
+ HTTPStatusCode: core.Int64Ptr(httpStatusCode),
+ Listener: listener,
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype) isaLoadBalancerListenerPolicyTargetPrototype() bool {
+ return true
+}
+
+// UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype unmarshals an instance of LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype from the specified map of raw messages.
+func UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype)
+ err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "listener", &obj.Listener, UnmarshalLoadBalancerListenerIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "uri", &obj.URI)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype : LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype struct
// This model "extends" LoadBalancerListenerPolicyTargetPrototype
type LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype struct {
- // The http status code in the redirect response.
+ // The HTTP status code for this redirect.
HTTPStatusCode *int64 `json:"http_status_code" validate:"required"`
// The redirect target URL.
@@ -51137,12 +66609,12 @@ type LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirect
}
// NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype : Instantiate LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype(httpStatusCode int64, url string) (model *LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype, err error) {
- model = &LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype{
+func (*VpcV1) NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype(httpStatusCode int64, url string) (_model *LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype, err error) {
+ _model = &LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype{
HTTPStatusCode: core.Int64Ptr(httpStatusCode),
URL: core.StringPtr(url),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -51206,10 +66678,45 @@ func UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity(
return
}
+// LoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect : LoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect struct
+// This model "extends" LoadBalancerListenerPolicyTarget
+type LoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect struct {
+ // The HTTP status code for this redirect.
+ HTTPStatusCode *int64 `json:"http_status_code" validate:"required"`
+
+ Listener *LoadBalancerListenerReference `json:"listener" validate:"required"`
+
+ // The redirect relative target URI.
+ URI *string `json:"uri,omitempty"`
+}
+
+func (*LoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect) isaLoadBalancerListenerPolicyTarget() bool {
+ return true
+}
+
+// UnmarshalLoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect unmarshals an instance of LoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect from the specified map of raw messages.
+func UnmarshalLoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(LoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect)
+ err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "listener", &obj.Listener, UnmarshalLoadBalancerListenerReference)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "uri", &obj.URI)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL : LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL struct
// This model "extends" LoadBalancerListenerPolicyTarget
type LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL struct {
- // The http status code in the redirect response.
+ // The HTTP status code for this redirect.
HTTPStatusCode *int64 `json:"http_status_code" validate:"required"`
// The redirect target URL.
@@ -51287,11 +66794,11 @@ type LoadBalancerPoolIdentityByHref struct {
}
// NewLoadBalancerPoolIdentityByHref : Instantiate LoadBalancerPoolIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerPoolIdentityByHref(href string) (model *LoadBalancerPoolIdentityByHref, err error) {
- model = &LoadBalancerPoolIdentityByHref{
+func (*VpcV1) NewLoadBalancerPoolIdentityByHref(href string) (_model *LoadBalancerPoolIdentityByHref, err error) {
+ _model = &LoadBalancerPoolIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -51318,11 +66825,11 @@ type LoadBalancerPoolIdentityByID struct {
}
// NewLoadBalancerPoolIdentityByID : Instantiate LoadBalancerPoolIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerPoolIdentityByID(id string) (model *LoadBalancerPoolIdentityByID, err error) {
- model = &LoadBalancerPoolIdentityByID{
+func (*VpcV1) NewLoadBalancerPoolIdentityByID(id string) (_model *LoadBalancerPoolIdentityByID, err error) {
+ _model = &LoadBalancerPoolIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -51344,18 +66851,20 @@ func UnmarshalLoadBalancerPoolIdentityByID(m map[string]json.RawMessage, result
// LoadBalancerPoolMemberTargetPrototypeIP : LoadBalancerPoolMemberTargetPrototypeIP struct
// This model "extends" LoadBalancerPoolMemberTargetPrototype
type LoadBalancerPoolMemberTargetPrototypeIP struct {
- // The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
- // property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
- // and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
+ // The IP address.
+ //
+ // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify
+ // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the
+ // error, or bypass the resource on which the unexpected IP address format was encountered.
Address *string `json:"address" validate:"required"`
}
// NewLoadBalancerPoolMemberTargetPrototypeIP : Instantiate LoadBalancerPoolMemberTargetPrototypeIP (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerPoolMemberTargetPrototypeIP(address string) (model *LoadBalancerPoolMemberTargetPrototypeIP, err error) {
- model = &LoadBalancerPoolMemberTargetPrototypeIP{
+func (*VpcV1) NewLoadBalancerPoolMemberTargetPrototypeIP(address string) (_model *LoadBalancerPoolMemberTargetPrototypeIP, err error) {
+ _model = &LoadBalancerPoolMemberTargetPrototypeIP{
Address: core.StringPtr(address),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -51426,9 +66935,11 @@ func UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentity(m map[string
// LoadBalancerPoolMemberTargetIP : LoadBalancerPoolMemberTargetIP struct
// This model "extends" LoadBalancerPoolMemberTarget
type LoadBalancerPoolMemberTargetIP struct {
- // The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
- // property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
- // and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
+ // The IP address.
+ //
+ // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify
+ // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the
+ // error, or bypass the resource on which the unexpected IP address format was encountered.
Address *string `json:"address" validate:"required"`
}
@@ -51506,11 +67017,11 @@ type LoadBalancerProfileIdentityByHref struct {
}
// NewLoadBalancerProfileIdentityByHref : Instantiate LoadBalancerProfileIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerProfileIdentityByHref(href string) (model *LoadBalancerProfileIdentityByHref, err error) {
- model = &LoadBalancerProfileIdentityByHref{
+func (*VpcV1) NewLoadBalancerProfileIdentityByHref(href string) (_model *LoadBalancerProfileIdentityByHref, err error) {
+ _model = &LoadBalancerProfileIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -51537,11 +67048,11 @@ type LoadBalancerProfileIdentityByName struct {
}
// NewLoadBalancerProfileIdentityByName : Instantiate LoadBalancerProfileIdentityByName (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerProfileIdentityByName(name string) (model *LoadBalancerProfileIdentityByName, err error) {
- model = &LoadBalancerProfileIdentityByName{
+func (*VpcV1) NewLoadBalancerProfileIdentityByName(name string) (_model *LoadBalancerProfileIdentityByName, err error) {
+ _model = &LoadBalancerProfileIdentityByName{
Name: core.StringPtr(name),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -51560,6 +67071,69 @@ func UnmarshalLoadBalancerProfileIdentityByName(m map[string]json.RawMessage, re
return
}
+// LoadBalancerProfileRouteModeSupportedDependent : The route mode support for a load balancer with this profile depends on its configuration.
+// This model "extends" LoadBalancerProfileRouteModeSupported
+type LoadBalancerProfileRouteModeSupportedDependent struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+}
+
+// Constants associated with the LoadBalancerProfileRouteModeSupportedDependent.Type property.
+// The type for this profile field.
+const (
+ LoadBalancerProfileRouteModeSupportedDependentTypeDependentConst = "dependent"
+)
+
+func (*LoadBalancerProfileRouteModeSupportedDependent) isaLoadBalancerProfileRouteModeSupported() bool {
+ return true
+}
+
+// UnmarshalLoadBalancerProfileRouteModeSupportedDependent unmarshals an instance of LoadBalancerProfileRouteModeSupportedDependent from the specified map of raw messages.
+func UnmarshalLoadBalancerProfileRouteModeSupportedDependent(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(LoadBalancerProfileRouteModeSupportedDependent)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// LoadBalancerProfileRouteModeSupportedFixed : The route mode support for a load balancer with this profile.
+// This model "extends" LoadBalancerProfileRouteModeSupported
+type LoadBalancerProfileRouteModeSupportedFixed struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The value for this profile field.
+ Value *bool `json:"value" validate:"required"`
+}
+
+// Constants associated with the LoadBalancerProfileRouteModeSupportedFixed.Type property.
+// The type for this profile field.
+const (
+ LoadBalancerProfileRouteModeSupportedFixedTypeFixedConst = "fixed"
+)
+
+func (*LoadBalancerProfileRouteModeSupportedFixed) isaLoadBalancerProfileRouteModeSupported() bool {
+ return true
+}
+
+// UnmarshalLoadBalancerProfileRouteModeSupportedFixed unmarshals an instance of LoadBalancerProfileRouteModeSupportedFixed from the specified map of raw messages.
+func UnmarshalLoadBalancerProfileRouteModeSupportedFixed(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(LoadBalancerProfileRouteModeSupportedFixed)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "value", &obj.Value)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// LoadBalancerProfileSecurityGroupsSupportedDependent : The security group support for a load balancer with this profile depends on its configuration.
// This model "extends" LoadBalancerProfileSecurityGroupsSupported
type LoadBalancerProfileSecurityGroupsSupportedDependent struct {
@@ -51623,6 +67197,69 @@ func UnmarshalLoadBalancerProfileSecurityGroupsSupportedFixed(m map[string]json.
return
}
+// LoadBalancerProfileUDPSupportedDependent : The UDP support for a load balancer with this profile depends on its configuration.
+// This model "extends" LoadBalancerProfileUDPSupported
+type LoadBalancerProfileUDPSupportedDependent struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+}
+
+// Constants associated with the LoadBalancerProfileUDPSupportedDependent.Type property.
+// The type for this profile field.
+const (
+ LoadBalancerProfileUDPSupportedDependentTypeDependentConst = "dependent"
+)
+
+func (*LoadBalancerProfileUDPSupportedDependent) isaLoadBalancerProfileUDPSupported() bool {
+ return true
+}
+
+// UnmarshalLoadBalancerProfileUDPSupportedDependent unmarshals an instance of LoadBalancerProfileUDPSupportedDependent from the specified map of raw messages.
+func UnmarshalLoadBalancerProfileUDPSupportedDependent(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(LoadBalancerProfileUDPSupportedDependent)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// LoadBalancerProfileUDPSupportedFixed : The UDP support for a load balancer with this profile.
+// This model "extends" LoadBalancerProfileUDPSupported
+type LoadBalancerProfileUDPSupportedFixed struct {
+ // The type for this profile field.
+ Type *string `json:"type" validate:"required"`
+
+ // The value for this profile field.
+ Value *bool `json:"value" validate:"required"`
+}
+
+// Constants associated with the LoadBalancerProfileUDPSupportedFixed.Type property.
+// The type for this profile field.
+const (
+ LoadBalancerProfileUDPSupportedFixedTypeFixedConst = "fixed"
+)
+
+func (*LoadBalancerProfileUDPSupportedFixed) isaLoadBalancerProfileUDPSupported() bool {
+ return true
+}
+
+// UnmarshalLoadBalancerProfileUDPSupportedFixed unmarshals an instance of LoadBalancerProfileUDPSupportedFixed from the specified map of raw messages.
+func UnmarshalLoadBalancerProfileUDPSupportedFixed(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(LoadBalancerProfileUDPSupportedFixed)
+ err = core.UnmarshalPrimitive(m, "type", &obj.Type)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "value", &obj.Value)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// NetworkACLIdentityByCRN : NetworkACLIdentityByCRN struct
// This model "extends" NetworkACLIdentity
type NetworkACLIdentityByCRN struct {
@@ -51631,11 +67268,11 @@ type NetworkACLIdentityByCRN struct {
}
// NewNetworkACLIdentityByCRN : Instantiate NetworkACLIdentityByCRN (Generic Model Constructor)
-func (*VpcV1) NewNetworkACLIdentityByCRN(crn string) (model *NetworkACLIdentityByCRN, err error) {
- model = &NetworkACLIdentityByCRN{
+func (*VpcV1) NewNetworkACLIdentityByCRN(crn string) (_model *NetworkACLIdentityByCRN, err error) {
+ _model = &NetworkACLIdentityByCRN{
CRN: core.StringPtr(crn),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -51662,11 +67299,11 @@ type NetworkACLIdentityByHref struct {
}
// NewNetworkACLIdentityByHref : Instantiate NetworkACLIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewNetworkACLIdentityByHref(href string) (model *NetworkACLIdentityByHref, err error) {
- model = &NetworkACLIdentityByHref{
+func (*VpcV1) NewNetworkACLIdentityByHref(href string) (_model *NetworkACLIdentityByHref, err error) {
+ _model = &NetworkACLIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -51693,11 +67330,11 @@ type NetworkACLIdentityByID struct {
}
// NewNetworkACLIdentityByID : Instantiate NetworkACLIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewNetworkACLIdentityByID(id string) (model *NetworkACLIdentityByID, err error) {
- model = &NetworkACLIdentityByID{
+func (*VpcV1) NewNetworkACLIdentityByID(id string) (_model *NetworkACLIdentityByID, err error) {
+ _model = &NetworkACLIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -51728,11 +67365,20 @@ type NetworkACLPrototypeNetworkACLByRules struct {
// The VPC this network ACL is to be a part of.
VPC VPCIdentityIntf `json:"vpc" validate:"required"`
- // Array of prototype objects for rules to create along with this network ACL. If unspecified, no rules will be
- // created, resulting in all traffic being denied.
+ // The prototype objects for rules to create along with this network ACL. If unspecified, no rules will be created,
+ // resulting in all traffic being denied.
Rules []NetworkACLRulePrototypeNetworkACLContextIntf `json:"rules,omitempty"`
}
+// NewNetworkACLPrototypeNetworkACLByRules : Instantiate NetworkACLPrototypeNetworkACLByRules (Generic Model Constructor)
+func (*VpcV1) NewNetworkACLPrototypeNetworkACLByRules(vpc VPCIdentityIntf) (_model *NetworkACLPrototypeNetworkACLByRules, err error) {
+ _model = &NetworkACLPrototypeNetworkACLByRules{
+ VPC: vpc,
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
func (*NetworkACLPrototypeNetworkACLByRules) isaNetworkACLPrototype() bool {
return true
}
@@ -51777,12 +67423,12 @@ type NetworkACLPrototypeNetworkACLBySourceNetworkACL struct {
}
// NewNetworkACLPrototypeNetworkACLBySourceNetworkACL : Instantiate NetworkACLPrototypeNetworkACLBySourceNetworkACL (Generic Model Constructor)
-func (*VpcV1) NewNetworkACLPrototypeNetworkACLBySourceNetworkACL(vpc VPCIdentityIntf, sourceNetworkACL NetworkACLIdentityIntf) (model *NetworkACLPrototypeNetworkACLBySourceNetworkACL, err error) {
- model = &NetworkACLPrototypeNetworkACLBySourceNetworkACL{
+func (*VpcV1) NewNetworkACLPrototypeNetworkACLBySourceNetworkACL(vpc VPCIdentityIntf, sourceNetworkACL NetworkACLIdentityIntf) (_model *NetworkACLPrototypeNetworkACLBySourceNetworkACL, err error) {
+ _model = &NetworkACLPrototypeNetworkACLBySourceNetworkACL{
VPC: vpc,
SourceNetworkACL: sourceNetworkACL,
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -51821,11 +67467,11 @@ type NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref struct {
}
// NewNetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref : Instantiate NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewNetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref(href string) (model *NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref, err error) {
- model = &NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref{
+func (*VpcV1) NewNetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref(href string) (_model *NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref, err error) {
+ _model = &NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -51852,11 +67498,11 @@ type NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID struct {
}
// NewNetworkACLRuleBeforePatchNetworkACLRuleIdentityByID : Instantiate NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewNetworkACLRuleBeforePatchNetworkACLRuleIdentityByID(id string) (model *NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID, err error) {
- model = &NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID{
+func (*VpcV1) NewNetworkACLRuleBeforePatchNetworkACLRuleIdentityByID(id string) (_model *NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID, err error) {
+ _model = &NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -51883,11 +67529,11 @@ type NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref struct {
}
// NewNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref : Instantiate NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref(href string) (model *NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref, err error) {
- model = &NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref{
+func (*VpcV1) NewNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref(href string) (_model *NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref, err error) {
+ _model = &NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -51914,11 +67560,11 @@ type NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID struct {
}
// NewNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID : Instantiate NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID(id string) (model *NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID, err error) {
- model = &NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID{
+func (*VpcV1) NewNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID(id string) (_model *NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID, err error) {
+ _model = &NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -52388,15 +68034,15 @@ const (
)
// NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll (Generic Model Constructor)
-func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll(action string, destination string, direction string, source string, protocol string) (model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll, err error) {
- model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll{
+func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll(action string, destination string, direction string, source string, protocol string) (_model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll, err error) {
+ _model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll{
Action: core.StringPtr(action),
Destination: core.StringPtr(destination),
Direction: core.StringPtr(direction),
Source: core.StringPtr(source),
Protocol: core.StringPtr(protocol),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -52486,15 +68132,15 @@ const (
)
// NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp (Generic Model Constructor)
-func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp(action string, destination string, direction string, source string, protocol string) (model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp, err error) {
- model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp{
+func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp(action string, destination string, direction string, source string, protocol string) (_model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp, err error) {
+ _model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp{
Action: core.StringPtr(action),
Destination: core.StringPtr(destination),
Direction: core.StringPtr(direction),
Source: core.StringPtr(source),
Protocol: core.StringPtr(protocol),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -52598,15 +68244,15 @@ const (
)
// NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp (Generic Model Constructor)
-func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp(action string, destination string, direction string, source string, protocol string) (model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp, err error) {
- model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp{
+func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp(action string, destination string, direction string, source string, protocol string) (_model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp, err error) {
+ _model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp{
Action: core.StringPtr(action),
Destination: core.StringPtr(destination),
Direction: core.StringPtr(direction),
Source: core.StringPtr(source),
Protocol: core.StringPtr(protocol),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -52707,15 +68353,15 @@ const (
)
// NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolAll (Generic Model Constructor)
-func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll(action string, destination string, direction string, source string, protocol string) (model *NetworkACLRulePrototypeNetworkACLRuleProtocolAll, err error) {
- model = &NetworkACLRulePrototypeNetworkACLRuleProtocolAll{
+func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll(action string, destination string, direction string, source string, protocol string) (_model *NetworkACLRulePrototypeNetworkACLRuleProtocolAll, err error) {
+ _model = &NetworkACLRulePrototypeNetworkACLRuleProtocolAll{
Action: core.StringPtr(action),
Destination: core.StringPtr(destination),
Direction: core.StringPtr(direction),
Source: core.StringPtr(source),
Protocol: core.StringPtr(protocol),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -52811,15 +68457,15 @@ const (
)
// NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp (Generic Model Constructor)
-func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp(action string, destination string, direction string, source string, protocol string) (model *NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp, err error) {
- model = &NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp{
+func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp(action string, destination string, direction string, source string, protocol string) (_model *NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp, err error) {
+ _model = &NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp{
Action: core.StringPtr(action),
Destination: core.StringPtr(destination),
Direction: core.StringPtr(direction),
Source: core.StringPtr(source),
Protocol: core.StringPtr(protocol),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -52929,15 +68575,15 @@ const (
)
// NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp (Generic Model Constructor)
-func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp(action string, destination string, direction string, source string, protocol string) (model *NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp, err error) {
- model = &NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp{
+func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp(action string, destination string, direction string, source string, protocol string) (_model *NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp, err error) {
+ _model = &NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp{
Action: core.StringPtr(action),
Destination: core.StringPtr(destination),
Direction: core.StringPtr(direction),
Source: core.StringPtr(source),
Protocol: core.StringPtr(protocol),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -53400,6 +69046,88 @@ func UnmarshalNetworkACLRuleNetworkACLRuleProtocolTcpudp(m map[string]json.RawMe
return
}
+// NetworkInterfaceIPPrototypeReservedIPIdentity : Identifies a reserved IP by a unique property.
+// Models which "extend" this model:
+// - NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByID
+// - NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByHref
+// This model "extends" NetworkInterfaceIPPrototype
+type NetworkInterfaceIPPrototypeReservedIPIdentity struct {
+ // The unique identifier for this reserved IP.
+ ID *string `json:"id,omitempty"`
+
+ // The URL for this reserved IP.
+ Href *string `json:"href,omitempty"`
+}
+
+func (*NetworkInterfaceIPPrototypeReservedIPIdentity) isaNetworkInterfaceIPPrototypeReservedIPIdentity() bool {
+ return true
+}
+
+type NetworkInterfaceIPPrototypeReservedIPIdentityIntf interface {
+ NetworkInterfaceIPPrototypeIntf
+ isaNetworkInterfaceIPPrototypeReservedIPIdentity() bool
+}
+
+func (*NetworkInterfaceIPPrototypeReservedIPIdentity) isaNetworkInterfaceIPPrototype() bool {
+ return true
+}
+
+// UnmarshalNetworkInterfaceIPPrototypeReservedIPIdentity unmarshals an instance of NetworkInterfaceIPPrototypeReservedIPIdentity from the specified map of raw messages.
+func UnmarshalNetworkInterfaceIPPrototypeReservedIPIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(NetworkInterfaceIPPrototypeReservedIPIdentity)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext : NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext struct
+// This model "extends" NetworkInterfaceIPPrototype
+type NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext struct {
+ // The IP address to reserve, which must not already be reserved on the subnet.
+ //
+ // If unspecified, an available address on the subnet will automatically be selected.
+ Address *string `json:"address,omitempty"`
+
+ // Indicates whether this reserved IP member will be automatically deleted when either
+ // `target` is deleted, or the reserved IP is unbound.
+ AutoDelete *bool `json:"auto_delete,omitempty"`
+
+ // The user-defined name for this reserved IP. If unspecified, the name will be a hyphenated list of randomly-selected
+ // words. Names must be unique within the subnet the reserved IP resides in. Names beginning with `ibm-` are reserved
+ // for provider-owned resources.
+ Name *string `json:"name,omitempty"`
+}
+
+func (*NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext) isaNetworkInterfaceIPPrototype() bool {
+ return true
+}
+
+// UnmarshalNetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext unmarshals an instance of NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext from the specified map of raw messages.
+func UnmarshalNetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext)
+ err = core.UnmarshalPrimitive(m, "address", &obj.Address)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// OperatingSystemIdentityByHref : OperatingSystemIdentityByHref struct
// This model "extends" OperatingSystemIdentity
type OperatingSystemIdentityByHref struct {
@@ -53408,11 +69136,11 @@ type OperatingSystemIdentityByHref struct {
}
// NewOperatingSystemIdentityByHref : Instantiate OperatingSystemIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewOperatingSystemIdentityByHref(href string) (model *OperatingSystemIdentityByHref, err error) {
- model = &OperatingSystemIdentityByHref{
+func (*VpcV1) NewOperatingSystemIdentityByHref(href string) (_model *OperatingSystemIdentityByHref, err error) {
+ _model = &OperatingSystemIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -53439,11 +69167,11 @@ type OperatingSystemIdentityByName struct {
}
// NewOperatingSystemIdentityByName : Instantiate OperatingSystemIdentityByName (Generic Model Constructor)
-func (*VpcV1) NewOperatingSystemIdentityByName(name string) (model *OperatingSystemIdentityByName, err error) {
- model = &OperatingSystemIdentityByName{
+func (*VpcV1) NewOperatingSystemIdentityByName(name string) (_model *OperatingSystemIdentityByName, err error) {
+ _model = &OperatingSystemIdentityByName{
Name: core.StringPtr(name),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -53550,29 +69278,29 @@ func UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext(m
return
}
-// PublicGatewayIdentityByCRN : PublicGatewayIdentityByCRN struct
+// PublicGatewayIdentityPublicGatewayIdentityByCRN : PublicGatewayIdentityPublicGatewayIdentityByCRN struct
// This model "extends" PublicGatewayIdentity
-type PublicGatewayIdentityByCRN struct {
+type PublicGatewayIdentityPublicGatewayIdentityByCRN struct {
// The CRN for this public gateway.
CRN *string `json:"crn" validate:"required"`
}
-// NewPublicGatewayIdentityByCRN : Instantiate PublicGatewayIdentityByCRN (Generic Model Constructor)
-func (*VpcV1) NewPublicGatewayIdentityByCRN(crn string) (model *PublicGatewayIdentityByCRN, err error) {
- model = &PublicGatewayIdentityByCRN{
+// NewPublicGatewayIdentityPublicGatewayIdentityByCRN : Instantiate PublicGatewayIdentityPublicGatewayIdentityByCRN (Generic Model Constructor)
+func (*VpcV1) NewPublicGatewayIdentityPublicGatewayIdentityByCRN(crn string) (_model *PublicGatewayIdentityPublicGatewayIdentityByCRN, err error) {
+ _model = &PublicGatewayIdentityPublicGatewayIdentityByCRN{
CRN: core.StringPtr(crn),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
-func (*PublicGatewayIdentityByCRN) isaPublicGatewayIdentity() bool {
+func (*PublicGatewayIdentityPublicGatewayIdentityByCRN) isaPublicGatewayIdentity() bool {
return true
}
-// UnmarshalPublicGatewayIdentityByCRN unmarshals an instance of PublicGatewayIdentityByCRN from the specified map of raw messages.
-func UnmarshalPublicGatewayIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(PublicGatewayIdentityByCRN)
+// UnmarshalPublicGatewayIdentityPublicGatewayIdentityByCRN unmarshals an instance of PublicGatewayIdentityPublicGatewayIdentityByCRN from the specified map of raw messages.
+func UnmarshalPublicGatewayIdentityPublicGatewayIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(PublicGatewayIdentityPublicGatewayIdentityByCRN)
err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
if err != nil {
return
@@ -53581,29 +69309,29 @@ func UnmarshalPublicGatewayIdentityByCRN(m map[string]json.RawMessage, result in
return
}
-// PublicGatewayIdentityByHref : PublicGatewayIdentityByHref struct
+// PublicGatewayIdentityPublicGatewayIdentityByHref : PublicGatewayIdentityPublicGatewayIdentityByHref struct
// This model "extends" PublicGatewayIdentity
-type PublicGatewayIdentityByHref struct {
+type PublicGatewayIdentityPublicGatewayIdentityByHref struct {
// The URL for this public gateway.
Href *string `json:"href" validate:"required"`
}
-// NewPublicGatewayIdentityByHref : Instantiate PublicGatewayIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewPublicGatewayIdentityByHref(href string) (model *PublicGatewayIdentityByHref, err error) {
- model = &PublicGatewayIdentityByHref{
+// NewPublicGatewayIdentityPublicGatewayIdentityByHref : Instantiate PublicGatewayIdentityPublicGatewayIdentityByHref (Generic Model Constructor)
+func (*VpcV1) NewPublicGatewayIdentityPublicGatewayIdentityByHref(href string) (_model *PublicGatewayIdentityPublicGatewayIdentityByHref, err error) {
+ _model = &PublicGatewayIdentityPublicGatewayIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
-func (*PublicGatewayIdentityByHref) isaPublicGatewayIdentity() bool {
+func (*PublicGatewayIdentityPublicGatewayIdentityByHref) isaPublicGatewayIdentity() bool {
return true
}
-// UnmarshalPublicGatewayIdentityByHref unmarshals an instance of PublicGatewayIdentityByHref from the specified map of raw messages.
-func UnmarshalPublicGatewayIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(PublicGatewayIdentityByHref)
+// UnmarshalPublicGatewayIdentityPublicGatewayIdentityByHref unmarshals an instance of PublicGatewayIdentityPublicGatewayIdentityByHref from the specified map of raw messages.
+func UnmarshalPublicGatewayIdentityPublicGatewayIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(PublicGatewayIdentityPublicGatewayIdentityByHref)
err = core.UnmarshalPrimitive(m, "href", &obj.Href)
if err != nil {
return
@@ -53612,29 +69340,29 @@ func UnmarshalPublicGatewayIdentityByHref(m map[string]json.RawMessage, result i
return
}
-// PublicGatewayIdentityByID : PublicGatewayIdentityByID struct
+// PublicGatewayIdentityPublicGatewayIdentityByID : PublicGatewayIdentityPublicGatewayIdentityByID struct
// This model "extends" PublicGatewayIdentity
-type PublicGatewayIdentityByID struct {
+type PublicGatewayIdentityPublicGatewayIdentityByID struct {
// The unique identifier for this public gateway.
ID *string `json:"id" validate:"required"`
}
-// NewPublicGatewayIdentityByID : Instantiate PublicGatewayIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewPublicGatewayIdentityByID(id string) (model *PublicGatewayIdentityByID, err error) {
- model = &PublicGatewayIdentityByID{
+// NewPublicGatewayIdentityPublicGatewayIdentityByID : Instantiate PublicGatewayIdentityPublicGatewayIdentityByID (Generic Model Constructor)
+func (*VpcV1) NewPublicGatewayIdentityPublicGatewayIdentityByID(id string) (_model *PublicGatewayIdentityPublicGatewayIdentityByID, err error) {
+ _model = &PublicGatewayIdentityPublicGatewayIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
-func (*PublicGatewayIdentityByID) isaPublicGatewayIdentity() bool {
+func (*PublicGatewayIdentityPublicGatewayIdentityByID) isaPublicGatewayIdentity() bool {
return true
}
-// UnmarshalPublicGatewayIdentityByID unmarshals an instance of PublicGatewayIdentityByID from the specified map of raw messages.
-func UnmarshalPublicGatewayIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
- obj := new(PublicGatewayIdentityByID)
+// UnmarshalPublicGatewayIdentityPublicGatewayIdentityByID unmarshals an instance of PublicGatewayIdentityPublicGatewayIdentityByID from the specified map of raw messages.
+func UnmarshalPublicGatewayIdentityPublicGatewayIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(PublicGatewayIdentityPublicGatewayIdentityByID)
err = core.UnmarshalPrimitive(m, "id", &obj.ID)
if err != nil {
return
@@ -53711,12 +69439,12 @@ type ReservedIPTargetEndpointGatewayReference struct {
// The unique user-defined name for this endpoint gateway.
Name *string `json:"name" validate:"required"`
- // The type of resource referenced.
+ // The resource type.
ResourceType *string `json:"resource_type" validate:"required"`
}
// Constants associated with the ReservedIPTargetEndpointGatewayReference.ResourceType property.
-// The type of resource referenced.
+// The resource type.
const (
ReservedIPTargetEndpointGatewayReferenceResourceTypeEndpointGatewayConst = "endpoint_gateway"
)
@@ -53756,6 +69484,234 @@ func UnmarshalReservedIPTargetEndpointGatewayReference(m map[string]json.RawMess
return
}
+// ReservedIPTargetGenericResourceReference : Identifying information for a resource that is not native to the VPC API.
+// This model "extends" ReservedIPTarget
+type ReservedIPTargetGenericResourceReference struct {
+ // The CRN for the resource.
+ CRN *string `json:"crn" validate:"required"`
+
+ // If present, this property indicates the referenced resource has been deleted and provides
+ // some supplementary information.
+ Deleted *GenericResourceReferenceDeleted `json:"deleted,omitempty"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+}
+
+// Constants associated with the ReservedIPTargetGenericResourceReference.ResourceType property.
+// The resource type.
+const (
+ ReservedIPTargetGenericResourceReferenceResourceTypeCloudResourceConst = "cloud_resource"
+)
+
+func (*ReservedIPTargetGenericResourceReference) isaReservedIPTarget() bool {
+ return true
+}
+
+// UnmarshalReservedIPTargetGenericResourceReference unmarshals an instance of ReservedIPTargetGenericResourceReference from the specified map of raw messages.
+func UnmarshalReservedIPTargetGenericResourceReference(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(ReservedIPTargetGenericResourceReference)
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalGenericResourceReferenceDeleted)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// ReservedIPTargetLoadBalancerReference : ReservedIPTargetLoadBalancerReference struct
+// This model "extends" ReservedIPTarget
+type ReservedIPTargetLoadBalancerReference struct {
+ // The load balancer's CRN.
+ CRN *string `json:"crn" validate:"required"`
+
+ // If present, this property indicates the referenced resource has been deleted and provides
+ // some supplementary information.
+ Deleted *LoadBalancerReferenceDeleted `json:"deleted,omitempty"`
+
+ // The load balancer's canonical URL.
+ Href *string `json:"href" validate:"required"`
+
+ // The unique identifier for this load balancer.
+ ID *string `json:"id" validate:"required"`
+
+ // The unique user-defined name for this load balancer.
+ Name *string `json:"name" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+}
+
+// Constants associated with the ReservedIPTargetLoadBalancerReference.ResourceType property.
+// The resource type.
+const (
+ ReservedIPTargetLoadBalancerReferenceResourceTypeLoadBalancerConst = "load_balancer"
+)
+
+func (*ReservedIPTargetLoadBalancerReference) isaReservedIPTarget() bool {
+ return true
+}
+
+// UnmarshalReservedIPTargetLoadBalancerReference unmarshals an instance of ReservedIPTargetLoadBalancerReference from the specified map of raw messages.
+func UnmarshalReservedIPTargetLoadBalancerReference(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(ReservedIPTargetLoadBalancerReference)
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalLoadBalancerReferenceDeleted)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// ReservedIPTargetNetworkInterfaceReferenceTargetContext : ReservedIPTargetNetworkInterfaceReferenceTargetContext struct
+// This model "extends" ReservedIPTarget
+type ReservedIPTargetNetworkInterfaceReferenceTargetContext struct {
+ // If present, this property indicates the referenced resource has been deleted and provides
+ // some supplementary information.
+ Deleted *NetworkInterfaceReferenceTargetContextDeleted `json:"deleted,omitempty"`
+
+ // The URL for this network interface.
+ Href *string `json:"href" validate:"required"`
+
+ // The unique identifier for this network interface.
+ ID *string `json:"id" validate:"required"`
+
+ // The user-defined name for this network interface.
+ Name *string `json:"name" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+}
+
+// Constants associated with the ReservedIPTargetNetworkInterfaceReferenceTargetContext.ResourceType property.
+// The resource type.
+const (
+ ReservedIPTargetNetworkInterfaceReferenceTargetContextResourceTypeNetworkInterfaceConst = "network_interface"
+)
+
+func (*ReservedIPTargetNetworkInterfaceReferenceTargetContext) isaReservedIPTarget() bool {
+ return true
+}
+
+// UnmarshalReservedIPTargetNetworkInterfaceReferenceTargetContext unmarshals an instance of ReservedIPTargetNetworkInterfaceReferenceTargetContext from the specified map of raw messages.
+func UnmarshalReservedIPTargetNetworkInterfaceReferenceTargetContext(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(ReservedIPTargetNetworkInterfaceReferenceTargetContext)
+ err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceReferenceTargetContextDeleted)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// ReservedIPTargetVPNGatewayReference : ReservedIPTargetVPNGatewayReference struct
+// This model "extends" ReservedIPTarget
+type ReservedIPTargetVPNGatewayReference struct {
+ // The VPN gateway's CRN.
+ CRN *string `json:"crn" validate:"required"`
+
+ // If present, this property indicates the referenced resource has been deleted and provides
+ // some supplementary information.
+ Deleted *VPNGatewayReferenceDeleted `json:"deleted,omitempty"`
+
+ // The VPN gateway's canonical URL.
+ Href *string `json:"href" validate:"required"`
+
+ // The unique identifier for this VPN gateway.
+ ID *string `json:"id" validate:"required"`
+
+ // The user-defined name for this VPN gateway.
+ Name *string `json:"name" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+}
+
+// Constants associated with the ReservedIPTargetVPNGatewayReference.ResourceType property.
+// The resource type.
+const (
+ ReservedIPTargetVPNGatewayReferenceResourceTypeVPNGatewayConst = "vpn_gateway"
+)
+
+func (*ReservedIPTargetVPNGatewayReference) isaReservedIPTarget() bool {
+ return true
+}
+
+// UnmarshalReservedIPTargetVPNGatewayReference unmarshals an instance of ReservedIPTargetVPNGatewayReference from the specified map of raw messages.
+func UnmarshalReservedIPTargetVPNGatewayReference(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(ReservedIPTargetVPNGatewayReference)
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPNGatewayReferenceDeleted)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// ResourceGroupIdentityByID : ResourceGroupIdentityByID struct
// This model "extends" ResourceGroupIdentity
type ResourceGroupIdentityByID struct {
@@ -53764,11 +69720,11 @@ type ResourceGroupIdentityByID struct {
}
// NewResourceGroupIdentityByID : Instantiate ResourceGroupIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewResourceGroupIdentityByID(id string) (model *ResourceGroupIdentityByID, err error) {
- model = &ResourceGroupIdentityByID{
+func (*VpcV1) NewResourceGroupIdentityByID(id string) (_model *ResourceGroupIdentityByID, err error) {
+ _model = &ResourceGroupIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -53790,9 +69746,11 @@ func UnmarshalResourceGroupIdentityByID(m map[string]json.RawMessage, result int
// RouteNextHopIP : RouteNextHopIP struct
// This model "extends" RouteNextHop
type RouteNextHopIP struct {
- // The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
- // property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
- // and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
+ // The IP address.
+ //
+ // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify
+ // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the
+ // error, or bypass the resource on which the unexpected IP address format was encountered.
Address *string `json:"address" validate:"required"`
}
@@ -53814,18 +69772,20 @@ func UnmarshalRouteNextHopIP(m map[string]json.RawMessage, result interface{}) (
// RouteNextHopPrototypeRouteNextHopIP : The IP address of the next hop to which to route packets.
// This model "extends" RouteNextHopPrototype
type RouteNextHopPrototypeRouteNextHopIP struct {
- // The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
- // property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
- // and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
+ // The IP address.
+ //
+ // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify
+ // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the
+ // error, or bypass the resource on which the unexpected IP address format was encountered.
Address *string `json:"address" validate:"required"`
}
// NewRouteNextHopPrototypeRouteNextHopIP : Instantiate RouteNextHopPrototypeRouteNextHopIP (Generic Model Constructor)
-func (*VpcV1) NewRouteNextHopPrototypeRouteNextHopIP(address string) (model *RouteNextHopPrototypeRouteNextHopIP, err error) {
- model = &RouteNextHopPrototypeRouteNextHopIP{
+func (*VpcV1) NewRouteNextHopPrototypeRouteNextHopIP(address string) (_model *RouteNextHopPrototypeRouteNextHopIP, err error) {
+ _model = &RouteNextHopPrototypeRouteNextHopIP{
Address: core.StringPtr(address),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -53950,11 +69910,11 @@ type RoutingTableIdentityByHref struct {
}
// NewRoutingTableIdentityByHref : Instantiate RoutingTableIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewRoutingTableIdentityByHref(href string) (model *RoutingTableIdentityByHref, err error) {
- model = &RoutingTableIdentityByHref{
+func (*VpcV1) NewRoutingTableIdentityByHref(href string) (_model *RoutingTableIdentityByHref, err error) {
+ _model = &RoutingTableIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -53981,11 +69941,11 @@ type RoutingTableIdentityByID struct {
}
// NewRoutingTableIdentityByID : Instantiate RoutingTableIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewRoutingTableIdentityByID(id string) (model *RoutingTableIdentityByID, err error) {
- model = &RoutingTableIdentityByID{
+func (*VpcV1) NewRoutingTableIdentityByID(id string) (_model *RoutingTableIdentityByID, err error) {
+ _model = &RoutingTableIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -54012,11 +69972,11 @@ type SecurityGroupIdentityByCRN struct {
}
// NewSecurityGroupIdentityByCRN : Instantiate SecurityGroupIdentityByCRN (Generic Model Constructor)
-func (*VpcV1) NewSecurityGroupIdentityByCRN(crn string) (model *SecurityGroupIdentityByCRN, err error) {
- model = &SecurityGroupIdentityByCRN{
+func (*VpcV1) NewSecurityGroupIdentityByCRN(crn string) (_model *SecurityGroupIdentityByCRN, err error) {
+ _model = &SecurityGroupIdentityByCRN{
CRN: core.StringPtr(crn),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -54043,11 +70003,11 @@ type SecurityGroupIdentityByHref struct {
}
// NewSecurityGroupIdentityByHref : Instantiate SecurityGroupIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewSecurityGroupIdentityByHref(href string) (model *SecurityGroupIdentityByHref, err error) {
- model = &SecurityGroupIdentityByHref{
+func (*VpcV1) NewSecurityGroupIdentityByHref(href string) (_model *SecurityGroupIdentityByHref, err error) {
+ _model = &SecurityGroupIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -54074,11 +70034,11 @@ type SecurityGroupIdentityByID struct {
}
// NewSecurityGroupIdentityByID : Instantiate SecurityGroupIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewSecurityGroupIdentityByID(id string) (model *SecurityGroupIdentityByID, err error) {
- model = &SecurityGroupIdentityByID{
+func (*VpcV1) NewSecurityGroupIdentityByID(id string) (_model *SecurityGroupIdentityByID, err error) {
+ _model = &SecurityGroupIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -54104,15 +70064,19 @@ type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll struct {
// The direction of traffic to enforce, either `inbound` or `outbound`.
Direction *string `json:"direction" validate:"required"`
- // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
- // used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
- // interfaces) in that group matching this IP version.
+ // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they
+ // are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses
+ // (network interfaces) in that group matching this IP version.
IPVersion *string `json:"ip_version,omitempty"`
- Remote SecurityGroupRuleRemotePrototypeIntf `json:"remote,omitempty"`
-
// The protocol to enforce.
Protocol *string `json:"protocol" validate:"required"`
+
+ // The IP addresses or security groups from which this rule will allow traffic (or to
+ // which, for outbound rules). Can be specified as an IP address, a CIDR block, or a
+ // security group. If omitted, a CIDR block of `0.0.0.0/0` will be used to allow traffic
+ // from any source (or to any source, for outbound rules).
+ Remote SecurityGroupRuleRemotePrototypeIntf `json:"remote,omitempty"`
}
// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.Direction property.
@@ -54123,9 +70087,9 @@ const (
)
// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.IPVersion property.
-// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
-// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
-// interfaces) in that group matching this IP version.
+// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they
+// are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses
+// (network interfaces) in that group matching this IP version.
const (
SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllIPVersionIpv4Const = "ipv4"
)
@@ -54137,12 +70101,12 @@ const (
)
// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll (Generic Model Constructor)
-func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll(direction string, protocol string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll, err error) {
- model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll{
+func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll(direction string, protocol string) (_model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll, err error) {
+ _model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll{
Direction: core.StringPtr(direction),
Protocol: core.StringPtr(protocol),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -54161,11 +70125,11 @@ func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll(m map[strin
if err != nil {
return
}
- err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemotePrototype)
+ err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
if err != nil {
return
}
- err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
+ err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemotePrototype)
if err != nil {
return
}
@@ -54173,28 +70137,31 @@ func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll(m map[strin
return
}
-// SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp : When `protocol` is `icmp`, then the rule may also contain fields to specify an ICMP `type` and `code`. Field `code`
-// may only be specified if `type` is also specified. If type is not specified, then traffic is allowed for all types
-// and codes. If type is specified and code is not specified, then traffic is allowed with the specified type for all
-// codes.
+// SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp : When `protocol` is `icmp`, the `type` property may optionally be specified. If specified, then ICMP traffic is
+// allowed only for the specified ICMP type. Further, if `type` is specified, the `code` property may optionally be
+// specified to allow traffic only for the specified ICMP code.
// This model "extends" SecurityGroupRulePrototype
type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp struct {
- // The direction of traffic to enforce, either `inbound` or `outbound`.
- Direction *string `json:"direction" validate:"required"`
-
- // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
- // used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
- // interfaces) in that group matching this IP version.
- IPVersion *string `json:"ip_version,omitempty"`
-
- Remote SecurityGroupRuleRemotePrototypeIntf `json:"remote,omitempty"`
-
// The ICMP traffic code to allow.
Code *int64 `json:"code,omitempty"`
+ // The direction of traffic to enforce, either `inbound` or `outbound`.
+ Direction *string `json:"direction" validate:"required"`
+
+ // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they
+ // are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses
+ // (network interfaces) in that group matching this IP version.
+ IPVersion *string `json:"ip_version,omitempty"`
+
// The protocol to enforce.
Protocol *string `json:"protocol" validate:"required"`
+ // The IP addresses or security groups from which this rule will allow traffic (or to
+ // which, for outbound rules). Can be specified as an IP address, a CIDR block, or a
+ // security group. If omitted, a CIDR block of `0.0.0.0/0` will be used to allow traffic
+ // from any source (or to any source, for outbound rules).
+ Remote SecurityGroupRuleRemotePrototypeIntf `json:"remote,omitempty"`
+
// The ICMP traffic type to allow.
Type *int64 `json:"type,omitempty"`
}
@@ -54207,9 +70174,9 @@ const (
)
// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp.IPVersion property.
-// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
-// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
-// interfaces) in that group matching this IP version.
+// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they
+// are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses
+// (network interfaces) in that group matching this IP version.
const (
SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpIPVersionIpv4Const = "ipv4"
)
@@ -54221,12 +70188,12 @@ const (
)
// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp (Generic Model Constructor)
-func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp(direction string, protocol string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp, err error) {
- model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp{
+func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp(direction string, protocol string) (_model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp, err error) {
+ _model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp{
Direction: core.StringPtr(direction),
Protocol: core.StringPtr(protocol),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -54237,6 +70204,10 @@ func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp) isaSecurityGroup
// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp from the specified map of raw messages.
func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp)
+ err = core.UnmarshalPrimitive(m, "code", &obj.Code)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "direction", &obj.Direction)
if err != nil {
return
@@ -54245,18 +70216,14 @@ func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp(m map[stri
if err != nil {
return
}
- err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemotePrototype)
- if err != nil {
- return
- }
- err = core.UnmarshalPrimitive(m, "code", &obj.Code)
- if err != nil {
- return
- }
err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemotePrototype)
+ if err != nil {
+ return
+ }
err = core.UnmarshalPrimitive(m, "type", &obj.Type)
if err != nil {
return
@@ -54266,20 +70233,18 @@ func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp(m map[stri
}
// SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp : If `protocol` is either `tcp` or `udp`, then the rule may also contain `port_min` and
-// `port_max`. Either both should be set, or neither. When neither is set then traffic is allowed on all ports. For a
+// `port_max`. Either both must be set, or neither. When neither is set then traffic is allowed on all ports. For a
// single port, set both to the same value.
// This model "extends" SecurityGroupRulePrototype
type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp struct {
// The direction of traffic to enforce, either `inbound` or `outbound`.
Direction *string `json:"direction" validate:"required"`
- // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
- // used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
- // interfaces) in that group matching this IP version.
+ // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they
+ // are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses
+ // (network interfaces) in that group matching this IP version.
IPVersion *string `json:"ip_version,omitempty"`
- Remote SecurityGroupRuleRemotePrototypeIntf `json:"remote,omitempty"`
-
// The inclusive upper bound of TCP/UDP port range.
PortMax *int64 `json:"port_max,omitempty"`
@@ -54288,6 +70253,12 @@ type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp struct {
// The protocol to enforce.
Protocol *string `json:"protocol" validate:"required"`
+
+ // The IP addresses or security groups from which this rule will allow traffic (or to
+ // which, for outbound rules). Can be specified as an IP address, a CIDR block, or a
+ // security group. If omitted, a CIDR block of `0.0.0.0/0` will be used to allow traffic
+ // from any source (or to any source, for outbound rules).
+ Remote SecurityGroupRuleRemotePrototypeIntf `json:"remote,omitempty"`
}
// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp.Direction property.
@@ -54298,9 +70269,9 @@ const (
)
// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp.IPVersion property.
-// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
-// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
-// interfaces) in that group matching this IP version.
+// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they
+// are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses
+// (network interfaces) in that group matching this IP version.
const (
SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpIPVersionIpv4Const = "ipv4"
)
@@ -54313,12 +70284,12 @@ const (
)
// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp (Generic Model Constructor)
-func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp(direction string, protocol string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp, err error) {
- model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp{
+func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp(direction string, protocol string) (_model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp, err error) {
+ _model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp{
Direction: core.StringPtr(direction),
Protocol: core.StringPtr(protocol),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -54337,10 +70308,6 @@ func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp(m map[st
if err != nil {
return
}
- err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemotePrototype)
- if err != nil {
- return
- }
err = core.UnmarshalPrimitive(m, "port_max", &obj.PortMax)
if err != nil {
return
@@ -54353,6 +70320,10 @@ func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp(m map[st
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemotePrototype)
+ if err != nil {
+ return
+ }
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
@@ -54367,11 +70338,11 @@ type SecurityGroupRuleRemotePatchCIDR struct {
}
// NewSecurityGroupRuleRemotePatchCIDR : Instantiate SecurityGroupRuleRemotePatchCIDR (Generic Model Constructor)
-func (*VpcV1) NewSecurityGroupRuleRemotePatchCIDR(cidrBlock string) (model *SecurityGroupRuleRemotePatchCIDR, err error) {
- model = &SecurityGroupRuleRemotePatchCIDR{
+func (*VpcV1) NewSecurityGroupRuleRemotePatchCIDR(cidrBlock string) (_model *SecurityGroupRuleRemotePatchCIDR, err error) {
+ _model = &SecurityGroupRuleRemotePatchCIDR{
CIDRBlock: core.StringPtr(cidrBlock),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -54393,18 +70364,20 @@ func UnmarshalSecurityGroupRuleRemotePatchCIDR(m map[string]json.RawMessage, res
// SecurityGroupRuleRemotePatchIP : SecurityGroupRuleRemotePatchIP struct
// This model "extends" SecurityGroupRuleRemotePatch
type SecurityGroupRuleRemotePatchIP struct {
- // The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
- // property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
- // and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
+ // The IP address.
+ //
+ // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify
+ // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the
+ // error, or bypass the resource on which the unexpected IP address format was encountered.
Address *string `json:"address" validate:"required"`
}
// NewSecurityGroupRuleRemotePatchIP : Instantiate SecurityGroupRuleRemotePatchIP (Generic Model Constructor)
-func (*VpcV1) NewSecurityGroupRuleRemotePatchIP(address string) (model *SecurityGroupRuleRemotePatchIP, err error) {
- model = &SecurityGroupRuleRemotePatchIP{
+func (*VpcV1) NewSecurityGroupRuleRemotePatchIP(address string) (_model *SecurityGroupRuleRemotePatchIP, err error) {
+ _model = &SecurityGroupRuleRemotePatchIP{
Address: core.StringPtr(address),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -54482,11 +70455,11 @@ type SecurityGroupRuleRemotePrototypeCIDR struct {
}
// NewSecurityGroupRuleRemotePrototypeCIDR : Instantiate SecurityGroupRuleRemotePrototypeCIDR (Generic Model Constructor)
-func (*VpcV1) NewSecurityGroupRuleRemotePrototypeCIDR(cidrBlock string) (model *SecurityGroupRuleRemotePrototypeCIDR, err error) {
- model = &SecurityGroupRuleRemotePrototypeCIDR{
+func (*VpcV1) NewSecurityGroupRuleRemotePrototypeCIDR(cidrBlock string) (_model *SecurityGroupRuleRemotePrototypeCIDR, err error) {
+ _model = &SecurityGroupRuleRemotePrototypeCIDR{
CIDRBlock: core.StringPtr(cidrBlock),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -54508,18 +70481,20 @@ func UnmarshalSecurityGroupRuleRemotePrototypeCIDR(m map[string]json.RawMessage,
// SecurityGroupRuleRemotePrototypeIP : SecurityGroupRuleRemotePrototypeIP struct
// This model "extends" SecurityGroupRuleRemotePrototype
type SecurityGroupRuleRemotePrototypeIP struct {
- // The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
- // property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
- // and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
+ // The IP address.
+ //
+ // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify
+ // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the
+ // error, or bypass the resource on which the unexpected IP address format was encountered.
Address *string `json:"address" validate:"required"`
}
// NewSecurityGroupRuleRemotePrototypeIP : Instantiate SecurityGroupRuleRemotePrototypeIP (Generic Model Constructor)
-func (*VpcV1) NewSecurityGroupRuleRemotePrototypeIP(address string) (model *SecurityGroupRuleRemotePrototypeIP, err error) {
- model = &SecurityGroupRuleRemotePrototypeIP{
+func (*VpcV1) NewSecurityGroupRuleRemotePrototypeIP(address string) (_model *SecurityGroupRuleRemotePrototypeIP, err error) {
+ _model = &SecurityGroupRuleRemotePrototypeIP{
Address: core.StringPtr(address),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -54614,9 +70589,11 @@ func UnmarshalSecurityGroupRuleRemoteCIDR(m map[string]json.RawMessage, result i
// SecurityGroupRuleRemoteIP : SecurityGroupRuleRemoteIP struct
// This model "extends" SecurityGroupRuleRemote
type SecurityGroupRuleRemoteIP struct {
- // The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
- // property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
- // and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
+ // The IP address.
+ //
+ // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify
+ // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the
+ // error, or bypass the resource on which the unexpected IP address format was encountered.
Address *string `json:"address" validate:"required"`
}
@@ -54699,10 +70676,10 @@ type SecurityGroupRuleSecurityGroupRuleProtocolAll struct {
// The unique identifier for this security group rule.
ID *string `json:"id" validate:"required"`
- // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
- // used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
- // interfaces) in that group matching this IP version.
- IPVersion *string `json:"ip_version,omitempty"`
+ // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they
+ // are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses
+ // (network interfaces) in that group matching this IP version.
+ IPVersion *string `json:"ip_version" validate:"required"`
Remote SecurityGroupRuleRemoteIntf `json:"remote" validate:"required"`
@@ -54718,9 +70695,9 @@ const (
)
// Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolAll.IPVersion property.
-// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
-// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
-// interfaces) in that group matching this IP version.
+// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they
+// are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses
+// (network interfaces) in that group matching this IP version.
const (
SecurityGroupRuleSecurityGroupRuleProtocolAllIPVersionIpv4Const = "ipv4"
)
@@ -54766,10 +70743,9 @@ func UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolAll(m map[string]json.Ra
return
}
-// SecurityGroupRuleSecurityGroupRuleProtocolIcmp : When `protocol` is `icmp`, then the rule may also contain fields to specify an ICMP `type` and `code`. Field `code`
-// may only be specified if `type` is also specified. If type is not specified, then traffic is allowed for all types
-// and codes. If type is specified and code is not specified, then traffic is allowed with the specified type for all
-// codes.
+// SecurityGroupRuleSecurityGroupRuleProtocolIcmp : When `protocol` is `icmp`, the `type` property may optionally be specified. If specified, then ICMP traffic is
+// allowed only for the specified ICMP type. Further, if `type` is specified, the `code` property may optionally be
+// specified to allow traffic only for the specified ICMP code.
// This model "extends" SecurityGroupRule
type SecurityGroupRuleSecurityGroupRuleProtocolIcmp struct {
// The direction of traffic to enforce, either `inbound` or `outbound`.
@@ -54781,10 +70757,10 @@ type SecurityGroupRuleSecurityGroupRuleProtocolIcmp struct {
// The unique identifier for this security group rule.
ID *string `json:"id" validate:"required"`
- // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
- // used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
- // interfaces) in that group matching this IP version.
- IPVersion *string `json:"ip_version,omitempty"`
+ // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they
+ // are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses
+ // (network interfaces) in that group matching this IP version.
+ IPVersion *string `json:"ip_version" validate:"required"`
Remote SecurityGroupRuleRemoteIntf `json:"remote" validate:"required"`
@@ -54806,9 +70782,9 @@ const (
)
// Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolIcmp.IPVersion property.
-// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
-// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
-// interfaces) in that group matching this IP version.
+// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they
+// are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses
+// (network interfaces) in that group matching this IP version.
const (
SecurityGroupRuleSecurityGroupRuleProtocolIcmpIPVersionIpv4Const = "ipv4"
)
@@ -54863,7 +70839,7 @@ func UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolIcmp(m map[string]json.R
}
// SecurityGroupRuleSecurityGroupRuleProtocolTcpudp : If `protocol` is either `tcp` or `udp`, then the rule may also contain `port_min` and
-// `port_max`. Either both should be set, or neither. When neither is set then traffic is allowed on all ports. For a
+// `port_max`. Either both must be set, or neither. When neither is set then traffic is allowed on all ports. For a
// single port, set both to the same value.
// This model "extends" SecurityGroupRule
type SecurityGroupRuleSecurityGroupRuleProtocolTcpudp struct {
@@ -54876,10 +70852,10 @@ type SecurityGroupRuleSecurityGroupRuleProtocolTcpudp struct {
// The unique identifier for this security group rule.
ID *string `json:"id" validate:"required"`
- // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
- // used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
- // interfaces) in that group matching this IP version.
- IPVersion *string `json:"ip_version,omitempty"`
+ // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they
+ // are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses
+ // (network interfaces) in that group matching this IP version.
+ IPVersion *string `json:"ip_version" validate:"required"`
Remote SecurityGroupRuleRemoteIntf `json:"remote" validate:"required"`
@@ -54901,9 +70877,9 @@ const (
)
// Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolTcpudp.IPVersion property.
-// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
-// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
-// interfaces) in that group matching this IP version.
+// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they
+// are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses
+// (network interfaces) in that group matching this IP version.
const (
SecurityGroupRuleSecurityGroupRuleProtocolTcpudpIPVersionIpv4Const = "ipv4"
)
@@ -54958,6 +70934,70 @@ func UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolTcpudp(m map[string]json
return
}
+// SecurityGroupTargetReferenceEndpointGatewayReference : SecurityGroupTargetReferenceEndpointGatewayReference struct
+// This model "extends" SecurityGroupTargetReference
+type SecurityGroupTargetReferenceEndpointGatewayReference struct {
+ // The CRN for this endpoint gateway.
+ CRN *string `json:"crn" validate:"required"`
+
+ // If present, this property indicates the referenced resource has been deleted and provides
+ // some supplementary information.
+ Deleted *EndpointGatewayReferenceDeleted `json:"deleted,omitempty"`
+
+ // The URL for this endpoint gateway.
+ Href *string `json:"href" validate:"required"`
+
+ // The unique identifier for this endpoint gateway.
+ ID *string `json:"id" validate:"required"`
+
+ // The unique user-defined name for this endpoint gateway.
+ Name *string `json:"name" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+}
+
+// Constants associated with the SecurityGroupTargetReferenceEndpointGatewayReference.ResourceType property.
+// The resource type.
+const (
+ SecurityGroupTargetReferenceEndpointGatewayReferenceResourceTypeEndpointGatewayConst = "endpoint_gateway"
+)
+
+func (*SecurityGroupTargetReferenceEndpointGatewayReference) isaSecurityGroupTargetReference() bool {
+ return true
+}
+
+// UnmarshalSecurityGroupTargetReferenceEndpointGatewayReference unmarshals an instance of SecurityGroupTargetReferenceEndpointGatewayReference from the specified map of raw messages.
+func UnmarshalSecurityGroupTargetReferenceEndpointGatewayReference(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(SecurityGroupTargetReferenceEndpointGatewayReference)
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalEndpointGatewayReferenceDeleted)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// SecurityGroupTargetReferenceLoadBalancerReference : SecurityGroupTargetReferenceLoadBalancerReference struct
// This model "extends" SecurityGroupTargetReference
type SecurityGroupTargetReferenceLoadBalancerReference struct {
@@ -54976,8 +71016,17 @@ type SecurityGroupTargetReferenceLoadBalancerReference struct {
// The unique user-defined name for this load balancer.
Name *string `json:"name" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
}
+// Constants associated with the SecurityGroupTargetReferenceLoadBalancerReference.ResourceType property.
+// The resource type.
+const (
+ SecurityGroupTargetReferenceLoadBalancerReferenceResourceTypeLoadBalancerConst = "load_balancer"
+)
+
func (*SecurityGroupTargetReferenceLoadBalancerReference) isaSecurityGroupTargetReference() bool {
return true
}
@@ -55005,6 +71054,10 @@ func UnmarshalSecurityGroupTargetReferenceLoadBalancerReference(m map[string]jso
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
@@ -55066,6 +71119,151 @@ func UnmarshalSecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext
return
}
+// SnapshotIdentityByCRN : SnapshotIdentityByCRN struct
+// This model "extends" SnapshotIdentity
+type SnapshotIdentityByCRN struct {
+ // The CRN of this snapshot.
+ CRN *string `json:"crn" validate:"required"`
+}
+
+// NewSnapshotIdentityByCRN : Instantiate SnapshotIdentityByCRN (Generic Model Constructor)
+func (*VpcV1) NewSnapshotIdentityByCRN(crn string) (_model *SnapshotIdentityByCRN, err error) {
+ _model = &SnapshotIdentityByCRN{
+ CRN: core.StringPtr(crn),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*SnapshotIdentityByCRN) isaSnapshotIdentity() bool {
+ return true
+}
+
+// UnmarshalSnapshotIdentityByCRN unmarshals an instance of SnapshotIdentityByCRN from the specified map of raw messages.
+func UnmarshalSnapshotIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(SnapshotIdentityByCRN)
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// SnapshotIdentityByHref : SnapshotIdentityByHref struct
+// This model "extends" SnapshotIdentity
+type SnapshotIdentityByHref struct {
+ // The URL for this snapshot.
+ Href *string `json:"href" validate:"required"`
+}
+
+// NewSnapshotIdentityByHref : Instantiate SnapshotIdentityByHref (Generic Model Constructor)
+func (*VpcV1) NewSnapshotIdentityByHref(href string) (_model *SnapshotIdentityByHref, err error) {
+ _model = &SnapshotIdentityByHref{
+ Href: core.StringPtr(href),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*SnapshotIdentityByHref) isaSnapshotIdentity() bool {
+ return true
+}
+
+// UnmarshalSnapshotIdentityByHref unmarshals an instance of SnapshotIdentityByHref from the specified map of raw messages.
+func UnmarshalSnapshotIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(SnapshotIdentityByHref)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// SnapshotIdentityByID : SnapshotIdentityByID struct
+// This model "extends" SnapshotIdentity
+type SnapshotIdentityByID struct {
+ // The unique identifier for this snapshot.
+ ID *string `json:"id" validate:"required"`
+}
+
+// NewSnapshotIdentityByID : Instantiate SnapshotIdentityByID (Generic Model Constructor)
+func (*VpcV1) NewSnapshotIdentityByID(id string) (_model *SnapshotIdentityByID, err error) {
+ _model = &SnapshotIdentityByID{
+ ID: core.StringPtr(id),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*SnapshotIdentityByID) isaSnapshotIdentity() bool {
+ return true
+}
+
+// UnmarshalSnapshotIdentityByID unmarshals an instance of SnapshotIdentityByID from the specified map of raw messages.
+func UnmarshalSnapshotIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(SnapshotIdentityByID)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// SnapshotPrototypeSnapshotBySourceVolume : SnapshotPrototypeSnapshotBySourceVolume struct
+// This model "extends" SnapshotPrototype
+type SnapshotPrototypeSnapshotBySourceVolume struct {
+ // The unique user-defined name for this snapshot. If unspecified, the name will be a hyphenated list of
+ // randomly-selected words.
+ Name *string `json:"name,omitempty"`
+
+ ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
+
+ // The [user tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this snapshot.
+ UserTags []string `json:"user_tags,omitempty"`
+
+ // The volume to create this snapshot from.
+ SourceVolume VolumeIdentityIntf `json:"source_volume" validate:"required"`
+}
+
+// NewSnapshotPrototypeSnapshotBySourceVolume : Instantiate SnapshotPrototypeSnapshotBySourceVolume (Generic Model Constructor)
+func (*VpcV1) NewSnapshotPrototypeSnapshotBySourceVolume(sourceVolume VolumeIdentityIntf) (_model *SnapshotPrototypeSnapshotBySourceVolume, err error) {
+ _model = &SnapshotPrototypeSnapshotBySourceVolume{
+ SourceVolume: sourceVolume,
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*SnapshotPrototypeSnapshotBySourceVolume) isaSnapshotPrototype() bool {
+ return true
+}
+
+// UnmarshalSnapshotPrototypeSnapshotBySourceVolume unmarshals an instance of SnapshotPrototypeSnapshotBySourceVolume from the specified map of raw messages.
+func UnmarshalSnapshotPrototypeSnapshotBySourceVolume(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(SnapshotPrototypeSnapshotBySourceVolume)
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "source_volume", &obj.SourceVolume, UnmarshalVolumeIdentity)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// SubnetIdentityByCRN : SubnetIdentityByCRN struct
// This model "extends" SubnetIdentity
type SubnetIdentityByCRN struct {
@@ -55074,11 +71272,11 @@ type SubnetIdentityByCRN struct {
}
// NewSubnetIdentityByCRN : Instantiate SubnetIdentityByCRN (Generic Model Constructor)
-func (*VpcV1) NewSubnetIdentityByCRN(crn string) (model *SubnetIdentityByCRN, err error) {
- model = &SubnetIdentityByCRN{
+func (*VpcV1) NewSubnetIdentityByCRN(crn string) (_model *SubnetIdentityByCRN, err error) {
+ _model = &SubnetIdentityByCRN{
CRN: core.StringPtr(crn),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -55105,11 +71303,11 @@ type SubnetIdentityByHref struct {
}
// NewSubnetIdentityByHref : Instantiate SubnetIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewSubnetIdentityByHref(href string) (model *SubnetIdentityByHref, err error) {
- model = &SubnetIdentityByHref{
+func (*VpcV1) NewSubnetIdentityByHref(href string) (_model *SubnetIdentityByHref, err error) {
+ _model = &SubnetIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -55136,11 +71334,11 @@ type SubnetIdentityByID struct {
}
// NewSubnetIdentityByID : Instantiate SubnetIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewSubnetIdentityByID(id string) (model *SubnetIdentityByID, err error) {
- model = &SubnetIdentityByID{
+func (*VpcV1) NewSubnetIdentityByID(id string) (_model *SubnetIdentityByID, err error) {
+ _model = &SubnetIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -55172,7 +71370,8 @@ type SubnetPrototypeSubnetByCIDR struct {
// The network ACL to use for this subnet. If unspecified, the default network ACL for the VPC is used.
NetworkACL NetworkACLIdentityIntf `json:"network_acl,omitempty"`
- // The public gateway to handle internet bound traffic for this subnet.
+ // The public gateway to use for internet-bound traffic for this subnet. If unspecified, the subnet will not be
+ // attached to a public gateway.
PublicGateway PublicGatewayIdentityIntf `json:"public_gateway,omitempty"`
ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
@@ -55187,8 +71386,9 @@ type SubnetPrototypeSubnetByCIDR struct {
// The IPv4 range of the subnet, expressed in CIDR format. The prefix length of the subnet's CIDR must be between `/9`
// (8,388,608 addresses) and `/29` (8 addresses). The IPv4 range of the subnet's CIDR must fall within an existing
- // address prefix in the VPC. The subnet will be created in the zone of the address prefix that contains the IPv4 CIDR.
- // If zone is specified, it must match the zone of the address prefix that contains the subnet's IPv4 CIDR.
+ // address prefix in the VPC and must not overlap with any existing subnet. The subnet will be created in the zone of
+ // the address prefix that contains the IPv4 CIDR. If zone is specified, it must match the zone of the address prefix
+ // that contains the subnet's IPv4 CIDR.
Ipv4CIDRBlock *string `json:"ipv4_cidr_block" validate:"required"`
// The zone this subnet will reside in.
@@ -55202,12 +71402,12 @@ const (
)
// NewSubnetPrototypeSubnetByCIDR : Instantiate SubnetPrototypeSubnetByCIDR (Generic Model Constructor)
-func (*VpcV1) NewSubnetPrototypeSubnetByCIDR(vpc VPCIdentityIntf, ipv4CIDRBlock string) (model *SubnetPrototypeSubnetByCIDR, err error) {
- model = &SubnetPrototypeSubnetByCIDR{
+func (*VpcV1) NewSubnetPrototypeSubnetByCIDR(vpc VPCIdentityIntf, ipv4CIDRBlock string) (_model *SubnetPrototypeSubnetByCIDR, err error) {
+ _model = &SubnetPrototypeSubnetByCIDR{
VPC: vpc,
Ipv4CIDRBlock: core.StringPtr(ipv4CIDRBlock),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -55271,7 +71471,8 @@ type SubnetPrototypeSubnetByTotalCount struct {
// The network ACL to use for this subnet. If unspecified, the default network ACL for the VPC is used.
NetworkACL NetworkACLIdentityIntf `json:"network_acl,omitempty"`
- // The public gateway to handle internet bound traffic for this subnet.
+ // The public gateway to use for internet-bound traffic for this subnet. If unspecified, the subnet will not be
+ // attached to a public gateway.
PublicGateway PublicGatewayIdentityIntf `json:"public_gateway,omitempty"`
ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
@@ -55299,13 +71500,13 @@ const (
)
// NewSubnetPrototypeSubnetByTotalCount : Instantiate SubnetPrototypeSubnetByTotalCount (Generic Model Constructor)
-func (*VpcV1) NewSubnetPrototypeSubnetByTotalCount(vpc VPCIdentityIntf, totalIpv4AddressCount int64, zone ZoneIdentityIntf) (model *SubnetPrototypeSubnetByTotalCount, err error) {
- model = &SubnetPrototypeSubnetByTotalCount{
+func (*VpcV1) NewSubnetPrototypeSubnetByTotalCount(vpc VPCIdentityIntf, totalIpv4AddressCount int64, zone ZoneIdentityIntf) (_model *SubnetPrototypeSubnetByTotalCount, err error) {
+ _model = &SubnetPrototypeSubnetByTotalCount{
VPC: vpc,
TotalIpv4AddressCount: core.Int64Ptr(totalIpv4AddressCount),
Zone: zone,
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -55356,6 +71557,161 @@ func UnmarshalSubnetPrototypeSubnetByTotalCount(m map[string]json.RawMessage, re
return
}
+// SubnetPublicGatewayPatchPublicGatewayIdentityByCRN : SubnetPublicGatewayPatchPublicGatewayIdentityByCRN struct
+// This model "extends" SubnetPublicGatewayPatch
+type SubnetPublicGatewayPatchPublicGatewayIdentityByCRN struct {
+ // The CRN for this public gateway.
+ CRN *string `json:"crn" validate:"required"`
+}
+
+// NewSubnetPublicGatewayPatchPublicGatewayIdentityByCRN : Instantiate SubnetPublicGatewayPatchPublicGatewayIdentityByCRN (Generic Model Constructor)
+func (*VpcV1) NewSubnetPublicGatewayPatchPublicGatewayIdentityByCRN(crn string) (_model *SubnetPublicGatewayPatchPublicGatewayIdentityByCRN, err error) {
+ _model = &SubnetPublicGatewayPatchPublicGatewayIdentityByCRN{
+ CRN: core.StringPtr(crn),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*SubnetPublicGatewayPatchPublicGatewayIdentityByCRN) isaSubnetPublicGatewayPatch() bool {
+ return true
+}
+
+// UnmarshalSubnetPublicGatewayPatchPublicGatewayIdentityByCRN unmarshals an instance of SubnetPublicGatewayPatchPublicGatewayIdentityByCRN from the specified map of raw messages.
+func UnmarshalSubnetPublicGatewayPatchPublicGatewayIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(SubnetPublicGatewayPatchPublicGatewayIdentityByCRN)
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// SubnetPublicGatewayPatchPublicGatewayIdentityByHref : SubnetPublicGatewayPatchPublicGatewayIdentityByHref struct
+// This model "extends" SubnetPublicGatewayPatch
+type SubnetPublicGatewayPatchPublicGatewayIdentityByHref struct {
+ // The URL for this public gateway.
+ Href *string `json:"href" validate:"required"`
+}
+
+// NewSubnetPublicGatewayPatchPublicGatewayIdentityByHref : Instantiate SubnetPublicGatewayPatchPublicGatewayIdentityByHref (Generic Model Constructor)
+func (*VpcV1) NewSubnetPublicGatewayPatchPublicGatewayIdentityByHref(href string) (_model *SubnetPublicGatewayPatchPublicGatewayIdentityByHref, err error) {
+ _model = &SubnetPublicGatewayPatchPublicGatewayIdentityByHref{
+ Href: core.StringPtr(href),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*SubnetPublicGatewayPatchPublicGatewayIdentityByHref) isaSubnetPublicGatewayPatch() bool {
+ return true
+}
+
+// UnmarshalSubnetPublicGatewayPatchPublicGatewayIdentityByHref unmarshals an instance of SubnetPublicGatewayPatchPublicGatewayIdentityByHref from the specified map of raw messages.
+func UnmarshalSubnetPublicGatewayPatchPublicGatewayIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(SubnetPublicGatewayPatchPublicGatewayIdentityByHref)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// SubnetPublicGatewayPatchPublicGatewayIdentityByID : SubnetPublicGatewayPatchPublicGatewayIdentityByID struct
+// This model "extends" SubnetPublicGatewayPatch
+type SubnetPublicGatewayPatchPublicGatewayIdentityByID struct {
+ // The unique identifier for this public gateway.
+ ID *string `json:"id" validate:"required"`
+}
+
+// NewSubnetPublicGatewayPatchPublicGatewayIdentityByID : Instantiate SubnetPublicGatewayPatchPublicGatewayIdentityByID (Generic Model Constructor)
+func (*VpcV1) NewSubnetPublicGatewayPatchPublicGatewayIdentityByID(id string) (_model *SubnetPublicGatewayPatchPublicGatewayIdentityByID, err error) {
+ _model = &SubnetPublicGatewayPatchPublicGatewayIdentityByID{
+ ID: core.StringPtr(id),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*SubnetPublicGatewayPatchPublicGatewayIdentityByID) isaSubnetPublicGatewayPatch() bool {
+ return true
+}
+
+// UnmarshalSubnetPublicGatewayPatchPublicGatewayIdentityByID unmarshals an instance of SubnetPublicGatewayPatchPublicGatewayIdentityByID from the specified map of raw messages.
+func UnmarshalSubnetPublicGatewayPatchPublicGatewayIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(SubnetPublicGatewayPatchPublicGatewayIdentityByID)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// TrustedProfileIdentityTrustedProfileByCRN : TrustedProfileIdentityTrustedProfileByCRN struct
+// This model "extends" TrustedProfileIdentity
+type TrustedProfileIdentityTrustedProfileByCRN struct {
+ // The CRN for this trusted profile.
+ CRN *string `json:"crn" validate:"required"`
+}
+
+// NewTrustedProfileIdentityTrustedProfileByCRN : Instantiate TrustedProfileIdentityTrustedProfileByCRN (Generic Model Constructor)
+func (*VpcV1) NewTrustedProfileIdentityTrustedProfileByCRN(crn string) (_model *TrustedProfileIdentityTrustedProfileByCRN, err error) {
+ _model = &TrustedProfileIdentityTrustedProfileByCRN{
+ CRN: core.StringPtr(crn),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*TrustedProfileIdentityTrustedProfileByCRN) isaTrustedProfileIdentity() bool {
+ return true
+}
+
+// UnmarshalTrustedProfileIdentityTrustedProfileByCRN unmarshals an instance of TrustedProfileIdentityTrustedProfileByCRN from the specified map of raw messages.
+func UnmarshalTrustedProfileIdentityTrustedProfileByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(TrustedProfileIdentityTrustedProfileByCRN)
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// TrustedProfileIdentityTrustedProfileByID : TrustedProfileIdentityTrustedProfileByID struct
+// This model "extends" TrustedProfileIdentity
+type TrustedProfileIdentityTrustedProfileByID struct {
+ // The unique identifier for this trusted profile.
+ ID *string `json:"id" validate:"required"`
+}
+
+// NewTrustedProfileIdentityTrustedProfileByID : Instantiate TrustedProfileIdentityTrustedProfileByID (Generic Model Constructor)
+func (*VpcV1) NewTrustedProfileIdentityTrustedProfileByID(id string) (_model *TrustedProfileIdentityTrustedProfileByID, err error) {
+ _model = &TrustedProfileIdentityTrustedProfileByID{
+ ID: core.StringPtr(id),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*TrustedProfileIdentityTrustedProfileByID) isaTrustedProfileIdentity() bool {
+ return true
+}
+
+// UnmarshalTrustedProfileIdentityTrustedProfileByID unmarshals an instance of TrustedProfileIdentityTrustedProfileByID from the specified map of raw messages.
+func UnmarshalTrustedProfileIdentityTrustedProfileByID(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(TrustedProfileIdentityTrustedProfileByID)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// VPCIdentityByCRN : VPCIdentityByCRN struct
// This model "extends" VPCIdentity
type VPCIdentityByCRN struct {
@@ -55364,11 +71720,11 @@ type VPCIdentityByCRN struct {
}
// NewVPCIdentityByCRN : Instantiate VPCIdentityByCRN (Generic Model Constructor)
-func (*VpcV1) NewVPCIdentityByCRN(crn string) (model *VPCIdentityByCRN, err error) {
- model = &VPCIdentityByCRN{
+func (*VpcV1) NewVPCIdentityByCRN(crn string) (_model *VPCIdentityByCRN, err error) {
+ _model = &VPCIdentityByCRN{
CRN: core.StringPtr(crn),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -55395,11 +71751,11 @@ type VPCIdentityByHref struct {
}
// NewVPCIdentityByHref : Instantiate VPCIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewVPCIdentityByHref(href string) (model *VPCIdentityByHref, err error) {
- model = &VPCIdentityByHref{
+func (*VpcV1) NewVPCIdentityByHref(href string) (_model *VPCIdentityByHref, err error) {
+ _model = &VPCIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -55426,11 +71782,11 @@ type VPCIdentityByID struct {
}
// NewVPCIdentityByID : Instantiate VPCIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewVPCIdentityByID(id string) (model *VPCIdentityByID, err error) {
- model = &VPCIdentityByID{
+func (*VpcV1) NewVPCIdentityByID(id string) (_model *VPCIdentityByID, err error) {
+ _model = &VPCIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -55449,19 +71805,265 @@ func UnmarshalVPCIdentityByID(m map[string]json.RawMessage, result interface{})
return
}
+// VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref : VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref struct
+// This model "extends" VPNGatewayConnectionIkePolicyPatch
+type VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref struct {
+ // The IKE policy's canonical URL.
+ Href *string `json:"href" validate:"required"`
+}
+
+// NewVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref : Instantiate VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref (Generic Model Constructor)
+func (*VpcV1) NewVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref(href string) (_model *VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref, err error) {
+ _model = &VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref{
+ Href: core.StringPtr(href),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref) isaVPNGatewayConnectionIkePolicyPatch() bool {
+ return true
+}
+
+// UnmarshalVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref unmarshals an instance of VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref from the specified map of raw messages.
+func UnmarshalVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID : VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID struct
+// This model "extends" VPNGatewayConnectionIkePolicyPatch
+type VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID struct {
+ // The unique identifier for this IKE policy.
+ ID *string `json:"id" validate:"required"`
+}
+
+// NewVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID : Instantiate VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID (Generic Model Constructor)
+func (*VpcV1) NewVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID(id string) (_model *VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID, err error) {
+ _model = &VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID{
+ ID: core.StringPtr(id),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID) isaVPNGatewayConnectionIkePolicyPatch() bool {
+ return true
+}
+
+// UnmarshalVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID unmarshals an instance of VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID from the specified map of raw messages.
+func UnmarshalVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref : VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref struct
+// This model "extends" VPNGatewayConnectionIkePolicyPrototype
+type VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref struct {
+ // The IKE policy's canonical URL.
+ Href *string `json:"href" validate:"required"`
+}
+
+// NewVPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref : Instantiate VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref (Generic Model Constructor)
+func (*VpcV1) NewVPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref(href string) (_model *VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref, err error) {
+ _model = &VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref{
+ Href: core.StringPtr(href),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref) isaVPNGatewayConnectionIkePolicyPrototype() bool {
+ return true
+}
+
+// UnmarshalVPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref unmarshals an instance of VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref from the specified map of raw messages.
+func UnmarshalVPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID : VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID struct
+// This model "extends" VPNGatewayConnectionIkePolicyPrototype
+type VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID struct {
+ // The unique identifier for this IKE policy.
+ ID *string `json:"id" validate:"required"`
+}
+
+// NewVPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID : Instantiate VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID (Generic Model Constructor)
+func (*VpcV1) NewVPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID(id string) (_model *VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID, err error) {
+ _model = &VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID{
+ ID: core.StringPtr(id),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID) isaVPNGatewayConnectionIkePolicyPrototype() bool {
+ return true
+}
+
+// UnmarshalVPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID unmarshals an instance of VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID from the specified map of raw messages.
+func UnmarshalVPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref : VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref struct
+// This model "extends" VPNGatewayConnectionIPsecPolicyPatch
+type VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref struct {
+ // The IPsec policy's canonical URL.
+ Href *string `json:"href" validate:"required"`
+}
+
+// NewVPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref : Instantiate VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref (Generic Model Constructor)
+func (*VpcV1) NewVPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref(href string) (_model *VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref, err error) {
+ _model = &VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref{
+ Href: core.StringPtr(href),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref) isaVPNGatewayConnectionIPsecPolicyPatch() bool {
+ return true
+}
+
+// UnmarshalVPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref unmarshals an instance of VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref from the specified map of raw messages.
+func UnmarshalVPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID : VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID struct
+// This model "extends" VPNGatewayConnectionIPsecPolicyPatch
+type VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID struct {
+ // The unique identifier for this IPsec policy.
+ ID *string `json:"id" validate:"required"`
+}
+
+// NewVPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID : Instantiate VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID (Generic Model Constructor)
+func (*VpcV1) NewVPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID(id string) (_model *VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID, err error) {
+ _model = &VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID{
+ ID: core.StringPtr(id),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID) isaVPNGatewayConnectionIPsecPolicyPatch() bool {
+ return true
+}
+
+// UnmarshalVPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID unmarshals an instance of VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID from the specified map of raw messages.
+func UnmarshalVPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref : VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref struct
+// This model "extends" VPNGatewayConnectionIPsecPolicyPrototype
+type VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref struct {
+ // The IPsec policy's canonical URL.
+ Href *string `json:"href" validate:"required"`
+}
+
+// NewVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref : Instantiate VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref (Generic Model Constructor)
+func (*VpcV1) NewVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref(href string) (_model *VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref, err error) {
+ _model = &VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref{
+ Href: core.StringPtr(href),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref) isaVPNGatewayConnectionIPsecPolicyPrototype() bool {
+ return true
+}
+
+// UnmarshalVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref unmarshals an instance of VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref from the specified map of raw messages.
+func UnmarshalVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID : VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID struct
+// This model "extends" VPNGatewayConnectionIPsecPolicyPrototype
+type VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID struct {
+ // The unique identifier for this IPsec policy.
+ ID *string `json:"id" validate:"required"`
+}
+
+// NewVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID : Instantiate VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID (Generic Model Constructor)
+func (*VpcV1) NewVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID(id string) (_model *VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID, err error) {
+ _model = &VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID{
+ ID: core.StringPtr(id),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID) isaVPNGatewayConnectionIPsecPolicyPrototype() bool {
+ return true
+}
+
+// UnmarshalVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID unmarshals an instance of VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID from the specified map of raw messages.
+func UnmarshalVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch : VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch struct
// This model "extends" VPNGatewayConnectionPatch
type VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch struct {
// If set to false, the VPN gateway connection is shut down.
AdminStateUp *bool `json:"admin_state_up,omitempty"`
- DeadPeerDetection *VPNGatewayConnectionDpdPrototype `json:"dead_peer_detection,omitempty"`
+ DeadPeerDetection *VPNGatewayConnectionDpdPatch `json:"dead_peer_detection,omitempty"`
- // Optional IKE policy configuration. The absence of a policy indicates autonegotiation.
- IkePolicy IkePolicyIdentityIntf `json:"ike_policy,omitempty"`
+ IkePolicy VPNGatewayConnectionIkePolicyPatchIntf `json:"ike_policy,omitempty"`
- // Optional IPsec policy configuration. The absence of a policy indicates autonegotiation.
- IpsecPolicy IPsecPolicyIdentityIntf `json:"ipsec_policy,omitempty"`
+ IpsecPolicy VPNGatewayConnectionIPsecPolicyPatchIntf `json:"ipsec_policy,omitempty"`
// The user-defined name for this VPN gateway connection.
Name *string `json:"name,omitempty"`
@@ -55493,15 +72095,15 @@ func UnmarshalVPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch(
if err != nil {
return
}
- err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpdPrototype)
+ err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpdPatch)
if err != nil {
return
}
- err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyIdentity)
+ err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalVPNGatewayConnectionIkePolicyPatch)
if err != nil {
return
}
- err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyIdentity)
+ err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalVPNGatewayConnectionIPsecPolicyPatch)
if err != nil {
return
}
@@ -55525,6 +72127,16 @@ func UnmarshalVPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch(
return
}
+// AsPatch returns a generic map representation of the VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch
+func (vpnGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch *VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch) AsPatch() (_patch map[string]interface{}, err error) {
+ var jsonData []byte
+ jsonData, err = json.Marshal(vpnGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch)
+ if err == nil {
+ err = json.Unmarshal(jsonData, &_patch)
+ }
+ return
+}
+
// VPNGatewayConnectionPolicyMode : VPNGatewayConnectionPolicyMode struct
// This model "extends" VPNGatewayConnection
type VPNGatewayConnectionPolicyMode struct {
@@ -55545,10 +72157,12 @@ type VPNGatewayConnectionPolicyMode struct {
// The unique identifier for this VPN gateway connection.
ID *string `json:"id" validate:"required"`
- // Optional IKE policy configuration. The absence of a policy indicates autonegotiation.
+ // The IKE policy. If absent, [auto-negotiation is
+ // used](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ike-auto-negotiation-phase-1).
IkePolicy *IkePolicyReference `json:"ike_policy,omitempty"`
- // Optional IPsec policy configuration. The absence of a policy indicates autonegotiation.
+ // The IPsec policy. If absent, [auto-negotiation is
+ // used](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ipsec-auto-negotiation-phase-2).
IpsecPolicy *IPsecPolicyReference `json:"ipsec_policy,omitempty"`
// The mode of the VPN gateway.
@@ -55569,10 +72183,10 @@ type VPNGatewayConnectionPolicyMode struct {
// The status of a VPN gateway connection.
Status *string `json:"status" validate:"required"`
- // A collection of local CIDRs for this resource.
+ // The local CIDRs for this resource.
LocalCIDRs []string `json:"local_cidrs" validate:"required"`
- // A collection of peer CIDRs for this resource.
+ // The peer CIDRs for this resource.
PeerCIDRs []string `json:"peer_cidrs" validate:"required"`
}
@@ -55685,11 +72299,9 @@ type VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype struct
DeadPeerDetection *VPNGatewayConnectionDpdPrototype `json:"dead_peer_detection,omitempty"`
- // Optional IKE policy configuration. The absence of a policy indicates autonegotiation.
- IkePolicy IkePolicyIdentityIntf `json:"ike_policy,omitempty"`
+ IkePolicy VPNGatewayConnectionIkePolicyPrototypeIntf `json:"ike_policy,omitempty"`
- // Optional IPsec policy configuration. The absence of a policy indicates autonegotiation.
- IpsecPolicy IPsecPolicyIdentityIntf `json:"ipsec_policy,omitempty"`
+ IpsecPolicy VPNGatewayConnectionIPsecPolicyPrototypeIntf `json:"ipsec_policy,omitempty"`
// The user-defined name for this VPN gateway connection.
Name *string `json:"name,omitempty"`
@@ -55700,22 +72312,22 @@ type VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype struct
// The preshared key.
Psk *string `json:"psk" validate:"required"`
- // A collection of local CIDRs for this resource.
+ // The local CIDRs for this resource.
LocalCIDRs []string `json:"local_cidrs" validate:"required"`
- // A collection of peer CIDRs for this resource.
+ // The peer CIDRs for this resource.
PeerCIDRs []string `json:"peer_cidrs" validate:"required"`
}
// NewVPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype : Instantiate VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype (Generic Model Constructor)
-func (*VpcV1) NewVPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype(peerAddress string, psk string, localCIDRs []string, peerCIDRs []string) (model *VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype, err error) {
- model = &VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype{
+func (*VpcV1) NewVPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype(peerAddress string, psk string, localCIDRs []string, peerCIDRs []string) (_model *VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype, err error) {
+ _model = &VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype{
PeerAddress: core.StringPtr(peerAddress),
Psk: core.StringPtr(psk),
LocalCIDRs: localCIDRs,
PeerCIDRs: peerCIDRs,
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -55734,11 +72346,11 @@ func UnmarshalVPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototy
if err != nil {
return
}
- err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyIdentity)
+ err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalVPNGatewayConnectionIkePolicyPrototype)
if err != nil {
return
}
- err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyIdentity)
+ err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalVPNGatewayConnectionIPsecPolicyPrototype)
if err != nil {
return
}
@@ -55774,11 +72386,9 @@ type VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype s
DeadPeerDetection *VPNGatewayConnectionDpdPrototype `json:"dead_peer_detection,omitempty"`
- // Optional IKE policy configuration. The absence of a policy indicates autonegotiation.
- IkePolicy IkePolicyIdentityIntf `json:"ike_policy,omitempty"`
+ IkePolicy VPNGatewayConnectionIkePolicyPrototypeIntf `json:"ike_policy,omitempty"`
- // Optional IPsec policy configuration. The absence of a policy indicates autonegotiation.
- IpsecPolicy IPsecPolicyIdentityIntf `json:"ipsec_policy,omitempty"`
+ IpsecPolicy VPNGatewayConnectionIPsecPolicyPrototypeIntf `json:"ipsec_policy,omitempty"`
// The user-defined name for this VPN gateway connection.
Name *string `json:"name,omitempty"`
@@ -55799,6 +72409,16 @@ const (
VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototypeRoutingProtocolNoneConst = "none"
)
+// NewVPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype : Instantiate VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype (Generic Model Constructor)
+func (*VpcV1) NewVPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype(peerAddress string, psk string) (_model *VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype, err error) {
+ _model = &VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype{
+ PeerAddress: core.StringPtr(peerAddress),
+ Psk: core.StringPtr(psk),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
func (*VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype) isaVPNGatewayConnectionPrototype() bool {
return true
}
@@ -55814,11 +72434,11 @@ func UnmarshalVPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePr
if err != nil {
return
}
- err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyIdentity)
+ err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalVPNGatewayConnectionIkePolicyPrototype)
if err != nil {
return
}
- err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyIdentity)
+ err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalVPNGatewayConnectionIPsecPolicyPrototype)
if err != nil {
return
}
@@ -55862,10 +72482,12 @@ type VPNGatewayConnectionStaticRouteMode struct {
// The unique identifier for this VPN gateway connection.
ID *string `json:"id" validate:"required"`
- // Optional IKE policy configuration. The absence of a policy indicates autonegotiation.
+ // The IKE policy. If absent, [auto-negotiation is
+ // used](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ike-auto-negotiation-phase-1).
IkePolicy *IkePolicyReference `json:"ike_policy,omitempty"`
- // Optional IPsec policy configuration. The absence of a policy indicates autonegotiation.
+ // The IPsec policy. If absent, [auto-negotiation is
+ // used](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ipsec-auto-negotiation-phase-2).
IpsecPolicy *IPsecPolicyReference `json:"ipsec_policy,omitempty"`
// The mode of the VPN gateway.
@@ -56003,7 +72625,7 @@ func UnmarshalVPNGatewayConnectionStaticRouteMode(m map[string]json.RawMessage,
// VPNGatewayPolicyMode : VPNGatewayPolicyMode struct
// This model "extends" VPNGateway
type VPNGatewayPolicyMode struct {
- // Collection of references to VPN gateway connections.
+ // Connections for this VPN gateway.
Connections []VPNGatewayConnectionReference `json:"connections" validate:"required"`
// The date and time that this VPN gateway was created.
@@ -56139,6 +72761,15 @@ const (
VPNGatewayPrototypeVPNGatewayPolicyModePrototypeModePolicyConst = "policy"
)
+// NewVPNGatewayPrototypeVPNGatewayPolicyModePrototype : Instantiate VPNGatewayPrototypeVPNGatewayPolicyModePrototype (Generic Model Constructor)
+func (*VpcV1) NewVPNGatewayPrototypeVPNGatewayPolicyModePrototype(subnet SubnetIdentityIntf) (_model *VPNGatewayPrototypeVPNGatewayPolicyModePrototype, err error) {
+ _model = &VPNGatewayPrototypeVPNGatewayPolicyModePrototype{
+ Subnet: subnet,
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
func (*VPNGatewayPrototypeVPNGatewayPolicyModePrototype) isaVPNGatewayPrototype() bool {
return true
}
@@ -56186,6 +72817,15 @@ const (
VPNGatewayPrototypeVPNGatewayRouteModePrototypeModeRouteConst = "route"
)
+// NewVPNGatewayPrototypeVPNGatewayRouteModePrototype : Instantiate VPNGatewayPrototypeVPNGatewayRouteModePrototype (Generic Model Constructor)
+func (*VpcV1) NewVPNGatewayPrototypeVPNGatewayRouteModePrototype(subnet SubnetIdentityIntf) (_model *VPNGatewayPrototypeVPNGatewayRouteModePrototype, err error) {
+ _model = &VPNGatewayPrototypeVPNGatewayRouteModePrototype{
+ Subnet: subnet,
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
func (*VPNGatewayPrototypeVPNGatewayRouteModePrototype) isaVPNGatewayPrototype() bool {
return true
}
@@ -56216,7 +72856,7 @@ func UnmarshalVPNGatewayPrototypeVPNGatewayRouteModePrototype(m map[string]json.
// VPNGatewayRouteMode : VPNGatewayRouteMode struct
// This model "extends" VPNGateway
type VPNGatewayRouteMode struct {
- // Collection of references to VPN gateway connections.
+ // Connections for this VPN gateway.
Connections []VPNGatewayConnectionReference `json:"connections" validate:"required"`
// The date and time that this VPN gateway was created.
@@ -56332,6 +72972,128 @@ func UnmarshalVPNGatewayRouteMode(m map[string]json.RawMessage, result interface
return
}
+// VolumeAttachmentPrototypeVolumeVolumeIdentity : Identifies a volume by a unique property.
+// Models which "extend" this model:
+// - VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID
+// - VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN
+// - VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref
+// This model "extends" VolumeAttachmentPrototypeVolume
+type VolumeAttachmentPrototypeVolumeVolumeIdentity struct {
+ // The unique identifier for this volume.
+ ID *string `json:"id,omitempty"`
+
+ // The CRN for this volume.
+ CRN *string `json:"crn,omitempty"`
+
+ // The URL for this volume.
+ Href *string `json:"href,omitempty"`
+}
+
+func (*VolumeAttachmentPrototypeVolumeVolumeIdentity) isaVolumeAttachmentPrototypeVolumeVolumeIdentity() bool {
+ return true
+}
+
+type VolumeAttachmentPrototypeVolumeVolumeIdentityIntf interface {
+ VolumeAttachmentPrototypeVolumeIntf
+ isaVolumeAttachmentPrototypeVolumeVolumeIdentity() bool
+}
+
+func (*VolumeAttachmentPrototypeVolumeVolumeIdentity) isaVolumeAttachmentPrototypeVolume() bool {
+ return true
+}
+
+// UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentity unmarshals an instance of VolumeAttachmentPrototypeVolumeVolumeIdentity from the specified map of raw messages.
+func UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VolumeAttachmentPrototypeVolumeVolumeIdentity)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext : VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext struct
+// Models which "extend" this model:
+// - VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity
+// - VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot
+// This model "extends" VolumeAttachmentPrototypeVolume
+type VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext struct {
+ // The maximum I/O operations per second (IOPS) to use for the volume. Applicable only to volumes using a profile
+ // `family` of `custom`.
+ Iops *int64 `json:"iops,omitempty"`
+
+ // The unique user-defined name for this volume.
+ Name *string `json:"name,omitempty"`
+
+ // The profile to use for this volume.
+ Profile VolumeProfileIdentityIntf `json:"profile" validate:"required"`
+
+ // The capacity to use for the volume (in gigabytes). The specified minimum and maximum capacity values for creating or
+ // updating volumes may expand in the future.
+ Capacity *int64 `json:"capacity,omitempty"`
+
+ // The root key to use to wrap the data encryption key for the volume.
+ //
+ // If unspecified, the `encryption` type for the volume will be `provider_managed`.
+ EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
+
+ // The snapshot from which to clone the volume.
+ SourceSnapshot SnapshotIdentityIntf `json:"source_snapshot,omitempty"`
+}
+
+func (*VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext) isaVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext() bool {
+ return true
+}
+
+type VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextIntf interface {
+ VolumeAttachmentPrototypeVolumeIntf
+ isaVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext() bool
+}
+
+func (*VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext) isaVolumeAttachmentPrototypeVolume() bool {
+ return true
+}
+
+// UnmarshalVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext unmarshals an instance of VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext from the specified map of raw messages.
+func UnmarshalVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext)
+ err = core.UnmarshalPrimitive(m, "iops", &obj.Iops)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotIdentity)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentity : Identifies a volume by a unique property.
// Models which "extend" this model:
// - VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByID
@@ -56384,15 +73146,11 @@ func UnmarshalVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentity(m map
// VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext : VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext struct
// Models which "extend" this model:
// - VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity
+// - VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot
// This model "extends" VolumeAttachmentVolumePrototypeInstanceContext
type VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext struct {
- // The identity of the root key to use to wrap the data encryption key for the volume.
- //
- // If this property is not provided, the `encryption` type for the volume will be
- // `provider_managed`.
- EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
-
- // The bandwidth for the volume.
+ // The maximum I/O operations per second (IOPS) to use for the volume. Applicable only to volumes using a profile
+ // `family` of `custom`.
Iops *int64 `json:"iops,omitempty"`
// The unique user-defined name for this volume.
@@ -56401,9 +73159,17 @@ type VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContex
// The profile to use for this volume.
Profile VolumeProfileIdentityIntf `json:"profile" validate:"required"`
- // The capacity of the volume in gigabytes. The specified minimum and maximum capacity values for creating or updating
- // volumes may expand in the future.
+ // The capacity to use for the volume (in gigabytes). The specified minimum and maximum capacity values for creating or
+ // updating volumes may expand in the future.
Capacity *int64 `json:"capacity,omitempty"`
+
+ // The root key to use to wrap the data encryption key for the volume.
+ //
+ // If unspecified, the `encryption` type for the volume will be `provider_managed`.
+ EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
+
+ // The snapshot from which to clone the volume.
+ SourceSnapshot SnapshotIdentityIntf `json:"source_snapshot,omitempty"`
}
func (*VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext) isaVolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext() bool {
@@ -56422,10 +73188,6 @@ func (*VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceCont
// UnmarshalVolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext unmarshals an instance of VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext from the specified map of raw messages.
func UnmarshalVolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext)
- err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
- if err != nil {
- return
- }
err = core.UnmarshalPrimitive(m, "iops", &obj.Iops)
if err != nil {
return
@@ -56442,6 +73204,14 @@ func UnmarshalVolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInsta
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotIdentity)
+ if err != nil {
+ return
+ }
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
@@ -56454,11 +73224,11 @@ type VolumeIdentityByCRN struct {
}
// NewVolumeIdentityByCRN : Instantiate VolumeIdentityByCRN (Generic Model Constructor)
-func (*VpcV1) NewVolumeIdentityByCRN(crn string) (model *VolumeIdentityByCRN, err error) {
- model = &VolumeIdentityByCRN{
+func (*VpcV1) NewVolumeIdentityByCRN(crn string) (_model *VolumeIdentityByCRN, err error) {
+ _model = &VolumeIdentityByCRN{
CRN: core.StringPtr(crn),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -56485,11 +73255,11 @@ type VolumeIdentityByHref struct {
}
// NewVolumeIdentityByHref : Instantiate VolumeIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewVolumeIdentityByHref(href string) (model *VolumeIdentityByHref, err error) {
- model = &VolumeIdentityByHref{
+func (*VpcV1) NewVolumeIdentityByHref(href string) (_model *VolumeIdentityByHref, err error) {
+ _model = &VolumeIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -56516,11 +73286,11 @@ type VolumeIdentityByID struct {
}
// NewVolumeIdentityByID : Instantiate VolumeIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewVolumeIdentityByID(id string) (model *VolumeIdentityByID, err error) {
- model = &VolumeIdentityByID{
+func (*VpcV1) NewVolumeIdentityByID(id string) (_model *VolumeIdentityByID, err error) {
+ _model = &VolumeIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -56547,11 +73317,11 @@ type VolumeProfileIdentityByHref struct {
}
// NewVolumeProfileIdentityByHref : Instantiate VolumeProfileIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewVolumeProfileIdentityByHref(href string) (model *VolumeProfileIdentityByHref, err error) {
- model = &VolumeProfileIdentityByHref{
+func (*VpcV1) NewVolumeProfileIdentityByHref(href string) (_model *VolumeProfileIdentityByHref, err error) {
+ _model = &VolumeProfileIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -56578,11 +73348,11 @@ type VolumeProfileIdentityByName struct {
}
// NewVolumeProfileIdentityByName : Instantiate VolumeProfileIdentityByName (Generic Model Constructor)
-func (*VpcV1) NewVolumeProfileIdentityByName(name string) (model *VolumeProfileIdentityByName, err error) {
- model = &VolumeProfileIdentityByName{
+func (*VpcV1) NewVolumeProfileIdentityByName(name string) (_model *VolumeProfileIdentityByName, err error) {
+ _model = &VolumeProfileIdentityByName{
Name: core.StringPtr(name),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -56604,13 +73374,8 @@ func UnmarshalVolumeProfileIdentityByName(m map[string]json.RawMessage, result i
// VolumePrototypeVolumeByCapacity : VolumePrototypeVolumeByCapacity struct
// This model "extends" VolumePrototype
type VolumePrototypeVolumeByCapacity struct {
- // The identity of the root key to use to wrap the data encryption key for the volume.
- //
- // If this property is not provided, the `encryption` type for the volume will be
- // `provider_managed`.
- EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
-
- // The bandwidth for the volume.
+ // The maximum I/O operations per second (IOPS) to use for the volume. Applicable only to volumes using a profile
+ // `family` of `custom`.
Iops *int64 `json:"iops,omitempty"`
// The unique user-defined name for this volume.
@@ -56621,22 +73386,30 @@ type VolumePrototypeVolumeByCapacity struct {
ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
+ // The [user tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this volume.
+ UserTags []string `json:"user_tags,omitempty"`
+
// The zone this volume will reside in.
Zone ZoneIdentityIntf `json:"zone" validate:"required"`
- // The capacity of the volume in gigabytes. The specified minimum and maximum capacity values for creating or updating
- // volumes may expand in the future.
+ // The capacity to use for the volume (in gigabytes). The specified minimum and maximum capacity values for creating or
+ // updating volumes may expand in the future.
Capacity *int64 `json:"capacity" validate:"required"`
+
+ // The root key to use to wrap the data encryption key for the volume.
+ //
+ // If unspecified, the `encryption` type for the volume will be `provider_managed`.
+ EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
}
// NewVolumePrototypeVolumeByCapacity : Instantiate VolumePrototypeVolumeByCapacity (Generic Model Constructor)
-func (*VpcV1) NewVolumePrototypeVolumeByCapacity(profile VolumeProfileIdentityIntf, zone ZoneIdentityIntf, capacity int64) (model *VolumePrototypeVolumeByCapacity, err error) {
- model = &VolumePrototypeVolumeByCapacity{
+func (*VpcV1) NewVolumePrototypeVolumeByCapacity(profile VolumeProfileIdentityIntf, zone ZoneIdentityIntf, capacity int64) (_model *VolumePrototypeVolumeByCapacity, err error) {
+ _model = &VolumePrototypeVolumeByCapacity{
Profile: profile,
Zone: zone,
Capacity: core.Int64Ptr(capacity),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -56647,10 +73420,6 @@ func (*VolumePrototypeVolumeByCapacity) isaVolumePrototype() bool {
// UnmarshalVolumePrototypeVolumeByCapacity unmarshals an instance of VolumePrototypeVolumeByCapacity from the specified map of raw messages.
func UnmarshalVolumePrototypeVolumeByCapacity(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(VolumePrototypeVolumeByCapacity)
- err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
- if err != nil {
- return
- }
err = core.UnmarshalPrimitive(m, "iops", &obj.Iops)
if err != nil {
return
@@ -56667,6 +73436,10 @@ func UnmarshalVolumePrototypeVolumeByCapacity(m map[string]json.RawMessage, resu
if err != nil {
return
}
+ err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags)
+ if err != nil {
+ return
+ }
err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity)
if err != nil {
return
@@ -56675,6 +73448,10 @@ func UnmarshalVolumePrototypeVolumeByCapacity(m map[string]json.RawMessage, resu
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
+ if err != nil {
+ return
+ }
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
@@ -56687,11 +73464,11 @@ type ZoneIdentityByHref struct {
}
// NewZoneIdentityByHref : Instantiate ZoneIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewZoneIdentityByHref(href string) (model *ZoneIdentityByHref, err error) {
- model = &ZoneIdentityByHref{
+func (*VpcV1) NewZoneIdentityByHref(href string) (_model *ZoneIdentityByHref, err error) {
+ _model = &ZoneIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -56718,11 +73495,11 @@ type ZoneIdentityByName struct {
}
// NewZoneIdentityByName : Instantiate ZoneIdentityByName (Generic Model Constructor)
-func (*VpcV1) NewZoneIdentityByName(name string) (model *ZoneIdentityByName, err error) {
- model = &ZoneIdentityByName{
+func (*VpcV1) NewZoneIdentityByName(name string) (_model *ZoneIdentityByName, err error) {
+ _model = &ZoneIdentityByName{
Name: core.StringPtr(name),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -56749,11 +73526,11 @@ type EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref struct
}
// NewEndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref : Instantiate EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewEndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref(href string) (model *EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref, err error) {
- model = &EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref{
+func (*VpcV1) NewEndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref(href string) (_model *EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref, err error) {
+ _model = &EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -56784,11 +73561,11 @@ type EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByID struct {
}
// NewEndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByID : Instantiate EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewEndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByID(id string) (model *EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByID, err error) {
- model = &EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByID{
+func (*VpcV1) NewEndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByID(id string) (_model *EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByID, err error) {
+ _model = &EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -56829,12 +73606,12 @@ const (
)
// NewEndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN : Instantiate EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN (Generic Model Constructor)
-func (*VpcV1) NewEndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN(resourceType string, crn string) (model *EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN, err error) {
- model = &EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN{
+func (*VpcV1) NewEndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN(resourceType string, crn string) (_model *EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN, err error) {
+ _model = &EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN{
ResourceType: core.StringPtr(resourceType),
CRN: core.StringPtr(crn),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -56880,12 +73657,12 @@ const (
)
// NewEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName : Instantiate EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName (Generic Model Constructor)
-func (*VpcV1) NewEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName(resourceType string, name string) (model *EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName, err error) {
- model = &EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName{
+func (*VpcV1) NewEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName(resourceType string, name string) (_model *EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName, err error) {
+ _model = &EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName{
ResourceType: core.StringPtr(resourceType),
Name: core.StringPtr(name),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -56920,11 +73697,11 @@ type FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN struct
}
// NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN : Instantiate FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN (Generic Model Constructor)
-func (*VpcV1) NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN(crn string) (model *FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN, err error) {
- model = &FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN{
+func (*VpcV1) NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN(crn string) (_model *FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN, err error) {
+ _model = &FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN{
CRN: core.StringPtr(crn),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -56955,11 +73732,11 @@ type FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref struc
}
// NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref : Instantiate FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref(href string) (model *FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref, err error) {
- model = &FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref{
+func (*VpcV1) NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref(href string) (_model *FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref, err error) {
+ _model = &FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -56990,11 +73767,11 @@ type FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID struct
}
// NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID : Instantiate FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID(id string) (model *FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID, err error) {
- model = &FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID{
+func (*VpcV1) NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID(id string) (_model *FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID, err error) {
+ _model = &FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57025,11 +73802,11 @@ type FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIden
}
// NewFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref : Instantiate FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(href string) (model *FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref, err error) {
- model = &FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref{
+func (*VpcV1) NewFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(href string) (_model *FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref, err error) {
+ _model = &FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57060,11 +73837,11 @@ type FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIden
}
// NewFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID : Instantiate FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID(id string) (model *FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID, err error) {
- model = &FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID{
+func (*VpcV1) NewFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID(id string) (_model *FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID, err error) {
+ _model = &FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57095,11 +73872,11 @@ type FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN struct {
}
// NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN : Instantiate FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN (Generic Model Constructor)
-func (*VpcV1) NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN(crn string) (model *FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN, err error) {
- model = &FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN{
+func (*VpcV1) NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN(crn string) (_model *FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN, err error) {
+ _model = &FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN{
CRN: core.StringPtr(crn),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57130,11 +73907,11 @@ type FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref struct {
}
// NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref : Instantiate FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref(href string) (model *FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref, err error) {
- model = &FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref{
+func (*VpcV1) NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref(href string) (_model *FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref, err error) {
+ _model = &FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57165,11 +73942,11 @@ type FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID struct {
}
// NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID : Instantiate FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID(id string) (model *FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID, err error) {
- model = &FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID{
+func (*VpcV1) NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID(id string) (_model *FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID, err error) {
+ _model = &FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57200,11 +73977,11 @@ type FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN struct {
}
// NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN : Instantiate FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN (Generic Model Constructor)
-func (*VpcV1) NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN(crn string) (model *FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN, err error) {
- model = &FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN{
+func (*VpcV1) NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN(crn string) (_model *FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN, err error) {
+ _model = &FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN{
CRN: core.StringPtr(crn),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57235,11 +74012,11 @@ type FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref struct {
}
// NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref : Instantiate FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref(href string) (model *FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref, err error) {
- model = &FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref{
+func (*VpcV1) NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref(href string) (_model *FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref, err error) {
+ _model = &FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57270,11 +74047,11 @@ type FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID struct {
}
// NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID : Instantiate FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID(id string) (model *FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID, err error) {
- model = &FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID{
+func (*VpcV1) NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID(id string) (_model *FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID, err error) {
+ _model = &FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57297,6 +74074,1054 @@ func UnmarshalFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID(m map[st
return
}
+// InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec struct
+// Models which "extend" this model:
+// - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup
+// - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager
+// This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototype
+type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec struct {
+ // The user-defined name for this instance group manager action. Names must be unique within the instance group
+ // manager. If unspecified, the name will be a hyphenated list of randomly-selected words.
+ Name *string `json:"name,omitempty"`
+
+ // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min
+ // period.
+ CronSpec *string `json:"cron_spec,omitempty"`
+
+ Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group,omitempty"`
+
+ Manager InstanceGroupManagerScheduledActionManagerPrototypeIntf `json:"manager,omitempty"`
+}
+
+func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec) isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec() bool {
+ return true
+}
+
+type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecIntf interface {
+ InstanceGroupManagerActionPrototypeScheduledActionPrototypeIntf
+ isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec() bool
+}
+
+func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool {
+ return true
+}
+
+func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec) isaInstanceGroupManagerActionPrototype() bool {
+ return true
+}
+
+// UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec)
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManagerPrototype)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt struct
+// Models which "extend" this model:
+// - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup
+// - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager
+// This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototype
+type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt struct {
+ // The user-defined name for this instance group manager action. Names must be unique within the instance group
+ // manager. If unspecified, the name will be a hyphenated list of randomly-selected words.
+ Name *string `json:"name,omitempty"`
+
+ // The date and time the scheduled action will run.
+ RunAt *strfmt.DateTime `json:"run_at,omitempty"`
+
+ Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group,omitempty"`
+
+ Manager InstanceGroupManagerScheduledActionManagerPrototypeIntf `json:"manager,omitempty"`
+}
+
+func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt) isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt() bool {
+ return true
+}
+
+type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtIntf interface {
+ InstanceGroupManagerActionPrototypeScheduledActionPrototypeIntf
+ isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt() bool
+}
+
+func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool {
+ return true
+}
+
+func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt) isaInstanceGroupManagerActionPrototype() bool {
+ return true
+}
+
+// UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt)
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManagerPrototype)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerActionScheduledActionGroupTarget : InstanceGroupManagerActionScheduledActionGroupTarget struct
+// This model "extends" InstanceGroupManagerActionScheduledAction
+type InstanceGroupManagerActionScheduledActionGroupTarget struct {
+ // Indicates whether this scheduled action will be automatically deleted after it has completed and
+ // `auto_delete_timeout` hours have passed. At present, this is always
+ // `true`, but may be modifiable in the future.
+ AutoDelete *bool `json:"auto_delete" validate:"required"`
+
+ // If `auto_delete` is `true`, and this scheduled action has finished, the hours after which it will be automatically
+ // deleted. If the value is `0`, the action will be deleted once it has finished. This value may be modifiable in the
+ // future.
+ AutoDeleteTimeout *int64 `json:"auto_delete_timeout" validate:"required"`
+
+ // The date and time that the instance group manager action was created.
+ CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
+
+ // The URL for this instance group manager action.
+ Href *string `json:"href" validate:"required"`
+
+ // The unique identifier for this instance group manager action.
+ ID *string `json:"id" validate:"required"`
+
+ // The user-defined name for this instance group manager action.
+ Name *string `json:"name" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+
+ // The status of the instance group action
+ // - `active`: Action is ready to be run
+ // - `completed`: Action was completed successfully
+ // - `failed`: Action could not be completed successfully
+ // - `incompatible`: Action parameters are not compatible with the group or manager
+ // - `omitted`: Action was not applied because this action's manager was disabled.
+ Status *string `json:"status" validate:"required"`
+
+ // The date and time that the instance group manager action was modified.
+ UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"`
+
+ // The type of action for the instance group.
+ ActionType *string `json:"action_type" validate:"required"`
+
+ // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min
+ // period.
+ CronSpec *string `json:"cron_spec,omitempty"`
+
+ // The date and time the scheduled action was last applied. If absent, the action has never been applied.
+ LastAppliedAt *strfmt.DateTime `json:"last_applied_at,omitempty"`
+
+ // The date and time the scheduled action will next run. If absent, the system is currently calculating the next run
+ // time.
+ NextRunAt *strfmt.DateTime `json:"next_run_at,omitempty"`
+
+ Group *InstanceGroupManagerScheduledActionGroup `json:"group" validate:"required"`
+}
+
+// Constants associated with the InstanceGroupManagerActionScheduledActionGroupTarget.ResourceType property.
+// The resource type.
+const (
+ InstanceGroupManagerActionScheduledActionGroupTargetResourceTypeInstanceGroupManagerActionConst = "instance_group_manager_action"
+)
+
+// Constants associated with the InstanceGroupManagerActionScheduledActionGroupTarget.Status property.
+// The status of the instance group action
+// - `active`: Action is ready to be run
+// - `completed`: Action was completed successfully
+// - `failed`: Action could not be completed successfully
+// - `incompatible`: Action parameters are not compatible with the group or manager
+// - `omitted`: Action was not applied because this action's manager was disabled.
+const (
+ InstanceGroupManagerActionScheduledActionGroupTargetStatusActiveConst = "active"
+ InstanceGroupManagerActionScheduledActionGroupTargetStatusCompletedConst = "completed"
+ InstanceGroupManagerActionScheduledActionGroupTargetStatusFailedConst = "failed"
+ InstanceGroupManagerActionScheduledActionGroupTargetStatusIncompatibleConst = "incompatible"
+ InstanceGroupManagerActionScheduledActionGroupTargetStatusOmittedConst = "omitted"
+)
+
+// Constants associated with the InstanceGroupManagerActionScheduledActionGroupTarget.ActionType property.
+// The type of action for the instance group.
+const (
+ InstanceGroupManagerActionScheduledActionGroupTargetActionTypeScheduledConst = "scheduled"
+)
+
+func (*InstanceGroupManagerActionScheduledActionGroupTarget) isaInstanceGroupManagerActionScheduledAction() bool {
+ return true
+}
+
+func (*InstanceGroupManagerActionScheduledActionGroupTarget) isaInstanceGroupManagerAction() bool {
+ return true
+}
+
+// UnmarshalInstanceGroupManagerActionScheduledActionGroupTarget unmarshals an instance of InstanceGroupManagerActionScheduledActionGroupTarget from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerActionScheduledActionGroupTarget(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerActionScheduledActionGroupTarget)
+ err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "auto_delete_timeout", &obj.AutoDeleteTimeout)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "status", &obj.Status)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "action_type", &obj.ActionType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "last_applied_at", &obj.LastAppliedAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "next_run_at", &obj.NextRunAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroup)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerActionScheduledActionManagerTarget : InstanceGroupManagerActionScheduledActionManagerTarget struct
+// This model "extends" InstanceGroupManagerActionScheduledAction
+type InstanceGroupManagerActionScheduledActionManagerTarget struct {
+ // Indicates whether this scheduled action will be automatically deleted after it has completed and
+ // `auto_delete_timeout` hours have passed. At present, this is always
+ // `true`, but may be modifiable in the future.
+ AutoDelete *bool `json:"auto_delete" validate:"required"`
+
+ // If `auto_delete` is `true`, and this scheduled action has finished, the hours after which it will be automatically
+ // deleted. If the value is `0`, the action will be deleted once it has finished. This value may be modifiable in the
+ // future.
+ AutoDeleteTimeout *int64 `json:"auto_delete_timeout" validate:"required"`
+
+ // The date and time that the instance group manager action was created.
+ CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`
+
+ // The URL for this instance group manager action.
+ Href *string `json:"href" validate:"required"`
+
+ // The unique identifier for this instance group manager action.
+ ID *string `json:"id" validate:"required"`
+
+ // The user-defined name for this instance group manager action.
+ Name *string `json:"name" validate:"required"`
+
+ // The resource type.
+ ResourceType *string `json:"resource_type" validate:"required"`
+
+ // The status of the instance group action
+ // - `active`: Action is ready to be run
+ // - `completed`: Action was completed successfully
+ // - `failed`: Action could not be completed successfully
+ // - `incompatible`: Action parameters are not compatible with the group or manager
+ // - `omitted`: Action was not applied because this action's manager was disabled.
+ Status *string `json:"status" validate:"required"`
+
+ // The date and time that the instance group manager action was modified.
+ UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"`
+
+ // The type of action for the instance group.
+ ActionType *string `json:"action_type" validate:"required"`
+
+ // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min
+ // period.
+ CronSpec *string `json:"cron_spec,omitempty"`
+
+ // The date and time the scheduled action was last applied. If absent, the action has never been applied.
+ LastAppliedAt *strfmt.DateTime `json:"last_applied_at,omitempty"`
+
+ // The date and time the scheduled action will next run. If absent, the system is currently calculating the next run
+ // time.
+ NextRunAt *strfmt.DateTime `json:"next_run_at,omitempty"`
+
+ Manager InstanceGroupManagerScheduledActionManagerIntf `json:"manager" validate:"required"`
+}
+
+// Constants associated with the InstanceGroupManagerActionScheduledActionManagerTarget.ResourceType property.
+// The resource type.
+const (
+ InstanceGroupManagerActionScheduledActionManagerTargetResourceTypeInstanceGroupManagerActionConst = "instance_group_manager_action"
+)
+
+// Constants associated with the InstanceGroupManagerActionScheduledActionManagerTarget.Status property.
+// The status of the instance group action
+// - `active`: Action is ready to be run
+// - `completed`: Action was completed successfully
+// - `failed`: Action could not be completed successfully
+// - `incompatible`: Action parameters are not compatible with the group or manager
+// - `omitted`: Action was not applied because this action's manager was disabled.
+const (
+ InstanceGroupManagerActionScheduledActionManagerTargetStatusActiveConst = "active"
+ InstanceGroupManagerActionScheduledActionManagerTargetStatusCompletedConst = "completed"
+ InstanceGroupManagerActionScheduledActionManagerTargetStatusFailedConst = "failed"
+ InstanceGroupManagerActionScheduledActionManagerTargetStatusIncompatibleConst = "incompatible"
+ InstanceGroupManagerActionScheduledActionManagerTargetStatusOmittedConst = "omitted"
+)
+
+// Constants associated with the InstanceGroupManagerActionScheduledActionManagerTarget.ActionType property.
+// The type of action for the instance group.
+const (
+ InstanceGroupManagerActionScheduledActionManagerTargetActionTypeScheduledConst = "scheduled"
+)
+
+func (*InstanceGroupManagerActionScheduledActionManagerTarget) isaInstanceGroupManagerActionScheduledAction() bool {
+ return true
+}
+
+func (*InstanceGroupManagerActionScheduledActionManagerTarget) isaInstanceGroupManagerAction() bool {
+ return true
+}
+
+// UnmarshalInstanceGroupManagerActionScheduledActionManagerTarget unmarshals an instance of InstanceGroupManagerActionScheduledActionManagerTarget from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerActionScheduledActionManagerTarget(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerActionScheduledActionManagerTarget)
+ err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "auto_delete_timeout", &obj.AutoDeleteTimeout)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "status", &obj.Status)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "action_type", &obj.ActionType)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "last_applied_at", &obj.LastAppliedAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "next_run_at", &obj.NextRunAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManager)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref : InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref struct
+// This model "extends" InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype
+type InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref struct {
+ // The desired maximum number of instance group members at the scheduled time.
+ MaxMembershipCount *int64 `json:"max_membership_count,omitempty"`
+
+ // The desired minimum number of instance group members at the scheduled time.
+ MinMembershipCount *int64 `json:"min_membership_count,omitempty"`
+
+ // The URL for this instance group manager.
+ Href *string `json:"href" validate:"required"`
+}
+
+// NewInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref : Instantiate InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref (Generic Model Constructor)
+func (*VpcV1) NewInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref(href string) (_model *InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref, err error) {
+ _model = &InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref{
+ Href: core.StringPtr(href),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref) isaInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype() bool {
+ return true
+}
+
+func (*InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref) isaInstanceGroupManagerScheduledActionManagerPrototype() bool {
+ return true
+}
+
+// UnmarshalInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref unmarshals an instance of InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref)
+ err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID : InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID struct
+// This model "extends" InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype
+type InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID struct {
+ // The desired maximum number of instance group members at the scheduled time.
+ MaxMembershipCount *int64 `json:"max_membership_count,omitempty"`
+
+ // The desired minimum number of instance group members at the scheduled time.
+ MinMembershipCount *int64 `json:"min_membership_count,omitempty"`
+
+ // The unique identifier for this instance group manager.
+ ID *string `json:"id" validate:"required"`
+}
+
+// NewInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID : Instantiate InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID (Generic Model Constructor)
+func (*VpcV1) NewInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID(id string) (_model *InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID, err error) {
+ _model = &InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID{
+ ID: core.StringPtr(id),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID) isaInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype() bool {
+ return true
+}
+
+func (*InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID) isaInstanceGroupManagerScheduledActionManagerPrototype() bool {
+ return true
+}
+
+// UnmarshalInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID unmarshals an instance of InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID)
+ err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN : InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN struct
+// This model "extends" InstancePlacementTargetPatchDedicatedHostGroupIdentity
+type InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN struct {
+ // The CRN for this dedicated host group.
+ CRN *string `json:"crn" validate:"required"`
+}
+
+// NewInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN : Instantiate InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN (Generic Model Constructor)
+func (*VpcV1) NewInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN(crn string) (_model *InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN, err error) {
+ _model = &InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN{
+ CRN: core.StringPtr(crn),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN) isaInstancePlacementTargetPatchDedicatedHostGroupIdentity() bool {
+ return true
+}
+
+func (*InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN) isaInstancePlacementTargetPatch() bool {
+ return true
+}
+
+// UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN unmarshals an instance of InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN)
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref : InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref struct
+// This model "extends" InstancePlacementTargetPatchDedicatedHostGroupIdentity
+type InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref struct {
+ // The URL for this dedicated host group.
+ Href *string `json:"href" validate:"required"`
+}
+
+// NewInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref : Instantiate InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref (Generic Model Constructor)
+func (*VpcV1) NewInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref(href string) (_model *InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref, err error) {
+ _model = &InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref{
+ Href: core.StringPtr(href),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref) isaInstancePlacementTargetPatchDedicatedHostGroupIdentity() bool {
+ return true
+}
+
+func (*InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref) isaInstancePlacementTargetPatch() bool {
+ return true
+}
+
+// UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref unmarshals an instance of InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID : InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID struct
+// This model "extends" InstancePlacementTargetPatchDedicatedHostGroupIdentity
+type InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID struct {
+ // The unique identifier for this dedicated host group.
+ ID *string `json:"id" validate:"required"`
+}
+
+// NewInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID : Instantiate InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID (Generic Model Constructor)
+func (*VpcV1) NewInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID(id string) (_model *InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID, err error) {
+ _model = &InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID{
+ ID: core.StringPtr(id),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID) isaInstancePlacementTargetPatchDedicatedHostGroupIdentity() bool {
+ return true
+}
+
+func (*InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID) isaInstancePlacementTargetPatch() bool {
+ return true
+}
+
+// UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID unmarshals an instance of InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN : InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN struct
+// This model "extends" InstancePlacementTargetPatchDedicatedHostIdentity
+type InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN struct {
+ // The CRN for this dedicated host.
+ CRN *string `json:"crn" validate:"required"`
+}
+
+// NewInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN : Instantiate InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN (Generic Model Constructor)
+func (*VpcV1) NewInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN(crn string) (_model *InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN, err error) {
+ _model = &InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN{
+ CRN: core.StringPtr(crn),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN) isaInstancePlacementTargetPatchDedicatedHostIdentity() bool {
+ return true
+}
+
+func (*InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN) isaInstancePlacementTargetPatch() bool {
+ return true
+}
+
+// UnmarshalInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN unmarshals an instance of InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN)
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref : InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref struct
+// This model "extends" InstancePlacementTargetPatchDedicatedHostIdentity
+type InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref struct {
+ // The URL for this dedicated host.
+ Href *string `json:"href" validate:"required"`
+}
+
+// NewInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref : Instantiate InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref (Generic Model Constructor)
+func (*VpcV1) NewInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref(href string) (_model *InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref, err error) {
+ _model = &InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref{
+ Href: core.StringPtr(href),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref) isaInstancePlacementTargetPatchDedicatedHostIdentity() bool {
+ return true
+}
+
+func (*InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref) isaInstancePlacementTargetPatch() bool {
+ return true
+}
+
+// UnmarshalInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref unmarshals an instance of InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID : InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID struct
+// This model "extends" InstancePlacementTargetPatchDedicatedHostIdentity
+type InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID struct {
+ // The unique identifier for this dedicated host.
+ ID *string `json:"id" validate:"required"`
+}
+
+// NewInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID : Instantiate InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID (Generic Model Constructor)
+func (*VpcV1) NewInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID(id string) (_model *InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID, err error) {
+ _model = &InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID{
+ ID: core.StringPtr(id),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID) isaInstancePlacementTargetPatchDedicatedHostIdentity() bool {
+ return true
+}
+
+func (*InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID) isaInstancePlacementTargetPatch() bool {
+ return true
+}
+
+// UnmarshalInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID unmarshals an instance of InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN : InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN struct
+// This model "extends" InstancePlacementTargetPrototypeDedicatedHostGroupIdentity
+type InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN struct {
+ // The CRN for this dedicated host group.
+ CRN *string `json:"crn" validate:"required"`
+}
+
+// NewInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN : Instantiate InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN (Generic Model Constructor)
+func (*VpcV1) NewInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN(crn string) (_model *InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN, err error) {
+ _model = &InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN{
+ CRN: core.StringPtr(crn),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN) isaInstancePlacementTargetPrototypeDedicatedHostGroupIdentity() bool {
+ return true
+}
+
+func (*InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN) isaInstancePlacementTargetPrototype() bool {
+ return true
+}
+
+// UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN unmarshals an instance of InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN)
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref : InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref struct
+// This model "extends" InstancePlacementTargetPrototypeDedicatedHostGroupIdentity
+type InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref struct {
+ // The URL for this dedicated host group.
+ Href *string `json:"href" validate:"required"`
+}
+
+// NewInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref : Instantiate InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref (Generic Model Constructor)
+func (*VpcV1) NewInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref(href string) (_model *InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref, err error) {
+ _model = &InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref{
+ Href: core.StringPtr(href),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref) isaInstancePlacementTargetPrototypeDedicatedHostGroupIdentity() bool {
+ return true
+}
+
+func (*InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref) isaInstancePlacementTargetPrototype() bool {
+ return true
+}
+
+// UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref unmarshals an instance of InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID : InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID struct
+// This model "extends" InstancePlacementTargetPrototypeDedicatedHostGroupIdentity
+type InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID struct {
+ // The unique identifier for this dedicated host group.
+ ID *string `json:"id" validate:"required"`
+}
+
+// NewInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID : Instantiate InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID (Generic Model Constructor)
+func (*VpcV1) NewInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID(id string) (_model *InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID, err error) {
+ _model = &InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID{
+ ID: core.StringPtr(id),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID) isaInstancePlacementTargetPrototypeDedicatedHostGroupIdentity() bool {
+ return true
+}
+
+func (*InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID) isaInstancePlacementTargetPrototype() bool {
+ return true
+}
+
+// UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID unmarshals an instance of InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN : InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN struct
+// This model "extends" InstancePlacementTargetPrototypeDedicatedHostIdentity
+type InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN struct {
+ // The CRN for this dedicated host.
+ CRN *string `json:"crn" validate:"required"`
+}
+
+// NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN : Instantiate InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN (Generic Model Constructor)
+func (*VpcV1) NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN(crn string) (_model *InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN, err error) {
+ _model = &InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN{
+ CRN: core.StringPtr(crn),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN) isaInstancePlacementTargetPrototypeDedicatedHostIdentity() bool {
+ return true
+}
+
+func (*InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN) isaInstancePlacementTargetPrototype() bool {
+ return true
+}
+
+// UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN unmarshals an instance of InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN)
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref : InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref struct
+// This model "extends" InstancePlacementTargetPrototypeDedicatedHostIdentity
+type InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref struct {
+ // The URL for this dedicated host.
+ Href *string `json:"href" validate:"required"`
+}
+
+// NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref : Instantiate InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref (Generic Model Constructor)
+func (*VpcV1) NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref(href string) (_model *InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref, err error) {
+ _model = &InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref{
+ Href: core.StringPtr(href),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref) isaInstancePlacementTargetPrototypeDedicatedHostIdentity() bool {
+ return true
+}
+
+func (*InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref) isaInstancePlacementTargetPrototype() bool {
+ return true
+}
+
+// UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref unmarshals an instance of InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID : InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID struct
+// This model "extends" InstancePlacementTargetPrototypeDedicatedHostIdentity
+type InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID struct {
+ // The unique identifier for this dedicated host.
+ ID *string `json:"id" validate:"required"`
+}
+
+// NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID : Instantiate InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID (Generic Model Constructor)
+func (*VpcV1) NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID(id string) (_model *InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID, err error) {
+ _model = &InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID{
+ ID: core.StringPtr(id),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID) isaInstancePlacementTargetPrototypeDedicatedHostIdentity() bool {
+ return true
+}
+
+func (*InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID) isaInstancePlacementTargetPrototype() bool {
+ return true
+}
+
+// UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID unmarshals an instance of InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN : InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN struct
+// This model "extends" InstancePlacementTargetPrototypePlacementGroupIdentity
+type InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN struct {
+ // The CRN for this placement group.
+ CRN *string `json:"crn" validate:"required"`
+}
+
+// NewInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN : Instantiate InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN (Generic Model Constructor)
+func (*VpcV1) NewInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN(crn string) (_model *InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN, err error) {
+ _model = &InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN{
+ CRN: core.StringPtr(crn),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN) isaInstancePlacementTargetPrototypePlacementGroupIdentity() bool {
+ return true
+}
+
+func (*InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN) isaInstancePlacementTargetPrototype() bool {
+ return true
+}
+
+// UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN unmarshals an instance of InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN)
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref : InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref struct
+// This model "extends" InstancePlacementTargetPrototypePlacementGroupIdentity
+type InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref struct {
+ // The URL for this placement group.
+ Href *string `json:"href" validate:"required"`
+}
+
+// NewInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref : Instantiate InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref (Generic Model Constructor)
+func (*VpcV1) NewInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref(href string) (_model *InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref, err error) {
+ _model = &InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref{
+ Href: core.StringPtr(href),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref) isaInstancePlacementTargetPrototypePlacementGroupIdentity() bool {
+ return true
+}
+
+func (*InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref) isaInstancePlacementTargetPrototype() bool {
+ return true
+}
+
+// UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref unmarshals an instance of InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID : InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID struct
+// This model "extends" InstancePlacementTargetPrototypePlacementGroupIdentity
+type InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID struct {
+ // The unique identifier for this placement group.
+ ID *string `json:"id" validate:"required"`
+}
+
+// NewInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID : Instantiate InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID (Generic Model Constructor)
+func (*VpcV1) NewInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID(id string) (_model *InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID, err error) {
+ _model = &InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID{
+ ID: core.StringPtr(id),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID) isaInstancePlacementTargetPrototypePlacementGroupIdentity() bool {
+ return true
+}
+
+func (*InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID) isaInstancePlacementTargetPrototype() bool {
+ return true
+}
+
+// UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID unmarshals an instance of InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID from the specified map of raw messages.
+func UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref : LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref struct
// This model "extends" LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity
type LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref struct {
@@ -57305,11 +75130,11 @@ type LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPo
}
// NewLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref : Instantiate LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(href string) (model *LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref, err error) {
- model = &LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref{
+func (*VpcV1) NewLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(href string) (_model *LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref, err error) {
+ _model = &LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57340,11 +75165,11 @@ type LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPo
}
// NewLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID : Instantiate LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID(id string) (model *LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID, err error) {
- model = &LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID{
+func (*VpcV1) NewLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID(id string) (_model *LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID, err error) {
+ _model = &LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57375,11 +75200,11 @@ type LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalanc
}
// NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref : Instantiate LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(href string) (model *LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref, err error) {
- model = &LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref{
+func (*VpcV1) NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(href string) (_model *LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref, err error) {
+ _model = &LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57410,11 +75235,11 @@ type LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalanc
}
// NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID : Instantiate LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID(id string) (model *LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID, err error) {
- model = &LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID{
+func (*VpcV1) NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID(id string) (_model *LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID, err error) {
+ _model = &LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57445,11 +75270,11 @@ type LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN
}
// NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN : Instantiate LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN(crn string) (model *LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN, err error) {
- model = &LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN{
+func (*VpcV1) NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN(crn string) (_model *LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN, err error) {
+ _model = &LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN{
CRN: core.StringPtr(crn),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57480,11 +75305,11 @@ type LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref
}
// NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref : Instantiate LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref(href string) (model *LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref, err error) {
- model = &LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref{
+func (*VpcV1) NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref(href string) (_model *LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref, err error) {
+ _model = &LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57515,11 +75340,11 @@ type LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID s
}
// NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID : Instantiate LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID(id string) (model *LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID, err error) {
- model = &LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID{
+func (*VpcV1) NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID(id string) (_model *LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID, err error) {
+ _model = &LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57542,6 +75367,76 @@ func UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdent
return
}
+// NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByHref : NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByHref struct
+// This model "extends" NetworkInterfaceIPPrototypeReservedIPIdentity
+type NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByHref struct {
+ // The URL for this reserved IP.
+ Href *string `json:"href" validate:"required"`
+}
+
+// NewNetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByHref : Instantiate NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByHref (Generic Model Constructor)
+func (*VpcV1) NewNetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByHref(href string) (_model *NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByHref, err error) {
+ _model = &NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByHref{
+ Href: core.StringPtr(href),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByHref) isaNetworkInterfaceIPPrototypeReservedIPIdentity() bool {
+ return true
+}
+
+func (*NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByHref) isaNetworkInterfaceIPPrototype() bool {
+ return true
+}
+
+// UnmarshalNetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByHref unmarshals an instance of NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByHref from the specified map of raw messages.
+func UnmarshalNetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByHref)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByID : NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByID struct
+// This model "extends" NetworkInterfaceIPPrototypeReservedIPIdentity
+type NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByID struct {
+ // The unique identifier for this reserved IP.
+ ID *string `json:"id" validate:"required"`
+}
+
+// NewNetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByID : Instantiate NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByID (Generic Model Constructor)
+func (*VpcV1) NewNetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByID(id string) (_model *NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByID, err error) {
+ _model = &NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByID{
+ ID: core.StringPtr(id),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByID) isaNetworkInterfaceIPPrototypeReservedIPIdentity() bool {
+ return true
+}
+
+func (*NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByID) isaNetworkInterfaceIPPrototype() bool {
+ return true
+}
+
+// UnmarshalNetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByID unmarshals an instance of NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByID from the specified map of raw messages.
+func UnmarshalNetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(NetworkInterfaceIPPrototypeReservedIPIdentityReservedIPIdentityByID)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress : PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress struct
// This model "extends" PublicGatewayFloatingIPPrototypeFloatingIPIdentity
type PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress struct {
@@ -57550,11 +75445,11 @@ type PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddre
}
// NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress : Instantiate PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress (Generic Model Constructor)
-func (*VpcV1) NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress(address string) (model *PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress, err error) {
- model = &PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress{
+func (*VpcV1) NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress(address string) (_model *PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress, err error) {
+ _model = &PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress{
Address: core.StringPtr(address),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57585,11 +75480,11 @@ type PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN s
}
// NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN : Instantiate PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN (Generic Model Constructor)
-func (*VpcV1) NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN(crn string) (model *PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN, err error) {
- model = &PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN{
+func (*VpcV1) NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN(crn string) (_model *PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN, err error) {
+ _model = &PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN{
CRN: core.StringPtr(crn),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57620,11 +75515,11 @@ type PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref
}
// NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref : Instantiate PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref(href string) (model *PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref, err error) {
- model = &PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref{
+func (*VpcV1) NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref(href string) (_model *PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref, err error) {
+ _model = &PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57655,11 +75550,11 @@ type PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID st
}
// NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID : Instantiate PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID(id string) (model *PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID, err error) {
- model = &PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID{
+func (*VpcV1) NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID(id string) (_model *PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID, err error) {
+ _model = &PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57690,11 +75585,11 @@ type ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCR
}
// NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN : Instantiate ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN (Generic Model Constructor)
-func (*VpcV1) NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN(crn string) (model *ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN, err error) {
- model = &ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN{
+func (*VpcV1) NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN(crn string) (_model *ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN, err error) {
+ _model = &ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN{
CRN: core.StringPtr(crn),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57725,11 +75620,11 @@ type ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHr
}
// NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref : Instantiate ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref(href string) (model *ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref, err error) {
- model = &ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref{
+func (*VpcV1) NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref(href string) (_model *ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref, err error) {
+ _model = &ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57760,11 +75655,11 @@ type ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID
}
// NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID : Instantiate ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID(id string) (model *ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID, err error) {
- model = &ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID{
+func (*VpcV1) NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID(id string) (_model *ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID, err error) {
+ _model = &ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57795,11 +75690,11 @@ type RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdenti
}
// NewRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref : Instantiate RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref(href string) (model *RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref, err error) {
- model = &RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref{
+func (*VpcV1) NewRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref(href string) (_model *RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref, err error) {
+ _model = &RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57830,11 +75725,11 @@ type RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdenti
}
// NewRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID : Instantiate RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID(id string) (model *RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID, err error) {
- model = &RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID{
+func (*VpcV1) NewRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID(id string) (_model *RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID, err error) {
+ _model = &RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57865,11 +75760,11 @@ type SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN
}
// NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN : Instantiate SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN (Generic Model Constructor)
-func (*VpcV1) NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN(crn string) (model *SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN, err error) {
- model = &SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN{
+func (*VpcV1) NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN(crn string) (_model *SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN, err error) {
+ _model = &SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN{
CRN: core.StringPtr(crn),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57900,11 +75795,11 @@ type SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHre
}
// NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref : Instantiate SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref(href string) (model *SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref, err error) {
- model = &SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref{
+func (*VpcV1) NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref(href string) (_model *SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref, err error) {
+ _model = &SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57935,11 +75830,11 @@ type SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID
}
// NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID : Instantiate SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID(id string) (model *SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID, err error) {
- model = &SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID{
+func (*VpcV1) NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID(id string) (_model *SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID, err error) {
+ _model = &SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -57970,11 +75865,11 @@ type SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityB
}
// NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN : Instantiate SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN (Generic Model Constructor)
-func (*VpcV1) NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN(crn string) (model *SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN, err error) {
- model = &SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN{
+func (*VpcV1) NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN(crn string) (_model *SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN, err error) {
+ _model = &SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN{
CRN: core.StringPtr(crn),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -58005,11 +75900,11 @@ type SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityB
}
// NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref : Instantiate SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref(href string) (model *SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref, err error) {
- model = &SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref{
+func (*VpcV1) NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref(href string) (_model *SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref, err error) {
+ _model = &SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -58040,11 +75935,11 @@ type SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityB
}
// NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID : Instantiate SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID(id string) (model *SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID, err error) {
- model = &SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID{
+func (*VpcV1) NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID(id string) (_model *SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID, err error) {
+ _model = &SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -58067,6 +75962,256 @@ func UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroup
return
}
+// VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN : VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN struct
+// This model "extends" VolumeAttachmentPrototypeVolumeVolumeIdentity
+type VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN struct {
+ // The CRN for this volume.
+ CRN *string `json:"crn" validate:"required"`
+}
+
+// NewVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN : Instantiate VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN (Generic Model Constructor)
+func (*VpcV1) NewVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN(crn string) (_model *VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN, err error) {
+ _model = &VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN{
+ CRN: core.StringPtr(crn),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN) isaVolumeAttachmentPrototypeVolumeVolumeIdentity() bool {
+ return true
+}
+
+func (*VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN) isaVolumeAttachmentPrototypeVolume() bool {
+ return true
+}
+
+// UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN unmarshals an instance of VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN from the specified map of raw messages.
+func UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN)
+ err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref : VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref struct
+// This model "extends" VolumeAttachmentPrototypeVolumeVolumeIdentity
+type VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref struct {
+ // The URL for this volume.
+ Href *string `json:"href" validate:"required"`
+}
+
+// NewVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref : Instantiate VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref (Generic Model Constructor)
+func (*VpcV1) NewVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref(href string) (_model *VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref, err error) {
+ _model = &VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref{
+ Href: core.StringPtr(href),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref) isaVolumeAttachmentPrototypeVolumeVolumeIdentity() bool {
+ return true
+}
+
+func (*VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref) isaVolumeAttachmentPrototypeVolume() bool {
+ return true
+}
+
+// UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref unmarshals an instance of VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref from the specified map of raw messages.
+func UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref)
+ err = core.UnmarshalPrimitive(m, "href", &obj.Href)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID : VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID struct
+// This model "extends" VolumeAttachmentPrototypeVolumeVolumeIdentity
+type VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID struct {
+ // The unique identifier for this volume.
+ ID *string `json:"id" validate:"required"`
+}
+
+// NewVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID : Instantiate VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID (Generic Model Constructor)
+func (*VpcV1) NewVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID(id string) (_model *VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID, err error) {
+ _model = &VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID{
+ ID: core.StringPtr(id),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID) isaVolumeAttachmentPrototypeVolumeVolumeIdentity() bool {
+ return true
+}
+
+func (*VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID) isaVolumeAttachmentPrototypeVolume() bool {
+ return true
+}
+
+// UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID unmarshals an instance of VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID from the specified map of raw messages.
+func UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID)
+ err = core.UnmarshalPrimitive(m, "id", &obj.ID)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity : VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity struct
+// This model "extends" VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext
+type VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity struct {
+ // The maximum I/O operations per second (IOPS) to use for the volume. Applicable only to volumes using a profile
+ // `family` of `custom`.
+ Iops *int64 `json:"iops,omitempty"`
+
+ // The unique user-defined name for this volume.
+ Name *string `json:"name,omitempty"`
+
+ // The profile to use for this volume.
+ Profile VolumeProfileIdentityIntf `json:"profile" validate:"required"`
+
+ // The capacity to use for the volume (in gigabytes). The specified minimum and maximum capacity values for creating or
+ // updating volumes may expand in the future.
+ Capacity *int64 `json:"capacity" validate:"required"`
+
+ // The root key to use to wrap the data encryption key for the volume.
+ //
+ // If unspecified, the `encryption` type for the volume will be `provider_managed`.
+ EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
+}
+
+// NewVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity : Instantiate VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity (Generic Model Constructor)
+func (*VpcV1) NewVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity(profile VolumeProfileIdentityIntf, capacity int64) (_model *VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity, err error) {
+ _model = &VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity{
+ Profile: profile,
+ Capacity: core.Int64Ptr(capacity),
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity) isaVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext() bool {
+ return true
+}
+
+func (*VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity) isaVolumeAttachmentPrototypeVolume() bool {
+ return true
+}
+
+// UnmarshalVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity unmarshals an instance of VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity from the specified map of raw messages.
+func UnmarshalVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity)
+ err = core.UnmarshalPrimitive(m, "iops", &obj.Iops)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot : VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot struct
+// This model "extends" VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext
+type VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot struct {
+ // The maximum I/O operations per second (IOPS) to use for the volume. Applicable only to volumes using a profile
+ // `family` of `custom`.
+ Iops *int64 `json:"iops,omitempty"`
+
+ // The unique user-defined name for this volume.
+ Name *string `json:"name,omitempty"`
+
+ // The profile to use for this volume.
+ Profile VolumeProfileIdentityIntf `json:"profile" validate:"required"`
+
+ // The capacity to use for the volume (in gigabytes). Must be at least the snapshot's
+ // `minimum_capacity`. The maximum value may increase in the future.
+ //
+ // If unspecified, the capacity will be the source snapshot's `minimum_capacity`.
+ Capacity *int64 `json:"capacity,omitempty"`
+
+ // The root key to use to wrap the data encryption key for the volume.
+ //
+ // If unspecified, the snapshot's `encryption_key` will be used.
+ EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
+
+ // The snapshot from which to clone the volume.
+ SourceSnapshot SnapshotIdentityIntf `json:"source_snapshot" validate:"required"`
+}
+
+// NewVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot : Instantiate VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot (Generic Model Constructor)
+func (*VpcV1) NewVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot(profile VolumeProfileIdentityIntf, sourceSnapshot SnapshotIdentityIntf) (_model *VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot, err error) {
+ _model = &VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot{
+ Profile: profile,
+ SourceSnapshot: sourceSnapshot,
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot) isaVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext() bool {
+ return true
+}
+
+func (*VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot) isaVolumeAttachmentPrototypeVolume() bool {
+ return true
+}
+
+// UnmarshalVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot unmarshals an instance of VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot from the specified map of raw messages.
+func UnmarshalVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot)
+ err = core.UnmarshalPrimitive(m, "iops", &obj.Iops)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotIdentity)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
// VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN : VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN struct
// This model "extends" VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentity
type VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN struct {
@@ -58075,11 +76220,11 @@ type VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityB
}
// NewVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN : Instantiate VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN (Generic Model Constructor)
-func (*VpcV1) NewVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN(crn string) (model *VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN, err error) {
- model = &VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN{
+func (*VpcV1) NewVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN(crn string) (_model *VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN, err error) {
+ _model = &VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN{
CRN: core.StringPtr(crn),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -58110,11 +76255,11 @@ type VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityB
}
// NewVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByHref : Instantiate VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByHref (Generic Model Constructor)
-func (*VpcV1) NewVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByHref(href string) (model *VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByHref, err error) {
- model = &VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByHref{
+func (*VpcV1) NewVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByHref(href string) (_model *VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByHref, err error) {
+ _model = &VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByHref{
Href: core.StringPtr(href),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -58145,11 +76290,11 @@ type VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityB
}
// NewVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByID : Instantiate VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByID (Generic Model Constructor)
-func (*VpcV1) NewVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByID(id string) (model *VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByID, err error) {
- model = &VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByID{
+func (*VpcV1) NewVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByID(id string) (_model *VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByID, err error) {
+ _model = &VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByID{
ID: core.StringPtr(id),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -58175,13 +76320,8 @@ func UnmarshalVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolume
// VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity : VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity struct
// This model "extends" VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext
type VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity struct {
- // The identity of the root key to use to wrap the data encryption key for the volume.
- //
- // If this property is not provided, the `encryption` type for the volume will be
- // `provider_managed`.
- EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
-
- // The bandwidth for the volume.
+ // The maximum I/O operations per second (IOPS) to use for the volume. Applicable only to volumes using a profile
+ // `family` of `custom`.
Iops *int64 `json:"iops,omitempty"`
// The unique user-defined name for this volume.
@@ -58190,18 +76330,23 @@ type VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContex
// The profile to use for this volume.
Profile VolumeProfileIdentityIntf `json:"profile" validate:"required"`
- // The capacity of the volume in gigabytes. The specified minimum and maximum capacity values for creating or updating
- // volumes may expand in the future.
+ // The capacity to use for the volume (in gigabytes). The specified minimum and maximum capacity values for creating or
+ // updating volumes may expand in the future.
Capacity *int64 `json:"capacity" validate:"required"`
+
+ // The root key to use to wrap the data encryption key for the volume.
+ //
+ // If unspecified, the `encryption` type for the volume will be `provider_managed`.
+ EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
}
// NewVolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity : Instantiate VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity (Generic Model Constructor)
-func (*VpcV1) NewVolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity(profile VolumeProfileIdentityIntf, capacity int64) (model *VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity, err error) {
- model = &VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity{
+func (*VpcV1) NewVolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity(profile VolumeProfileIdentityIntf, capacity int64) (_model *VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity, err error) {
+ _model = &VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity{
Profile: profile,
Capacity: core.Int64Ptr(capacity),
}
- err = core.ValidateStruct(model, "required parameters")
+ err = core.ValidateStruct(_model, "required parameters")
return
}
@@ -58216,10 +76361,6 @@ func (*VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceCont
// UnmarshalVolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity unmarshals an instance of VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity from the specified map of raw messages.
func UnmarshalVolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity(m map[string]json.RawMessage, result interface{}) (err error) {
obj := new(VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity)
- err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
- if err != nil {
- return
- }
err = core.UnmarshalPrimitive(m, "iops", &obj.Iops)
if err != nil {
return
@@ -58236,6 +76377,301 @@ func UnmarshalVolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInsta
if err != nil {
return
}
+ err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot : VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot struct
+// This model "extends" VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext
+type VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot struct {
+ // The maximum I/O operations per second (IOPS) to use for the volume. Applicable only to volumes using a profile
+ // `family` of `custom`.
+ Iops *int64 `json:"iops,omitempty"`
+
+ // The unique user-defined name for this volume.
+ Name *string `json:"name,omitempty"`
+
+ // The profile to use for this volume.
+ Profile VolumeProfileIdentityIntf `json:"profile" validate:"required"`
+
+ // The capacity to use for the volume (in gigabytes). Must be at least the snapshot's
+ // `minimum_capacity`. The maximum value may increase in the future.
+ //
+ // If unspecified, the capacity will be the source snapshot's `minimum_capacity`.
+ Capacity *int64 `json:"capacity,omitempty"`
+
+ // The root key to use to wrap the data encryption key for the volume.
+ //
+ // If unspecified, the snapshot's `encryption_key` will be used.
+ EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
+
+ // The snapshot from which to clone the volume.
+ SourceSnapshot SnapshotIdentityIntf `json:"source_snapshot" validate:"required"`
+}
+
+// NewVolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot : Instantiate VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot (Generic Model Constructor)
+func (*VpcV1) NewVolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot(profile VolumeProfileIdentityIntf, sourceSnapshot SnapshotIdentityIntf) (_model *VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot, err error) {
+ _model = &VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot{
+ Profile: profile,
+ SourceSnapshot: sourceSnapshot,
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot) isaVolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext() bool {
+ return true
+}
+
+func (*VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot) isaVolumeAttachmentVolumePrototypeInstanceContext() bool {
+ return true
+}
+
+// UnmarshalVolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot unmarshals an instance of VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot from the specified map of raw messages.
+func UnmarshalVolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot)
+ err = core.UnmarshalPrimitive(m, "iops", &obj.Iops)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotIdentity)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup struct
+// This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec
+type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup struct {
+ // The user-defined name for this instance group manager action. Names must be unique within the instance group
+ // manager. If unspecified, the name will be a hyphenated list of randomly-selected words.
+ Name *string `json:"name,omitempty"`
+
+ // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min
+ // period.
+ CronSpec *string `json:"cron_spec,omitempty"`
+
+ Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group" validate:"required"`
+}
+
+// NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup : Instantiate InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup (Generic Model Constructor)
+func (*VpcV1) NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup(group *InstanceGroupManagerScheduledActionGroupPrototype) (_model *InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup, err error) {
+ _model = &InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup{
+ Group: group,
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup) isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec() bool {
+ return true
+}
+
+func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool {
+ return true
+}
+
+func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup) isaInstanceGroupManagerActionPrototype() bool {
+ return true
+}
+
+// UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup)
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager struct
+// This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec
+type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager struct {
+ // The user-defined name for this instance group manager action. Names must be unique within the instance group
+ // manager. If unspecified, the name will be a hyphenated list of randomly-selected words.
+ Name *string `json:"name,omitempty"`
+
+ // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min
+ // period.
+ CronSpec *string `json:"cron_spec,omitempty"`
+
+ Manager InstanceGroupManagerScheduledActionManagerPrototypeIntf `json:"manager" validate:"required"`
+}
+
+// NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager : Instantiate InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager (Generic Model Constructor)
+func (*VpcV1) NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager(manager InstanceGroupManagerScheduledActionManagerPrototypeIntf) (_model *InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager, err error) {
+ _model = &InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager{
+ Manager: manager,
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager) isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec() bool {
+ return true
+}
+
+func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool {
+ return true
+}
+
+func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager) isaInstanceGroupManagerActionPrototype() bool {
+ return true
+}
+
+// UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager)
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManagerPrototype)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup struct
+// This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt
+type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup struct {
+ // The user-defined name for this instance group manager action. Names must be unique within the instance group
+ // manager. If unspecified, the name will be a hyphenated list of randomly-selected words.
+ Name *string `json:"name,omitempty"`
+
+ // The date and time the scheduled action will run.
+ RunAt *strfmt.DateTime `json:"run_at,omitempty"`
+
+ Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group" validate:"required"`
+}
+
+// NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup : Instantiate InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup (Generic Model Constructor)
+func (*VpcV1) NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup(group *InstanceGroupManagerScheduledActionGroupPrototype) (_model *InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup, err error) {
+ _model = &InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup{
+ Group: group,
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup) isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt() bool {
+ return true
+}
+
+func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool {
+ return true
+}
+
+func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup) isaInstanceGroupManagerActionPrototype() bool {
+ return true
+}
+
+// UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup)
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype)
+ if err != nil {
+ return
+ }
+ reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
+ return
+}
+
+// InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager struct
+// This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt
+type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager struct {
+ // The user-defined name for this instance group manager action. Names must be unique within the instance group
+ // manager. If unspecified, the name will be a hyphenated list of randomly-selected words.
+ Name *string `json:"name,omitempty"`
+
+ // The date and time the scheduled action will run.
+ RunAt *strfmt.DateTime `json:"run_at,omitempty"`
+
+ Manager InstanceGroupManagerScheduledActionManagerPrototypeIntf `json:"manager" validate:"required"`
+}
+
+// NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager : Instantiate InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager (Generic Model Constructor)
+func (*VpcV1) NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager(manager InstanceGroupManagerScheduledActionManagerPrototypeIntf) (_model *InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager, err error) {
+ _model = &InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager{
+ Manager: manager,
+ }
+ err = core.ValidateStruct(_model, "required parameters")
+ return
+}
+
+func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager) isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt() bool {
+ return true
+}
+
+func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool {
+ return true
+}
+
+func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager) isaInstanceGroupManagerActionPrototype() bool {
+ return true
+}
+
+// UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager from the specified map of raw messages.
+func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager(m map[string]json.RawMessage, result interface{}) (err error) {
+ obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager)
+ err = core.UnmarshalPrimitive(m, "name", &obj.Name)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt)
+ if err != nil {
+ return
+ }
+ err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManagerPrototype)
+ if err != nil {
+ return
+ }
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 77566057e3..97d3d24640 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -120,7 +120,7 @@ github.com/IBM-Cloud/power-go-client/power/models
# github.com/IBM/go-sdk-core/v4 v4.9.0
## explicit; go 1.12
github.com/IBM/go-sdk-core/v4/core
-# github.com/IBM/go-sdk-core/v5 v5.9.1
+# github.com/IBM/go-sdk-core/v5 v5.9.5
## explicit; go 1.14
github.com/IBM/go-sdk-core/v5/core
# github.com/IBM/networking-go-sdk v0.14.0
@@ -135,8 +135,8 @@ github.com/IBM/platform-services-go-sdk/iamidentityv1
github.com/IBM/platform-services-go-sdk/iampolicymanagementv1
github.com/IBM/platform-services-go-sdk/resourcecontrollerv2
github.com/IBM/platform-services-go-sdk/resourcemanagerv2
-# github.com/IBM/vpc-go-sdk v1.0.1
-## explicit; go 1.14
+# github.com/IBM/vpc-go-sdk v0.20.0
+## explicit; go 1.16
github.com/IBM/vpc-go-sdk/common
github.com/IBM/vpc-go-sdk/vpcv1
# github.com/PaesslerAG/gval v1.0.0