diff --git a/CHANGELOG.md b/CHANGELOG.md index 69789adc49..ff4956c807 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,34 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) +## 65.28.0 - 2022-12-13 +### Added +- Support for the Queue service +- Support for Intel X9 shapes when launching VM database systems in the Database service +- Support for enabling, disabling, and editing Database Management service connections on pluggable databases in the Database service +- Support for availability configurations and maintenance window schedules on synthetic monitors in the Application Performance Monitoring service +- Support for scheduling cascading deletes on a project in the DevOps service +- Support for cancelling a scheduled cascading delete on a project in the DevOps service +- Support for issue and action fields on job phases of validation and migration processes in the Database Migration service +- Support for cluster profiles in the Big Data service +- Support for egress-only services in the Service Mesh service +- Support for optional listeners and service discovery metadata on virtual deployments in the Service Mesh service +- Support for canceling work requests in the accepted state in the Service Mesh service +- Support for filtering work requests on associated resource id and operation status in the Service Mesh service +- Support for sorting while listing work requests, listing work request logs, and listing work request errors in the Service Mesh service + + +### Breaking Changes +- The type for property `RouteRules` was changed from a List of `VirtualServiceTrafficRouteRule` to a List of `VirtualServiceTrafficRouteRuleDetails` in the models `UpdateVirtualServiceRouteTableDetails` and `CreateVirtualServiceRouteTableDetails` in the Service Mesh service +- The type for property `Mtls` was changed from `CreateMutualTransportLayerSecurityDetails` to `VirtualServiceMutualTransportLayerSecurityDetails` in the models `UpdateVirtualServiceDetails` and `CreateVirtualServiceDetails.` in the Service Mesh service +- The type for property `RouteRules` was changed from a List of `IngressGatewayTrafficRouteRule` to a List of `IngressGatewayTrafficRouteRuleDetails` in the models `UpdateIngressGatewayRouteTableDetails` and `CreateIngressGatewayRouteTableDetails` in the Service Mesh service +- The type for property `Mtls` was changed from `CreateIngressGatewayMutualTransportLayerSecurityDetails` to `IngressGatewayMutualTransportLayerSecurityDetails` in the models `UpdateIngressGatewayDetails` and `CreateIngressGatewayDetails` in the Service Mesh service +- The type for property `Rules` was changed from a List of `AccessPolicyRule` to a List of `AccessPolicyRuleDetails` in the models `UpdateAccessPolicyDetails` and `CreateAccessPolicyDetails` in the Service Mesh service +- Support for default retries on operations of the Service Mesh service +- Support for default retries on operations of the Database Migration service +- Support for default retries on operations of the Fusion Apps as a Service service + + ## 65.27.0 - 2022-12-06 ### Added - Support for the Container Instances service diff --git a/Makefile b/Makefile index 15069ccb09..ce7e2655fe 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ DOC_SERVER_URL=https:\/\/docs.cloud.oracle.com -GEN_TARGETS = identity core objectstorage loadbalancer database audit dns filestorage email containerengine resourcesearch keymanagement announcementsservice healthchecks waas autoscaling streaming ons monitoring resourcemanager budget workrequests functions limits events dts oce oda analytics integration osmanagement marketplace apigateway applicationmigration datacatalog dataflow datascience nosql secrets vault bds cims datasafe mysql dataintegration ocvp usageapi blockchain loggingingestion logging loganalytics managementdashboard sch loggingsearch managementagent cloudguard opsi computeinstanceagent optimizer tenantmanagercontrolplane rover databasemanagement artifacts apmsynthetics goldengate apmcontrolplane apmtraces networkloadbalancer vulnerabilityscanning databasemigration servicecatalog ailanguage operatoraccesscontrol bastion genericartifactscontent jms devops aianomalydetection datalabelingservice datalabelingservicedataplane apmconfig waf certificates certificatesmanagement usage databasetools servicemanagerproxy appmgmtcontrol ospgateway identitydataplane visualbuilder osubusage osubsubscription osuborganizationsubscription osubbillingschedule dashboardservice threatintelligence aivision aispeech dataconnectivity stackmonitoring servicemesh adm licensemanager onesubscription governancerulescontrolplane waa networkfirewall vnmonitoring emwarehouse lockbox fusionapps mediaservices opa opensearch cloudmigrations cloudbridge disasterrecovery containerinstances aidocument ##SPECNAME## +GEN_TARGETS = identity core objectstorage loadbalancer database audit dns filestorage email containerengine resourcesearch keymanagement announcementsservice healthchecks waas autoscaling streaming ons monitoring resourcemanager budget workrequests functions limits events dts oce oda analytics integration osmanagement marketplace apigateway applicationmigration datacatalog dataflow datascience nosql secrets vault bds cims datasafe mysql dataintegration ocvp usageapi blockchain loggingingestion logging loganalytics managementdashboard sch loggingsearch managementagent cloudguard opsi computeinstanceagent optimizer tenantmanagercontrolplane rover databasemanagement artifacts apmsynthetics goldengate apmcontrolplane apmtraces networkloadbalancer vulnerabilityscanning databasemigration servicecatalog ailanguage operatoraccesscontrol bastion genericartifactscontent jms devops aianomalydetection datalabelingservice datalabelingservicedataplane apmconfig waf certificates certificatesmanagement usage databasetools servicemanagerproxy appmgmtcontrol ospgateway identitydataplane visualbuilder osubusage osubsubscription osuborganizationsubscription osubbillingschedule dashboardservice threatintelligence aivision aispeech dataconnectivity stackmonitoring servicemesh adm licensemanager onesubscription governancerulescontrolplane waa networkfirewall vnmonitoring emwarehouse lockbox fusionapps mediaservices opa opensearch cloudmigrations cloudbridge disasterrecovery containerinstances aidocument queue ##SPECNAME## NON_GEN_TARGETS = common common/auth objectstorage/transfer example TARGETS = $(NON_GEN_TARGETS) $(GEN_TARGETS) diff --git a/apmsynthetics/availability_configuration.go b/apmsynthetics/availability_configuration.go new file mode 100644 index 0000000000..3cdf700449 --- /dev/null +++ b/apmsynthetics/availability_configuration.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Application Performance Monitoring Synthetic Monitoring API +// +// Use the Application Performance Monitoring Synthetic Monitoring API to query synthetic scripts and monitors. For more information, see Application Performance Monitoring (https://docs.oracle.com/iaas/application-performance-monitoring/index.html). +// + +package apmsynthetics + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AvailabilityConfiguration Monitor availability configuration details. +type AvailabilityConfiguration struct { + + // Intervals with failed runs more than this value will be classified as UNAVAILABLE. + MaxAllowedFailuresPerInterval *int `mandatory:"false" json:"maxAllowedFailuresPerInterval"` + + // Intervals with runs less than this value will be classified as UNKNOWN and excluded from the availability calculations. + MinAllowedRunsPerInterval *int `mandatory:"false" json:"minAllowedRunsPerInterval"` +} + +func (m AvailabilityConfiguration) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AvailabilityConfiguration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/apmsynthetics/create_monitor_details.go b/apmsynthetics/create_monitor_details.go index 6270121918..7c3774f4b6 100644 --- a/apmsynthetics/create_monitor_details.go +++ b/apmsynthetics/create_monitor_details.go @@ -43,7 +43,8 @@ type CreateMonitorDetails struct { // If runOnce is enabled, then the monitor will run once. IsRunOnce *bool `mandatory:"false" json:"isRunOnce"` - // Timeout in seconds. Timeout cannot be more than 30% of repeatIntervalInSeconds time for monitors. + // Timeout in seconds. If isFailureRetried is true, then timeout cannot be more than 30% of repeatIntervalInSeconds time for monitors. + // If isFailureRetried is false, then timeout cannot be more than 50% of repeatIntervalInSeconds time for monitors. // Also, timeoutInSeconds should be a multiple of 60 for Scripted REST, Scripted Browser and Browser monitors. // Monitor will be allowed to run only for timeoutInSeconds time. It would be terminated after that. TimeoutInSeconds *int `mandatory:"false" json:"timeoutInSeconds"` @@ -61,6 +62,10 @@ type CreateMonitorDetails struct { Configuration MonitorConfiguration `mandatory:"false" json:"configuration"` + AvailabilityConfiguration *AvailabilityConfiguration `mandatory:"false" json:"availabilityConfiguration"` + + MaintenanceWindowSchedule *MaintenanceWindowSchedule `mandatory:"false" json:"maintenanceWindowSchedule"` + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. // Example: `{"bar-key": "value"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` @@ -107,22 +112,24 @@ func (m CreateMonitorDetails) ValidateEnumValue() (bool, error) { // UnmarshalJSON unmarshals from json func (m *CreateMonitorDetails) UnmarshalJSON(data []byte) (e error) { model := struct { - ScriptId *string `json:"scriptId"` - Status MonitorStatusEnum `json:"status"` - IsRunOnce *bool `json:"isRunOnce"` - TimeoutInSeconds *int `json:"timeoutInSeconds"` - Target *string `json:"target"` - ScriptParameters []MonitorScriptParameter `json:"scriptParameters"` - Configuration monitorconfiguration `json:"configuration"` - FreeformTags map[string]string `json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `json:"definedTags"` - IsRunNow *bool `json:"isRunNow"` - SchedulingPolicy SchedulingPolicyEnum `json:"schedulingPolicy"` - BatchIntervalInSeconds *int `json:"batchIntervalInSeconds"` - DisplayName *string `json:"displayName"` - MonitorType MonitorTypesEnum `json:"monitorType"` - VantagePoints []string `json:"vantagePoints"` - RepeatIntervalInSeconds *int `json:"repeatIntervalInSeconds"` + ScriptId *string `json:"scriptId"` + Status MonitorStatusEnum `json:"status"` + IsRunOnce *bool `json:"isRunOnce"` + TimeoutInSeconds *int `json:"timeoutInSeconds"` + Target *string `json:"target"` + ScriptParameters []MonitorScriptParameter `json:"scriptParameters"` + Configuration monitorconfiguration `json:"configuration"` + AvailabilityConfiguration *AvailabilityConfiguration `json:"availabilityConfiguration"` + MaintenanceWindowSchedule *MaintenanceWindowSchedule `json:"maintenanceWindowSchedule"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + IsRunNow *bool `json:"isRunNow"` + SchedulingPolicy SchedulingPolicyEnum `json:"schedulingPolicy"` + BatchIntervalInSeconds *int `json:"batchIntervalInSeconds"` + DisplayName *string `json:"displayName"` + MonitorType MonitorTypesEnum `json:"monitorType"` + VantagePoints []string `json:"vantagePoints"` + RepeatIntervalInSeconds *int `json:"repeatIntervalInSeconds"` }{} e = json.Unmarshal(data, &model) @@ -155,6 +162,10 @@ func (m *CreateMonitorDetails) UnmarshalJSON(data []byte) (e error) { m.Configuration = nil } + m.AvailabilityConfiguration = model.AvailabilityConfiguration + + m.MaintenanceWindowSchedule = model.MaintenanceWindowSchedule + m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/apmsynthetics/list_monitors_request_response.go b/apmsynthetics/list_monitors_request_response.go index ae65b5d70e..251aea2adf 100644 --- a/apmsynthetics/list_monitors_request_response.go +++ b/apmsynthetics/list_monitors_request_response.go @@ -46,6 +46,12 @@ type ListMonitorsRequest struct { // Example: `50` Page *string `mandatory:"false" contributesTo:"query" name:"page"` + // A filter to return the monitors whose maintenance window is currently active. + IsMaintenanceWindowActive *bool `mandatory:"false" contributesTo:"query" name:"isMaintenanceWindowActive"` + + // A filter to return the monitors whose maintenance window is set. + IsMaintenanceWindowSet *bool `mandatory:"false" contributesTo:"query" name:"isMaintenanceWindowSet"` + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). Default sort order is ascending. SortOrder ListMonitorsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` @@ -231,27 +237,30 @@ type ListMonitorsSortByEnum string // Set of constants representing the allowable values for ListMonitorsSortByEnum const ( - ListMonitorsSortByDisplayname ListMonitorsSortByEnum = "displayName" - ListMonitorsSortByTimecreated ListMonitorsSortByEnum = "timeCreated" - ListMonitorsSortByTimeupdated ListMonitorsSortByEnum = "timeUpdated" - ListMonitorsSortByStatus ListMonitorsSortByEnum = "status" - ListMonitorsSortByMonitortype ListMonitorsSortByEnum = "monitorType" + ListMonitorsSortByDisplayname ListMonitorsSortByEnum = "displayName" + ListMonitorsSortByTimecreated ListMonitorsSortByEnum = "timeCreated" + ListMonitorsSortByTimeupdated ListMonitorsSortByEnum = "timeUpdated" + ListMonitorsSortByStatus ListMonitorsSortByEnum = "status" + ListMonitorsSortByMonitortype ListMonitorsSortByEnum = "monitorType" + ListMonitorsSortByMaintenancewindowtimestarted ListMonitorsSortByEnum = "maintenanceWindowTimeStarted" ) var mappingListMonitorsSortByEnum = map[string]ListMonitorsSortByEnum{ - "displayName": ListMonitorsSortByDisplayname, - "timeCreated": ListMonitorsSortByTimecreated, - "timeUpdated": ListMonitorsSortByTimeupdated, - "status": ListMonitorsSortByStatus, - "monitorType": ListMonitorsSortByMonitortype, + "displayName": ListMonitorsSortByDisplayname, + "timeCreated": ListMonitorsSortByTimecreated, + "timeUpdated": ListMonitorsSortByTimeupdated, + "status": ListMonitorsSortByStatus, + "monitorType": ListMonitorsSortByMonitortype, + "maintenanceWindowTimeStarted": ListMonitorsSortByMaintenancewindowtimestarted, } var mappingListMonitorsSortByEnumLowerCase = map[string]ListMonitorsSortByEnum{ - "displayname": ListMonitorsSortByDisplayname, - "timecreated": ListMonitorsSortByTimecreated, - "timeupdated": ListMonitorsSortByTimeupdated, - "status": ListMonitorsSortByStatus, - "monitortype": ListMonitorsSortByMonitortype, + "displayname": ListMonitorsSortByDisplayname, + "timecreated": ListMonitorsSortByTimecreated, + "timeupdated": ListMonitorsSortByTimeupdated, + "status": ListMonitorsSortByStatus, + "monitortype": ListMonitorsSortByMonitortype, + "maintenancewindowtimestarted": ListMonitorsSortByMaintenancewindowtimestarted, } // GetListMonitorsSortByEnumValues Enumerates the set of values for ListMonitorsSortByEnum @@ -271,6 +280,7 @@ func GetListMonitorsSortByEnumStringValues() []string { "timeUpdated", "status", "monitorType", + "maintenanceWindowTimeStarted", } } diff --git a/apmsynthetics/maintenance_window_schedule.go b/apmsynthetics/maintenance_window_schedule.go new file mode 100644 index 0000000000..57520514d5 --- /dev/null +++ b/apmsynthetics/maintenance_window_schedule.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Application Performance Monitoring Synthetic Monitoring API +// +// Use the Application Performance Monitoring Synthetic Monitoring API to query synthetic scripts and monitors. For more information, see Application Performance Monitoring (https://docs.oracle.com/iaas/application-performance-monitoring/index.html). +// + +package apmsynthetics + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MaintenanceWindowSchedule Details used to schedule maintenance window. +type MaintenanceWindowSchedule struct { + + // Start time for the maintenance window, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) timestamp format. + // Example: `2020-02-12T22:47:12.613Z` + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // End time for the maintenance window, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) timestamp format. + // Example: `2020-02-12T22:47:12.613Z` + TimeEnded *common.SDKTime `mandatory:"false" json:"timeEnded"` +} + +func (m MaintenanceWindowSchedule) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MaintenanceWindowSchedule) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/apmsynthetics/monitor.go b/apmsynthetics/monitor.go index f5ac502e35..20e5d11faf 100644 --- a/apmsynthetics/monitor.go +++ b/apmsynthetics/monitor.go @@ -51,7 +51,8 @@ type Monitor struct { // If runOnce is enabled, then the monitor will run once. IsRunOnce *bool `mandatory:"true" json:"isRunOnce"` - // Timeout in seconds. Timeout cannot be more than 30% of repeatIntervalInSeconds time for monitors. + // Timeout in seconds. If isFailureRetried is true, then timeout cannot be more than 30% of repeatIntervalInSeconds time for monitors. + // If isFailureRetried is false, then timeout cannot be more than 50% of repeatIntervalInSeconds time for monitors. // Also, timeoutInSeconds should be a multiple of 60 for Scripted REST, Scripted Browser and Browser monitors. // Monitor will be allowed to run only for timeoutInSeconds time. It would be terminated after that. TimeoutInSeconds *int `mandatory:"true" json:"timeoutInSeconds"` @@ -76,6 +77,10 @@ type Monitor struct { Configuration MonitorConfiguration `mandatory:"false" json:"configuration"` + AvailabilityConfiguration *AvailabilityConfiguration `mandatory:"false" json:"availabilityConfiguration"` + + MaintenanceWindowSchedule *MaintenanceWindowSchedule `mandatory:"false" json:"maintenanceWindowSchedule"` + // The time the resource was created, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) // timestamp format. // Example: `2020-02-12T22:47:12.613Z` @@ -123,27 +128,29 @@ func (m Monitor) ValidateEnumValue() (bool, error) { // UnmarshalJSON unmarshals from json func (m *Monitor) UnmarshalJSON(data []byte) (e error) { model := struct { - Target *string `json:"target"` - ScriptParameters []MonitorScriptParameterInfo `json:"scriptParameters"` - Configuration monitorconfiguration `json:"configuration"` - TimeCreated *common.SDKTime `json:"timeCreated"` - TimeUpdated *common.SDKTime `json:"timeUpdated"` - FreeformTags map[string]string `json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `json:"definedTags"` - Id *string `json:"id"` - DisplayName *string `json:"displayName"` - MonitorType MonitorTypesEnum `json:"monitorType"` - VantagePoints []VantagePointInfo `json:"vantagePoints"` - VantagePointCount *int `json:"vantagePointCount"` - ScriptId *string `json:"scriptId"` - ScriptName *string `json:"scriptName"` - Status MonitorStatusEnum `json:"status"` - RepeatIntervalInSeconds *int `json:"repeatIntervalInSeconds"` - IsRunOnce *bool `json:"isRunOnce"` - TimeoutInSeconds *int `json:"timeoutInSeconds"` - IsRunNow *bool `json:"isRunNow"` - SchedulingPolicy SchedulingPolicyEnum `json:"schedulingPolicy"` - BatchIntervalInSeconds *int `json:"batchIntervalInSeconds"` + Target *string `json:"target"` + ScriptParameters []MonitorScriptParameterInfo `json:"scriptParameters"` + Configuration monitorconfiguration `json:"configuration"` + AvailabilityConfiguration *AvailabilityConfiguration `json:"availabilityConfiguration"` + MaintenanceWindowSchedule *MaintenanceWindowSchedule `json:"maintenanceWindowSchedule"` + TimeCreated *common.SDKTime `json:"timeCreated"` + TimeUpdated *common.SDKTime `json:"timeUpdated"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + Id *string `json:"id"` + DisplayName *string `json:"displayName"` + MonitorType MonitorTypesEnum `json:"monitorType"` + VantagePoints []VantagePointInfo `json:"vantagePoints"` + VantagePointCount *int `json:"vantagePointCount"` + ScriptId *string `json:"scriptId"` + ScriptName *string `json:"scriptName"` + Status MonitorStatusEnum `json:"status"` + RepeatIntervalInSeconds *int `json:"repeatIntervalInSeconds"` + IsRunOnce *bool `json:"isRunOnce"` + TimeoutInSeconds *int `json:"timeoutInSeconds"` + IsRunNow *bool `json:"isRunNow"` + SchedulingPolicy SchedulingPolicyEnum `json:"schedulingPolicy"` + BatchIntervalInSeconds *int `json:"batchIntervalInSeconds"` }{} e = json.Unmarshal(data, &model) @@ -168,6 +175,10 @@ func (m *Monitor) UnmarshalJSON(data []byte) (e error) { m.Configuration = nil } + m.AvailabilityConfiguration = model.AvailabilityConfiguration + + m.MaintenanceWindowSchedule = model.MaintenanceWindowSchedule + m.TimeCreated = model.TimeCreated m.TimeUpdated = model.TimeUpdated diff --git a/apmsynthetics/monitor_summary.go b/apmsynthetics/monitor_summary.go index 1d45601750..7bf93e88ae 100644 --- a/apmsynthetics/monitor_summary.go +++ b/apmsynthetics/monitor_summary.go @@ -50,7 +50,8 @@ type MonitorSummary struct { // If runOnce is enabled, then the monitor will run once. IsRunOnce *bool `mandatory:"true" json:"isRunOnce"` - // Timeout in seconds. Timeout cannot be more than 30% of repeatIntervalInSeconds time for monitors. + // Timeout in seconds. If isFailureRetried is true, then timeout cannot be more than 30% of repeatIntervalInSeconds time for monitors. + // If isFailureRetried is false, then timeout cannot be more than 50% of repeatIntervalInSeconds time for monitors. // Also, timeoutInSeconds should be a multiple of 60 for Scripted REST, Scripted Browser and Browser monitors. // Monitor will be allowed to run only for timeoutInSeconds time. It would be terminated after that. TimeoutInSeconds *int `mandatory:"true" json:"timeoutInSeconds"` @@ -70,6 +71,8 @@ type MonitorSummary struct { // If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. Target *string `mandatory:"false" json:"target"` + MaintenanceWindowSchedule *MaintenanceWindowSchedule `mandatory:"false" json:"maintenanceWindowSchedule"` + // The time the resource was created, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) // timestamp format. // Example: `2020-02-12T22:47:12.613Z` diff --git a/apmsynthetics/update_monitor_details.go b/apmsynthetics/update_monitor_details.go index 2e7ff80f47..6acddb1b4e 100644 --- a/apmsynthetics/update_monitor_details.go +++ b/apmsynthetics/update_monitor_details.go @@ -40,7 +40,8 @@ type UpdateMonitorDetails struct { // If runOnce is enabled, then the monitor will run once. IsRunOnce *bool `mandatory:"false" json:"isRunOnce"` - // Timeout in seconds. Timeout cannot be more than 30% of repeatIntervalInSeconds time for monitors. + // Timeout in seconds. If isFailureRetried is true, then timeout cannot be more than 30% of repeatIntervalInSeconds time for monitors. + // If isFailureRetried is false, then timeout cannot be more than 50% of repeatIntervalInSeconds time for monitors. // Also, timeoutInSeconds should be a multiple of 60 for Scripted REST, Scripted Browser and Browser monitors. // Monitor will be allowed to run only for timeoutInSeconds time. It would be terminated after that. TimeoutInSeconds *int `mandatory:"false" json:"timeoutInSeconds"` @@ -58,6 +59,10 @@ type UpdateMonitorDetails struct { Configuration MonitorConfiguration `mandatory:"false" json:"configuration"` + AvailabilityConfiguration *AvailabilityConfiguration `mandatory:"false" json:"availabilityConfiguration"` + + MaintenanceWindowSchedule *MaintenanceWindowSchedule `mandatory:"false" json:"maintenanceWindowSchedule"` + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. // Example: `{"bar-key": "value"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` @@ -101,21 +106,23 @@ func (m UpdateMonitorDetails) ValidateEnumValue() (bool, error) { // UnmarshalJSON unmarshals from json func (m *UpdateMonitorDetails) UnmarshalJSON(data []byte) (e error) { model := struct { - DisplayName *string `json:"displayName"` - VantagePoints []string `json:"vantagePoints"` - ScriptId *string `json:"scriptId"` - Status MonitorStatusEnum `json:"status"` - RepeatIntervalInSeconds *int `json:"repeatIntervalInSeconds"` - IsRunOnce *bool `json:"isRunOnce"` - TimeoutInSeconds *int `json:"timeoutInSeconds"` - Target *string `json:"target"` - ScriptParameters []MonitorScriptParameter `json:"scriptParameters"` - Configuration monitorconfiguration `json:"configuration"` - FreeformTags map[string]string `json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `json:"definedTags"` - IsRunNow *bool `json:"isRunNow"` - SchedulingPolicy SchedulingPolicyEnum `json:"schedulingPolicy"` - BatchIntervalInSeconds *int `json:"batchIntervalInSeconds"` + DisplayName *string `json:"displayName"` + VantagePoints []string `json:"vantagePoints"` + ScriptId *string `json:"scriptId"` + Status MonitorStatusEnum `json:"status"` + RepeatIntervalInSeconds *int `json:"repeatIntervalInSeconds"` + IsRunOnce *bool `json:"isRunOnce"` + TimeoutInSeconds *int `json:"timeoutInSeconds"` + Target *string `json:"target"` + ScriptParameters []MonitorScriptParameter `json:"scriptParameters"` + Configuration monitorconfiguration `json:"configuration"` + AvailabilityConfiguration *AvailabilityConfiguration `json:"availabilityConfiguration"` + MaintenanceWindowSchedule *MaintenanceWindowSchedule `json:"maintenanceWindowSchedule"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + IsRunNow *bool `json:"isRunNow"` + SchedulingPolicy SchedulingPolicyEnum `json:"schedulingPolicy"` + BatchIntervalInSeconds *int `json:"batchIntervalInSeconds"` }{} e = json.Unmarshal(data, &model) @@ -157,6 +164,10 @@ func (m *UpdateMonitorDetails) UnmarshalJSON(data []byte) (e error) { m.Configuration = nil } + m.AvailabilityConfiguration = model.AvailabilityConfiguration + + m.MaintenanceWindowSchedule = model.MaintenanceWindowSchedule + m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/bds/bds_instance.go b/bds/bds_instance.go index 008c167fa6..76bac72e89 100644 --- a/bds/bds_instance.go +++ b/bds/bds_instance.go @@ -76,6 +76,9 @@ type BdsInstance struct { // The OCID of the Key Management master encryption key. KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + // Profile of the Big Data Service cluster. + ClusterProfile BdsInstanceClusterProfileEnum `mandatory:"false" json:"clusterProfile,omitempty"` } func (m BdsInstance) String() string { @@ -94,6 +97,9 @@ func (m BdsInstance) ValidateEnumValue() (bool, error) { if _, ok := GetMappingBdsInstanceClusterVersionEnum(string(m.ClusterVersion)); !ok && m.ClusterVersion != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ClusterVersion: %s. Supported values are: %s.", m.ClusterVersion, strings.Join(GetBdsInstanceClusterVersionEnumStringValues(), ","))) } + if _, ok := GetMappingBdsInstanceClusterProfileEnum(string(m.ClusterProfile)); !ok && m.ClusterProfile != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ClusterProfile: %s. Supported values are: %s.", m.ClusterProfile, strings.Join(GetBdsInstanceClusterProfileEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -227,3 +233,61 @@ func GetMappingBdsInstanceClusterVersionEnum(val string) (BdsInstanceClusterVers enum, ok := mappingBdsInstanceClusterVersionEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// BdsInstanceClusterProfileEnum Enum with underlying type: string +type BdsInstanceClusterProfileEnum string + +// Set of constants representing the allowable values for BdsInstanceClusterProfileEnum +const ( + BdsInstanceClusterProfileHadoopExtended BdsInstanceClusterProfileEnum = "HADOOP_EXTENDED" + BdsInstanceClusterProfileHadoop BdsInstanceClusterProfileEnum = "HADOOP" + BdsInstanceClusterProfileHive BdsInstanceClusterProfileEnum = "HIVE" + BdsInstanceClusterProfileSpark BdsInstanceClusterProfileEnum = "SPARK" + BdsInstanceClusterProfileHbase BdsInstanceClusterProfileEnum = "HBASE" + BdsInstanceClusterProfileTrino BdsInstanceClusterProfileEnum = "TRINO" +) + +var mappingBdsInstanceClusterProfileEnum = map[string]BdsInstanceClusterProfileEnum{ + "HADOOP_EXTENDED": BdsInstanceClusterProfileHadoopExtended, + "HADOOP": BdsInstanceClusterProfileHadoop, + "HIVE": BdsInstanceClusterProfileHive, + "SPARK": BdsInstanceClusterProfileSpark, + "HBASE": BdsInstanceClusterProfileHbase, + "TRINO": BdsInstanceClusterProfileTrino, +} + +var mappingBdsInstanceClusterProfileEnumLowerCase = map[string]BdsInstanceClusterProfileEnum{ + "hadoop_extended": BdsInstanceClusterProfileHadoopExtended, + "hadoop": BdsInstanceClusterProfileHadoop, + "hive": BdsInstanceClusterProfileHive, + "spark": BdsInstanceClusterProfileSpark, + "hbase": BdsInstanceClusterProfileHbase, + "trino": BdsInstanceClusterProfileTrino, +} + +// GetBdsInstanceClusterProfileEnumValues Enumerates the set of values for BdsInstanceClusterProfileEnum +func GetBdsInstanceClusterProfileEnumValues() []BdsInstanceClusterProfileEnum { + values := make([]BdsInstanceClusterProfileEnum, 0) + for _, v := range mappingBdsInstanceClusterProfileEnum { + values = append(values, v) + } + return values +} + +// GetBdsInstanceClusterProfileEnumStringValues Enumerates the set of values in String for BdsInstanceClusterProfileEnum +func GetBdsInstanceClusterProfileEnumStringValues() []string { + return []string{ + "HADOOP_EXTENDED", + "HADOOP", + "HIVE", + "SPARK", + "HBASE", + "TRINO", + } +} + +// GetMappingBdsInstanceClusterProfileEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingBdsInstanceClusterProfileEnum(val string) (BdsInstanceClusterProfileEnum, bool) { + enum, ok := mappingBdsInstanceClusterProfileEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/bds/bds_instance_summary.go b/bds/bds_instance_summary.go index d5711afad4..938e950e51 100644 --- a/bds/bds_instance_summary.go +++ b/bds/bds_instance_summary.go @@ -48,6 +48,9 @@ type BdsInstanceSummary struct { // Version of the Hadoop distribution. ClusterVersion BdsInstanceClusterVersionEnum `mandatory:"false" json:"clusterVersion,omitempty"` + // Profile of the Big Data Service cluster. + ClusterProfile BdsInstanceClusterProfileEnum `mandatory:"false" json:"clusterProfile,omitempty"` + // Simple key-value pair that is applied without any predefined name, type, or scope. // Exists for cross-compatibility only. For example, `{"bar-key": "value"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` @@ -73,6 +76,9 @@ func (m BdsInstanceSummary) ValidateEnumValue() (bool, error) { if _, ok := GetMappingBdsInstanceClusterVersionEnum(string(m.ClusterVersion)); !ok && m.ClusterVersion != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ClusterVersion: %s. Supported values are: %s.", m.ClusterVersion, strings.Join(GetBdsInstanceClusterVersionEnumStringValues(), ","))) } + if _, ok := GetMappingBdsInstanceClusterProfileEnum(string(m.ClusterProfile)); !ok && m.ClusterProfile != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ClusterProfile: %s. Supported values are: %s.", m.ClusterProfile, strings.Join(GetBdsInstanceClusterProfileEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/bds/create_bds_instance_details.go b/bds/create_bds_instance_details.go index 301dbbf0e4..e8e05479bd 100644 --- a/bds/create_bds_instance_details.go +++ b/bds/create_bds_instance_details.go @@ -60,6 +60,9 @@ type CreateBdsInstanceDetails struct { // The OCID of the Key Management master encryption key. KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + // Profile of the Big Data Service cluster. + ClusterProfile BdsInstanceClusterProfileEnum `mandatory:"false" json:"clusterProfile,omitempty"` } func (m CreateBdsInstanceDetails) String() string { @@ -75,6 +78,9 @@ func (m CreateBdsInstanceDetails) ValidateEnumValue() (bool, error) { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ClusterVersion: %s. Supported values are: %s.", m.ClusterVersion, strings.Join(GetBdsInstanceClusterVersionEnumStringValues(), ","))) } + if _, ok := GetMappingBdsInstanceClusterProfileEnum(string(m.ClusterProfile)); !ok && m.ClusterProfile != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ClusterProfile: %s. Supported values are: %s.", m.ClusterProfile, strings.Join(GetBdsInstanceClusterProfileEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/common/common.go b/common/common.go index 6b196b6832..5a527a3e1d 100644 --- a/common/common.go +++ b/common/common.go @@ -80,12 +80,22 @@ func (region Region) EndpointForTemplate(service string, serviceEndpointTemplate return endpoint } -// EndpointForTemplateDottedRegion returns a endpoint for a service based on template, only unknown region name can fall back to "oc1", but not short code region name. +// EndpointForTemplateDottedRegion returns a endpoint for a service based on the service name and EndpointTemplateForRegionWithDot template. If a service name is missing it is obtained from serviceEndpointTemplate and endpoint is constructed usingEndpointTemplateForRegionWithDot template. func (region Region) EndpointForTemplateDottedRegion(service string, serviceEndpointTemplate string, endpointServiceName string) (string, error) { + if !strings.Contains(string(region), ".") { + var endpoint = "" + if serviceEndpointTemplate != "" { + endpoint = region.EndpointForTemplate(service, serviceEndpointTemplate) + return endpoint, nil + } + endpoint = region.EndpointForTemplate(service, "") + return endpoint, nil + } + if endpointServiceName != "" { endpoint := strings.Replace(EndpointTemplateForRegionWithDot, "{endpoint_service_name}", endpointServiceName, 1) endpoint = strings.Replace(endpoint, "{region}", string(region), 1) - Debugf("Constructing endpoint from service name %s and region %s", endpointServiceName, region) + Debugf("Constructing endpoint from service name %s and region %s. Endpoint: %s", endpointServiceName, region, endpoint) return endpoint, nil } if serviceEndpointTemplate != "" { @@ -96,6 +106,7 @@ func (region Region) EndpointForTemplateDottedRegion(service string, serviceEndp if len(res) > 1 { endpoint = strings.Replace(EndpointTemplateForRegionWithDot, "{endpoint_service_name}", res[0], 1) endpoint = strings.Replace(endpoint, "{region}", string(region), 1) + Debugf("Constructing endpoint from service endpoint template %s and region %s. Endpoint: %s", serviceEndpointTemplate, region, endpoint) } else { return endpoint, fmt.Errorf("Endpoint service name not present in endpoint template") } diff --git a/common/common_test.go b/common/common_test.go index 5eac6c6dc4..5a0554cddf 100644 --- a/common/common_test.go +++ b/common/common_test.go @@ -217,6 +217,12 @@ func TestEndpointForTemplate(t *testing.T) { endpointTemplate: "https://test.{region}.{secondLevelDomain}", expected: "https://test.ap-chiyoda-1.oraclecloud8.com", }, + { + service: "identity", + region: StringToRegion("broom6.us.oracle.com"), + endpointTemplate: "https://iaas.{region}.{secondLevelDomain}", + expected: "https://iaas.broom6.us.oracle.com", + }, } for _, testData := range testDataSet { @@ -225,15 +231,15 @@ func TestEndpointForTemplate(t *testing.T) { } } -func TestEndpointForDotInRegion(t *testing.T) { - //dot in region with service name and endpoint template - region := StringToRegion("some.customerdomain.com") +func TestEndpointWithServiceName(t *testing.T) { + //no dot in region with service name and endpoint template + region := StringToRegion("us-phoenix-1") service := "test" - endpointTemplate := "https://{region}.bar.com" + endpointTemplate := "https://iaas.{region}.{secondLevelDomain}" serviceName := "iaas" endpoint, err := region.EndpointForTemplateDottedRegion(service, endpointTemplate, serviceName) assert.NoError(t, err) - assert.Equal(t, "https://iaas.some.customerdomain.com", endpoint) + assert.Equal(t, "https://iaas.us-phoenix-1.oraclecloud.com", endpoint) service = "identity" region = StringToRegion("broom6.us.oracle.com") @@ -258,14 +264,6 @@ func TestEndpointForDotInRegion(t *testing.T) { assert.NoError(t, err) assert.Equal(t, "https://iaas.broom6.us.oracle.com", endpoint) - //dot in region without service name and with endpoint template - service = "identity" - region = StringToRegion("broom6.us.oracle.com") - endpointTemplate = "https://iaas.{region}.{secondLevelDomain}" - endpoint, err = region.EndpointForTemplateDottedRegion(service, endpointTemplate, "") - assert.NoError(t, err) - assert.Equal(t, "https://iaas.broom6.us.oracle.com", endpoint) - //dot in region without service name and without endpoint template service = "analytics" region = StringToRegion("broom6.us.oracle.com") diff --git a/common/version.go b/common/version.go index 322034e043..153620f16e 100644 --- a/common/version.go +++ b/common/version.go @@ -12,7 +12,7 @@ import ( const ( major = "65" - minor = "27" + minor = "28" patch = "0" tag = "" ) diff --git a/containerinstances/containerinstances_containerinstance_client.go b/containerinstances/containerinstances_containerinstance_client.go index c2c483db9a..63e9d33b1c 100644 --- a/containerinstances/containerinstances_containerinstance_client.go +++ b/containerinstances/containerinstances_containerinstance_client.go @@ -136,7 +136,7 @@ func (client ContainerInstanceClient) changeContainerInstanceCompartment(ctx con defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/container-instances/20210415/ContainerInstance/ChangeContainerInstanceCompartment" err = common.PostProcessServiceError(err, "ContainerInstance", "ChangeContainerInstanceCompartment", apiReferenceLink) return response, err } @@ -199,7 +199,7 @@ func (client ContainerInstanceClient) createContainerInstance(ctx context.Contex defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/container-instances/20210415/ContainerInstance/CreateContainerInstance" err = common.PostProcessServiceError(err, "ContainerInstance", "CreateContainerInstance", apiReferenceLink) return response, err } @@ -257,7 +257,7 @@ func (client ContainerInstanceClient) deleteContainerInstance(ctx context.Contex defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/container-instances/20210415/ContainerInstance/DeleteContainerInstance" err = common.PostProcessServiceError(err, "ContainerInstance", "DeleteContainerInstance", apiReferenceLink) return response, err } @@ -315,7 +315,7 @@ func (client ContainerInstanceClient) getContainer(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/container-instances/20210415/Container/GetContainer" err = common.PostProcessServiceError(err, "ContainerInstance", "GetContainer", apiReferenceLink) return response, err } @@ -373,7 +373,7 @@ func (client ContainerInstanceClient) getContainerInstance(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/container-instances/20210415/ContainerInstance/GetContainerInstance" err = common.PostProcessServiceError(err, "ContainerInstance", "GetContainerInstance", apiReferenceLink) return response, err } @@ -431,7 +431,7 @@ func (client ContainerInstanceClient) getWorkRequest(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/container-instances/20210415/WorkRequest/GetWorkRequest" err = common.PostProcessServiceError(err, "ContainerInstance", "GetWorkRequest", apiReferenceLink) return response, err } @@ -489,7 +489,7 @@ func (client ContainerInstanceClient) listContainerInstanceShapes(ctx context.Co defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/container-instances/20210415/ContainerInstanceShapeCollection/ListContainerInstanceShapes" err = common.PostProcessServiceError(err, "ContainerInstance", "ListContainerInstanceShapes", apiReferenceLink) return response, err } @@ -547,7 +547,7 @@ func (client ContainerInstanceClient) listContainerInstances(ctx context.Context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/container-instances/20210415/ContainerInstanceCollection/ListContainerInstances" err = common.PostProcessServiceError(err, "ContainerInstance", "ListContainerInstances", apiReferenceLink) return response, err } @@ -605,7 +605,7 @@ func (client ContainerInstanceClient) listContainers(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/container-instances/20210415/ContainerCollection/ListContainers" err = common.PostProcessServiceError(err, "ContainerInstance", "ListContainers", apiReferenceLink) return response, err } @@ -663,7 +663,7 @@ func (client ContainerInstanceClient) listWorkRequestErrors(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/container-instances/20210415/WorkRequestErrorCollection/ListWorkRequestErrors" err = common.PostProcessServiceError(err, "ContainerInstance", "ListWorkRequestErrors", apiReferenceLink) return response, err } @@ -721,7 +721,7 @@ func (client ContainerInstanceClient) listWorkRequestLogs(ctx context.Context, r defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/container-instances/20210415/WorkRequestLogEntryCollection/ListWorkRequestLogs" err = common.PostProcessServiceError(err, "ContainerInstance", "ListWorkRequestLogs", apiReferenceLink) return response, err } @@ -779,7 +779,7 @@ func (client ContainerInstanceClient) listWorkRequests(ctx context.Context, requ defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/container-instances/20210415/WorkRequestSummaryCollection/ListWorkRequests" err = common.PostProcessServiceError(err, "ContainerInstance", "ListWorkRequests", apiReferenceLink) return response, err } @@ -837,7 +837,7 @@ func (client ContainerInstanceClient) restartContainerInstance(ctx context.Conte defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/container-instances/20210415/ContainerInstance/RestartContainerInstance" err = common.PostProcessServiceError(err, "ContainerInstance", "RestartContainerInstance", apiReferenceLink) return response, err } @@ -894,7 +894,7 @@ func (client ContainerInstanceClient) retrieveLogs(ctx context.Context, request httpResponse, err = client.Call(ctx, &httpRequest) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/container-instances/20210415/Container/RetrieveLogs" err = common.PostProcessServiceError(err, "ContainerInstance", "RetrieveLogs", apiReferenceLink) return response, err } @@ -952,7 +952,7 @@ func (client ContainerInstanceClient) startContainerInstance(ctx context.Context defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/container-instances/20210415/ContainerInstance/StartContainerInstance" err = common.PostProcessServiceError(err, "ContainerInstance", "StartContainerInstance", apiReferenceLink) return response, err } @@ -1010,7 +1010,7 @@ func (client ContainerInstanceClient) stopContainerInstance(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/container-instances/20210415/ContainerInstance/StopContainerInstance" err = common.PostProcessServiceError(err, "ContainerInstance", "StopContainerInstance", apiReferenceLink) return response, err } @@ -1068,7 +1068,7 @@ func (client ContainerInstanceClient) updateContainer(ctx context.Context, reque defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/container-instances/20210415/Container/UpdateContainer" err = common.PostProcessServiceError(err, "ContainerInstance", "UpdateContainer", apiReferenceLink) return response, err } @@ -1126,7 +1126,7 @@ func (client ContainerInstanceClient) updateContainerInstance(ctx context.Contex defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/container-instances/20210415/ContainerInstance/UpdateContainerInstance" err = common.PostProcessServiceError(err, "ContainerInstance", "UpdateContainerInstance", apiReferenceLink) return response, err } diff --git a/database/database_client.go b/database/database_client.go index 45830c5371..542dbd7f3c 100644 --- a/database/database_client.go +++ b/database/database_client.go @@ -5175,6 +5175,68 @@ func (client DatabaseClient) disableExternalPluggableDatabaseStackMonitoring(ctx return response, err } +// DisablePluggableDatabaseManagement Disables the Database Management service for the pluggable database. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/DisablePluggableDatabaseManagement.go.html to see an example of how to use DisablePluggableDatabaseManagement API. +func (client DatabaseClient) DisablePluggableDatabaseManagement(ctx context.Context, request DisablePluggableDatabaseManagementRequest) (response DisablePluggableDatabaseManagementResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.disablePluggableDatabaseManagement, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DisablePluggableDatabaseManagementResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DisablePluggableDatabaseManagementResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DisablePluggableDatabaseManagementResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DisablePluggableDatabaseManagementResponse") + } + return +} + +// disablePluggableDatabaseManagement implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) disablePluggableDatabaseManagement(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/pluggableDatabases/{pluggableDatabaseId}/actions/disablePluggableDatabaseManagement", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DisablePluggableDatabaseManagementResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/database/20160918/PluggableDatabase/DisablePluggableDatabaseManagement" + err = common.PostProcessServiceError(err, "Database", "DisablePluggableDatabaseManagement", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DownloadExadataInfrastructureConfigFile Downloads the configuration file for the specified Exadata Cloud@Customer infrastructure. // // See also @@ -6036,6 +6098,68 @@ func (client DatabaseClient) enableExternalPluggableDatabaseStackMonitoring(ctx return response, err } +// EnablePluggableDatabaseManagement Enables the Database Management service for an Oracle Pluggable Database located in Oracle Cloud Infrastructure. This service allows the pluggable database to access tools including Metrics and Performance hub. Database Management is enabled at the pluggable database (PDB) level. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/EnablePluggableDatabaseManagement.go.html to see an example of how to use EnablePluggableDatabaseManagement API. +func (client DatabaseClient) EnablePluggableDatabaseManagement(ctx context.Context, request EnablePluggableDatabaseManagementRequest) (response EnablePluggableDatabaseManagementResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.enablePluggableDatabaseManagement, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = EnablePluggableDatabaseManagementResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = EnablePluggableDatabaseManagementResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(EnablePluggableDatabaseManagementResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into EnablePluggableDatabaseManagementResponse") + } + return +} + +// enablePluggableDatabaseManagement implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) enablePluggableDatabaseManagement(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/pluggableDatabases/{pluggableDatabaseId}/actions/enablePluggableDatabaseManagement", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response EnablePluggableDatabaseManagementResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/database/20160918/PluggableDatabase/EnablePluggableDatabaseManagement" + err = common.PostProcessServiceError(err, "Database", "EnablePluggableDatabaseManagement", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // FailOverAutonomousDatabase Initiates a failover the specified Autonomous Database to a standby. To perform a failover to a standby located in a remote region, specify the OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the remote standby using the `peerDbId` parameter. // // See also @@ -13023,6 +13147,68 @@ func (client DatabaseClient) modifyDatabaseManagement(ctx context.Context, reque return response, err } +// ModifyPluggableDatabaseManagement Updates one or more attributes of the Database Management service for the pluggable database. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/ModifyPluggableDatabaseManagement.go.html to see an example of how to use ModifyPluggableDatabaseManagement API. +func (client DatabaseClient) ModifyPluggableDatabaseManagement(ctx context.Context, request ModifyPluggableDatabaseManagementRequest) (response ModifyPluggableDatabaseManagementResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.modifyPluggableDatabaseManagement, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ModifyPluggableDatabaseManagementResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ModifyPluggableDatabaseManagementResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ModifyPluggableDatabaseManagementResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ModifyPluggableDatabaseManagementResponse") + } + return +} + +// modifyPluggableDatabaseManagement implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) modifyPluggableDatabaseManagement(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/pluggableDatabases/{pluggableDatabaseId}/actions/modifyPluggableDatabaseManagement", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ModifyPluggableDatabaseManagementResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/database/20160918/PluggableDatabase/ModifyPluggableDatabaseManagement" + err = common.PostProcessServiceError(err, "Database", "ModifyPluggableDatabaseManagement", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // RegisterAutonomousDatabaseDataSafe Asynchronously registers this Autonomous Database with Data Safe. // // See also diff --git a/database/db_system_shape_summary.go b/database/db_system_shape_summary.go index cca4694a71..8f4c90b3d5 100644 --- a/database/db_system_shape_summary.go +++ b/database/db_system_shape_summary.go @@ -30,7 +30,7 @@ type DbSystemShapeSummary struct { // The family of the shape used for the DB system. ShapeFamily *string `mandatory:"false" json:"shapeFamily"` - // The shape type for the virtual machine DB system. Shape type is determined by CPU hardware. Valid values are `AMD` and `INTEL`. + // The shape type for the virtual machine DB system. Shape type is determined by CPU hardware. Valid values are `AMD` , `INTEL` or `INTEL_FLEX_X9`. ShapeType DbSystemShapeSummaryShapeTypeEnum `mandatory:"false" json:"shapeType,omitempty"` // Deprecated. Use `name` instead of `shape`. @@ -112,18 +112,21 @@ type DbSystemShapeSummaryShapeTypeEnum string // Set of constants representing the allowable values for DbSystemShapeSummaryShapeTypeEnum const ( - DbSystemShapeSummaryShapeTypeAmd DbSystemShapeSummaryShapeTypeEnum = "AMD" - DbSystemShapeSummaryShapeTypeIntel DbSystemShapeSummaryShapeTypeEnum = "INTEL" + DbSystemShapeSummaryShapeTypeAmd DbSystemShapeSummaryShapeTypeEnum = "AMD" + DbSystemShapeSummaryShapeTypeIntel DbSystemShapeSummaryShapeTypeEnum = "INTEL" + DbSystemShapeSummaryShapeTypeIntelFlexX9 DbSystemShapeSummaryShapeTypeEnum = "INTEL_FLEX_X9" ) var mappingDbSystemShapeSummaryShapeTypeEnum = map[string]DbSystemShapeSummaryShapeTypeEnum{ - "AMD": DbSystemShapeSummaryShapeTypeAmd, - "INTEL": DbSystemShapeSummaryShapeTypeIntel, + "AMD": DbSystemShapeSummaryShapeTypeAmd, + "INTEL": DbSystemShapeSummaryShapeTypeIntel, + "INTEL_FLEX_X9": DbSystemShapeSummaryShapeTypeIntelFlexX9, } var mappingDbSystemShapeSummaryShapeTypeEnumLowerCase = map[string]DbSystemShapeSummaryShapeTypeEnum{ - "amd": DbSystemShapeSummaryShapeTypeAmd, - "intel": DbSystemShapeSummaryShapeTypeIntel, + "amd": DbSystemShapeSummaryShapeTypeAmd, + "intel": DbSystemShapeSummaryShapeTypeIntel, + "intel_flex_x9": DbSystemShapeSummaryShapeTypeIntelFlexX9, } // GetDbSystemShapeSummaryShapeTypeEnumValues Enumerates the set of values for DbSystemShapeSummaryShapeTypeEnum @@ -140,6 +143,7 @@ func GetDbSystemShapeSummaryShapeTypeEnumStringValues() []string { return []string{ "AMD", "INTEL", + "INTEL_FLEX_X9", } } diff --git a/database/db_system_storage_performance_summary.go b/database/db_system_storage_performance_summary.go index e8b9eb5656..411df07da5 100644 --- a/database/db_system_storage_performance_summary.go +++ b/database/db_system_storage_performance_summary.go @@ -18,7 +18,7 @@ import ( // DbSystemStoragePerformanceSummary Representation of storage performance summary per shapeType . type DbSystemStoragePerformanceSummary struct { - // ShapeType of the DbSystems,INTEL or AMD + // ShapeType of the DbSystems INTEL , AMD or INTEL_FLEX_X9 ShapeType DbSystemStoragePerformanceSummaryShapeTypeEnum `mandatory:"true" json:"shapeType"` // List of storage performance for the DATA disks @@ -52,18 +52,21 @@ type DbSystemStoragePerformanceSummaryShapeTypeEnum string // Set of constants representing the allowable values for DbSystemStoragePerformanceSummaryShapeTypeEnum const ( - DbSystemStoragePerformanceSummaryShapeTypeAmd DbSystemStoragePerformanceSummaryShapeTypeEnum = "AMD" - DbSystemStoragePerformanceSummaryShapeTypeIntel DbSystemStoragePerformanceSummaryShapeTypeEnum = "INTEL" + DbSystemStoragePerformanceSummaryShapeTypeAmd DbSystemStoragePerformanceSummaryShapeTypeEnum = "AMD" + DbSystemStoragePerformanceSummaryShapeTypeIntel DbSystemStoragePerformanceSummaryShapeTypeEnum = "INTEL" + DbSystemStoragePerformanceSummaryShapeTypeIntelFlexX9 DbSystemStoragePerformanceSummaryShapeTypeEnum = "INTEL_FLEX_X9" ) var mappingDbSystemStoragePerformanceSummaryShapeTypeEnum = map[string]DbSystemStoragePerformanceSummaryShapeTypeEnum{ - "AMD": DbSystemStoragePerformanceSummaryShapeTypeAmd, - "INTEL": DbSystemStoragePerformanceSummaryShapeTypeIntel, + "AMD": DbSystemStoragePerformanceSummaryShapeTypeAmd, + "INTEL": DbSystemStoragePerformanceSummaryShapeTypeIntel, + "INTEL_FLEX_X9": DbSystemStoragePerformanceSummaryShapeTypeIntelFlexX9, } var mappingDbSystemStoragePerformanceSummaryShapeTypeEnumLowerCase = map[string]DbSystemStoragePerformanceSummaryShapeTypeEnum{ - "amd": DbSystemStoragePerformanceSummaryShapeTypeAmd, - "intel": DbSystemStoragePerformanceSummaryShapeTypeIntel, + "amd": DbSystemStoragePerformanceSummaryShapeTypeAmd, + "intel": DbSystemStoragePerformanceSummaryShapeTypeIntel, + "intel_flex_x9": DbSystemStoragePerformanceSummaryShapeTypeIntelFlexX9, } // GetDbSystemStoragePerformanceSummaryShapeTypeEnumValues Enumerates the set of values for DbSystemStoragePerformanceSummaryShapeTypeEnum @@ -80,6 +83,7 @@ func GetDbSystemStoragePerformanceSummaryShapeTypeEnumStringValues() []string { return []string{ "AMD", "INTEL", + "INTEL_FLEX_X9", } } diff --git a/database/disable_pluggable_database_management_request_response.go b/database/disable_pluggable_database_management_request_response.go new file mode 100644 index 0000000000..a655d38869 --- /dev/null +++ b/database/disable_pluggable_database_management_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DisablePluggableDatabaseManagementRequest wrapper for the DisablePluggableDatabaseManagement operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/DisablePluggableDatabaseManagement.go.html to see an example of how to use DisablePluggableDatabaseManagementRequest. +type DisablePluggableDatabaseManagementRequest struct { + + // The database OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + PluggableDatabaseId *string `mandatory:"true" contributesTo:"path" name:"pluggableDatabaseId"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DisablePluggableDatabaseManagementRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DisablePluggableDatabaseManagementRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DisablePluggableDatabaseManagementRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DisablePluggableDatabaseManagementRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DisablePluggableDatabaseManagementRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DisablePluggableDatabaseManagementResponse wrapper for the DisablePluggableDatabaseManagement operation +type DisablePluggableDatabaseManagementResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PluggableDatabase instance + PluggableDatabase `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use GetWorkRequest with a work request OCID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DisablePluggableDatabaseManagementResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DisablePluggableDatabaseManagementResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/database/enable_pluggable_database_management_details.go b/database/enable_pluggable_database_management_details.go new file mode 100644 index 0000000000..631ffdcd92 --- /dev/null +++ b/database/enable_pluggable_database_management_details.go @@ -0,0 +1,145 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). +// + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// EnablePluggableDatabaseManagementDetails Data to enable the Database Management service for the pluggable database. +type EnablePluggableDatabaseManagementDetails struct { + CredentialDetails *DatabaseCredentialDetails `mandatory:"true" json:"credentialDetails"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the private endpoint. + PrivateEndPointId *string `mandatory:"true" json:"privateEndPointId"` + + // The name of the Oracle Database service that will be used to connect to the database. + ServiceName *string `mandatory:"true" json:"serviceName"` + + // Protocol used by the database connection. + Protocol EnablePluggableDatabaseManagementDetailsProtocolEnum `mandatory:"false" json:"protocol,omitempty"` + + // The port used to connect to the pluggable database. + Port *int `mandatory:"false" json:"port"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure secret (https://docs.cloud.oracle.com/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + SslSecretId *string `mandatory:"false" json:"sslSecretId"` + + // The role of the user that will be connecting to the pluggable database. + Role EnablePluggableDatabaseManagementDetailsRoleEnum `mandatory:"false" json:"role,omitempty"` +} + +func (m EnablePluggableDatabaseManagementDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m EnablePluggableDatabaseManagementDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingEnablePluggableDatabaseManagementDetailsProtocolEnum(string(m.Protocol)); !ok && m.Protocol != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Protocol: %s. Supported values are: %s.", m.Protocol, strings.Join(GetEnablePluggableDatabaseManagementDetailsProtocolEnumStringValues(), ","))) + } + if _, ok := GetMappingEnablePluggableDatabaseManagementDetailsRoleEnum(string(m.Role)); !ok && m.Role != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Role: %s. Supported values are: %s.", m.Role, strings.Join(GetEnablePluggableDatabaseManagementDetailsRoleEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// EnablePluggableDatabaseManagementDetailsProtocolEnum Enum with underlying type: string +type EnablePluggableDatabaseManagementDetailsProtocolEnum string + +// Set of constants representing the allowable values for EnablePluggableDatabaseManagementDetailsProtocolEnum +const ( + EnablePluggableDatabaseManagementDetailsProtocolTcp EnablePluggableDatabaseManagementDetailsProtocolEnum = "TCP" + EnablePluggableDatabaseManagementDetailsProtocolTcps EnablePluggableDatabaseManagementDetailsProtocolEnum = "TCPS" +) + +var mappingEnablePluggableDatabaseManagementDetailsProtocolEnum = map[string]EnablePluggableDatabaseManagementDetailsProtocolEnum{ + "TCP": EnablePluggableDatabaseManagementDetailsProtocolTcp, + "TCPS": EnablePluggableDatabaseManagementDetailsProtocolTcps, +} + +var mappingEnablePluggableDatabaseManagementDetailsProtocolEnumLowerCase = map[string]EnablePluggableDatabaseManagementDetailsProtocolEnum{ + "tcp": EnablePluggableDatabaseManagementDetailsProtocolTcp, + "tcps": EnablePluggableDatabaseManagementDetailsProtocolTcps, +} + +// GetEnablePluggableDatabaseManagementDetailsProtocolEnumValues Enumerates the set of values for EnablePluggableDatabaseManagementDetailsProtocolEnum +func GetEnablePluggableDatabaseManagementDetailsProtocolEnumValues() []EnablePluggableDatabaseManagementDetailsProtocolEnum { + values := make([]EnablePluggableDatabaseManagementDetailsProtocolEnum, 0) + for _, v := range mappingEnablePluggableDatabaseManagementDetailsProtocolEnum { + values = append(values, v) + } + return values +} + +// GetEnablePluggableDatabaseManagementDetailsProtocolEnumStringValues Enumerates the set of values in String for EnablePluggableDatabaseManagementDetailsProtocolEnum +func GetEnablePluggableDatabaseManagementDetailsProtocolEnumStringValues() []string { + return []string{ + "TCP", + "TCPS", + } +} + +// GetMappingEnablePluggableDatabaseManagementDetailsProtocolEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingEnablePluggableDatabaseManagementDetailsProtocolEnum(val string) (EnablePluggableDatabaseManagementDetailsProtocolEnum, bool) { + enum, ok := mappingEnablePluggableDatabaseManagementDetailsProtocolEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// EnablePluggableDatabaseManagementDetailsRoleEnum Enum with underlying type: string +type EnablePluggableDatabaseManagementDetailsRoleEnum string + +// Set of constants representing the allowable values for EnablePluggableDatabaseManagementDetailsRoleEnum +const ( + EnablePluggableDatabaseManagementDetailsRoleSysdba EnablePluggableDatabaseManagementDetailsRoleEnum = "SYSDBA" + EnablePluggableDatabaseManagementDetailsRoleNormal EnablePluggableDatabaseManagementDetailsRoleEnum = "NORMAL" +) + +var mappingEnablePluggableDatabaseManagementDetailsRoleEnum = map[string]EnablePluggableDatabaseManagementDetailsRoleEnum{ + "SYSDBA": EnablePluggableDatabaseManagementDetailsRoleSysdba, + "NORMAL": EnablePluggableDatabaseManagementDetailsRoleNormal, +} + +var mappingEnablePluggableDatabaseManagementDetailsRoleEnumLowerCase = map[string]EnablePluggableDatabaseManagementDetailsRoleEnum{ + "sysdba": EnablePluggableDatabaseManagementDetailsRoleSysdba, + "normal": EnablePluggableDatabaseManagementDetailsRoleNormal, +} + +// GetEnablePluggableDatabaseManagementDetailsRoleEnumValues Enumerates the set of values for EnablePluggableDatabaseManagementDetailsRoleEnum +func GetEnablePluggableDatabaseManagementDetailsRoleEnumValues() []EnablePluggableDatabaseManagementDetailsRoleEnum { + values := make([]EnablePluggableDatabaseManagementDetailsRoleEnum, 0) + for _, v := range mappingEnablePluggableDatabaseManagementDetailsRoleEnum { + values = append(values, v) + } + return values +} + +// GetEnablePluggableDatabaseManagementDetailsRoleEnumStringValues Enumerates the set of values in String for EnablePluggableDatabaseManagementDetailsRoleEnum +func GetEnablePluggableDatabaseManagementDetailsRoleEnumStringValues() []string { + return []string{ + "SYSDBA", + "NORMAL", + } +} + +// GetMappingEnablePluggableDatabaseManagementDetailsRoleEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingEnablePluggableDatabaseManagementDetailsRoleEnum(val string) (EnablePluggableDatabaseManagementDetailsRoleEnum, bool) { + enum, ok := mappingEnablePluggableDatabaseManagementDetailsRoleEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/database/enable_pluggable_database_management_request_response.go b/database/enable_pluggable_database_management_request_response.go new file mode 100644 index 0000000000..e654e0fe46 --- /dev/null +++ b/database/enable_pluggable_database_management_request_response.go @@ -0,0 +1,111 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// EnablePluggableDatabaseManagementRequest wrapper for the EnablePluggableDatabaseManagement operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/EnablePluggableDatabaseManagement.go.html to see an example of how to use EnablePluggableDatabaseManagementRequest. +type EnablePluggableDatabaseManagementRequest struct { + + // The database OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + PluggableDatabaseId *string `mandatory:"true" contributesTo:"path" name:"pluggableDatabaseId"` + + // Request to enable the Database Management service for an Oracle Pluggable Database located in Oracle Cloud Infrastructure. + EnablePluggableDatabaseManagementDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request EnablePluggableDatabaseManagementRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request EnablePluggableDatabaseManagementRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request EnablePluggableDatabaseManagementRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request EnablePluggableDatabaseManagementRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request EnablePluggableDatabaseManagementRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// EnablePluggableDatabaseManagementResponse wrapper for the EnablePluggableDatabaseManagement operation +type EnablePluggableDatabaseManagementResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PluggableDatabase instance + PluggableDatabase `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use GetWorkRequest with a work request OCID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response EnablePluggableDatabaseManagementResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response EnablePluggableDatabaseManagementResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/database/modify_pluggable_database_management_details.go b/database/modify_pluggable_database_management_details.go new file mode 100644 index 0000000000..2525f21c45 --- /dev/null +++ b/database/modify_pluggable_database_management_details.go @@ -0,0 +1,145 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). +// + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ModifyPluggableDatabaseManagementDetails Data to update one or more attributes of the Database Management configuration for the pluggable database. +type ModifyPluggableDatabaseManagementDetails struct { + CredentialDetails *DatabaseCredentialDetails `mandatory:"false" json:"credentialDetails"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the private endpoint. + PrivateEndPointId *string `mandatory:"false" json:"privateEndPointId"` + + // The name of the Oracle Database service that will be used to connect to the database. + ServiceName *string `mandatory:"false" json:"serviceName"` + + // Protocol used by the database connection. + Protocol ModifyPluggableDatabaseManagementDetailsProtocolEnum `mandatory:"false" json:"protocol,omitempty"` + + // The port used to connect to the database. + Port *int `mandatory:"false" json:"port"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure secret (https://docs.cloud.oracle.com/Content/KeyManagement/Concepts/keyoverview.htm#concepts). + SslSecretId *string `mandatory:"false" json:"sslSecretId"` + + // The role of the user that will be connecting to the database. + Role ModifyPluggableDatabaseManagementDetailsRoleEnum `mandatory:"false" json:"role,omitempty"` +} + +func (m ModifyPluggableDatabaseManagementDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ModifyPluggableDatabaseManagementDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingModifyPluggableDatabaseManagementDetailsProtocolEnum(string(m.Protocol)); !ok && m.Protocol != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Protocol: %s. Supported values are: %s.", m.Protocol, strings.Join(GetModifyPluggableDatabaseManagementDetailsProtocolEnumStringValues(), ","))) + } + if _, ok := GetMappingModifyPluggableDatabaseManagementDetailsRoleEnum(string(m.Role)); !ok && m.Role != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Role: %s. Supported values are: %s.", m.Role, strings.Join(GetModifyPluggableDatabaseManagementDetailsRoleEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ModifyPluggableDatabaseManagementDetailsProtocolEnum Enum with underlying type: string +type ModifyPluggableDatabaseManagementDetailsProtocolEnum string + +// Set of constants representing the allowable values for ModifyPluggableDatabaseManagementDetailsProtocolEnum +const ( + ModifyPluggableDatabaseManagementDetailsProtocolTcp ModifyPluggableDatabaseManagementDetailsProtocolEnum = "TCP" + ModifyPluggableDatabaseManagementDetailsProtocolTcps ModifyPluggableDatabaseManagementDetailsProtocolEnum = "TCPS" +) + +var mappingModifyPluggableDatabaseManagementDetailsProtocolEnum = map[string]ModifyPluggableDatabaseManagementDetailsProtocolEnum{ + "TCP": ModifyPluggableDatabaseManagementDetailsProtocolTcp, + "TCPS": ModifyPluggableDatabaseManagementDetailsProtocolTcps, +} + +var mappingModifyPluggableDatabaseManagementDetailsProtocolEnumLowerCase = map[string]ModifyPluggableDatabaseManagementDetailsProtocolEnum{ + "tcp": ModifyPluggableDatabaseManagementDetailsProtocolTcp, + "tcps": ModifyPluggableDatabaseManagementDetailsProtocolTcps, +} + +// GetModifyPluggableDatabaseManagementDetailsProtocolEnumValues Enumerates the set of values for ModifyPluggableDatabaseManagementDetailsProtocolEnum +func GetModifyPluggableDatabaseManagementDetailsProtocolEnumValues() []ModifyPluggableDatabaseManagementDetailsProtocolEnum { + values := make([]ModifyPluggableDatabaseManagementDetailsProtocolEnum, 0) + for _, v := range mappingModifyPluggableDatabaseManagementDetailsProtocolEnum { + values = append(values, v) + } + return values +} + +// GetModifyPluggableDatabaseManagementDetailsProtocolEnumStringValues Enumerates the set of values in String for ModifyPluggableDatabaseManagementDetailsProtocolEnum +func GetModifyPluggableDatabaseManagementDetailsProtocolEnumStringValues() []string { + return []string{ + "TCP", + "TCPS", + } +} + +// GetMappingModifyPluggableDatabaseManagementDetailsProtocolEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingModifyPluggableDatabaseManagementDetailsProtocolEnum(val string) (ModifyPluggableDatabaseManagementDetailsProtocolEnum, bool) { + enum, ok := mappingModifyPluggableDatabaseManagementDetailsProtocolEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ModifyPluggableDatabaseManagementDetailsRoleEnum Enum with underlying type: string +type ModifyPluggableDatabaseManagementDetailsRoleEnum string + +// Set of constants representing the allowable values for ModifyPluggableDatabaseManagementDetailsRoleEnum +const ( + ModifyPluggableDatabaseManagementDetailsRoleSysdba ModifyPluggableDatabaseManagementDetailsRoleEnum = "SYSDBA" + ModifyPluggableDatabaseManagementDetailsRoleNormal ModifyPluggableDatabaseManagementDetailsRoleEnum = "NORMAL" +) + +var mappingModifyPluggableDatabaseManagementDetailsRoleEnum = map[string]ModifyPluggableDatabaseManagementDetailsRoleEnum{ + "SYSDBA": ModifyPluggableDatabaseManagementDetailsRoleSysdba, + "NORMAL": ModifyPluggableDatabaseManagementDetailsRoleNormal, +} + +var mappingModifyPluggableDatabaseManagementDetailsRoleEnumLowerCase = map[string]ModifyPluggableDatabaseManagementDetailsRoleEnum{ + "sysdba": ModifyPluggableDatabaseManagementDetailsRoleSysdba, + "normal": ModifyPluggableDatabaseManagementDetailsRoleNormal, +} + +// GetModifyPluggableDatabaseManagementDetailsRoleEnumValues Enumerates the set of values for ModifyPluggableDatabaseManagementDetailsRoleEnum +func GetModifyPluggableDatabaseManagementDetailsRoleEnumValues() []ModifyPluggableDatabaseManagementDetailsRoleEnum { + values := make([]ModifyPluggableDatabaseManagementDetailsRoleEnum, 0) + for _, v := range mappingModifyPluggableDatabaseManagementDetailsRoleEnum { + values = append(values, v) + } + return values +} + +// GetModifyPluggableDatabaseManagementDetailsRoleEnumStringValues Enumerates the set of values in String for ModifyPluggableDatabaseManagementDetailsRoleEnum +func GetModifyPluggableDatabaseManagementDetailsRoleEnumStringValues() []string { + return []string{ + "SYSDBA", + "NORMAL", + } +} + +// GetMappingModifyPluggableDatabaseManagementDetailsRoleEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingModifyPluggableDatabaseManagementDetailsRoleEnum(val string) (ModifyPluggableDatabaseManagementDetailsRoleEnum, bool) { + enum, ok := mappingModifyPluggableDatabaseManagementDetailsRoleEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/database/modify_pluggable_database_management_request_response.go b/database/modify_pluggable_database_management_request_response.go new file mode 100644 index 0000000000..aa7f044587 --- /dev/null +++ b/database/modify_pluggable_database_management_request_response.go @@ -0,0 +1,111 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ModifyPluggableDatabaseManagementRequest wrapper for the ModifyPluggableDatabaseManagement operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/ModifyPluggableDatabaseManagement.go.html to see an example of how to use ModifyPluggableDatabaseManagementRequest. +type ModifyPluggableDatabaseManagementRequest struct { + + // The database OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + PluggableDatabaseId *string `mandatory:"true" contributesTo:"path" name:"pluggableDatabaseId"` + + // The data to update one or more attributes of the Database Management Service for the pluggable database. + ModifyPluggableDatabaseManagementDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ModifyPluggableDatabaseManagementRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ModifyPluggableDatabaseManagementRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ModifyPluggableDatabaseManagementRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ModifyPluggableDatabaseManagementRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ModifyPluggableDatabaseManagementRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ModifyPluggableDatabaseManagementResponse wrapper for the ModifyPluggableDatabaseManagement operation +type ModifyPluggableDatabaseManagementResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PluggableDatabase instance + PluggableDatabase `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use GetWorkRequest with a work request OCID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ModifyPluggableDatabaseManagementResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ModifyPluggableDatabaseManagementResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/database/pluggable_database.go b/database/pluggable_database.go index 7e2294e41e..21aad04650 100644 --- a/database/pluggable_database.go +++ b/database/pluggable_database.go @@ -58,6 +58,8 @@ type PluggableDatabase struct { // Defined tags for this resource. Each key is predefined and scoped to a namespace. // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + PluggableDatabaseManagementConfig *PluggableDatabaseManagementConfig `mandatory:"false" json:"pluggableDatabaseManagementConfig"` } func (m PluggableDatabase) String() string { diff --git a/database/pluggable_database_management_config.go b/database/pluggable_database_management_config.go new file mode 100644 index 0000000000..98bcb698b8 --- /dev/null +++ b/database/pluggable_database_management_config.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). +// + +package database + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PluggableDatabaseManagementConfig The configuration of the Pluggable Database Management service. +type PluggableDatabaseManagementConfig struct { + + // The status of the Pluggable Database Management service. + ManagementStatus PluggableDatabaseManagementConfigManagementStatusEnum `mandatory:"true" json:"managementStatus"` +} + +func (m PluggableDatabaseManagementConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PluggableDatabaseManagementConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPluggableDatabaseManagementConfigManagementStatusEnum(string(m.ManagementStatus)); !ok && m.ManagementStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ManagementStatus: %s. Supported values are: %s.", m.ManagementStatus, strings.Join(GetPluggableDatabaseManagementConfigManagementStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PluggableDatabaseManagementConfigManagementStatusEnum Enum with underlying type: string +type PluggableDatabaseManagementConfigManagementStatusEnum string + +// Set of constants representing the allowable values for PluggableDatabaseManagementConfigManagementStatusEnum +const ( + PluggableDatabaseManagementConfigManagementStatusEnabling PluggableDatabaseManagementConfigManagementStatusEnum = "ENABLING" + PluggableDatabaseManagementConfigManagementStatusEnabled PluggableDatabaseManagementConfigManagementStatusEnum = "ENABLED" + PluggableDatabaseManagementConfigManagementStatusDisabling PluggableDatabaseManagementConfigManagementStatusEnum = "DISABLING" + PluggableDatabaseManagementConfigManagementStatusDisabled PluggableDatabaseManagementConfigManagementStatusEnum = "DISABLED" + PluggableDatabaseManagementConfigManagementStatusUpdating PluggableDatabaseManagementConfigManagementStatusEnum = "UPDATING" + PluggableDatabaseManagementConfigManagementStatusFailedEnabling PluggableDatabaseManagementConfigManagementStatusEnum = "FAILED_ENABLING" + PluggableDatabaseManagementConfigManagementStatusFailedDisabling PluggableDatabaseManagementConfigManagementStatusEnum = "FAILED_DISABLING" + PluggableDatabaseManagementConfigManagementStatusFailedUpdating PluggableDatabaseManagementConfigManagementStatusEnum = "FAILED_UPDATING" +) + +var mappingPluggableDatabaseManagementConfigManagementStatusEnum = map[string]PluggableDatabaseManagementConfigManagementStatusEnum{ + "ENABLING": PluggableDatabaseManagementConfigManagementStatusEnabling, + "ENABLED": PluggableDatabaseManagementConfigManagementStatusEnabled, + "DISABLING": PluggableDatabaseManagementConfigManagementStatusDisabling, + "DISABLED": PluggableDatabaseManagementConfigManagementStatusDisabled, + "UPDATING": PluggableDatabaseManagementConfigManagementStatusUpdating, + "FAILED_ENABLING": PluggableDatabaseManagementConfigManagementStatusFailedEnabling, + "FAILED_DISABLING": PluggableDatabaseManagementConfigManagementStatusFailedDisabling, + "FAILED_UPDATING": PluggableDatabaseManagementConfigManagementStatusFailedUpdating, +} + +var mappingPluggableDatabaseManagementConfigManagementStatusEnumLowerCase = map[string]PluggableDatabaseManagementConfigManagementStatusEnum{ + "enabling": PluggableDatabaseManagementConfigManagementStatusEnabling, + "enabled": PluggableDatabaseManagementConfigManagementStatusEnabled, + "disabling": PluggableDatabaseManagementConfigManagementStatusDisabling, + "disabled": PluggableDatabaseManagementConfigManagementStatusDisabled, + "updating": PluggableDatabaseManagementConfigManagementStatusUpdating, + "failed_enabling": PluggableDatabaseManagementConfigManagementStatusFailedEnabling, + "failed_disabling": PluggableDatabaseManagementConfigManagementStatusFailedDisabling, + "failed_updating": PluggableDatabaseManagementConfigManagementStatusFailedUpdating, +} + +// GetPluggableDatabaseManagementConfigManagementStatusEnumValues Enumerates the set of values for PluggableDatabaseManagementConfigManagementStatusEnum +func GetPluggableDatabaseManagementConfigManagementStatusEnumValues() []PluggableDatabaseManagementConfigManagementStatusEnum { + values := make([]PluggableDatabaseManagementConfigManagementStatusEnum, 0) + for _, v := range mappingPluggableDatabaseManagementConfigManagementStatusEnum { + values = append(values, v) + } + return values +} + +// GetPluggableDatabaseManagementConfigManagementStatusEnumStringValues Enumerates the set of values in String for PluggableDatabaseManagementConfigManagementStatusEnum +func GetPluggableDatabaseManagementConfigManagementStatusEnumStringValues() []string { + return []string{ + "ENABLING", + "ENABLED", + "DISABLING", + "DISABLED", + "UPDATING", + "FAILED_ENABLING", + "FAILED_DISABLING", + "FAILED_UPDATING", + } +} + +// GetMappingPluggableDatabaseManagementConfigManagementStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPluggableDatabaseManagementConfigManagementStatusEnum(val string) (PluggableDatabaseManagementConfigManagementStatusEnum, bool) { + enum, ok := mappingPluggableDatabaseManagementConfigManagementStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/database/pluggable_database_summary.go b/database/pluggable_database_summary.go index 9d2f583975..fd1962627f 100644 --- a/database/pluggable_database_summary.go +++ b/database/pluggable_database_summary.go @@ -58,6 +58,8 @@ type PluggableDatabaseSummary struct { // Defined tags for this resource. Each key is predefined and scoped to a namespace. // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + PluggableDatabaseManagementConfig *PluggableDatabaseManagementConfig `mandatory:"false" json:"pluggableDatabaseManagementConfig"` } func (m PluggableDatabaseSummary) String() string { diff --git a/databasemigration/connection.go b/databasemigration/connection.go index 334f909b8d..572ab014d0 100644 --- a/databasemigration/connection.go +++ b/databasemigration/connection.go @@ -79,6 +79,9 @@ type Connection struct { // Usage of system tag keys. These predefined keys are scoped to namespaces. // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // An array of Network Security Group OCIDs used to define network access for Connections. + NsgIds []string `mandatory:"false" json:"nsgIds"` } func (m Connection) String() string { diff --git a/databasemigration/connection_summary.go b/databasemigration/connection_summary.go index e90eb135f8..1d260dbde0 100644 --- a/databasemigration/connection_summary.go +++ b/databasemigration/connection_summary.go @@ -63,6 +63,9 @@ type ConnectionSummary struct { // Usage of system tag keys. These predefined keys are scoped to namespaces. // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // An array of Network Security Group OCIDs used to define network access for Connections. + NsgIds []string `mandatory:"false" json:"nsgIds"` } func (m ConnectionSummary) String() string { diff --git a/databasemigration/create_connection_details.go b/databasemigration/create_connection_details.go index 68fa440733..9f3516604d 100644 --- a/databasemigration/create_connection_details.go +++ b/databasemigration/create_connection_details.go @@ -60,6 +60,9 @@ type CreateConnectionDetails struct { // Defined tags for this resource. Each key is predefined and scoped to a namespace. // Example: `{"foo-namespace": {"bar-key": "value"}}` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // An array of Network Security Group OCIDs used to define network access for Connections. + NsgIds []string `mandatory:"false" json:"nsgIds"` } func (m CreateConnectionDetails) String() string { diff --git a/databasemigration/create_directory_object.go b/databasemigration/create_directory_object.go index f078d05bf3..d17c964ff0 100644 --- a/databasemigration/create_directory_object.go +++ b/databasemigration/create_directory_object.go @@ -24,7 +24,7 @@ type CreateDirectoryObject struct { Name *string `mandatory:"true" json:"name"` // Absolute path of directory on database server - Path *string `mandatory:"true" json:"path"` + Path *string `mandatory:"false" json:"path"` } func (m CreateDirectoryObject) String() string { diff --git a/databasemigration/databasemigration_client.go b/databasemigration/databasemigration_client.go index f2c9759887..cd7ec9d04d 100644 --- a/databasemigration/databasemigration_client.go +++ b/databasemigration/databasemigration_client.go @@ -92,9 +92,10 @@ func (client *DatabaseMigrationClient) ConfigurationProvider() *common.Configura // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/AbortJob.go.html to see an example of how to use AbortJob API. +// A default retry strategy applies to this operation AbortJob() func (client DatabaseMigrationClient) AbortJob(ctx context.Context, request AbortJobRequest) (response AbortJobResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -154,9 +155,10 @@ func (client DatabaseMigrationClient) abortJob(ctx context.Context, request comm // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/AddMigrationObjects.go.html to see an example of how to use AddMigrationObjects API. +// A default retry strategy applies to this operation AddMigrationObjects() func (client DatabaseMigrationClient) AddMigrationObjects(ctx context.Context, request AddMigrationObjectsRequest) (response AddMigrationObjectsResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -211,9 +213,10 @@ func (client DatabaseMigrationClient) addMigrationObjects(ctx context.Context, r // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/ChangeAgentCompartment.go.html to see an example of how to use ChangeAgentCompartment API. +// A default retry strategy applies to this operation ChangeAgentCompartment() func (client DatabaseMigrationClient) ChangeAgentCompartment(ctx context.Context, request ChangeAgentCompartmentRequest) (response ChangeAgentCompartmentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -273,9 +276,10 @@ func (client DatabaseMigrationClient) changeAgentCompartment(ctx context.Context // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/ChangeConnectionCompartment.go.html to see an example of how to use ChangeConnectionCompartment API. +// A default retry strategy applies to this operation ChangeConnectionCompartment() func (client DatabaseMigrationClient) ChangeConnectionCompartment(ctx context.Context, request ChangeConnectionCompartmentRequest) (response ChangeConnectionCompartmentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -335,9 +339,10 @@ func (client DatabaseMigrationClient) changeConnectionCompartment(ctx context.Co // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/ChangeMigrationCompartment.go.html to see an example of how to use ChangeMigrationCompartment API. +// A default retry strategy applies to this operation ChangeMigrationCompartment() func (client DatabaseMigrationClient) ChangeMigrationCompartment(ctx context.Context, request ChangeMigrationCompartmentRequest) (response ChangeMigrationCompartmentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -397,9 +402,10 @@ func (client DatabaseMigrationClient) changeMigrationCompartment(ctx context.Con // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/CloneMigration.go.html to see an example of how to use CloneMigration API. +// A default retry strategy applies to this operation CloneMigration() func (client DatabaseMigrationClient) CloneMigration(ctx context.Context, request CloneMigrationRequest) (response CloneMigrationResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -460,9 +466,10 @@ func (client DatabaseMigrationClient) cloneMigration(ctx context.Context, reques // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/CreateConnection.go.html to see an example of how to use CreateConnection API. +// A default retry strategy applies to this operation CreateConnection() func (client DatabaseMigrationClient) CreateConnection(ctx context.Context, request CreateConnectionRequest) (response CreateConnectionResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -524,9 +531,10 @@ func (client DatabaseMigrationClient) createConnection(ctx context.Context, requ // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/CreateMigration.go.html to see an example of how to use CreateMigration API. +// A default retry strategy applies to this operation CreateMigration() func (client DatabaseMigrationClient) CreateMigration(ctx context.Context, request CreateMigrationRequest) (response CreateMigrationResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -586,9 +594,10 @@ func (client DatabaseMigrationClient) createMigration(ctx context.Context, reque // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/DeleteAgent.go.html to see an example of how to use DeleteAgent API. +// A default retry strategy applies to this operation DeleteAgent() func (client DatabaseMigrationClient) DeleteAgent(ctx context.Context, request DeleteAgentRequest) (response DeleteAgentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -643,9 +652,10 @@ func (client DatabaseMigrationClient) deleteAgent(ctx context.Context, request c // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/DeleteConnection.go.html to see an example of how to use DeleteConnection API. +// A default retry strategy applies to this operation DeleteConnection() func (client DatabaseMigrationClient) DeleteConnection(ctx context.Context, request DeleteConnectionRequest) (response DeleteConnectionResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -700,9 +710,10 @@ func (client DatabaseMigrationClient) deleteConnection(ctx context.Context, requ // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/DeleteJob.go.html to see an example of how to use DeleteJob API. +// A default retry strategy applies to this operation DeleteJob() func (client DatabaseMigrationClient) DeleteJob(ctx context.Context, request DeleteJobRequest) (response DeleteJobResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -757,9 +768,10 @@ func (client DatabaseMigrationClient) deleteJob(ctx context.Context, request com // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/DeleteMigration.go.html to see an example of how to use DeleteMigration API. +// A default retry strategy applies to this operation DeleteMigration() func (client DatabaseMigrationClient) DeleteMigration(ctx context.Context, request DeleteMigrationRequest) (response DeleteMigrationResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -814,9 +826,10 @@ func (client DatabaseMigrationClient) deleteMigration(ctx context.Context, reque // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/EvaluateMigration.go.html to see an example of how to use EvaluateMigration API. +// A default retry strategy applies to this operation EvaluateMigration() func (client DatabaseMigrationClient) EvaluateMigration(ctx context.Context, request EvaluateMigrationRequest) (response EvaluateMigrationResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -876,9 +889,10 @@ func (client DatabaseMigrationClient) evaluateMigration(ctx context.Context, req // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/GetAdvisorReport.go.html to see an example of how to use GetAdvisorReport API. +// A default retry strategy applies to this operation GetAdvisorReport() func (client DatabaseMigrationClient) GetAdvisorReport(ctx context.Context, request GetAdvisorReportRequest) (response GetAdvisorReportResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -933,9 +947,10 @@ func (client DatabaseMigrationClient) getAdvisorReport(ctx context.Context, requ // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/GetAgent.go.html to see an example of how to use GetAgent API. +// A default retry strategy applies to this operation GetAgent() func (client DatabaseMigrationClient) GetAgent(ctx context.Context, request GetAgentRequest) (response GetAgentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -990,9 +1005,10 @@ func (client DatabaseMigrationClient) getAgent(ctx context.Context, request comm // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/GetConnection.go.html to see an example of how to use GetConnection API. +// A default retry strategy applies to this operation GetConnection() func (client DatabaseMigrationClient) GetConnection(ctx context.Context, request GetConnectionRequest) (response GetConnectionResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1047,9 +1063,10 @@ func (client DatabaseMigrationClient) getConnection(ctx context.Context, request // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/GetJob.go.html to see an example of how to use GetJob API. +// A default retry strategy applies to this operation GetJob() func (client DatabaseMigrationClient) GetJob(ctx context.Context, request GetJobRequest) (response GetJobResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1104,9 +1121,10 @@ func (client DatabaseMigrationClient) getJob(ctx context.Context, request common // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/GetJobOutputContent.go.html to see an example of how to use GetJobOutputContent API. +// A default retry strategy applies to this operation GetJobOutputContent() func (client DatabaseMigrationClient) GetJobOutputContent(ctx context.Context, request GetJobOutputContentRequest) (response GetJobOutputContentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1160,9 +1178,10 @@ func (client DatabaseMigrationClient) getJobOutputContent(ctx context.Context, r // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/GetMigration.go.html to see an example of how to use GetMigration API. +// A default retry strategy applies to this operation GetMigration() func (client DatabaseMigrationClient) GetMigration(ctx context.Context, request GetMigrationRequest) (response GetMigrationResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1217,9 +1236,10 @@ func (client DatabaseMigrationClient) getMigration(ctx context.Context, request // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/GetWorkRequest.go.html to see an example of how to use GetWorkRequest API. +// A default retry strategy applies to this operation GetWorkRequest() func (client DatabaseMigrationClient) GetWorkRequest(ctx context.Context, request GetWorkRequestRequest) (response GetWorkRequestResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1274,9 +1294,10 @@ func (client DatabaseMigrationClient) getWorkRequest(ctx context.Context, reques // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/ListAgentImages.go.html to see an example of how to use ListAgentImages API. +// A default retry strategy applies to this operation ListAgentImages() func (client DatabaseMigrationClient) ListAgentImages(ctx context.Context, request ListAgentImagesRequest) (response ListAgentImagesResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1331,9 +1352,10 @@ func (client DatabaseMigrationClient) listAgentImages(ctx context.Context, reque // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/ListAgents.go.html to see an example of how to use ListAgents API. +// A default retry strategy applies to this operation ListAgents() func (client DatabaseMigrationClient) ListAgents(ctx context.Context, request ListAgentsRequest) (response ListAgentsResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1388,9 +1410,10 @@ func (client DatabaseMigrationClient) listAgents(ctx context.Context, request co // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/ListConnections.go.html to see an example of how to use ListConnections API. +// A default retry strategy applies to this operation ListConnections() func (client DatabaseMigrationClient) ListConnections(ctx context.Context, request ListConnectionsRequest) (response ListConnectionsResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1445,9 +1468,10 @@ func (client DatabaseMigrationClient) listConnections(ctx context.Context, reque // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/ListExcludedObjects.go.html to see an example of how to use ListExcludedObjects API. +// A default retry strategy applies to this operation ListExcludedObjects() func (client DatabaseMigrationClient) ListExcludedObjects(ctx context.Context, request ListExcludedObjectsRequest) (response ListExcludedObjectsResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1502,9 +1526,10 @@ func (client DatabaseMigrationClient) listExcludedObjects(ctx context.Context, r // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/ListJobOutputs.go.html to see an example of how to use ListJobOutputs API. +// A default retry strategy applies to this operation ListJobOutputs() func (client DatabaseMigrationClient) ListJobOutputs(ctx context.Context, request ListJobOutputsRequest) (response ListJobOutputsResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1560,9 +1585,10 @@ func (client DatabaseMigrationClient) listJobOutputs(ctx context.Context, reques // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/ListJobs.go.html to see an example of how to use ListJobs API. +// A default retry strategy applies to this operation ListJobs() func (client DatabaseMigrationClient) ListJobs(ctx context.Context, request ListJobsRequest) (response ListJobsResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1617,9 +1643,10 @@ func (client DatabaseMigrationClient) listJobs(ctx context.Context, request comm // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/ListMigrationObjectTypes.go.html to see an example of how to use ListMigrationObjectTypes API. +// A default retry strategy applies to this operation ListMigrationObjectTypes() func (client DatabaseMigrationClient) ListMigrationObjectTypes(ctx context.Context, request ListMigrationObjectTypesRequest) (response ListMigrationObjectTypesResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1674,9 +1701,10 @@ func (client DatabaseMigrationClient) listMigrationObjectTypes(ctx context.Conte // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/ListMigrationObjects.go.html to see an example of how to use ListMigrationObjects API. +// A default retry strategy applies to this operation ListMigrationObjects() func (client DatabaseMigrationClient) ListMigrationObjects(ctx context.Context, request ListMigrationObjectsRequest) (response ListMigrationObjectsResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1731,9 +1759,10 @@ func (client DatabaseMigrationClient) listMigrationObjects(ctx context.Context, // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/ListMigrations.go.html to see an example of how to use ListMigrations API. +// A default retry strategy applies to this operation ListMigrations() func (client DatabaseMigrationClient) ListMigrations(ctx context.Context, request ListMigrationsRequest) (response ListMigrationsResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1788,9 +1817,10 @@ func (client DatabaseMigrationClient) listMigrations(ctx context.Context, reques // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrors API. +// A default retry strategy applies to this operation ListWorkRequestErrors() func (client DatabaseMigrationClient) ListWorkRequestErrors(ctx context.Context, request ListWorkRequestErrorsRequest) (response ListWorkRequestErrorsResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1845,9 +1875,10 @@ func (client DatabaseMigrationClient) listWorkRequestErrors(ctx context.Context, // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogs API. +// A default retry strategy applies to this operation ListWorkRequestLogs() func (client DatabaseMigrationClient) ListWorkRequestLogs(ctx context.Context, request ListWorkRequestLogsRequest) (response ListWorkRequestLogsResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1902,9 +1933,10 @@ func (client DatabaseMigrationClient) listWorkRequestLogs(ctx context.Context, r // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/ListWorkRequests.go.html to see an example of how to use ListWorkRequests API. +// A default retry strategy applies to this operation ListWorkRequests() func (client DatabaseMigrationClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1959,9 +1991,10 @@ func (client DatabaseMigrationClient) listWorkRequests(ctx context.Context, requ // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/RemoveMigrationObjects.go.html to see an example of how to use RemoveMigrationObjects API. +// A default retry strategy applies to this operation RemoveMigrationObjects() func (client DatabaseMigrationClient) RemoveMigrationObjects(ctx context.Context, request RemoveMigrationObjectsRequest) (response RemoveMigrationObjectsResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -2016,9 +2049,10 @@ func (client DatabaseMigrationClient) removeMigrationObjects(ctx context.Context // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/ResumeJob.go.html to see an example of how to use ResumeJob API. +// A default retry strategy applies to this operation ResumeJob() func (client DatabaseMigrationClient) ResumeJob(ctx context.Context, request ResumeJobRequest) (response ResumeJobResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -2078,9 +2112,10 @@ func (client DatabaseMigrationClient) resumeJob(ctx context.Context, request com // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/RetrieveSupportedPhases.go.html to see an example of how to use RetrieveSupportedPhases API. +// A default retry strategy applies to this operation RetrieveSupportedPhases() func (client DatabaseMigrationClient) RetrieveSupportedPhases(ctx context.Context, request RetrieveSupportedPhasesRequest) (response RetrieveSupportedPhasesResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -2135,9 +2170,10 @@ func (client DatabaseMigrationClient) retrieveSupportedPhases(ctx context.Contex // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/StartMigration.go.html to see an example of how to use StartMigration API. +// A default retry strategy applies to this operation StartMigration() func (client DatabaseMigrationClient) StartMigration(ctx context.Context, request StartMigrationRequest) (response StartMigrationResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -2197,9 +2233,10 @@ func (client DatabaseMigrationClient) startMigration(ctx context.Context, reques // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/UpdateAgent.go.html to see an example of how to use UpdateAgent API. +// A default retry strategy applies to this operation UpdateAgent() func (client DatabaseMigrationClient) UpdateAgent(ctx context.Context, request UpdateAgentRequest) (response UpdateAgentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -2259,9 +2296,10 @@ func (client DatabaseMigrationClient) updateAgent(ctx context.Context, request c // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/UpdateConnection.go.html to see an example of how to use UpdateConnection API. +// A default retry strategy applies to this operation UpdateConnection() func (client DatabaseMigrationClient) UpdateConnection(ctx context.Context, request UpdateConnectionRequest) (response UpdateConnectionResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -2316,9 +2354,10 @@ func (client DatabaseMigrationClient) updateConnection(ctx context.Context, requ // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/UpdateJob.go.html to see an example of how to use UpdateJob API. +// A default retry strategy applies to this operation UpdateJob() func (client DatabaseMigrationClient) UpdateJob(ctx context.Context, request UpdateJobRequest) (response UpdateJobResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -2373,9 +2412,10 @@ func (client DatabaseMigrationClient) updateJob(ctx context.Context, request com // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/databasemigration/UpdateMigration.go.html to see an example of how to use UpdateMigration API. +// A default retry strategy applies to this operation UpdateMigration() func (client DatabaseMigrationClient) UpdateMigration(ctx context.Context, request UpdateMigrationRequest) (response UpdateMigrationResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } diff --git a/databasemigration/phase_status.go b/databasemigration/phase_status.go index a15ca040c4..f79e8b1690 100644 --- a/databasemigration/phase_status.go +++ b/databasemigration/phase_status.go @@ -30,6 +30,12 @@ type PhaseStatus struct { // True if a Pre-Migration Advisor report is available for this phase. False or null if no report is available. IsAdvisorReportAvailable *bool `mandatory:"false" json:"isAdvisorReportAvailable"` + // The text describing the root cause of the reported issue + Issue *string `mandatory:"false" json:"issue"` + + // The text describing the action required to fix the issue + Action *string `mandatory:"false" json:"action"` + // Summary of phase status results. Extract []PhaseExtractEntry `mandatory:"false" json:"extract"` diff --git a/databasemigration/update_connection_details.go b/databasemigration/update_connection_details.go index a343dc539f..d41837ebba 100644 --- a/databasemigration/update_connection_details.go +++ b/databasemigration/update_connection_details.go @@ -50,6 +50,9 @@ type UpdateConnectionDetails struct { // Defined tags for this resource. Each key is predefined and scoped to a namespace. // Example: `{"foo-namespace": {"bar-key": "value"}}` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // An array of Network Security Group OCIDs used to define network access for Connections. + NsgIds []string `mandatory:"false" json:"nsgIds"` } func (m UpdateConnectionDetails) String() string { diff --git a/devops/bitbucket_cloud_app_password_connection.go b/devops/bitbucket_cloud_app_password_connection.go index a69e9145cb..423bb19257 100644 --- a/devops/bitbucket_cloud_app_password_connection.go +++ b/devops/bitbucket_cloud_app_password_connection.go @@ -47,6 +47,9 @@ type BitbucketCloudAppPasswordConnection struct { // The time the connection was updated. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + // A detailed message describing the current state. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: `{"bar-key": "value"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` @@ -95,6 +98,11 @@ func (m BitbucketCloudAppPasswordConnection) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } +//GetLifecycleDetails returns LifecycleDetails +func (m BitbucketCloudAppPasswordConnection) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + //GetLifecycleState returns LifecycleState func (m BitbucketCloudAppPasswordConnection) GetLifecycleState() ConnectionLifecycleStateEnum { return m.LifecycleState diff --git a/devops/bitbucket_cloud_app_password_connection_summary.go b/devops/bitbucket_cloud_app_password_connection_summary.go index 0b2b9018e6..3fa85cf8ab 100644 --- a/devops/bitbucket_cloud_app_password_connection_summary.go +++ b/devops/bitbucket_cloud_app_password_connection_summary.go @@ -47,6 +47,9 @@ type BitbucketCloudAppPasswordConnectionSummary struct { // The time the connection was updated. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + // A detailed message describing the current state. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: `{"bar-key": "value"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` @@ -95,6 +98,11 @@ func (m BitbucketCloudAppPasswordConnectionSummary) GetTimeUpdated() *common.SDK return m.TimeUpdated } +//GetLifecycleDetails returns LifecycleDetails +func (m BitbucketCloudAppPasswordConnectionSummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + //GetLifecycleState returns LifecycleState func (m BitbucketCloudAppPasswordConnectionSummary) GetLifecycleState() ConnectionLifecycleStateEnum { return m.LifecycleState diff --git a/devops/bitbucket_server_access_token_connection.go b/devops/bitbucket_server_access_token_connection.go index 1b41139218..d5330c6414 100644 --- a/devops/bitbucket_server_access_token_connection.go +++ b/devops/bitbucket_server_access_token_connection.go @@ -47,6 +47,9 @@ type BitbucketServerAccessTokenConnection struct { // The time the connection was updated. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + // A detailed message describing the current state. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: `{"bar-key": "value"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` @@ -97,6 +100,11 @@ func (m BitbucketServerAccessTokenConnection) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } +//GetLifecycleDetails returns LifecycleDetails +func (m BitbucketServerAccessTokenConnection) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + //GetLifecycleState returns LifecycleState func (m BitbucketServerAccessTokenConnection) GetLifecycleState() ConnectionLifecycleStateEnum { return m.LifecycleState @@ -153,20 +161,21 @@ func (m BitbucketServerAccessTokenConnection) MarshalJSON() (buff []byte, e erro // UnmarshalJSON unmarshals from json func (m *BitbucketServerAccessTokenConnection) UnmarshalJSON(data []byte) (e error) { model := struct { - Description *string `json:"description"` - DisplayName *string `json:"displayName"` - TimeCreated *common.SDKTime `json:"timeCreated"` - TimeUpdated *common.SDKTime `json:"timeUpdated"` - LifecycleState ConnectionLifecycleStateEnum `json:"lifecycleState"` - FreeformTags map[string]string `json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `json:"definedTags"` - SystemTags map[string]map[string]interface{} `json:"systemTags"` - TlsVerifyConfig tlsverifyconfig `json:"tlsVerifyConfig"` - Id *string `json:"id"` - CompartmentId *string `json:"compartmentId"` - ProjectId *string `json:"projectId"` - AccessToken *string `json:"accessToken"` - BaseUrl *string `json:"baseUrl"` + Description *string `json:"description"` + DisplayName *string `json:"displayName"` + TimeCreated *common.SDKTime `json:"timeCreated"` + TimeUpdated *common.SDKTime `json:"timeUpdated"` + LifecycleDetails *string `json:"lifecycleDetails"` + LifecycleState ConnectionLifecycleStateEnum `json:"lifecycleState"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + TlsVerifyConfig tlsverifyconfig `json:"tlsVerifyConfig"` + Id *string `json:"id"` + CompartmentId *string `json:"compartmentId"` + ProjectId *string `json:"projectId"` + AccessToken *string `json:"accessToken"` + BaseUrl *string `json:"baseUrl"` }{} e = json.Unmarshal(data, &model) @@ -182,6 +191,8 @@ func (m *BitbucketServerAccessTokenConnection) UnmarshalJSON(data []byte) (e err m.TimeUpdated = model.TimeUpdated + m.LifecycleDetails = model.LifecycleDetails + m.LifecycleState = model.LifecycleState m.FreeformTags = model.FreeformTags diff --git a/devops/bitbucket_server_token_connection_summary.go b/devops/bitbucket_server_token_connection_summary.go index ad3c045982..65315b08c4 100644 --- a/devops/bitbucket_server_token_connection_summary.go +++ b/devops/bitbucket_server_token_connection_summary.go @@ -47,6 +47,9 @@ type BitbucketServerTokenConnectionSummary struct { // The time the connection was updated. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + // A detailed message describing the current state. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: `{"bar-key": "value"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` @@ -97,6 +100,11 @@ func (m BitbucketServerTokenConnectionSummary) GetTimeUpdated() *common.SDKTime return m.TimeUpdated } +//GetLifecycleDetails returns LifecycleDetails +func (m BitbucketServerTokenConnectionSummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + //GetLifecycleState returns LifecycleState func (m BitbucketServerTokenConnectionSummary) GetLifecycleState() ConnectionLifecycleStateEnum { return m.LifecycleState @@ -153,20 +161,21 @@ func (m BitbucketServerTokenConnectionSummary) MarshalJSON() (buff []byte, e err // UnmarshalJSON unmarshals from json func (m *BitbucketServerTokenConnectionSummary) UnmarshalJSON(data []byte) (e error) { model := struct { - DisplayName *string `json:"displayName"` - Description *string `json:"description"` - TimeCreated *common.SDKTime `json:"timeCreated"` - TimeUpdated *common.SDKTime `json:"timeUpdated"` - LifecycleState ConnectionLifecycleStateEnum `json:"lifecycleState"` - FreeformTags map[string]string `json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `json:"definedTags"` - SystemTags map[string]map[string]interface{} `json:"systemTags"` - TlsVerifyConfig tlsverifyconfig `json:"tlsVerifyConfig"` - Id *string `json:"id"` - CompartmentId *string `json:"compartmentId"` - ProjectId *string `json:"projectId"` - AccessToken *string `json:"accessToken"` - BaseUrl *string `json:"baseUrl"` + DisplayName *string `json:"displayName"` + Description *string `json:"description"` + TimeCreated *common.SDKTime `json:"timeCreated"` + TimeUpdated *common.SDKTime `json:"timeUpdated"` + LifecycleDetails *string `json:"lifecycleDetails"` + LifecycleState ConnectionLifecycleStateEnum `json:"lifecycleState"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + TlsVerifyConfig tlsverifyconfig `json:"tlsVerifyConfig"` + Id *string `json:"id"` + CompartmentId *string `json:"compartmentId"` + ProjectId *string `json:"projectId"` + AccessToken *string `json:"accessToken"` + BaseUrl *string `json:"baseUrl"` }{} e = json.Unmarshal(data, &model) @@ -182,6 +191,8 @@ func (m *BitbucketServerTokenConnectionSummary) UnmarshalJSON(data []byte) (e er m.TimeUpdated = model.TimeUpdated + m.LifecycleDetails = model.LifecycleDetails + m.LifecycleState = model.LifecycleState m.FreeformTags = model.FreeformTags diff --git a/devops/build_pipeline_summary.go b/devops/build_pipeline_summary.go index d5d481261f..d77391f958 100644 --- a/devops/build_pipeline_summary.go +++ b/devops/build_pipeline_summary.go @@ -39,6 +39,9 @@ type BuildPipelineSummary struct { // The time the build pipeline was updated. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + // A detailed message describing the current state. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // The current state of the build pipeline. LifecycleState BuildPipelineLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` diff --git a/devops/build_run.go b/devops/build_run.go index 2439b71a7d..979c77d942 100644 --- a/devops/build_run.go +++ b/devops/build_run.go @@ -170,6 +170,7 @@ const ( BuildRunLifecycleStateSucceeded BuildRunLifecycleStateEnum = "SUCCEEDED" BuildRunLifecycleStateCanceling BuildRunLifecycleStateEnum = "CANCELING" BuildRunLifecycleStateCanceled BuildRunLifecycleStateEnum = "CANCELED" + BuildRunLifecycleStateDeleting BuildRunLifecycleStateEnum = "DELETING" ) var mappingBuildRunLifecycleStateEnum = map[string]BuildRunLifecycleStateEnum{ @@ -179,6 +180,7 @@ var mappingBuildRunLifecycleStateEnum = map[string]BuildRunLifecycleStateEnum{ "SUCCEEDED": BuildRunLifecycleStateSucceeded, "CANCELING": BuildRunLifecycleStateCanceling, "CANCELED": BuildRunLifecycleStateCanceled, + "DELETING": BuildRunLifecycleStateDeleting, } var mappingBuildRunLifecycleStateEnumLowerCase = map[string]BuildRunLifecycleStateEnum{ @@ -188,6 +190,7 @@ var mappingBuildRunLifecycleStateEnumLowerCase = map[string]BuildRunLifecycleSta "succeeded": BuildRunLifecycleStateSucceeded, "canceling": BuildRunLifecycleStateCanceling, "canceled": BuildRunLifecycleStateCanceled, + "deleting": BuildRunLifecycleStateDeleting, } // GetBuildRunLifecycleStateEnumValues Enumerates the set of values for BuildRunLifecycleStateEnum @@ -208,6 +211,7 @@ func GetBuildRunLifecycleStateEnumStringValues() []string { "SUCCEEDED", "CANCELING", "CANCELED", + "DELETING", } } diff --git a/devops/cancel_scheduled_cascading_project_deletion_request_response.go b/devops/cancel_scheduled_cascading_project_deletion_request_response.go new file mode 100644 index 0000000000..745ad37251 --- /dev/null +++ b/devops/cancel_scheduled_cascading_project_deletion_request_response.go @@ -0,0 +1,95 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CancelScheduledCascadingProjectDeletionRequest wrapper for the CancelScheduledCascadingProjectDeletion operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/CancelScheduledCascadingProjectDeletion.go.html to see an example of how to use CancelScheduledCascadingProjectDeletionRequest. +type CancelScheduledCascadingProjectDeletionRequest struct { + + // Unique project identifier. + ProjectId *string `mandatory:"true" contributesTo:"path" name:"projectId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CancelScheduledCascadingProjectDeletionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CancelScheduledCascadingProjectDeletionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CancelScheduledCascadingProjectDeletionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CancelScheduledCascadingProjectDeletionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CancelScheduledCascadingProjectDeletionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CancelScheduledCascadingProjectDeletionResponse wrapper for the CancelScheduledCascadingProjectDeletion operation +type CancelScheduledCascadingProjectDeletionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CancelScheduledCascadingProjectDeletionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CancelScheduledCascadingProjectDeletionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/connection.go b/devops/connection.go index 0a232c514e..9c78933d47 100644 --- a/devops/connection.go +++ b/devops/connection.go @@ -40,6 +40,9 @@ type Connection interface { // The time the connection was updated. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). GetTimeUpdated() *common.SDKTime + // A detailed message describing the current state. For example, can be used to provide actionable information for a resource in Failed state. + GetLifecycleDetails() *string + // The current state of the connection. GetLifecycleState() ConnectionLifecycleStateEnum @@ -54,19 +57,20 @@ type Connection interface { } type connection struct { - JsonData []byte - Id *string `mandatory:"true" json:"id"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` - ProjectId *string `mandatory:"true" json:"projectId"` - Description *string `mandatory:"false" json:"description"` - DisplayName *string `mandatory:"false" json:"displayName"` - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - LifecycleState ConnectionLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` - ConnectionType string `json:"connectionType"` + JsonData []byte + Id *string `mandatory:"true" json:"id"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + ProjectId *string `mandatory:"true" json:"projectId"` + Description *string `mandatory:"false" json:"description"` + DisplayName *string `mandatory:"false" json:"displayName"` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + LifecycleState ConnectionLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + ConnectionType string `json:"connectionType"` } // UnmarshalJSON unmarshals json @@ -87,6 +91,7 @@ func (m *connection) UnmarshalJSON(data []byte) error { m.DisplayName = s.Model.DisplayName m.TimeCreated = s.Model.TimeCreated m.TimeUpdated = s.Model.TimeUpdated + m.LifecycleDetails = s.Model.LifecycleDetails m.LifecycleState = s.Model.LifecycleState m.FreeformTags = s.Model.FreeformTags m.DefinedTags = s.Model.DefinedTags @@ -169,6 +174,11 @@ func (m connection) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } +//GetLifecycleDetails returns LifecycleDetails +func (m connection) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + //GetLifecycleState returns LifecycleState func (m connection) GetLifecycleState() ConnectionLifecycleStateEnum { return m.LifecycleState @@ -213,15 +223,18 @@ type ConnectionLifecycleStateEnum string // Set of constants representing the allowable values for ConnectionLifecycleStateEnum const ( - ConnectionLifecycleStateActive ConnectionLifecycleStateEnum = "ACTIVE" + ConnectionLifecycleStateActive ConnectionLifecycleStateEnum = "ACTIVE" + ConnectionLifecycleStateDeleting ConnectionLifecycleStateEnum = "DELETING" ) var mappingConnectionLifecycleStateEnum = map[string]ConnectionLifecycleStateEnum{ - "ACTIVE": ConnectionLifecycleStateActive, + "ACTIVE": ConnectionLifecycleStateActive, + "DELETING": ConnectionLifecycleStateDeleting, } var mappingConnectionLifecycleStateEnumLowerCase = map[string]ConnectionLifecycleStateEnum{ - "active": ConnectionLifecycleStateActive, + "active": ConnectionLifecycleStateActive, + "deleting": ConnectionLifecycleStateDeleting, } // GetConnectionLifecycleStateEnumValues Enumerates the set of values for ConnectionLifecycleStateEnum @@ -237,6 +250,7 @@ func GetConnectionLifecycleStateEnumValues() []ConnectionLifecycleStateEnum { func GetConnectionLifecycleStateEnumStringValues() []string { return []string{ "ACTIVE", + "DELETING", } } diff --git a/devops/connection_summary.go b/devops/connection_summary.go index 4e2231a4e3..5b0f42b5b5 100644 --- a/devops/connection_summary.go +++ b/devops/connection_summary.go @@ -40,6 +40,9 @@ type ConnectionSummary interface { // The time the connection was updated. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). GetTimeUpdated() *common.SDKTime + // A detailed message describing the current state. For example, can be used to provide actionable information for a resource in Failed state. + GetLifecycleDetails() *string + // The current state of the connection. GetLifecycleState() ConnectionLifecycleStateEnum @@ -54,19 +57,20 @@ type ConnectionSummary interface { } type connectionsummary struct { - JsonData []byte - Id *string `mandatory:"true" json:"id"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` - ProjectId *string `mandatory:"true" json:"projectId"` - DisplayName *string `mandatory:"false" json:"displayName"` - Description *string `mandatory:"false" json:"description"` - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - LifecycleState ConnectionLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` - ConnectionType string `json:"connectionType"` + JsonData []byte + Id *string `mandatory:"true" json:"id"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + ProjectId *string `mandatory:"true" json:"projectId"` + DisplayName *string `mandatory:"false" json:"displayName"` + Description *string `mandatory:"false" json:"description"` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + LifecycleState ConnectionLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + ConnectionType string `json:"connectionType"` } // UnmarshalJSON unmarshals json @@ -87,6 +91,7 @@ func (m *connectionsummary) UnmarshalJSON(data []byte) error { m.Description = s.Model.Description m.TimeCreated = s.Model.TimeCreated m.TimeUpdated = s.Model.TimeUpdated + m.LifecycleDetails = s.Model.LifecycleDetails m.LifecycleState = s.Model.LifecycleState m.FreeformTags = s.Model.FreeformTags m.DefinedTags = s.Model.DefinedTags @@ -169,6 +174,11 @@ func (m connectionsummary) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } +//GetLifecycleDetails returns LifecycleDetails +func (m connectionsummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + //GetLifecycleState returns LifecycleState func (m connectionsummary) GetLifecycleState() ConnectionLifecycleStateEnum { return m.LifecycleState diff --git a/devops/create_repository_details.go b/devops/create_repository_details.go index bbcdbf3484..e2cd3fbfb8 100644 --- a/devops/create_repository_details.go +++ b/devops/create_repository_details.go @@ -24,7 +24,9 @@ type CreateRepositoryDetails struct { // The OCID of the DevOps project containing the repository. ProjectId *string `mandatory:"true" json:"projectId"` - // Type of repository. + // Type of repository. Allowed values: + // `MIRRORED` + // `HOSTED` RepositoryType RepositoryRepositoryTypeEnum `mandatory:"true" json:"repositoryType"` // The default branch of the repository. diff --git a/devops/deploy_pipeline_summary.go b/devops/deploy_pipeline_summary.go index 2d5d2e7f99..b74c1b6b01 100644 --- a/devops/deploy_pipeline_summary.go +++ b/devops/deploy_pipeline_summary.go @@ -39,6 +39,9 @@ type DeployPipelineSummary struct { // Time the deployment pipeline was updated. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // The current state of the deployment pipeline. LifecycleState DeployPipelineLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` diff --git a/devops/devops_client.go b/devops/devops_client.go index 995e6c8410..89c58d1fd9 100644 --- a/devops/devops_client.go +++ b/devops/devops_client.go @@ -276,6 +276,69 @@ func (client DevopsClient) cancelDeployment(ctx context.Context, request common. return response, err } +// CancelScheduledCascadingProjectDeletion Cascading operation that restores Project and child resources from a DELETING state to an active state +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/CancelScheduledCascadingProjectDeletion.go.html to see an example of how to use CancelScheduledCascadingProjectDeletion API. +// A default retry strategy applies to this operation CancelScheduledCascadingProjectDeletion() +func (client DevopsClient) CancelScheduledCascadingProjectDeletion(ctx context.Context, request CancelScheduledCascadingProjectDeletionRequest) (response CancelScheduledCascadingProjectDeletionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.cancelScheduledCascadingProjectDeletion, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CancelScheduledCascadingProjectDeletionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CancelScheduledCascadingProjectDeletionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CancelScheduledCascadingProjectDeletionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CancelScheduledCascadingProjectDeletionResponse") + } + return +} + +// cancelScheduledCascadingProjectDeletion implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) cancelScheduledCascadingProjectDeletion(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/projects/{projectId}/actions/cancelScheduledCascadingProjectDeletion", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CancelScheduledCascadingProjectDeletionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Project/CancelScheduledCascadingProjectDeletion" + err = common.PostProcessServiceError(err, "Devops", "CancelScheduledCascadingProjectDeletion", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ChangeProjectCompartment Moves a project resource from one compartment OCID to another. // // See also @@ -4467,6 +4530,69 @@ func (client DevopsClient) putRepositoryRef(ctx context.Context, request common. return response, err } +// ScheduleCascadingProjectDeletion Cascading operation that marks Project and child DevOps resources in a DELETING state for a retention period +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ScheduleCascadingProjectDeletion.go.html to see an example of how to use ScheduleCascadingProjectDeletion API. +// A default retry strategy applies to this operation ScheduleCascadingProjectDeletion() +func (client DevopsClient) ScheduleCascadingProjectDeletion(ctx context.Context, request ScheduleCascadingProjectDeletionRequest) (response ScheduleCascadingProjectDeletionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.scheduleCascadingProjectDeletion, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ScheduleCascadingProjectDeletionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ScheduleCascadingProjectDeletionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ScheduleCascadingProjectDeletionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ScheduleCascadingProjectDeletionResponse") + } + return +} + +// scheduleCascadingProjectDeletion implements the OCIOperation interface (enables retrying operations) +func (client DevopsClient) scheduleCascadingProjectDeletion(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/projects/{projectId}/actions/scheduleCascadingProjectDeletion", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ScheduleCascadingProjectDeletionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Project/ScheduleCascadingProjectDeletion" + err = common.PostProcessServiceError(err, "Devops", "ScheduleCascadingProjectDeletion", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpdateBuildPipeline Updates the build pipeline. // // See also diff --git a/devops/github_access_token_connection.go b/devops/github_access_token_connection.go index e641cd6dcc..cc2cfb395b 100644 --- a/devops/github_access_token_connection.go +++ b/devops/github_access_token_connection.go @@ -44,6 +44,9 @@ type GithubAccessTokenConnection struct { // The time the connection was updated. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + // A detailed message describing the current state. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: `{"bar-key": "value"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` @@ -92,6 +95,11 @@ func (m GithubAccessTokenConnection) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } +//GetLifecycleDetails returns LifecycleDetails +func (m GithubAccessTokenConnection) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + //GetLifecycleState returns LifecycleState func (m GithubAccessTokenConnection) GetLifecycleState() ConnectionLifecycleStateEnum { return m.LifecycleState diff --git a/devops/github_access_token_connection_summary.go b/devops/github_access_token_connection_summary.go index 76d217e720..66dc196b39 100644 --- a/devops/github_access_token_connection_summary.go +++ b/devops/github_access_token_connection_summary.go @@ -44,6 +44,9 @@ type GithubAccessTokenConnectionSummary struct { // The time the connection was updated. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + // A detailed message describing the current state. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: `{"bar-key": "value"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` @@ -92,6 +95,11 @@ func (m GithubAccessTokenConnectionSummary) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } +//GetLifecycleDetails returns LifecycleDetails +func (m GithubAccessTokenConnectionSummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + //GetLifecycleState returns LifecycleState func (m GithubAccessTokenConnectionSummary) GetLifecycleState() ConnectionLifecycleStateEnum { return m.LifecycleState diff --git a/devops/gitlab_access_token_connection.go b/devops/gitlab_access_token_connection.go index 8e16ed7493..23f8bd337a 100644 --- a/devops/gitlab_access_token_connection.go +++ b/devops/gitlab_access_token_connection.go @@ -44,6 +44,9 @@ type GitlabAccessTokenConnection struct { // The time the connection was updated. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + // A detailed message describing the current state. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: `{"bar-key": "value"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` @@ -92,6 +95,11 @@ func (m GitlabAccessTokenConnection) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } +//GetLifecycleDetails returns LifecycleDetails +func (m GitlabAccessTokenConnection) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + //GetLifecycleState returns LifecycleState func (m GitlabAccessTokenConnection) GetLifecycleState() ConnectionLifecycleStateEnum { return m.LifecycleState diff --git a/devops/gitlab_access_token_connection_summary.go b/devops/gitlab_access_token_connection_summary.go index aa8959e881..e476eff419 100644 --- a/devops/gitlab_access_token_connection_summary.go +++ b/devops/gitlab_access_token_connection_summary.go @@ -44,6 +44,9 @@ type GitlabAccessTokenConnectionSummary struct { // The time the connection was updated. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + // A detailed message describing the current state. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: `{"bar-key": "value"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` @@ -92,6 +95,11 @@ func (m GitlabAccessTokenConnectionSummary) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } +//GetLifecycleDetails returns LifecycleDetails +func (m GitlabAccessTokenConnectionSummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + //GetLifecycleState returns LifecycleState func (m GitlabAccessTokenConnectionSummary) GetLifecycleState() ConnectionLifecycleStateEnum { return m.LifecycleState diff --git a/devops/gitlab_server_access_token_connection.go b/devops/gitlab_server_access_token_connection.go index c384dd26fb..07ca69c934 100644 --- a/devops/gitlab_server_access_token_connection.go +++ b/devops/gitlab_server_access_token_connection.go @@ -48,6 +48,9 @@ type GitlabServerAccessTokenConnection struct { // The time the connection was updated. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + // A detailed message describing the current state. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: `{"bar-key": "value"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` @@ -98,6 +101,11 @@ func (m GitlabServerAccessTokenConnection) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } +//GetLifecycleDetails returns LifecycleDetails +func (m GitlabServerAccessTokenConnection) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + //GetLifecycleState returns LifecycleState func (m GitlabServerAccessTokenConnection) GetLifecycleState() ConnectionLifecycleStateEnum { return m.LifecycleState @@ -154,20 +162,21 @@ func (m GitlabServerAccessTokenConnection) MarshalJSON() (buff []byte, e error) // UnmarshalJSON unmarshals from json func (m *GitlabServerAccessTokenConnection) UnmarshalJSON(data []byte) (e error) { model := struct { - Description *string `json:"description"` - DisplayName *string `json:"displayName"` - TimeCreated *common.SDKTime `json:"timeCreated"` - TimeUpdated *common.SDKTime `json:"timeUpdated"` - LifecycleState ConnectionLifecycleStateEnum `json:"lifecycleState"` - FreeformTags map[string]string `json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `json:"definedTags"` - SystemTags map[string]map[string]interface{} `json:"systemTags"` - TlsVerifyConfig tlsverifyconfig `json:"tlsVerifyConfig"` - Id *string `json:"id"` - CompartmentId *string `json:"compartmentId"` - ProjectId *string `json:"projectId"` - AccessToken *string `json:"accessToken"` - BaseUrl *string `json:"baseUrl"` + Description *string `json:"description"` + DisplayName *string `json:"displayName"` + TimeCreated *common.SDKTime `json:"timeCreated"` + TimeUpdated *common.SDKTime `json:"timeUpdated"` + LifecycleDetails *string `json:"lifecycleDetails"` + LifecycleState ConnectionLifecycleStateEnum `json:"lifecycleState"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + TlsVerifyConfig tlsverifyconfig `json:"tlsVerifyConfig"` + Id *string `json:"id"` + CompartmentId *string `json:"compartmentId"` + ProjectId *string `json:"projectId"` + AccessToken *string `json:"accessToken"` + BaseUrl *string `json:"baseUrl"` }{} e = json.Unmarshal(data, &model) @@ -183,6 +192,8 @@ func (m *GitlabServerAccessTokenConnection) UnmarshalJSON(data []byte) (e error) m.TimeUpdated = model.TimeUpdated + m.LifecycleDetails = model.LifecycleDetails + m.LifecycleState = model.LifecycleState m.FreeformTags = model.FreeformTags diff --git a/devops/gitlab_server_access_token_connection_summary.go b/devops/gitlab_server_access_token_connection_summary.go index 65ad537eb9..6dc22de432 100644 --- a/devops/gitlab_server_access_token_connection_summary.go +++ b/devops/gitlab_server_access_token_connection_summary.go @@ -47,6 +47,9 @@ type GitlabServerAccessTokenConnectionSummary struct { // The time the connection was updated. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + // A detailed message describing the current state. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: `{"bar-key": "value"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` @@ -97,6 +100,11 @@ func (m GitlabServerAccessTokenConnectionSummary) GetTimeUpdated() *common.SDKTi return m.TimeUpdated } +//GetLifecycleDetails returns LifecycleDetails +func (m GitlabServerAccessTokenConnectionSummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + //GetLifecycleState returns LifecycleState func (m GitlabServerAccessTokenConnectionSummary) GetLifecycleState() ConnectionLifecycleStateEnum { return m.LifecycleState @@ -153,20 +161,21 @@ func (m GitlabServerAccessTokenConnectionSummary) MarshalJSON() (buff []byte, e // UnmarshalJSON unmarshals from json func (m *GitlabServerAccessTokenConnectionSummary) UnmarshalJSON(data []byte) (e error) { model := struct { - DisplayName *string `json:"displayName"` - Description *string `json:"description"` - TimeCreated *common.SDKTime `json:"timeCreated"` - TimeUpdated *common.SDKTime `json:"timeUpdated"` - LifecycleState ConnectionLifecycleStateEnum `json:"lifecycleState"` - FreeformTags map[string]string `json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `json:"definedTags"` - SystemTags map[string]map[string]interface{} `json:"systemTags"` - TlsVerifyConfig tlsverifyconfig `json:"tlsVerifyConfig"` - Id *string `json:"id"` - CompartmentId *string `json:"compartmentId"` - ProjectId *string `json:"projectId"` - AccessToken *string `json:"accessToken"` - BaseUrl *string `json:"baseUrl"` + DisplayName *string `json:"displayName"` + Description *string `json:"description"` + TimeCreated *common.SDKTime `json:"timeCreated"` + TimeUpdated *common.SDKTime `json:"timeUpdated"` + LifecycleDetails *string `json:"lifecycleDetails"` + LifecycleState ConnectionLifecycleStateEnum `json:"lifecycleState"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + TlsVerifyConfig tlsverifyconfig `json:"tlsVerifyConfig"` + Id *string `json:"id"` + CompartmentId *string `json:"compartmentId"` + ProjectId *string `json:"projectId"` + AccessToken *string `json:"accessToken"` + BaseUrl *string `json:"baseUrl"` }{} e = json.Unmarshal(data, &model) @@ -182,6 +191,8 @@ func (m *GitlabServerAccessTokenConnectionSummary) UnmarshalJSON(data []byte) (e m.TimeUpdated = model.TimeUpdated + m.LifecycleDetails = model.LifecycleDetails + m.LifecycleState = model.LifecycleState m.FreeformTags = model.FreeformTags diff --git a/devops/list_work_requests_request_response.go b/devops/list_work_requests_request_response.go index d23b6d734b..e71e49aa2b 100644 --- a/devops/list_work_requests_request_response.go +++ b/devops/list_work_requests_request_response.go @@ -45,6 +45,9 @@ type ListWorkRequestsRequest struct { // The field to sort by. Only one sort order can be provided. Default sort order is descending and is based on the timeAccepted field. SortBy ListWorkRequestsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + // A filter to return only resources where their Operation Types matches the parameter operation types + OperationTypeMultiValueQuery []string `contributesTo:"query" name:"operationTypeMultiValueQuery" collectionFormat:"multi"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/devops/operation_type.go b/devops/operation_type.go index c690136bfe..33e4117ea1 100644 --- a/devops/operation_type.go +++ b/devops/operation_type.go @@ -18,120 +18,126 @@ type OperationTypeEnum string // Set of constants representing the allowable values for OperationTypeEnum const ( - OperationTypeCreateProject OperationTypeEnum = "CREATE_PROJECT" - OperationTypeUpdateProject OperationTypeEnum = "UPDATE_PROJECT" - OperationTypeDeleteProject OperationTypeEnum = "DELETE_PROJECT" - OperationTypeMoveProject OperationTypeEnum = "MOVE_PROJECT" - OperationTypeCreateDeployPipeline OperationTypeEnum = "CREATE_DEPLOY_PIPELINE" - OperationTypeUpdateDeployPipeline OperationTypeEnum = "UPDATE_DEPLOY_PIPELINE" - OperationTypeDeleteDeployPipeline OperationTypeEnum = "DELETE_DEPLOY_PIPELINE" - OperationTypeCreateDeployStage OperationTypeEnum = "CREATE_DEPLOY_STAGE" - OperationTypeUpdateDeployStage OperationTypeEnum = "UPDATE_DEPLOY_STAGE" - OperationTypeDeleteDeployStage OperationTypeEnum = "DELETE_DEPLOY_STAGE" - OperationTypeCreateDeployArtifact OperationTypeEnum = "CREATE_DEPLOY_ARTIFACT" - OperationTypeUpdateDeployArtifact OperationTypeEnum = "UPDATE_DEPLOY_ARTIFACT" - OperationTypeDeleteDeployArtifact OperationTypeEnum = "DELETE_DEPLOY_ARTIFACT" - OperationTypeCreateDeployEnvironment OperationTypeEnum = "CREATE_DEPLOY_ENVIRONMENT" - OperationTypeUpdateDeployEnvironment OperationTypeEnum = "UPDATE_DEPLOY_ENVIRONMENT" - OperationTypeDeleteDeployEnvironment OperationTypeEnum = "DELETE_DEPLOY_ENVIRONMENT" - OperationTypeCreateDeployment OperationTypeEnum = "CREATE_DEPLOYMENT" - OperationTypeUpdateDeployment OperationTypeEnum = "UPDATE_DEPLOYMENT" - OperationTypeDeleteDeployment OperationTypeEnum = "DELETE_DEPLOYMENT" - OperationTypeCreateBuildPipeline OperationTypeEnum = "CREATE_BUILD_PIPELINE" - OperationTypeUpdateBuildPipeline OperationTypeEnum = "UPDATE_BUILD_PIPELINE" - OperationTypeDeleteBuildPipeline OperationTypeEnum = "DELETE_BUILD_PIPELINE" - OperationTypeCreateBuildPipelineStage OperationTypeEnum = "CREATE_BUILD_PIPELINE_STAGE" - OperationTypeUpdateBuildPipelineStage OperationTypeEnum = "UPDATE_BUILD_PIPELINE_STAGE" - OperationTypeDeleteBuildPipelineStage OperationTypeEnum = "DELETE_BUILD_PIPELINE_STAGE" - OperationTypeCreateConnection OperationTypeEnum = "CREATE_CONNECTION" - OperationTypeUpdateConnection OperationTypeEnum = "UPDATE_CONNECTION" - OperationTypeDeleteConnection OperationTypeEnum = "DELETE_CONNECTION" - OperationTypeCreateTrigger OperationTypeEnum = "CREATE_TRIGGER" - OperationTypeUpdateTrigger OperationTypeEnum = "UPDATE_TRIGGER" - OperationTypeDeleteTrigger OperationTypeEnum = "DELETE_TRIGGER" - OperationTypeExecuteTrigger OperationTypeEnum = "EXECUTE_TRIGGER" - OperationTypeCreateRepository OperationTypeEnum = "CREATE_REPOSITORY" - OperationTypeUpdateRepository OperationTypeEnum = "UPDATE_REPOSITORY" - OperationTypeDeleteRepository OperationTypeEnum = "DELETE_REPOSITORY" - OperationTypeMirrorRepository OperationTypeEnum = "MIRROR_REPOSITORY" + OperationTypeCreateProject OperationTypeEnum = "CREATE_PROJECT" + OperationTypeUpdateProject OperationTypeEnum = "UPDATE_PROJECT" + OperationTypeDeleteProject OperationTypeEnum = "DELETE_PROJECT" + OperationTypeMoveProject OperationTypeEnum = "MOVE_PROJECT" + OperationTypeCreateDeployPipeline OperationTypeEnum = "CREATE_DEPLOY_PIPELINE" + OperationTypeUpdateDeployPipeline OperationTypeEnum = "UPDATE_DEPLOY_PIPELINE" + OperationTypeDeleteDeployPipeline OperationTypeEnum = "DELETE_DEPLOY_PIPELINE" + OperationTypeCreateDeployStage OperationTypeEnum = "CREATE_DEPLOY_STAGE" + OperationTypeUpdateDeployStage OperationTypeEnum = "UPDATE_DEPLOY_STAGE" + OperationTypeDeleteDeployStage OperationTypeEnum = "DELETE_DEPLOY_STAGE" + OperationTypeCreateDeployArtifact OperationTypeEnum = "CREATE_DEPLOY_ARTIFACT" + OperationTypeUpdateDeployArtifact OperationTypeEnum = "UPDATE_DEPLOY_ARTIFACT" + OperationTypeDeleteDeployArtifact OperationTypeEnum = "DELETE_DEPLOY_ARTIFACT" + OperationTypeCreateDeployEnvironment OperationTypeEnum = "CREATE_DEPLOY_ENVIRONMENT" + OperationTypeUpdateDeployEnvironment OperationTypeEnum = "UPDATE_DEPLOY_ENVIRONMENT" + OperationTypeDeleteDeployEnvironment OperationTypeEnum = "DELETE_DEPLOY_ENVIRONMENT" + OperationTypeCreateDeployment OperationTypeEnum = "CREATE_DEPLOYMENT" + OperationTypeUpdateDeployment OperationTypeEnum = "UPDATE_DEPLOYMENT" + OperationTypeDeleteDeployment OperationTypeEnum = "DELETE_DEPLOYMENT" + OperationTypeCreateBuildPipeline OperationTypeEnum = "CREATE_BUILD_PIPELINE" + OperationTypeUpdateBuildPipeline OperationTypeEnum = "UPDATE_BUILD_PIPELINE" + OperationTypeDeleteBuildPipeline OperationTypeEnum = "DELETE_BUILD_PIPELINE" + OperationTypeCreateBuildPipelineStage OperationTypeEnum = "CREATE_BUILD_PIPELINE_STAGE" + OperationTypeUpdateBuildPipelineStage OperationTypeEnum = "UPDATE_BUILD_PIPELINE_STAGE" + OperationTypeDeleteBuildPipelineStage OperationTypeEnum = "DELETE_BUILD_PIPELINE_STAGE" + OperationTypeCreateConnection OperationTypeEnum = "CREATE_CONNECTION" + OperationTypeUpdateConnection OperationTypeEnum = "UPDATE_CONNECTION" + OperationTypeDeleteConnection OperationTypeEnum = "DELETE_CONNECTION" + OperationTypeCreateTrigger OperationTypeEnum = "CREATE_TRIGGER" + OperationTypeUpdateTrigger OperationTypeEnum = "UPDATE_TRIGGER" + OperationTypeDeleteTrigger OperationTypeEnum = "DELETE_TRIGGER" + OperationTypeExecuteTrigger OperationTypeEnum = "EXECUTE_TRIGGER" + OperationTypeCreateRepository OperationTypeEnum = "CREATE_REPOSITORY" + OperationTypeUpdateRepository OperationTypeEnum = "UPDATE_REPOSITORY" + OperationTypeDeleteRepository OperationTypeEnum = "DELETE_REPOSITORY" + OperationTypeMirrorRepository OperationTypeEnum = "MIRROR_REPOSITORY" + OperationTypeScheduleCascadingProjectDeletion OperationTypeEnum = "SCHEDULE_CASCADING_PROJECT_DELETION" + OperationTypeCancelScheduledCascadingProjectDeletion OperationTypeEnum = "CANCEL_SCHEDULED_CASCADING_PROJECT_DELETION" ) var mappingOperationTypeEnum = map[string]OperationTypeEnum{ - "CREATE_PROJECT": OperationTypeCreateProject, - "UPDATE_PROJECT": OperationTypeUpdateProject, - "DELETE_PROJECT": OperationTypeDeleteProject, - "MOVE_PROJECT": OperationTypeMoveProject, - "CREATE_DEPLOY_PIPELINE": OperationTypeCreateDeployPipeline, - "UPDATE_DEPLOY_PIPELINE": OperationTypeUpdateDeployPipeline, - "DELETE_DEPLOY_PIPELINE": OperationTypeDeleteDeployPipeline, - "CREATE_DEPLOY_STAGE": OperationTypeCreateDeployStage, - "UPDATE_DEPLOY_STAGE": OperationTypeUpdateDeployStage, - "DELETE_DEPLOY_STAGE": OperationTypeDeleteDeployStage, - "CREATE_DEPLOY_ARTIFACT": OperationTypeCreateDeployArtifact, - "UPDATE_DEPLOY_ARTIFACT": OperationTypeUpdateDeployArtifact, - "DELETE_DEPLOY_ARTIFACT": OperationTypeDeleteDeployArtifact, - "CREATE_DEPLOY_ENVIRONMENT": OperationTypeCreateDeployEnvironment, - "UPDATE_DEPLOY_ENVIRONMENT": OperationTypeUpdateDeployEnvironment, - "DELETE_DEPLOY_ENVIRONMENT": OperationTypeDeleteDeployEnvironment, - "CREATE_DEPLOYMENT": OperationTypeCreateDeployment, - "UPDATE_DEPLOYMENT": OperationTypeUpdateDeployment, - "DELETE_DEPLOYMENT": OperationTypeDeleteDeployment, - "CREATE_BUILD_PIPELINE": OperationTypeCreateBuildPipeline, - "UPDATE_BUILD_PIPELINE": OperationTypeUpdateBuildPipeline, - "DELETE_BUILD_PIPELINE": OperationTypeDeleteBuildPipeline, - "CREATE_BUILD_PIPELINE_STAGE": OperationTypeCreateBuildPipelineStage, - "UPDATE_BUILD_PIPELINE_STAGE": OperationTypeUpdateBuildPipelineStage, - "DELETE_BUILD_PIPELINE_STAGE": OperationTypeDeleteBuildPipelineStage, - "CREATE_CONNECTION": OperationTypeCreateConnection, - "UPDATE_CONNECTION": OperationTypeUpdateConnection, - "DELETE_CONNECTION": OperationTypeDeleteConnection, - "CREATE_TRIGGER": OperationTypeCreateTrigger, - "UPDATE_TRIGGER": OperationTypeUpdateTrigger, - "DELETE_TRIGGER": OperationTypeDeleteTrigger, - "EXECUTE_TRIGGER": OperationTypeExecuteTrigger, - "CREATE_REPOSITORY": OperationTypeCreateRepository, - "UPDATE_REPOSITORY": OperationTypeUpdateRepository, - "DELETE_REPOSITORY": OperationTypeDeleteRepository, - "MIRROR_REPOSITORY": OperationTypeMirrorRepository, + "CREATE_PROJECT": OperationTypeCreateProject, + "UPDATE_PROJECT": OperationTypeUpdateProject, + "DELETE_PROJECT": OperationTypeDeleteProject, + "MOVE_PROJECT": OperationTypeMoveProject, + "CREATE_DEPLOY_PIPELINE": OperationTypeCreateDeployPipeline, + "UPDATE_DEPLOY_PIPELINE": OperationTypeUpdateDeployPipeline, + "DELETE_DEPLOY_PIPELINE": OperationTypeDeleteDeployPipeline, + "CREATE_DEPLOY_STAGE": OperationTypeCreateDeployStage, + "UPDATE_DEPLOY_STAGE": OperationTypeUpdateDeployStage, + "DELETE_DEPLOY_STAGE": OperationTypeDeleteDeployStage, + "CREATE_DEPLOY_ARTIFACT": OperationTypeCreateDeployArtifact, + "UPDATE_DEPLOY_ARTIFACT": OperationTypeUpdateDeployArtifact, + "DELETE_DEPLOY_ARTIFACT": OperationTypeDeleteDeployArtifact, + "CREATE_DEPLOY_ENVIRONMENT": OperationTypeCreateDeployEnvironment, + "UPDATE_DEPLOY_ENVIRONMENT": OperationTypeUpdateDeployEnvironment, + "DELETE_DEPLOY_ENVIRONMENT": OperationTypeDeleteDeployEnvironment, + "CREATE_DEPLOYMENT": OperationTypeCreateDeployment, + "UPDATE_DEPLOYMENT": OperationTypeUpdateDeployment, + "DELETE_DEPLOYMENT": OperationTypeDeleteDeployment, + "CREATE_BUILD_PIPELINE": OperationTypeCreateBuildPipeline, + "UPDATE_BUILD_PIPELINE": OperationTypeUpdateBuildPipeline, + "DELETE_BUILD_PIPELINE": OperationTypeDeleteBuildPipeline, + "CREATE_BUILD_PIPELINE_STAGE": OperationTypeCreateBuildPipelineStage, + "UPDATE_BUILD_PIPELINE_STAGE": OperationTypeUpdateBuildPipelineStage, + "DELETE_BUILD_PIPELINE_STAGE": OperationTypeDeleteBuildPipelineStage, + "CREATE_CONNECTION": OperationTypeCreateConnection, + "UPDATE_CONNECTION": OperationTypeUpdateConnection, + "DELETE_CONNECTION": OperationTypeDeleteConnection, + "CREATE_TRIGGER": OperationTypeCreateTrigger, + "UPDATE_TRIGGER": OperationTypeUpdateTrigger, + "DELETE_TRIGGER": OperationTypeDeleteTrigger, + "EXECUTE_TRIGGER": OperationTypeExecuteTrigger, + "CREATE_REPOSITORY": OperationTypeCreateRepository, + "UPDATE_REPOSITORY": OperationTypeUpdateRepository, + "DELETE_REPOSITORY": OperationTypeDeleteRepository, + "MIRROR_REPOSITORY": OperationTypeMirrorRepository, + "SCHEDULE_CASCADING_PROJECT_DELETION": OperationTypeScheduleCascadingProjectDeletion, + "CANCEL_SCHEDULED_CASCADING_PROJECT_DELETION": OperationTypeCancelScheduledCascadingProjectDeletion, } var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{ - "create_project": OperationTypeCreateProject, - "update_project": OperationTypeUpdateProject, - "delete_project": OperationTypeDeleteProject, - "move_project": OperationTypeMoveProject, - "create_deploy_pipeline": OperationTypeCreateDeployPipeline, - "update_deploy_pipeline": OperationTypeUpdateDeployPipeline, - "delete_deploy_pipeline": OperationTypeDeleteDeployPipeline, - "create_deploy_stage": OperationTypeCreateDeployStage, - "update_deploy_stage": OperationTypeUpdateDeployStage, - "delete_deploy_stage": OperationTypeDeleteDeployStage, - "create_deploy_artifact": OperationTypeCreateDeployArtifact, - "update_deploy_artifact": OperationTypeUpdateDeployArtifact, - "delete_deploy_artifact": OperationTypeDeleteDeployArtifact, - "create_deploy_environment": OperationTypeCreateDeployEnvironment, - "update_deploy_environment": OperationTypeUpdateDeployEnvironment, - "delete_deploy_environment": OperationTypeDeleteDeployEnvironment, - "create_deployment": OperationTypeCreateDeployment, - "update_deployment": OperationTypeUpdateDeployment, - "delete_deployment": OperationTypeDeleteDeployment, - "create_build_pipeline": OperationTypeCreateBuildPipeline, - "update_build_pipeline": OperationTypeUpdateBuildPipeline, - "delete_build_pipeline": OperationTypeDeleteBuildPipeline, - "create_build_pipeline_stage": OperationTypeCreateBuildPipelineStage, - "update_build_pipeline_stage": OperationTypeUpdateBuildPipelineStage, - "delete_build_pipeline_stage": OperationTypeDeleteBuildPipelineStage, - "create_connection": OperationTypeCreateConnection, - "update_connection": OperationTypeUpdateConnection, - "delete_connection": OperationTypeDeleteConnection, - "create_trigger": OperationTypeCreateTrigger, - "update_trigger": OperationTypeUpdateTrigger, - "delete_trigger": OperationTypeDeleteTrigger, - "execute_trigger": OperationTypeExecuteTrigger, - "create_repository": OperationTypeCreateRepository, - "update_repository": OperationTypeUpdateRepository, - "delete_repository": OperationTypeDeleteRepository, - "mirror_repository": OperationTypeMirrorRepository, + "create_project": OperationTypeCreateProject, + "update_project": OperationTypeUpdateProject, + "delete_project": OperationTypeDeleteProject, + "move_project": OperationTypeMoveProject, + "create_deploy_pipeline": OperationTypeCreateDeployPipeline, + "update_deploy_pipeline": OperationTypeUpdateDeployPipeline, + "delete_deploy_pipeline": OperationTypeDeleteDeployPipeline, + "create_deploy_stage": OperationTypeCreateDeployStage, + "update_deploy_stage": OperationTypeUpdateDeployStage, + "delete_deploy_stage": OperationTypeDeleteDeployStage, + "create_deploy_artifact": OperationTypeCreateDeployArtifact, + "update_deploy_artifact": OperationTypeUpdateDeployArtifact, + "delete_deploy_artifact": OperationTypeDeleteDeployArtifact, + "create_deploy_environment": OperationTypeCreateDeployEnvironment, + "update_deploy_environment": OperationTypeUpdateDeployEnvironment, + "delete_deploy_environment": OperationTypeDeleteDeployEnvironment, + "create_deployment": OperationTypeCreateDeployment, + "update_deployment": OperationTypeUpdateDeployment, + "delete_deployment": OperationTypeDeleteDeployment, + "create_build_pipeline": OperationTypeCreateBuildPipeline, + "update_build_pipeline": OperationTypeUpdateBuildPipeline, + "delete_build_pipeline": OperationTypeDeleteBuildPipeline, + "create_build_pipeline_stage": OperationTypeCreateBuildPipelineStage, + "update_build_pipeline_stage": OperationTypeUpdateBuildPipelineStage, + "delete_build_pipeline_stage": OperationTypeDeleteBuildPipelineStage, + "create_connection": OperationTypeCreateConnection, + "update_connection": OperationTypeUpdateConnection, + "delete_connection": OperationTypeDeleteConnection, + "create_trigger": OperationTypeCreateTrigger, + "update_trigger": OperationTypeUpdateTrigger, + "delete_trigger": OperationTypeDeleteTrigger, + "execute_trigger": OperationTypeExecuteTrigger, + "create_repository": OperationTypeCreateRepository, + "update_repository": OperationTypeUpdateRepository, + "delete_repository": OperationTypeDeleteRepository, + "mirror_repository": OperationTypeMirrorRepository, + "schedule_cascading_project_deletion": OperationTypeScheduleCascadingProjectDeletion, + "cancel_scheduled_cascading_project_deletion": OperationTypeCancelScheduledCascadingProjectDeletion, } // GetOperationTypeEnumValues Enumerates the set of values for OperationTypeEnum @@ -182,6 +188,8 @@ func GetOperationTypeEnumStringValues() []string { "UPDATE_REPOSITORY", "DELETE_REPOSITORY", "MIRROR_REPOSITORY", + "SCHEDULE_CASCADING_PROJECT_DELETION", + "CANCEL_SCHEDULED_CASCADING_PROJECT_DELETION", } } diff --git a/devops/project.go b/devops/project.go index e8e11c37dd..c6dfa8ccc5 100644 --- a/devops/project.go +++ b/devops/project.go @@ -81,30 +81,33 @@ type ProjectLifecycleStateEnum string // Set of constants representing the allowable values for ProjectLifecycleStateEnum const ( - ProjectLifecycleStateCreating ProjectLifecycleStateEnum = "CREATING" - ProjectLifecycleStateUpdating ProjectLifecycleStateEnum = "UPDATING" - ProjectLifecycleStateActive ProjectLifecycleStateEnum = "ACTIVE" - ProjectLifecycleStateDeleting ProjectLifecycleStateEnum = "DELETING" - ProjectLifecycleStateDeleted ProjectLifecycleStateEnum = "DELETED" - ProjectLifecycleStateFailed ProjectLifecycleStateEnum = "FAILED" + ProjectLifecycleStateCreating ProjectLifecycleStateEnum = "CREATING" + ProjectLifecycleStateUpdating ProjectLifecycleStateEnum = "UPDATING" + ProjectLifecycleStateActive ProjectLifecycleStateEnum = "ACTIVE" + ProjectLifecycleStateDeleting ProjectLifecycleStateEnum = "DELETING" + ProjectLifecycleStateDeleted ProjectLifecycleStateEnum = "DELETED" + ProjectLifecycleStateFailed ProjectLifecycleStateEnum = "FAILED" + ProjectLifecycleStateNeedsAttention ProjectLifecycleStateEnum = "NEEDS_ATTENTION" ) var mappingProjectLifecycleStateEnum = map[string]ProjectLifecycleStateEnum{ - "CREATING": ProjectLifecycleStateCreating, - "UPDATING": ProjectLifecycleStateUpdating, - "ACTIVE": ProjectLifecycleStateActive, - "DELETING": ProjectLifecycleStateDeleting, - "DELETED": ProjectLifecycleStateDeleted, - "FAILED": ProjectLifecycleStateFailed, + "CREATING": ProjectLifecycleStateCreating, + "UPDATING": ProjectLifecycleStateUpdating, + "ACTIVE": ProjectLifecycleStateActive, + "DELETING": ProjectLifecycleStateDeleting, + "DELETED": ProjectLifecycleStateDeleted, + "FAILED": ProjectLifecycleStateFailed, + "NEEDS_ATTENTION": ProjectLifecycleStateNeedsAttention, } var mappingProjectLifecycleStateEnumLowerCase = map[string]ProjectLifecycleStateEnum{ - "creating": ProjectLifecycleStateCreating, - "updating": ProjectLifecycleStateUpdating, - "active": ProjectLifecycleStateActive, - "deleting": ProjectLifecycleStateDeleting, - "deleted": ProjectLifecycleStateDeleted, - "failed": ProjectLifecycleStateFailed, + "creating": ProjectLifecycleStateCreating, + "updating": ProjectLifecycleStateUpdating, + "active": ProjectLifecycleStateActive, + "deleting": ProjectLifecycleStateDeleting, + "deleted": ProjectLifecycleStateDeleted, + "failed": ProjectLifecycleStateFailed, + "needs_attention": ProjectLifecycleStateNeedsAttention, } // GetProjectLifecycleStateEnumValues Enumerates the set of values for ProjectLifecycleStateEnum @@ -125,6 +128,7 @@ func GetProjectLifecycleStateEnumStringValues() []string { "DELETING", "DELETED", "FAILED", + "NEEDS_ATTENTION", } } diff --git a/devops/project_summary.go b/devops/project_summary.go index 6a746de356..f8f75c24d7 100644 --- a/devops/project_summary.go +++ b/devops/project_summary.go @@ -41,7 +41,10 @@ type ProjectSummary struct { // Time the project was updated. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - // The current state of the deployment. + // A detailed message describing the current state. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The current state of the project. LifecycleState ProjectLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: `{"bar-key": "value"}` diff --git a/devops/repository.go b/devops/repository.go index 13913f1cf6..7374190b4c 100644 --- a/devops/repository.go +++ b/devops/repository.go @@ -169,18 +169,21 @@ const ( RepositoryLifecycleStateActive RepositoryLifecycleStateEnum = "ACTIVE" RepositoryLifecycleStateCreating RepositoryLifecycleStateEnum = "CREATING" RepositoryLifecycleStateDeleted RepositoryLifecycleStateEnum = "DELETED" + RepositoryLifecycleStateDeleting RepositoryLifecycleStateEnum = "DELETING" ) var mappingRepositoryLifecycleStateEnum = map[string]RepositoryLifecycleStateEnum{ "ACTIVE": RepositoryLifecycleStateActive, "CREATING": RepositoryLifecycleStateCreating, "DELETED": RepositoryLifecycleStateDeleted, + "DELETING": RepositoryLifecycleStateDeleting, } var mappingRepositoryLifecycleStateEnumLowerCase = map[string]RepositoryLifecycleStateEnum{ "active": RepositoryLifecycleStateActive, "creating": RepositoryLifecycleStateCreating, "deleted": RepositoryLifecycleStateDeleted, + "deleting": RepositoryLifecycleStateDeleting, } // GetRepositoryLifecycleStateEnumValues Enumerates the set of values for RepositoryLifecycleStateEnum @@ -198,6 +201,7 @@ func GetRepositoryLifecycleStateEnumStringValues() []string { "ACTIVE", "CREATING", "DELETED", + "DELETING", } } diff --git a/devops/repository_summary.go b/devops/repository_summary.go index a5d492a76f..a62e59cd0f 100644 --- a/devops/repository_summary.go +++ b/devops/repository_summary.go @@ -42,7 +42,9 @@ type RepositorySummary struct { // The default branch of the repository. DefaultBranch *string `mandatory:"false" json:"defaultBranch"` - // Type of repository. + // Type of repository. Allowed values: + // `MIRRORED` + // `HOSTED` RepositoryType RepositoryRepositoryTypeEnum `mandatory:"false" json:"repositoryType,omitempty"` // SSH URL that you use to git clone, pull and push. diff --git a/devops/schedule_cascading_project_deletion_request_response.go b/devops/schedule_cascading_project_deletion_request_response.go new file mode 100644 index 0000000000..f0d810b2ee --- /dev/null +++ b/devops/schedule_cascading_project_deletion_request_response.go @@ -0,0 +1,95 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package devops + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ScheduleCascadingProjectDeletionRequest wrapper for the ScheduleCascadingProjectDeletion operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/devops/ScheduleCascadingProjectDeletion.go.html to see an example of how to use ScheduleCascadingProjectDeletionRequest. +type ScheduleCascadingProjectDeletionRequest struct { + + // Unique project identifier. + ProjectId *string `mandatory:"true" contributesTo:"path" name:"projectId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ScheduleCascadingProjectDeletionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ScheduleCascadingProjectDeletionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ScheduleCascadingProjectDeletionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ScheduleCascadingProjectDeletionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ScheduleCascadingProjectDeletionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ScheduleCascadingProjectDeletionResponse wrapper for the ScheduleCascadingProjectDeletion operation +type ScheduleCascadingProjectDeletionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ScheduleCascadingProjectDeletionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ScheduleCascadingProjectDeletionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/devops/trigger.go b/devops/trigger.go index a105207cab..b1b2a127dc 100644 --- a/devops/trigger.go +++ b/devops/trigger.go @@ -237,15 +237,18 @@ type TriggerLifecycleStateEnum string // Set of constants representing the allowable values for TriggerLifecycleStateEnum const ( - TriggerLifecycleStateActive TriggerLifecycleStateEnum = "ACTIVE" + TriggerLifecycleStateActive TriggerLifecycleStateEnum = "ACTIVE" + TriggerLifecycleStateDeleting TriggerLifecycleStateEnum = "DELETING" ) var mappingTriggerLifecycleStateEnum = map[string]TriggerLifecycleStateEnum{ - "ACTIVE": TriggerLifecycleStateActive, + "ACTIVE": TriggerLifecycleStateActive, + "DELETING": TriggerLifecycleStateDeleting, } var mappingTriggerLifecycleStateEnumLowerCase = map[string]TriggerLifecycleStateEnum{ - "active": TriggerLifecycleStateActive, + "active": TriggerLifecycleStateActive, + "deleting": TriggerLifecycleStateDeleting, } // GetTriggerLifecycleStateEnumValues Enumerates the set of values for TriggerLifecycleStateEnum @@ -261,6 +264,7 @@ func GetTriggerLifecycleStateEnumValues() []TriggerLifecycleStateEnum { func GetTriggerLifecycleStateEnumStringValues() []string { return []string{ "ACTIVE", + "DELETING", } } diff --git a/devops/update_repository_details.go b/devops/update_repository_details.go index ab6e8a2714..f888ea904e 100644 --- a/devops/update_repository_details.go +++ b/devops/update_repository_details.go @@ -27,7 +27,9 @@ type UpdateRepositoryDetails struct { // The default branch of the repository. DefaultBranch *string `mandatory:"false" json:"defaultBranch"` - // Type of repository. + // Type of repository. Allowed values: + // `MIRRORED` + // `HOSTED` RepositoryType RepositoryRepositoryTypeEnum `mandatory:"false" json:"repositoryType,omitempty"` MirrorRepositoryConfig *MirrorRepositoryConfig `mandatory:"false" json:"mirrorRepositoryConfig"` diff --git a/devops/vbs_access_token_connection.go b/devops/vbs_access_token_connection.go index fa21bff7c5..a7d92d4c90 100644 --- a/devops/vbs_access_token_connection.go +++ b/devops/vbs_access_token_connection.go @@ -47,6 +47,9 @@ type VbsAccessTokenConnection struct { // The time the connection was updated. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + // A detailed message describing the current state. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: `{"bar-key": "value"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` @@ -95,6 +98,11 @@ func (m VbsAccessTokenConnection) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } +//GetLifecycleDetails returns LifecycleDetails +func (m VbsAccessTokenConnection) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + //GetLifecycleState returns LifecycleState func (m VbsAccessTokenConnection) GetLifecycleState() ConnectionLifecycleStateEnum { return m.LifecycleState diff --git a/devops/vbs_access_token_connection_summary.go b/devops/vbs_access_token_connection_summary.go index 03894d7a60..41e7337266 100644 --- a/devops/vbs_access_token_connection_summary.go +++ b/devops/vbs_access_token_connection_summary.go @@ -47,6 +47,9 @@ type VbsAccessTokenConnectionSummary struct { // The time the connection was updated. Format defined by RFC3339 (https://datatracker.ietf.org/doc/html/rfc3339). TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + // A detailed message describing the current state. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: `{"bar-key": "value"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` @@ -95,6 +98,11 @@ func (m VbsAccessTokenConnectionSummary) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } +//GetLifecycleDetails returns LifecycleDetails +func (m VbsAccessTokenConnectionSummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + //GetLifecycleState returns LifecycleState func (m VbsAccessTokenConnectionSummary) GetLifecycleState() ConnectionLifecycleStateEnum { return m.LifecycleState diff --git a/fusionapps/action.go b/fusionapps/action.go index 93b4fd33b4..d5022a912e 100644 --- a/fusionapps/action.go +++ b/fusionapps/action.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/admin_user_collection.go b/fusionapps/admin_user_collection.go index a7acdba966..4746b6652d 100644 --- a/fusionapps/admin_user_collection.go +++ b/fusionapps/admin_user_collection.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/admin_user_summary.go b/fusionapps/admin_user_summary.go index 27f5a6372c..eba46dfa01 100644 --- a/fusionapps/admin_user_summary.go +++ b/fusionapps/admin_user_summary.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/allow_rule.go b/fusionapps/allow_rule.go index a5284b522b..7bbf8f99d2 100644 --- a/fusionapps/allow_rule.go +++ b/fusionapps/allow_rule.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/attach_existing_instance_details.go b/fusionapps/attach_existing_instance_details.go index d951543bea..76dc15c973 100644 --- a/fusionapps/attach_existing_instance_details.go +++ b/fusionapps/attach_existing_instance_details.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps @@ -20,7 +20,7 @@ import ( type AttachExistingInstanceDetails struct { // The service instance OCID of the instance being attached - InstanceId *string `mandatory:"false" json:"instanceId"` + InstanceId *string `mandatory:"true" json:"instanceId"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. // Example: `{"bar-key": "value"}` @@ -31,7 +31,7 @@ type AttachExistingInstanceDetails struct { DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` // Type of the ServiceInstance being attached. - ServiceInstanceType AttachExistingInstanceDetailsServiceInstanceTypeEnum `mandatory:"false" json:"serviceInstanceType,omitempty"` + ServiceInstanceType AttachExistingInstanceDetailsServiceInstanceTypeEnum `mandatory:"true" json:"serviceInstanceType"` } func (m AttachExistingInstanceDetails) String() string { diff --git a/fusionapps/capabilities.go b/fusionapps/capabilities.go index e51b045ced..29ea52daf6 100644 --- a/fusionapps/capabilities.go +++ b/fusionapps/capabilities.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/change_fusion_environment_compartment_details.go b/fusionapps/change_fusion_environment_compartment_details.go index 5cf37fb839..f392fba883 100644 --- a/fusionapps/change_fusion_environment_compartment_details.go +++ b/fusionapps/change_fusion_environment_compartment_details.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/change_fusion_environment_family_compartment_details.go b/fusionapps/change_fusion_environment_family_compartment_details.go index 7e72c974fa..9c1ef83d02 100644 --- a/fusionapps/change_fusion_environment_family_compartment_details.go +++ b/fusionapps/change_fusion_environment_family_compartment_details.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/create_data_masking_activity_details.go b/fusionapps/create_data_masking_activity_details.go index 720f73c239..b32f36d86c 100644 --- a/fusionapps/create_data_masking_activity_details.go +++ b/fusionapps/create_data_masking_activity_details.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/create_fusion_environment_admin_user_details.go b/fusionapps/create_fusion_environment_admin_user_details.go index 403b83786e..103ab23f1b 100644 --- a/fusionapps/create_fusion_environment_admin_user_details.go +++ b/fusionapps/create_fusion_environment_admin_user_details.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/create_fusion_environment_details.go b/fusionapps/create_fusion_environment_details.go index 4184b05767..1a77cd7722 100644 --- a/fusionapps/create_fusion_environment_details.go +++ b/fusionapps/create_fusion_environment_details.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/create_fusion_environment_family_details.go b/fusionapps/create_fusion_environment_family_details.go index df9a197a9c..0f8addbb0b 100644 --- a/fusionapps/create_fusion_environment_family_details.go +++ b/fusionapps/create_fusion_environment_family_details.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/create_new_instance_details.go b/fusionapps/create_new_instance_details.go index 40aa46045f..2e27d9ad46 100644 --- a/fusionapps/create_new_instance_details.go +++ b/fusionapps/create_new_instance_details.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps @@ -18,7 +18,7 @@ import ( // CreateNewInstanceDetails Information about the service attachment. type CreateNewInstanceDetails struct { - Details CreateServiceInstanceDetails `mandatory:"false" json:"details"` + Details CreateServiceInstanceDetails `mandatory:"true" json:"details"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. // Example: `{"bar-key": "value"}` @@ -62,9 +62,9 @@ func (m CreateNewInstanceDetails) MarshalJSON() (buff []byte, e error) { // UnmarshalJSON unmarshals from json func (m *CreateNewInstanceDetails) UnmarshalJSON(data []byte) (e error) { model := struct { - Details createserviceinstancedetails `json:"details"` FreeformTags map[string]string `json:"freeformTags"` DefinedTags map[string]map[string]interface{} `json:"definedTags"` + Details createserviceinstancedetails `json:"details"` }{} e = json.Unmarshal(data, &model) @@ -72,6 +72,10 @@ func (m *CreateNewInstanceDetails) UnmarshalJSON(data []byte) (e error) { return } var nn interface{} + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + nn, e = model.Details.UnmarshalPolymorphicJSON(model.Details.JsonData) if e != nil { return @@ -82,9 +86,5 @@ func (m *CreateNewInstanceDetails) UnmarshalJSON(data []byte) (e error) { m.Details = nil } - m.FreeformTags = model.FreeformTags - - m.DefinedTags = model.DefinedTags - return } diff --git a/fusionapps/create_oax_service_instance_details.go b/fusionapps/create_oax_service_instance_details.go index ba3563f0bf..7031901c65 100644 --- a/fusionapps/create_oax_service_instance_details.go +++ b/fusionapps/create_oax_service_instance_details.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps @@ -22,16 +22,15 @@ type CreateOaxServiceInstanceDetails struct { // The service instance type being provisioned DisplayName *string `mandatory:"true" json:"displayName"` + // A unique Name for Analytics Warehouse. + Name *string `mandatory:"true" json:"name"` + // Comparment where the instance is to be created CompartmentId *string `mandatory:"false" json:"compartmentId"` - // A unique Name for Analytics Warehouse. - Name *string `mandatory:"false" json:"name"` - // This is the description for Analytics Warehouse Service. Description *string `mandatory:"false" json:"description"` - // Admin information to provision Analytics Warehouse Servcie FawAdminInfo *FawAdminInfoDetails `mandatory:"false" json:"FawAdminInfo"` } diff --git a/fusionapps/create_oic_service_instance_details.go b/fusionapps/create_oic_service_instance_details.go index 8a8bef9dda..79deafd2c5 100644 --- a/fusionapps/create_oic_service_instance_details.go +++ b/fusionapps/create_oic_service_instance_details.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/create_refresh_activity_details.go b/fusionapps/create_refresh_activity_details.go index 5c016c8451..7aa6d8007c 100644 --- a/fusionapps/create_refresh_activity_details.go +++ b/fusionapps/create_refresh_activity_details.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps @@ -20,6 +20,9 @@ type CreateRefreshActivityDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the source environment SourceFusionEnvironmentId *string `mandatory:"true" json:"sourceFusionEnvironmentId"` + + // Current time the refresh activity is scheduled to start. An RFC3339 formatted datetime string. + TimeScheduledStart *common.SDKTime `mandatory:"false" json:"timeScheduledStart"` } func (m CreateRefreshActivityDetails) String() string { diff --git a/fusionapps/create_service_attachment_details.go b/fusionapps/create_service_attachment_details.go index 01af607ecd..ac125f9b1e 100644 --- a/fusionapps/create_service_attachment_details.go +++ b/fusionapps/create_service_attachment_details.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/create_service_instance_details.go b/fusionapps/create_service_instance_details.go index d6f0333f67..f91f49d6de 100644 --- a/fusionapps/create_service_instance_details.go +++ b/fusionapps/create_service_instance_details.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/data_masking_activity.go b/fusionapps/data_masking_activity.go index 162b99e8de..ed8ed83857 100644 --- a/fusionapps/data_masking_activity.go +++ b/fusionapps/data_masking_activity.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/data_masking_activity_collection.go b/fusionapps/data_masking_activity_collection.go index 7e303ed760..deddf07192 100644 --- a/fusionapps/data_masking_activity_collection.go +++ b/fusionapps/data_masking_activity_collection.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/data_masking_activity_summary.go b/fusionapps/data_masking_activity_summary.go index 8de29d50b1..c84e9ea325 100644 --- a/fusionapps/data_masking_activity_summary.go +++ b/fusionapps/data_masking_activity_summary.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/delete_refresh_activity_request_response.go b/fusionapps/delete_refresh_activity_request_response.go new file mode 100644 index 0000000000..f0cfa1359a --- /dev/null +++ b/fusionapps/delete_refresh_activity_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package fusionapps + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteRefreshActivityRequest wrapper for the DeleteRefreshActivity operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/DeleteRefreshActivity.go.html to see an example of how to use DeleteRefreshActivityRequest. +type DeleteRefreshActivityRequest struct { + + // unique FusionEnvironment identifier + FusionEnvironmentId *string `mandatory:"true" contributesTo:"path" name:"fusionEnvironmentId"` + + // The unique identifier (OCID) of the Refresh activity. + RefreshActivityId *string `mandatory:"true" contributesTo:"path" name:"refreshActivityId"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteRefreshActivityRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteRefreshActivityRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteRefreshActivityRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteRefreshActivityRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteRefreshActivityRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteRefreshActivityResponse wrapper for the DeleteRefreshActivity operation +type DeleteRefreshActivityResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteRefreshActivityResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteRefreshActivityResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fusionapps/family_maintenance_policy.go b/fusionapps/family_maintenance_policy.go index cbc87924c1..1970eb11ec 100644 --- a/fusionapps/family_maintenance_policy.go +++ b/fusionapps/family_maintenance_policy.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/faw_admin_info_details.go b/fusionapps/faw_admin_info_details.go index a2bb368e0a..1c67ea5857 100644 --- a/fusionapps/faw_admin_info_details.go +++ b/fusionapps/faw_admin_info_details.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps @@ -15,17 +15,17 @@ import ( "strings" ) -// FawAdminInfoDetails Admin information to provision Analytics Warehouse Servcie. +// FawAdminInfoDetails Admin information to provision Analytics Warehouse Service. type FawAdminInfoDetails struct { // Password for the ADW to be created in User Tenancy - AdwAdminPass *string `mandatory:"false" json:"adwAdminPass"` + AdwAdminPass *string `mandatory:"true" json:"adwAdminPass"` + + // Email ID to send notification for Analytics Warehouse updates. + NotificationEmail *string `mandatory:"true" json:"notificationEmail"` // Password for the auto-created FAWService user FawServicePass *string `mandatory:"false" json:"fawServicePass"` - - // Email ID to send notification for Analytics Warehouse updates. - NotificationEmail *string `mandatory:"false" json:"notificationEmail"` } func (m FawAdminInfoDetails) String() string { diff --git a/fusionapps/fusion_environment.go b/fusionapps/fusion_environment.go index cf4c1eda75..8fd2de59d7 100644 --- a/fusionapps/fusion_environment.go +++ b/fusionapps/fusion_environment.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps @@ -72,6 +72,12 @@ type FusionEnvironment struct { // Language packs AdditionalLanguagePacks []string `mandatory:"false" json:"additionalLanguagePacks"` + // The lockbox Id of this fusion environment. If there's no lockbox id, this field will be null + LockboxId *string `mandatory:"false" json:"lockboxId"` + + // If it's true, then the Break Glass feature is enabled + IsBreakGlassEnabled *bool `mandatory:"false" json:"isBreakGlassEnabled"` + Refresh *RefreshDetails `mandatory:"false" json:"refresh"` // Network Access Control Rules @@ -136,6 +142,8 @@ func (m *FusionEnvironment) UnmarshalJSON(data []byte) (e error) { PublicUrl *string `json:"publicUrl"` DnsPrefix *string `json:"dnsPrefix"` AdditionalLanguagePacks []string `json:"additionalLanguagePacks"` + LockboxId *string `json:"lockboxId"` + IsBreakGlassEnabled *bool `json:"isBreakGlassEnabled"` Refresh *RefreshDetails `json:"refresh"` Rules []rule `json:"rules"` TimeCreated *common.SDKTime `json:"timeCreated"` @@ -191,6 +199,10 @@ func (m *FusionEnvironment) UnmarshalJSON(data []byte) (e error) { m.AdditionalLanguagePacks[i] = n } + m.LockboxId = model.LockboxId + + m.IsBreakGlassEnabled = model.IsBreakGlassEnabled + m.Refresh = model.Refresh m.Rules = make([]Rule, len(model.Rules)) diff --git a/fusionapps/fusion_environment_collection.go b/fusionapps/fusion_environment_collection.go index 5310fb823d..ef48ea350f 100644 --- a/fusionapps/fusion_environment_collection.go +++ b/fusionapps/fusion_environment_collection.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/fusion_environment_family.go b/fusionapps/fusion_environment_family.go index 7792176c7f..02b1546cd3 100644 --- a/fusionapps/fusion_environment_family.go +++ b/fusionapps/fusion_environment_family.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/fusion_environment_family_collection.go b/fusionapps/fusion_environment_family_collection.go index 2bf932cd24..a27569c92c 100644 --- a/fusionapps/fusion_environment_family_collection.go +++ b/fusionapps/fusion_environment_family_collection.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/fusion_environment_family_limits_and_usage.go b/fusionapps/fusion_environment_family_limits_and_usage.go index d4f9c7558d..0c03bee262 100644 --- a/fusionapps/fusion_environment_family_limits_and_usage.go +++ b/fusionapps/fusion_environment_family_limits_and_usage.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/fusion_environment_family_summary.go b/fusionapps/fusion_environment_family_summary.go index bfae09720b..4bc523c5f3 100644 --- a/fusionapps/fusion_environment_family_summary.go +++ b/fusionapps/fusion_environment_family_summary.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/fusion_environment_status.go b/fusionapps/fusion_environment_status.go index d06bb056d9..a0b7d757fd 100644 --- a/fusionapps/fusion_environment_status.go +++ b/fusionapps/fusion_environment_status.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/fusion_environment_summary.go b/fusionapps/fusion_environment_summary.go index 01c8a9837c..e5b24bd0bc 100644 --- a/fusionapps/fusion_environment_summary.go +++ b/fusionapps/fusion_environment_summary.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps @@ -59,6 +59,12 @@ type FusionEnvironmentSummary struct { // Language packs AdditionalLanguagePacks []string `mandatory:"false" json:"additionalLanguagePacks"` + // The lockbox Id of this fusion environment. If there's no lockbox id, this field will be null + LockboxId *string `mandatory:"false" json:"lockboxId"` + + // If it's true, then the Break Glass feature is enabled + IsBreakGlassEnabled *bool `mandatory:"false" json:"isBreakGlassEnabled"` + // The time the the FusionEnvironment was created. An RFC3339 formatted datetime string TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` diff --git a/fusionapps/fusionapps_fusionapplications_client.go b/fusionapps/fusionapps_fusionapplications_client.go index e66c4bba0a..e0f7453b0f 100644 --- a/fusionapps/fusionapps_fusionapplications_client.go +++ b/fusionapps/fusionapps_fusionapplications_client.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps @@ -93,9 +93,10 @@ func (client *FusionApplicationsClient) ConfigurationProvider() *common.Configur // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/ChangeFusionEnvironmentCompartment.go.html to see an example of how to use ChangeFusionEnvironmentCompartment API. +// A default retry strategy applies to this operation ChangeFusionEnvironmentCompartment() func (client FusionApplicationsClient) ChangeFusionEnvironmentCompartment(ctx context.Context, request ChangeFusionEnvironmentCompartmentRequest) (response ChangeFusionEnvironmentCompartmentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -156,9 +157,10 @@ func (client FusionApplicationsClient) changeFusionEnvironmentCompartment(ctx co // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/ChangeFusionEnvironmentFamilyCompartment.go.html to see an example of how to use ChangeFusionEnvironmentFamilyCompartment API. +// A default retry strategy applies to this operation ChangeFusionEnvironmentFamilyCompartment() func (client FusionApplicationsClient) ChangeFusionEnvironmentFamilyCompartment(ctx context.Context, request ChangeFusionEnvironmentFamilyCompartmentRequest) (response ChangeFusionEnvironmentFamilyCompartmentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -218,9 +220,10 @@ func (client FusionApplicationsClient) changeFusionEnvironmentFamilyCompartment( // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/CreateDataMaskingActivity.go.html to see an example of how to use CreateDataMaskingActivity API. +// A default retry strategy applies to this operation CreateDataMaskingActivity() func (client FusionApplicationsClient) CreateDataMaskingActivity(ctx context.Context, request CreateDataMaskingActivityRequest) (response CreateDataMaskingActivityResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -280,9 +283,10 @@ func (client FusionApplicationsClient) createDataMaskingActivity(ctx context.Con // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/CreateFusionEnvironment.go.html to see an example of how to use CreateFusionEnvironment API. +// A default retry strategy applies to this operation CreateFusionEnvironment() func (client FusionApplicationsClient) CreateFusionEnvironment(ctx context.Context, request CreateFusionEnvironmentRequest) (response CreateFusionEnvironmentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -342,9 +346,10 @@ func (client FusionApplicationsClient) createFusionEnvironment(ctx context.Conte // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/CreateFusionEnvironmentAdminUser.go.html to see an example of how to use CreateFusionEnvironmentAdminUser API. +// A default retry strategy applies to this operation CreateFusionEnvironmentAdminUser() func (client FusionApplicationsClient) CreateFusionEnvironmentAdminUser(ctx context.Context, request CreateFusionEnvironmentAdminUserRequest) (response CreateFusionEnvironmentAdminUserResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -404,9 +409,10 @@ func (client FusionApplicationsClient) createFusionEnvironmentAdminUser(ctx cont // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/CreateFusionEnvironmentFamily.go.html to see an example of how to use CreateFusionEnvironmentFamily API. +// A default retry strategy applies to this operation CreateFusionEnvironmentFamily() func (client FusionApplicationsClient) CreateFusionEnvironmentFamily(ctx context.Context, request CreateFusionEnvironmentFamilyRequest) (response CreateFusionEnvironmentFamilyResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -466,9 +472,10 @@ func (client FusionApplicationsClient) createFusionEnvironmentFamily(ctx context // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/CreateRefreshActivity.go.html to see an example of how to use CreateRefreshActivity API. +// A default retry strategy applies to this operation CreateRefreshActivity() func (client FusionApplicationsClient) CreateRefreshActivity(ctx context.Context, request CreateRefreshActivityRequest) (response CreateRefreshActivityResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -528,9 +535,10 @@ func (client FusionApplicationsClient) createRefreshActivity(ctx context.Context // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/DeleteFusionEnvironment.go.html to see an example of how to use DeleteFusionEnvironment API. +// A default retry strategy applies to this operation DeleteFusionEnvironment() func (client FusionApplicationsClient) DeleteFusionEnvironment(ctx context.Context, request DeleteFusionEnvironmentRequest) (response DeleteFusionEnvironmentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -585,9 +593,10 @@ func (client FusionApplicationsClient) deleteFusionEnvironment(ctx context.Conte // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/DeleteFusionEnvironmentAdminUser.go.html to see an example of how to use DeleteFusionEnvironmentAdminUser API. +// A default retry strategy applies to this operation DeleteFusionEnvironmentAdminUser() func (client FusionApplicationsClient) DeleteFusionEnvironmentAdminUser(ctx context.Context, request DeleteFusionEnvironmentAdminUserRequest) (response DeleteFusionEnvironmentAdminUserResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -642,9 +651,10 @@ func (client FusionApplicationsClient) deleteFusionEnvironmentAdminUser(ctx cont // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/DeleteFusionEnvironmentFamily.go.html to see an example of how to use DeleteFusionEnvironmentFamily API. +// A default retry strategy applies to this operation DeleteFusionEnvironmentFamily() func (client FusionApplicationsClient) DeleteFusionEnvironmentFamily(ctx context.Context, request DeleteFusionEnvironmentFamilyRequest) (response DeleteFusionEnvironmentFamilyResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -694,14 +704,73 @@ func (client FusionApplicationsClient) deleteFusionEnvironmentFamily(ctx context return response, err } +// DeleteRefreshActivity Deletes a scheduled RefreshActivity resource by identifier +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/DeleteRefreshActivity.go.html to see an example of how to use DeleteRefreshActivity API. +// A default retry strategy applies to this operation DeleteRefreshActivity() +func (client FusionApplicationsClient) DeleteRefreshActivity(ctx context.Context, request DeleteRefreshActivityRequest) (response DeleteRefreshActivityResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteRefreshActivity, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteRefreshActivityResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteRefreshActivityResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteRefreshActivityResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteRefreshActivityResponse") + } + return +} + +// deleteRefreshActivity implements the OCIOperation interface (enables retrying operations) +func (client FusionApplicationsClient) deleteRefreshActivity(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/fusionEnvironments/{fusionEnvironmentId}/refreshActivities/{refreshActivityId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteRefreshActivityResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fusion-applications/20211201/RefreshActivity/DeleteRefreshActivity" + err = common.PostProcessServiceError(err, "FusionApplications", "DeleteRefreshActivity", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetDataMaskingActivity Gets a DataMaskingActivity by identifier // // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/GetDataMaskingActivity.go.html to see an example of how to use GetDataMaskingActivity API. +// A default retry strategy applies to this operation GetDataMaskingActivity() func (client FusionApplicationsClient) GetDataMaskingActivity(ctx context.Context, request GetDataMaskingActivityRequest) (response GetDataMaskingActivityResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -756,9 +825,10 @@ func (client FusionApplicationsClient) getDataMaskingActivity(ctx context.Contex // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/GetFusionEnvironment.go.html to see an example of how to use GetFusionEnvironment API. +// A default retry strategy applies to this operation GetFusionEnvironment() func (client FusionApplicationsClient) GetFusionEnvironment(ctx context.Context, request GetFusionEnvironmentRequest) (response GetFusionEnvironmentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -813,9 +883,10 @@ func (client FusionApplicationsClient) getFusionEnvironment(ctx context.Context, // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/GetFusionEnvironmentFamily.go.html to see an example of how to use GetFusionEnvironmentFamily API. +// A default retry strategy applies to this operation GetFusionEnvironmentFamily() func (client FusionApplicationsClient) GetFusionEnvironmentFamily(ctx context.Context, request GetFusionEnvironmentFamilyRequest) (response GetFusionEnvironmentFamilyResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -870,9 +941,10 @@ func (client FusionApplicationsClient) getFusionEnvironmentFamily(ctx context.Co // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/GetFusionEnvironmentFamilyLimitsAndUsage.go.html to see an example of how to use GetFusionEnvironmentFamilyLimitsAndUsage API. +// A default retry strategy applies to this operation GetFusionEnvironmentFamilyLimitsAndUsage() func (client FusionApplicationsClient) GetFusionEnvironmentFamilyLimitsAndUsage(ctx context.Context, request GetFusionEnvironmentFamilyLimitsAndUsageRequest) (response GetFusionEnvironmentFamilyLimitsAndUsageResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -927,9 +999,10 @@ func (client FusionApplicationsClient) getFusionEnvironmentFamilyLimitsAndUsage( // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/GetFusionEnvironmentFamilySubscriptionDetail.go.html to see an example of how to use GetFusionEnvironmentFamilySubscriptionDetail API. +// A default retry strategy applies to this operation GetFusionEnvironmentFamilySubscriptionDetail() func (client FusionApplicationsClient) GetFusionEnvironmentFamilySubscriptionDetail(ctx context.Context, request GetFusionEnvironmentFamilySubscriptionDetailRequest) (response GetFusionEnvironmentFamilySubscriptionDetailResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -984,9 +1057,10 @@ func (client FusionApplicationsClient) getFusionEnvironmentFamilySubscriptionDet // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/GetFusionEnvironmentStatus.go.html to see an example of how to use GetFusionEnvironmentStatus API. +// A default retry strategy applies to this operation GetFusionEnvironmentStatus() func (client FusionApplicationsClient) GetFusionEnvironmentStatus(ctx context.Context, request GetFusionEnvironmentStatusRequest) (response GetFusionEnvironmentStatusResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1041,9 +1115,10 @@ func (client FusionApplicationsClient) getFusionEnvironmentStatus(ctx context.Co // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/GetRefreshActivity.go.html to see an example of how to use GetRefreshActivity API. +// A default retry strategy applies to this operation GetRefreshActivity() func (client FusionApplicationsClient) GetRefreshActivity(ctx context.Context, request GetRefreshActivityRequest) (response GetRefreshActivityResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1098,9 +1173,10 @@ func (client FusionApplicationsClient) getRefreshActivity(ctx context.Context, r // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/GetScheduledActivity.go.html to see an example of how to use GetScheduledActivity API. +// A default retry strategy applies to this operation GetScheduledActivity() func (client FusionApplicationsClient) GetScheduledActivity(ctx context.Context, request GetScheduledActivityRequest) (response GetScheduledActivityResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1155,9 +1231,10 @@ func (client FusionApplicationsClient) getScheduledActivity(ctx context.Context, // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/GetServiceAttachment.go.html to see an example of how to use GetServiceAttachment API. +// A default retry strategy applies to this operation GetServiceAttachment() func (client FusionApplicationsClient) GetServiceAttachment(ctx context.Context, request GetServiceAttachmentRequest) (response GetServiceAttachmentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1212,9 +1289,10 @@ func (client FusionApplicationsClient) getServiceAttachment(ctx context.Context, // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/GetWorkRequest.go.html to see an example of how to use GetWorkRequest API. +// A default retry strategy applies to this operation GetWorkRequest() func (client FusionApplicationsClient) GetWorkRequest(ctx context.Context, request GetWorkRequestRequest) (response GetWorkRequestResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1269,9 +1347,10 @@ func (client FusionApplicationsClient) getWorkRequest(ctx context.Context, reque // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/ListAdminUsers.go.html to see an example of how to use ListAdminUsers API. +// A default retry strategy applies to this operation ListAdminUsers() func (client FusionApplicationsClient) ListAdminUsers(ctx context.Context, request ListAdminUsersRequest) (response ListAdminUsersResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1326,9 +1405,10 @@ func (client FusionApplicationsClient) listAdminUsers(ctx context.Context, reque // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/ListDataMaskingActivities.go.html to see an example of how to use ListDataMaskingActivities API. +// A default retry strategy applies to this operation ListDataMaskingActivities() func (client FusionApplicationsClient) ListDataMaskingActivities(ctx context.Context, request ListDataMaskingActivitiesRequest) (response ListDataMaskingActivitiesResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1383,9 +1463,10 @@ func (client FusionApplicationsClient) listDataMaskingActivities(ctx context.Con // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/ListFusionEnvironmentFamilies.go.html to see an example of how to use ListFusionEnvironmentFamilies API. +// A default retry strategy applies to this operation ListFusionEnvironmentFamilies() func (client FusionApplicationsClient) ListFusionEnvironmentFamilies(ctx context.Context, request ListFusionEnvironmentFamiliesRequest) (response ListFusionEnvironmentFamiliesResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1440,9 +1521,10 @@ func (client FusionApplicationsClient) listFusionEnvironmentFamilies(ctx context // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/ListFusionEnvironments.go.html to see an example of how to use ListFusionEnvironments API. +// A default retry strategy applies to this operation ListFusionEnvironments() func (client FusionApplicationsClient) ListFusionEnvironments(ctx context.Context, request ListFusionEnvironmentsRequest) (response ListFusionEnvironmentsResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1497,9 +1579,10 @@ func (client FusionApplicationsClient) listFusionEnvironments(ctx context.Contex // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/ListRefreshActivities.go.html to see an example of how to use ListRefreshActivities API. +// A default retry strategy applies to this operation ListRefreshActivities() func (client FusionApplicationsClient) ListRefreshActivities(ctx context.Context, request ListRefreshActivitiesRequest) (response ListRefreshActivitiesResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1554,9 +1637,10 @@ func (client FusionApplicationsClient) listRefreshActivities(ctx context.Context // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/ListScheduledActivities.go.html to see an example of how to use ListScheduledActivities API. +// A default retry strategy applies to this operation ListScheduledActivities() func (client FusionApplicationsClient) ListScheduledActivities(ctx context.Context, request ListScheduledActivitiesRequest) (response ListScheduledActivitiesResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1611,9 +1695,10 @@ func (client FusionApplicationsClient) listScheduledActivities(ctx context.Conte // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/ListServiceAttachments.go.html to see an example of how to use ListServiceAttachments API. +// A default retry strategy applies to this operation ListServiceAttachments() func (client FusionApplicationsClient) ListServiceAttachments(ctx context.Context, request ListServiceAttachmentsRequest) (response ListServiceAttachmentsResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1668,9 +1753,10 @@ func (client FusionApplicationsClient) listServiceAttachments(ctx context.Contex // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/ListTimeAvailableForRefreshes.go.html to see an example of how to use ListTimeAvailableForRefreshes API. +// A default retry strategy applies to this operation ListTimeAvailableForRefreshes() func (client FusionApplicationsClient) ListTimeAvailableForRefreshes(ctx context.Context, request ListTimeAvailableForRefreshesRequest) (response ListTimeAvailableForRefreshesResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1725,9 +1811,10 @@ func (client FusionApplicationsClient) listTimeAvailableForRefreshes(ctx context // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrors API. +// A default retry strategy applies to this operation ListWorkRequestErrors() func (client FusionApplicationsClient) ListWorkRequestErrors(ctx context.Context, request ListWorkRequestErrorsRequest) (response ListWorkRequestErrorsResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1782,9 +1869,10 @@ func (client FusionApplicationsClient) listWorkRequestErrors(ctx context.Context // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogs API. +// A default retry strategy applies to this operation ListWorkRequestLogs() func (client FusionApplicationsClient) ListWorkRequestLogs(ctx context.Context, request ListWorkRequestLogsRequest) (response ListWorkRequestLogsResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1839,9 +1927,10 @@ func (client FusionApplicationsClient) listWorkRequestLogs(ctx context.Context, // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/ListWorkRequests.go.html to see an example of how to use ListWorkRequests API. +// A default retry strategy applies to this operation ListWorkRequests() func (client FusionApplicationsClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1896,9 +1985,10 @@ func (client FusionApplicationsClient) listWorkRequests(ctx context.Context, req // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/ResetFusionEnvironmentPassword.go.html to see an example of how to use ResetFusionEnvironmentPassword API. +// A default retry strategy applies to this operation ResetFusionEnvironmentPassword() func (client FusionApplicationsClient) ResetFusionEnvironmentPassword(ctx context.Context, request ResetFusionEnvironmentPasswordRequest) (response ResetFusionEnvironmentPasswordResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1958,9 +2048,10 @@ func (client FusionApplicationsClient) resetFusionEnvironmentPassword(ctx contex // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/UpdateFusionEnvironment.go.html to see an example of how to use UpdateFusionEnvironment API. +// A default retry strategy applies to this operation UpdateFusionEnvironment() func (client FusionApplicationsClient) UpdateFusionEnvironment(ctx context.Context, request UpdateFusionEnvironmentRequest) (response UpdateFusionEnvironmentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -2015,9 +2106,10 @@ func (client FusionApplicationsClient) updateFusionEnvironment(ctx context.Conte // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/UpdateFusionEnvironmentFamily.go.html to see an example of how to use UpdateFusionEnvironmentFamily API. +// A default retry strategy applies to this operation UpdateFusionEnvironmentFamily() func (client FusionApplicationsClient) UpdateFusionEnvironmentFamily(ctx context.Context, request UpdateFusionEnvironmentFamilyRequest) (response UpdateFusionEnvironmentFamilyResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -2066,3 +2158,61 @@ func (client FusionApplicationsClient) updateFusionEnvironmentFamily(ctx context err = common.UnmarshalResponse(httpResponse, &response) return response, err } + +// UpdateRefreshActivity Updates a scheduled RefreshActivity. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/UpdateRefreshActivity.go.html to see an example of how to use UpdateRefreshActivity API. +// A default retry strategy applies to this operation UpdateRefreshActivity() +func (client FusionApplicationsClient) UpdateRefreshActivity(ctx context.Context, request UpdateRefreshActivityRequest) (response UpdateRefreshActivityResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateRefreshActivity, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateRefreshActivityResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateRefreshActivityResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateRefreshActivityResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateRefreshActivityResponse") + } + return +} + +// updateRefreshActivity implements the OCIOperation interface (enables retrying operations) +func (client FusionApplicationsClient) updateRefreshActivity(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/fusionEnvironments/{fusionEnvironmentId}/refreshActivities/{refreshActivityId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateRefreshActivityResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fusion-applications/20211201/UpdateRefreshActivityDetails/UpdateRefreshActivity" + err = common.PostProcessServiceError(err, "FusionApplications", "UpdateRefreshActivity", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/fusionapps/get_maintenance_policy_details.go b/fusionapps/get_maintenance_policy_details.go index 886468abde..d0073313fa 100644 --- a/fusionapps/get_maintenance_policy_details.go +++ b/fusionapps/get_maintenance_policy_details.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/kms_key_info.go b/fusionapps/kms_key_info.go index 65de6ef9ab..e0a85e55f2 100644 --- a/fusionapps/kms_key_info.go +++ b/fusionapps/kms_key_info.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/limit_and_usage.go b/fusionapps/limit_and_usage.go index 8416ad4668..1f7a350008 100644 --- a/fusionapps/limit_and_usage.go +++ b/fusionapps/limit_and_usage.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/maintenance_policy.go b/fusionapps/maintenance_policy.go index fb76ccb2a5..a650442760 100644 --- a/fusionapps/maintenance_policy.go +++ b/fusionapps/maintenance_policy.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/patch_action.go b/fusionapps/patch_action.go index c1e1dd4460..3dd07a01b2 100644 --- a/fusionapps/patch_action.go +++ b/fusionapps/patch_action.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/quarterly_upgrade_begin_times.go b/fusionapps/quarterly_upgrade_begin_times.go index cfdfb36751..ccccb13658 100644 --- a/fusionapps/quarterly_upgrade_begin_times.go +++ b/fusionapps/quarterly_upgrade_begin_times.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/refresh_activity.go b/fusionapps/refresh_activity.go index f81654017b..90bf65ff74 100644 --- a/fusionapps/refresh_activity.go +++ b/fusionapps/refresh_activity.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps @@ -51,6 +51,9 @@ type RefreshActivity struct { // The time the refresh activity record was updated. An RFC3339 formatted datetime string. TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + // Details of refresh investigation information, each item represents a different issue. + RefreshIssueDetailsList []RefreshIssueDetails `mandatory:"false" json:"refreshIssueDetailsList"` + // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. LifecycleDetails RefreshActivityLifecycleDetailsEnum `mandatory:"false" json:"lifecycleDetails,omitempty"` } @@ -85,27 +88,30 @@ type RefreshActivityLifecycleStateEnum string // Set of constants representing the allowable values for RefreshActivityLifecycleStateEnum const ( - RefreshActivityLifecycleStateAccepted RefreshActivityLifecycleStateEnum = "ACCEPTED" - RefreshActivityLifecycleStateInProgress RefreshActivityLifecycleStateEnum = "IN_PROGRESS" - RefreshActivityLifecycleStateFailed RefreshActivityLifecycleStateEnum = "FAILED" - RefreshActivityLifecycleStateSucceeded RefreshActivityLifecycleStateEnum = "SUCCEEDED" - RefreshActivityLifecycleStateCanceled RefreshActivityLifecycleStateEnum = "CANCELED" + RefreshActivityLifecycleStateAccepted RefreshActivityLifecycleStateEnum = "ACCEPTED" + RefreshActivityLifecycleStateInProgress RefreshActivityLifecycleStateEnum = "IN_PROGRESS" + RefreshActivityLifecycleStateNeedsAttention RefreshActivityLifecycleStateEnum = "NEEDS_ATTENTION" + RefreshActivityLifecycleStateFailed RefreshActivityLifecycleStateEnum = "FAILED" + RefreshActivityLifecycleStateSucceeded RefreshActivityLifecycleStateEnum = "SUCCEEDED" + RefreshActivityLifecycleStateCanceled RefreshActivityLifecycleStateEnum = "CANCELED" ) var mappingRefreshActivityLifecycleStateEnum = map[string]RefreshActivityLifecycleStateEnum{ - "ACCEPTED": RefreshActivityLifecycleStateAccepted, - "IN_PROGRESS": RefreshActivityLifecycleStateInProgress, - "FAILED": RefreshActivityLifecycleStateFailed, - "SUCCEEDED": RefreshActivityLifecycleStateSucceeded, - "CANCELED": RefreshActivityLifecycleStateCanceled, + "ACCEPTED": RefreshActivityLifecycleStateAccepted, + "IN_PROGRESS": RefreshActivityLifecycleStateInProgress, + "NEEDS_ATTENTION": RefreshActivityLifecycleStateNeedsAttention, + "FAILED": RefreshActivityLifecycleStateFailed, + "SUCCEEDED": RefreshActivityLifecycleStateSucceeded, + "CANCELED": RefreshActivityLifecycleStateCanceled, } var mappingRefreshActivityLifecycleStateEnumLowerCase = map[string]RefreshActivityLifecycleStateEnum{ - "accepted": RefreshActivityLifecycleStateAccepted, - "in_progress": RefreshActivityLifecycleStateInProgress, - "failed": RefreshActivityLifecycleStateFailed, - "succeeded": RefreshActivityLifecycleStateSucceeded, - "canceled": RefreshActivityLifecycleStateCanceled, + "accepted": RefreshActivityLifecycleStateAccepted, + "in_progress": RefreshActivityLifecycleStateInProgress, + "needs_attention": RefreshActivityLifecycleStateNeedsAttention, + "failed": RefreshActivityLifecycleStateFailed, + "succeeded": RefreshActivityLifecycleStateSucceeded, + "canceled": RefreshActivityLifecycleStateCanceled, } // GetRefreshActivityLifecycleStateEnumValues Enumerates the set of values for RefreshActivityLifecycleStateEnum @@ -122,6 +128,7 @@ func GetRefreshActivityLifecycleStateEnumStringValues() []string { return []string{ "ACCEPTED", "IN_PROGRESS", + "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELED", diff --git a/fusionapps/refresh_activity_collection.go b/fusionapps/refresh_activity_collection.go index 0b7d6c4a30..87380cc3d8 100644 --- a/fusionapps/refresh_activity_collection.go +++ b/fusionapps/refresh_activity_collection.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/refresh_activity_summary.go b/fusionapps/refresh_activity_summary.go index 3634f0b59b..7058b91945 100644 --- a/fusionapps/refresh_activity_summary.go +++ b/fusionapps/refresh_activity_summary.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps @@ -53,6 +53,9 @@ type RefreshActivitySummary struct { // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. LifecycleDetails RefreshActivityLifecycleDetailsEnum `mandatory:"false" json:"lifecycleDetails,omitempty"` + + // Details of refresh investigation information, each item represents a different issue. + RefreshIssueDetailsList []RefreshIssueDetails `mandatory:"false" json:"refreshIssueDetailsList"` } func (m RefreshActivitySummary) String() string { diff --git a/fusionapps/refresh_details.go b/fusionapps/refresh_details.go index efe761df52..09d89c79fc 100644 --- a/fusionapps/refresh_details.go +++ b/fusionapps/refresh_details.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/refresh_issue_details.go b/fusionapps/refresh_issue_details.go new file mode 100644 index 0000000000..9c01d69038 --- /dev/null +++ b/fusionapps/refresh_issue_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fusion Applications Environment Management API +// +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). +// + +package fusionapps + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RefreshIssueDetails Details of refresh failure or validation failure that needs to be investigated. +type RefreshIssueDetails struct { + + // Detail reasons of refresh failure or validation failure that needs to be shown to customer. + RefreshIssues *string `mandatory:"false" json:"refreshIssues"` +} + +func (m RefreshIssueDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RefreshIssueDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fusionapps/reset_fusion_environment_password_details.go b/fusionapps/reset_fusion_environment_password_details.go index 42f93a4465..c8c085f1d2 100644 --- a/fusionapps/reset_fusion_environment_password_details.go +++ b/fusionapps/reset_fusion_environment_password_details.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/rule.go b/fusionapps/rule.go index 1d94b7f58c..4ef837826a 100644 --- a/fusionapps/rule.go +++ b/fusionapps/rule.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/rule_condition.go b/fusionapps/rule_condition.go index c11a6c8d30..b18fa0de62 100644 --- a/fusionapps/rule_condition.go +++ b/fusionapps/rule_condition.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/scheduled_activity.go b/fusionapps/scheduled_activity.go index 9d63c77f8e..ff52254a1d 100644 --- a/fusionapps/scheduled_activity.go +++ b/fusionapps/scheduled_activity.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/scheduled_activity_collection.go b/fusionapps/scheduled_activity_collection.go index 4aa3b9ed44..a5c3585141 100644 --- a/fusionapps/scheduled_activity_collection.go +++ b/fusionapps/scheduled_activity_collection.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/scheduled_activity_summary.go b/fusionapps/scheduled_activity_summary.go index fdfd4052f1..b0e72eac82 100644 --- a/fusionapps/scheduled_activity_summary.go +++ b/fusionapps/scheduled_activity_summary.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/service_attachment.go b/fusionapps/service_attachment.go index d1e00ef5cd..a516b3fa78 100644 --- a/fusionapps/service_attachment.go +++ b/fusionapps/service_attachment.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/service_attachment_collection.go b/fusionapps/service_attachment_collection.go index 361ee51883..04a8cf9ad5 100644 --- a/fusionapps/service_attachment_collection.go +++ b/fusionapps/service_attachment_collection.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/service_attachment_summary.go b/fusionapps/service_attachment_summary.go index 2587272506..8b44e37ebb 100644 --- a/fusionapps/service_attachment_summary.go +++ b/fusionapps/service_attachment_summary.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/source_ip_address_condition.go b/fusionapps/source_ip_address_condition.go index c893b13a4c..282de7c9f6 100644 --- a/fusionapps/source_ip_address_condition.go +++ b/fusionapps/source_ip_address_condition.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps @@ -23,7 +23,7 @@ type SourceIpAddressCondition struct { // The service accepts only classless inter-domain routing (CIDR) format (x.x.x.x/y or x:x::x/y) strings. // Specify 0.0.0.0/0 or ::/0 to match all incoming traffic. // example: "192.168.0.0/16" - AttributeValue *string `mandatory:"false" json:"attributeValue"` + AttributeValue *string `mandatory:"true" json:"attributeValue"` } func (m SourceIpAddressCondition) String() string { diff --git a/fusionapps/source_vcn_id_condition.go b/fusionapps/source_vcn_id_condition.go index a239887302..6262cb8330 100644 --- a/fusionapps/source_vcn_id_condition.go +++ b/fusionapps/source_vcn_id_condition.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/source_vcn_ip_address_condition.go b/fusionapps/source_vcn_ip_address_condition.go index 363ce6d5aa..3093fce5ef 100644 --- a/fusionapps/source_vcn_ip_address_condition.go +++ b/fusionapps/source_vcn_ip_address_condition.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/subscription.go b/fusionapps/subscription.go index 3cf9cbc458..f9f0f45eca 100644 --- a/fusionapps/subscription.go +++ b/fusionapps/subscription.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/subscription_detail.go b/fusionapps/subscription_detail.go index b29db3d2b2..5196f8cb8d 100644 --- a/fusionapps/subscription_detail.go +++ b/fusionapps/subscription_detail.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/subscription_sku.go b/fusionapps/subscription_sku.go index 1b1379ba74..e10237ff74 100644 --- a/fusionapps/subscription_sku.go +++ b/fusionapps/subscription_sku.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/time_available_for_refresh.go b/fusionapps/time_available_for_refresh.go index e474dce231..ea0ffb15a6 100644 --- a/fusionapps/time_available_for_refresh.go +++ b/fusionapps/time_available_for_refresh.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/time_available_for_refresh_collection.go b/fusionapps/time_available_for_refresh_collection.go index 97e37be3f1..a3de82a109 100644 --- a/fusionapps/time_available_for_refresh_collection.go +++ b/fusionapps/time_available_for_refresh_collection.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/time_available_for_refresh_summary.go b/fusionapps/time_available_for_refresh_summary.go index e3bae82d0b..667eee970f 100644 --- a/fusionapps/time_available_for_refresh_summary.go +++ b/fusionapps/time_available_for_refresh_summary.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/update_family_maintenance_policy_details.go b/fusionapps/update_family_maintenance_policy_details.go index 0687b27e00..861b80f97d 100644 --- a/fusionapps/update_family_maintenance_policy_details.go +++ b/fusionapps/update_family_maintenance_policy_details.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/update_fusion_environment_details.go b/fusionapps/update_fusion_environment_details.go index fa2707fa10..ca584ffe9b 100644 --- a/fusionapps/update_fusion_environment_details.go +++ b/fusionapps/update_fusion_environment_details.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/update_fusion_environment_family_details.go b/fusionapps/update_fusion_environment_family_details.go index 2d062a3090..a077988ce4 100644 --- a/fusionapps/update_fusion_environment_family_details.go +++ b/fusionapps/update_fusion_environment_family_details.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/update_refresh_activity_details.go b/fusionapps/update_refresh_activity_details.go new file mode 100644 index 0000000000..eefd12a1e5 --- /dev/null +++ b/fusionapps/update_refresh_activity_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Fusion Applications Environment Management API +// +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). +// + +package fusionapps + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateRefreshActivityDetails The information about scheduled refresh. +type UpdateRefreshActivityDetails struct { + + // Time the refresh activity is scheduled to start. An RFC3339 formatted datetime string. + TimeScheduledStart *common.SDKTime `mandatory:"false" json:"timeScheduledStart"` +} + +func (m UpdateRefreshActivityDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateRefreshActivityDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/fusionapps/update_refresh_activity_request_response.go b/fusionapps/update_refresh_activity_request_response.go new file mode 100644 index 0000000000..09a5bf529a --- /dev/null +++ b/fusionapps/update_refresh_activity_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package fusionapps + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateRefreshActivityRequest wrapper for the UpdateRefreshActivity operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fusionapps/UpdateRefreshActivity.go.html to see an example of how to use UpdateRefreshActivityRequest. +type UpdateRefreshActivityRequest struct { + + // unique FusionEnvironment identifier + FusionEnvironmentId *string `mandatory:"true" contributesTo:"path" name:"fusionEnvironmentId"` + + // The unique identifier (OCID) of the Refresh activity. + RefreshActivityId *string `mandatory:"true" contributesTo:"path" name:"refreshActivityId"` + + // Details for the updating scheduled RefreshActivity. + UpdateRefreshActivityDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateRefreshActivityRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateRefreshActivityRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateRefreshActivityRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateRefreshActivityRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateRefreshActivityRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateRefreshActivityResponse wrapper for the UpdateRefreshActivity operation +type UpdateRefreshActivityResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The RefreshActivity instance + RefreshActivity `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateRefreshActivityResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateRefreshActivityResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/fusionapps/upgrade_action.go b/fusionapps/upgrade_action.go index 10c94bc74b..9a01ea7198 100644 --- a/fusionapps/upgrade_action.go +++ b/fusionapps/upgrade_action.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/vertex_action.go b/fusionapps/vertex_action.go index d24b15fa63..98bb6d54c5 100644 --- a/fusionapps/vertex_action.go +++ b/fusionapps/vertex_action.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/work_request.go b/fusionapps/work_request.go index f7592a2567..0832b67c3c 100644 --- a/fusionapps/work_request.go +++ b/fusionapps/work_request.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps @@ -98,6 +98,7 @@ const ( WorkRequestOperationTypeChangeFusionEnvironmentFamilyCompartment WorkRequestOperationTypeEnum = "CHANGE_FUSION_ENVIRONMENT_FAMILY_COMPARTMENT" WorkRequestOperationTypeRefreshFusionEnvironment WorkRequestOperationTypeEnum = "REFRESH_FUSION_ENVIRONMENT" WorkRequestOperationTypeExecuteColdPatch WorkRequestOperationTypeEnum = "EXECUTE_COLD_PATCH" + WorkRequestOperationTypeDataMaskFusionEnvironment WorkRequestOperationTypeEnum = "DATA_MASK_FUSION_ENVIRONMENT" ) var mappingWorkRequestOperationTypeEnum = map[string]WorkRequestOperationTypeEnum{ @@ -121,6 +122,7 @@ var mappingWorkRequestOperationTypeEnum = map[string]WorkRequestOperationTypeEnu "CHANGE_FUSION_ENVIRONMENT_FAMILY_COMPARTMENT": WorkRequestOperationTypeChangeFusionEnvironmentFamilyCompartment, "REFRESH_FUSION_ENVIRONMENT": WorkRequestOperationTypeRefreshFusionEnvironment, "EXECUTE_COLD_PATCH": WorkRequestOperationTypeExecuteColdPatch, + "DATA_MASK_FUSION_ENVIRONMENT": WorkRequestOperationTypeDataMaskFusionEnvironment, } var mappingWorkRequestOperationTypeEnumLowerCase = map[string]WorkRequestOperationTypeEnum{ @@ -144,6 +146,7 @@ var mappingWorkRequestOperationTypeEnumLowerCase = map[string]WorkRequestOperati "change_fusion_environment_family_compartment": WorkRequestOperationTypeChangeFusionEnvironmentFamilyCompartment, "refresh_fusion_environment": WorkRequestOperationTypeRefreshFusionEnvironment, "execute_cold_patch": WorkRequestOperationTypeExecuteColdPatch, + "data_mask_fusion_environment": WorkRequestOperationTypeDataMaskFusionEnvironment, } // GetWorkRequestOperationTypeEnumValues Enumerates the set of values for WorkRequestOperationTypeEnum @@ -178,6 +181,7 @@ func GetWorkRequestOperationTypeEnumStringValues() []string { "CHANGE_FUSION_ENVIRONMENT_FAMILY_COMPARTMENT", "REFRESH_FUSION_ENVIRONMENT", "EXECUTE_COLD_PATCH", + "DATA_MASK_FUSION_ENVIRONMENT", } } diff --git a/fusionapps/work_request_error.go b/fusionapps/work_request_error.go index 7844cfa587..16666e8bbe 100644 --- a/fusionapps/work_request_error.go +++ b/fusionapps/work_request_error.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/work_request_error_collection.go b/fusionapps/work_request_error_collection.go index 50e5034233..95bc75e215 100644 --- a/fusionapps/work_request_error_collection.go +++ b/fusionapps/work_request_error_collection.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/work_request_log_entry.go b/fusionapps/work_request_log_entry.go index 84d0dffc11..4a4aa15fd0 100644 --- a/fusionapps/work_request_log_entry.go +++ b/fusionapps/work_request_log_entry.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/work_request_log_entry_collection.go b/fusionapps/work_request_log_entry_collection.go index 2573bad1e8..2baf5cb847 100644 --- a/fusionapps/work_request_log_entry_collection.go +++ b/fusionapps/work_request_log_entry_collection.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/work_request_resource.go b/fusionapps/work_request_resource.go index 52065473f2..b01cf44e07 100644 --- a/fusionapps/work_request_resource.go +++ b/fusionapps/work_request_resource.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/work_request_summary.go b/fusionapps/work_request_summary.go index 65f96745b8..2f5230f708 100644 --- a/fusionapps/work_request_summary.go +++ b/fusionapps/work_request_summary.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/fusionapps/work_request_summary_collection.go b/fusionapps/work_request_summary_collection.go index 35a0899cf4..51d89df509 100644 --- a/fusionapps/work_request_summary_collection.go +++ b/fusionapps/work_request_summary_collection.go @@ -4,7 +4,7 @@ // Fusion Applications Environment Management API // -// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/Identity/fusion-applications/home.htm). +// Use the Fusion Applications Environment Management API to manage the environments where your Fusion Applications run. For more information, see the Fusion Applications Environment Management documentation (https://docs.cloud.oracle.com/iaas/Content/fusion-applications/home.htm). // package fusionapps diff --git a/goldengate/azure_data_lake_storage_connection.go b/goldengate/azure_data_lake_storage_connection.go new file mode 100644 index 0000000000..f4b41029d8 --- /dev/null +++ b/goldengate/azure_data_lake_storage_connection.go @@ -0,0 +1,311 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AzureDataLakeStorageConnection Represents the metadata of a Azure Data Lake Storage Connection. +type AzureDataLakeStorageConnection struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the connection being + // referenced. + Id *string `mandatory:"true" json:"id"` + + // An object's Display Name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The time the resource was created. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time the resource was last updated. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // Sets the Azure storage account name. + AccountName *string `mandatory:"true" json:"accountName"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` + + // A simple key-value pair that is applied without any predefined name, type, or scope. Exists + // for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle + // Cloud Infrastructure services. Each key is predefined and scoped to namespaces. For more + // information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // Describes the object's current state in detail. For example, it can be used to provide + // actionable information for a resource in a Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer vault being + // referenced. + // If provided, this will reference a vault which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to manage secrets contained + // within this vault. + VaultId *string `mandatory:"false" json:"vaultId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer "Master" key being + // referenced. + // If provided, this will reference a key which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to utilize this key to + // manage secrets. + KeyId *string `mandatory:"false" json:"keyId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet being referenced. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // List of ingress IP addresses, from where the GoldenGate deployment connects to this connection's privateIp. + IngressIps []IngressIpDetails `mandatory:"false" json:"ingressIps"` + + // An array of Network Security Group OCIDs used to define network access for either Deployments or Connections. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // Azure tenant ID of the application. This property is required when 'authenticationType' is set to 'AZURE_ACTIVE_DIRECTORY'. + // e.g.: 14593954-d337-4a61-a364-9f758c64f97f + AzureTenantId *string `mandatory:"false" json:"azureTenantId"` + + // Azure client ID of the application. This property is required when 'authenticationType' is set to 'AZURE_ACTIVE_DIRECTORY'. + // e.g.: 06ecaabf-8b80-4ec8-a0ec-20cbf463703d + ClientId *string `mandatory:"false" json:"clientId"` + + // Azure Storage service endpoint. + // e.g: https://test.blob.core.windows.net + Endpoint *string `mandatory:"false" json:"endpoint"` + + // The Azure Data Lake Storage technology type. + TechnologyType AzureDataLakeStorageConnectionTechnologyTypeEnum `mandatory:"true" json:"technologyType"` + + // Used authentication mechanism to access Azure Data Lake Storage. + AuthenticationType AzureDataLakeStorageConnectionAuthenticationTypeEnum `mandatory:"true" json:"authenticationType"` + + // Possible lifecycle states for connection. + LifecycleState ConnectionLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +//GetId returns Id +func (m AzureDataLakeStorageConnection) GetId() *string { + return m.Id +} + +//GetDisplayName returns DisplayName +func (m AzureDataLakeStorageConnection) GetDisplayName() *string { + return m.DisplayName +} + +//GetDescription returns Description +func (m AzureDataLakeStorageConnection) GetDescription() *string { + return m.Description +} + +//GetCompartmentId returns CompartmentId +func (m AzureDataLakeStorageConnection) GetCompartmentId() *string { + return m.CompartmentId +} + +//GetFreeformTags returns FreeformTags +func (m AzureDataLakeStorageConnection) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetDefinedTags returns DefinedTags +func (m AzureDataLakeStorageConnection) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +//GetSystemTags returns SystemTags +func (m AzureDataLakeStorageConnection) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +//GetLifecycleState returns LifecycleState +func (m AzureDataLakeStorageConnection) GetLifecycleState() ConnectionLifecycleStateEnum { + return m.LifecycleState +} + +//GetLifecycleDetails returns LifecycleDetails +func (m AzureDataLakeStorageConnection) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +//GetTimeCreated returns TimeCreated +func (m AzureDataLakeStorageConnection) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +//GetTimeUpdated returns TimeUpdated +func (m AzureDataLakeStorageConnection) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +//GetVaultId returns VaultId +func (m AzureDataLakeStorageConnection) GetVaultId() *string { + return m.VaultId +} + +//GetKeyId returns KeyId +func (m AzureDataLakeStorageConnection) GetKeyId() *string { + return m.KeyId +} + +//GetSubnetId returns SubnetId +func (m AzureDataLakeStorageConnection) GetSubnetId() *string { + return m.SubnetId +} + +//GetIngressIps returns IngressIps +func (m AzureDataLakeStorageConnection) GetIngressIps() []IngressIpDetails { + return m.IngressIps +} + +//GetNsgIds returns NsgIds +func (m AzureDataLakeStorageConnection) GetNsgIds() []string { + return m.NsgIds +} + +func (m AzureDataLakeStorageConnection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AzureDataLakeStorageConnection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAzureDataLakeStorageConnectionTechnologyTypeEnum(string(m.TechnologyType)); !ok && m.TechnologyType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TechnologyType: %s. Supported values are: %s.", m.TechnologyType, strings.Join(GetAzureDataLakeStorageConnectionTechnologyTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingAzureDataLakeStorageConnectionAuthenticationTypeEnum(string(m.AuthenticationType)); !ok && m.AuthenticationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AuthenticationType: %s. Supported values are: %s.", m.AuthenticationType, strings.Join(GetAzureDataLakeStorageConnectionAuthenticationTypeEnumStringValues(), ","))) + } + + if _, ok := GetMappingConnectionLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetConnectionLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AzureDataLakeStorageConnection) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAzureDataLakeStorageConnection AzureDataLakeStorageConnection + s := struct { + DiscriminatorParam string `json:"connectionType"` + MarshalTypeAzureDataLakeStorageConnection + }{ + "AZURE_DATA_LAKE_STORAGE", + (MarshalTypeAzureDataLakeStorageConnection)(m), + } + + return json.Marshal(&s) +} + +// AzureDataLakeStorageConnectionTechnologyTypeEnum Enum with underlying type: string +type AzureDataLakeStorageConnectionTechnologyTypeEnum string + +// Set of constants representing the allowable values for AzureDataLakeStorageConnectionTechnologyTypeEnum +const ( + AzureDataLakeStorageConnectionTechnologyTypeAzureDataLakeStorage AzureDataLakeStorageConnectionTechnologyTypeEnum = "AZURE_DATA_LAKE_STORAGE" +) + +var mappingAzureDataLakeStorageConnectionTechnologyTypeEnum = map[string]AzureDataLakeStorageConnectionTechnologyTypeEnum{ + "AZURE_DATA_LAKE_STORAGE": AzureDataLakeStorageConnectionTechnologyTypeAzureDataLakeStorage, +} + +var mappingAzureDataLakeStorageConnectionTechnologyTypeEnumLowerCase = map[string]AzureDataLakeStorageConnectionTechnologyTypeEnum{ + "azure_data_lake_storage": AzureDataLakeStorageConnectionTechnologyTypeAzureDataLakeStorage, +} + +// GetAzureDataLakeStorageConnectionTechnologyTypeEnumValues Enumerates the set of values for AzureDataLakeStorageConnectionTechnologyTypeEnum +func GetAzureDataLakeStorageConnectionTechnologyTypeEnumValues() []AzureDataLakeStorageConnectionTechnologyTypeEnum { + values := make([]AzureDataLakeStorageConnectionTechnologyTypeEnum, 0) + for _, v := range mappingAzureDataLakeStorageConnectionTechnologyTypeEnum { + values = append(values, v) + } + return values +} + +// GetAzureDataLakeStorageConnectionTechnologyTypeEnumStringValues Enumerates the set of values in String for AzureDataLakeStorageConnectionTechnologyTypeEnum +func GetAzureDataLakeStorageConnectionTechnologyTypeEnumStringValues() []string { + return []string{ + "AZURE_DATA_LAKE_STORAGE", + } +} + +// GetMappingAzureDataLakeStorageConnectionTechnologyTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAzureDataLakeStorageConnectionTechnologyTypeEnum(val string) (AzureDataLakeStorageConnectionTechnologyTypeEnum, bool) { + enum, ok := mappingAzureDataLakeStorageConnectionTechnologyTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// AzureDataLakeStorageConnectionAuthenticationTypeEnum Enum with underlying type: string +type AzureDataLakeStorageConnectionAuthenticationTypeEnum string + +// Set of constants representing the allowable values for AzureDataLakeStorageConnectionAuthenticationTypeEnum +const ( + AzureDataLakeStorageConnectionAuthenticationTypeSharedKey AzureDataLakeStorageConnectionAuthenticationTypeEnum = "SHARED_KEY" + AzureDataLakeStorageConnectionAuthenticationTypeSharedAccessSignature AzureDataLakeStorageConnectionAuthenticationTypeEnum = "SHARED_ACCESS_SIGNATURE" + AzureDataLakeStorageConnectionAuthenticationTypeAzureActiveDirectory AzureDataLakeStorageConnectionAuthenticationTypeEnum = "AZURE_ACTIVE_DIRECTORY" +) + +var mappingAzureDataLakeStorageConnectionAuthenticationTypeEnum = map[string]AzureDataLakeStorageConnectionAuthenticationTypeEnum{ + "SHARED_KEY": AzureDataLakeStorageConnectionAuthenticationTypeSharedKey, + "SHARED_ACCESS_SIGNATURE": AzureDataLakeStorageConnectionAuthenticationTypeSharedAccessSignature, + "AZURE_ACTIVE_DIRECTORY": AzureDataLakeStorageConnectionAuthenticationTypeAzureActiveDirectory, +} + +var mappingAzureDataLakeStorageConnectionAuthenticationTypeEnumLowerCase = map[string]AzureDataLakeStorageConnectionAuthenticationTypeEnum{ + "shared_key": AzureDataLakeStorageConnectionAuthenticationTypeSharedKey, + "shared_access_signature": AzureDataLakeStorageConnectionAuthenticationTypeSharedAccessSignature, + "azure_active_directory": AzureDataLakeStorageConnectionAuthenticationTypeAzureActiveDirectory, +} + +// GetAzureDataLakeStorageConnectionAuthenticationTypeEnumValues Enumerates the set of values for AzureDataLakeStorageConnectionAuthenticationTypeEnum +func GetAzureDataLakeStorageConnectionAuthenticationTypeEnumValues() []AzureDataLakeStorageConnectionAuthenticationTypeEnum { + values := make([]AzureDataLakeStorageConnectionAuthenticationTypeEnum, 0) + for _, v := range mappingAzureDataLakeStorageConnectionAuthenticationTypeEnum { + values = append(values, v) + } + return values +} + +// GetAzureDataLakeStorageConnectionAuthenticationTypeEnumStringValues Enumerates the set of values in String for AzureDataLakeStorageConnectionAuthenticationTypeEnum +func GetAzureDataLakeStorageConnectionAuthenticationTypeEnumStringValues() []string { + return []string{ + "SHARED_KEY", + "SHARED_ACCESS_SIGNATURE", + "AZURE_ACTIVE_DIRECTORY", + } +} + +// GetMappingAzureDataLakeStorageConnectionAuthenticationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAzureDataLakeStorageConnectionAuthenticationTypeEnum(val string) (AzureDataLakeStorageConnectionAuthenticationTypeEnum, bool) { + enum, ok := mappingAzureDataLakeStorageConnectionAuthenticationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/azure_data_lake_storage_connection_summary.go b/goldengate/azure_data_lake_storage_connection_summary.go new file mode 100644 index 0000000000..207dba29d7 --- /dev/null +++ b/goldengate/azure_data_lake_storage_connection_summary.go @@ -0,0 +1,227 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AzureDataLakeStorageConnectionSummary Summary of the Azure Data Lake Storage Connection. +type AzureDataLakeStorageConnectionSummary struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the connection being + // referenced. + Id *string `mandatory:"true" json:"id"` + + // An object's Display Name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The time the resource was created. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time the resource was last updated. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // Sets the Azure storage account name. + AccountName *string `mandatory:"true" json:"accountName"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` + + // A simple key-value pair that is applied without any predefined name, type, or scope. Exists + // for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle + // Cloud Infrastructure services. Each key is predefined and scoped to namespaces. For more + // information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // Describes the object's current state in detail. For example, it can be used to provide + // actionable information for a resource in a Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer vault being + // referenced. + // If provided, this will reference a vault which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to manage secrets contained + // within this vault. + VaultId *string `mandatory:"false" json:"vaultId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer "Master" key being + // referenced. + // If provided, this will reference a key which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to utilize this key to + // manage secrets. + KeyId *string `mandatory:"false" json:"keyId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet being referenced. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // List of ingress IP addresses, from where the GoldenGate deployment connects to this connection's privateIp. + IngressIps []IngressIpDetails `mandatory:"false" json:"ingressIps"` + + // An array of Network Security Group OCIDs used to define network access for either Deployments or Connections. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // Azure tenant ID of the application. This property is required when 'authenticationType' is set to 'AZURE_ACTIVE_DIRECTORY'. + // e.g.: 14593954-d337-4a61-a364-9f758c64f97f + AzureTenantId *string `mandatory:"false" json:"azureTenantId"` + + // Azure client ID of the application. This property is required when 'authenticationType' is set to 'AZURE_ACTIVE_DIRECTORY'. + // e.g.: 06ecaabf-8b80-4ec8-a0ec-20cbf463703d + ClientId *string `mandatory:"false" json:"clientId"` + + // Azure Storage service endpoint. + // e.g: https://test.blob.core.windows.net + Endpoint *string `mandatory:"false" json:"endpoint"` + + // Possible lifecycle states for connection. + LifecycleState ConnectionLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The Azure Data Lake Storage technology type. + TechnologyType AzureDataLakeStorageConnectionTechnologyTypeEnum `mandatory:"true" json:"technologyType"` + + // Used authentication mechanism to access Azure Data Lake Storage. + AuthenticationType AzureDataLakeStorageConnectionAuthenticationTypeEnum `mandatory:"true" json:"authenticationType"` +} + +//GetId returns Id +func (m AzureDataLakeStorageConnectionSummary) GetId() *string { + return m.Id +} + +//GetDisplayName returns DisplayName +func (m AzureDataLakeStorageConnectionSummary) GetDisplayName() *string { + return m.DisplayName +} + +//GetDescription returns Description +func (m AzureDataLakeStorageConnectionSummary) GetDescription() *string { + return m.Description +} + +//GetCompartmentId returns CompartmentId +func (m AzureDataLakeStorageConnectionSummary) GetCompartmentId() *string { + return m.CompartmentId +} + +//GetFreeformTags returns FreeformTags +func (m AzureDataLakeStorageConnectionSummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetDefinedTags returns DefinedTags +func (m AzureDataLakeStorageConnectionSummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +//GetSystemTags returns SystemTags +func (m AzureDataLakeStorageConnectionSummary) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +//GetLifecycleState returns LifecycleState +func (m AzureDataLakeStorageConnectionSummary) GetLifecycleState() ConnectionLifecycleStateEnum { + return m.LifecycleState +} + +//GetLifecycleDetails returns LifecycleDetails +func (m AzureDataLakeStorageConnectionSummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +//GetTimeCreated returns TimeCreated +func (m AzureDataLakeStorageConnectionSummary) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +//GetTimeUpdated returns TimeUpdated +func (m AzureDataLakeStorageConnectionSummary) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +//GetVaultId returns VaultId +func (m AzureDataLakeStorageConnectionSummary) GetVaultId() *string { + return m.VaultId +} + +//GetKeyId returns KeyId +func (m AzureDataLakeStorageConnectionSummary) GetKeyId() *string { + return m.KeyId +} + +//GetSubnetId returns SubnetId +func (m AzureDataLakeStorageConnectionSummary) GetSubnetId() *string { + return m.SubnetId +} + +//GetIngressIps returns IngressIps +func (m AzureDataLakeStorageConnectionSummary) GetIngressIps() []IngressIpDetails { + return m.IngressIps +} + +//GetNsgIds returns NsgIds +func (m AzureDataLakeStorageConnectionSummary) GetNsgIds() []string { + return m.NsgIds +} + +func (m AzureDataLakeStorageConnectionSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AzureDataLakeStorageConnectionSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingConnectionLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetConnectionLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingAzureDataLakeStorageConnectionTechnologyTypeEnum(string(m.TechnologyType)); !ok && m.TechnologyType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TechnologyType: %s. Supported values are: %s.", m.TechnologyType, strings.Join(GetAzureDataLakeStorageConnectionTechnologyTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingAzureDataLakeStorageConnectionAuthenticationTypeEnum(string(m.AuthenticationType)); !ok && m.AuthenticationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AuthenticationType: %s. Supported values are: %s.", m.AuthenticationType, strings.Join(GetAzureDataLakeStorageConnectionAuthenticationTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AzureDataLakeStorageConnectionSummary) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAzureDataLakeStorageConnectionSummary AzureDataLakeStorageConnectionSummary + s := struct { + DiscriminatorParam string `json:"connectionType"` + MarshalTypeAzureDataLakeStorageConnectionSummary + }{ + "AZURE_DATA_LAKE_STORAGE", + (MarshalTypeAzureDataLakeStorageConnectionSummary)(m), + } + + return json.Marshal(&s) +} diff --git a/goldengate/azure_synapse_connection.go b/goldengate/azure_synapse_connection.go new file mode 100644 index 0000000000..d3899bcf40 --- /dev/null +++ b/goldengate/azure_synapse_connection.go @@ -0,0 +1,253 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AzureSynapseConnection Represents the metadata of a Azure Synapse Analytics Connection. +type AzureSynapseConnection struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the connection being + // referenced. + Id *string `mandatory:"true" json:"id"` + + // An object's Display Name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The time the resource was created. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time the resource was last updated. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // JDBC connection string. + // e.g.: 'jdbc:sqlserver://.sql.azuresynapse.net:1433;database=;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.sql.azuresynapse.net;loginTimeout=300;' + ConnectionString *string `mandatory:"true" json:"connectionString"` + + // The username Oracle GoldenGate uses to connect the associated RDBMS. This username must + // already exist and be available for use by the database. It must conform to the security + // requirements implemented by the database including length, case sensitivity, and so on. + Username *string `mandatory:"true" json:"username"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` + + // A simple key-value pair that is applied without any predefined name, type, or scope. Exists + // for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle + // Cloud Infrastructure services. Each key is predefined and scoped to namespaces. For more + // information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // Describes the object's current state in detail. For example, it can be used to provide + // actionable information for a resource in a Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer vault being + // referenced. + // If provided, this will reference a vault which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to manage secrets contained + // within this vault. + VaultId *string `mandatory:"false" json:"vaultId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer "Master" key being + // referenced. + // If provided, this will reference a key which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to utilize this key to + // manage secrets. + KeyId *string `mandatory:"false" json:"keyId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet being referenced. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // List of ingress IP addresses, from where the GoldenGate deployment connects to this connection's privateIp. + IngressIps []IngressIpDetails `mandatory:"false" json:"ingressIps"` + + // An array of Network Security Group OCIDs used to define network access for either Deployments or Connections. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // The Azure Synapse Analytics technology type. + TechnologyType AzureSynapseConnectionTechnologyTypeEnum `mandatory:"true" json:"technologyType"` + + // Possible lifecycle states for connection. + LifecycleState ConnectionLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +//GetId returns Id +func (m AzureSynapseConnection) GetId() *string { + return m.Id +} + +//GetDisplayName returns DisplayName +func (m AzureSynapseConnection) GetDisplayName() *string { + return m.DisplayName +} + +//GetDescription returns Description +func (m AzureSynapseConnection) GetDescription() *string { + return m.Description +} + +//GetCompartmentId returns CompartmentId +func (m AzureSynapseConnection) GetCompartmentId() *string { + return m.CompartmentId +} + +//GetFreeformTags returns FreeformTags +func (m AzureSynapseConnection) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetDefinedTags returns DefinedTags +func (m AzureSynapseConnection) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +//GetSystemTags returns SystemTags +func (m AzureSynapseConnection) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +//GetLifecycleState returns LifecycleState +func (m AzureSynapseConnection) GetLifecycleState() ConnectionLifecycleStateEnum { + return m.LifecycleState +} + +//GetLifecycleDetails returns LifecycleDetails +func (m AzureSynapseConnection) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +//GetTimeCreated returns TimeCreated +func (m AzureSynapseConnection) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +//GetTimeUpdated returns TimeUpdated +func (m AzureSynapseConnection) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +//GetVaultId returns VaultId +func (m AzureSynapseConnection) GetVaultId() *string { + return m.VaultId +} + +//GetKeyId returns KeyId +func (m AzureSynapseConnection) GetKeyId() *string { + return m.KeyId +} + +//GetSubnetId returns SubnetId +func (m AzureSynapseConnection) GetSubnetId() *string { + return m.SubnetId +} + +//GetIngressIps returns IngressIps +func (m AzureSynapseConnection) GetIngressIps() []IngressIpDetails { + return m.IngressIps +} + +//GetNsgIds returns NsgIds +func (m AzureSynapseConnection) GetNsgIds() []string { + return m.NsgIds +} + +func (m AzureSynapseConnection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AzureSynapseConnection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAzureSynapseConnectionTechnologyTypeEnum(string(m.TechnologyType)); !ok && m.TechnologyType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TechnologyType: %s. Supported values are: %s.", m.TechnologyType, strings.Join(GetAzureSynapseConnectionTechnologyTypeEnumStringValues(), ","))) + } + + if _, ok := GetMappingConnectionLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetConnectionLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AzureSynapseConnection) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAzureSynapseConnection AzureSynapseConnection + s := struct { + DiscriminatorParam string `json:"connectionType"` + MarshalTypeAzureSynapseConnection + }{ + "AZURE_SYNAPSE_ANALYTICS", + (MarshalTypeAzureSynapseConnection)(m), + } + + return json.Marshal(&s) +} + +// AzureSynapseConnectionTechnologyTypeEnum Enum with underlying type: string +type AzureSynapseConnectionTechnologyTypeEnum string + +// Set of constants representing the allowable values for AzureSynapseConnectionTechnologyTypeEnum +const ( + AzureSynapseConnectionTechnologyTypeAzureSynapseAnalytics AzureSynapseConnectionTechnologyTypeEnum = "AZURE_SYNAPSE_ANALYTICS" +) + +var mappingAzureSynapseConnectionTechnologyTypeEnum = map[string]AzureSynapseConnectionTechnologyTypeEnum{ + "AZURE_SYNAPSE_ANALYTICS": AzureSynapseConnectionTechnologyTypeAzureSynapseAnalytics, +} + +var mappingAzureSynapseConnectionTechnologyTypeEnumLowerCase = map[string]AzureSynapseConnectionTechnologyTypeEnum{ + "azure_synapse_analytics": AzureSynapseConnectionTechnologyTypeAzureSynapseAnalytics, +} + +// GetAzureSynapseConnectionTechnologyTypeEnumValues Enumerates the set of values for AzureSynapseConnectionTechnologyTypeEnum +func GetAzureSynapseConnectionTechnologyTypeEnumValues() []AzureSynapseConnectionTechnologyTypeEnum { + values := make([]AzureSynapseConnectionTechnologyTypeEnum, 0) + for _, v := range mappingAzureSynapseConnectionTechnologyTypeEnum { + values = append(values, v) + } + return values +} + +// GetAzureSynapseConnectionTechnologyTypeEnumStringValues Enumerates the set of values in String for AzureSynapseConnectionTechnologyTypeEnum +func GetAzureSynapseConnectionTechnologyTypeEnumStringValues() []string { + return []string{ + "AZURE_SYNAPSE_ANALYTICS", + } +} + +// GetMappingAzureSynapseConnectionTechnologyTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAzureSynapseConnectionTechnologyTypeEnum(val string) (AzureSynapseConnectionTechnologyTypeEnum, bool) { + enum, ok := mappingAzureSynapseConnectionTechnologyTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/azure_synapse_connection_summary.go b/goldengate/azure_synapse_connection_summary.go new file mode 100644 index 0000000000..9c4dc9ae65 --- /dev/null +++ b/goldengate/azure_synapse_connection_summary.go @@ -0,0 +1,215 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AzureSynapseConnectionSummary Summary of the Azure Synapse Analytics Connection. +type AzureSynapseConnectionSummary struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the connection being + // referenced. + Id *string `mandatory:"true" json:"id"` + + // An object's Display Name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The time the resource was created. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time the resource was last updated. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // JDBC connection string. + // e.g.: 'jdbc:sqlserver://.sql.azuresynapse.net:1433;database=;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.sql.azuresynapse.net;loginTimeout=300;' + ConnectionString *string `mandatory:"true" json:"connectionString"` + + // The username Oracle GoldenGate uses to connect the associated RDBMS. This username must + // already exist and be available for use by the database. It must conform to the security + // requirements implemented by the database including length, case sensitivity, and so on. + Username *string `mandatory:"true" json:"username"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` + + // A simple key-value pair that is applied without any predefined name, type, or scope. Exists + // for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle + // Cloud Infrastructure services. Each key is predefined and scoped to namespaces. For more + // information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // Describes the object's current state in detail. For example, it can be used to provide + // actionable information for a resource in a Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer vault being + // referenced. + // If provided, this will reference a vault which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to manage secrets contained + // within this vault. + VaultId *string `mandatory:"false" json:"vaultId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer "Master" key being + // referenced. + // If provided, this will reference a key which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to utilize this key to + // manage secrets. + KeyId *string `mandatory:"false" json:"keyId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet being referenced. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // List of ingress IP addresses, from where the GoldenGate deployment connects to this connection's privateIp. + IngressIps []IngressIpDetails `mandatory:"false" json:"ingressIps"` + + // An array of Network Security Group OCIDs used to define network access for either Deployments or Connections. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // Possible lifecycle states for connection. + LifecycleState ConnectionLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The Azure Synapse Analytics technology type. + TechnologyType AzureSynapseConnectionTechnologyTypeEnum `mandatory:"true" json:"technologyType"` +} + +//GetId returns Id +func (m AzureSynapseConnectionSummary) GetId() *string { + return m.Id +} + +//GetDisplayName returns DisplayName +func (m AzureSynapseConnectionSummary) GetDisplayName() *string { + return m.DisplayName +} + +//GetDescription returns Description +func (m AzureSynapseConnectionSummary) GetDescription() *string { + return m.Description +} + +//GetCompartmentId returns CompartmentId +func (m AzureSynapseConnectionSummary) GetCompartmentId() *string { + return m.CompartmentId +} + +//GetFreeformTags returns FreeformTags +func (m AzureSynapseConnectionSummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetDefinedTags returns DefinedTags +func (m AzureSynapseConnectionSummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +//GetSystemTags returns SystemTags +func (m AzureSynapseConnectionSummary) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +//GetLifecycleState returns LifecycleState +func (m AzureSynapseConnectionSummary) GetLifecycleState() ConnectionLifecycleStateEnum { + return m.LifecycleState +} + +//GetLifecycleDetails returns LifecycleDetails +func (m AzureSynapseConnectionSummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +//GetTimeCreated returns TimeCreated +func (m AzureSynapseConnectionSummary) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +//GetTimeUpdated returns TimeUpdated +func (m AzureSynapseConnectionSummary) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +//GetVaultId returns VaultId +func (m AzureSynapseConnectionSummary) GetVaultId() *string { + return m.VaultId +} + +//GetKeyId returns KeyId +func (m AzureSynapseConnectionSummary) GetKeyId() *string { + return m.KeyId +} + +//GetSubnetId returns SubnetId +func (m AzureSynapseConnectionSummary) GetSubnetId() *string { + return m.SubnetId +} + +//GetIngressIps returns IngressIps +func (m AzureSynapseConnectionSummary) GetIngressIps() []IngressIpDetails { + return m.IngressIps +} + +//GetNsgIds returns NsgIds +func (m AzureSynapseConnectionSummary) GetNsgIds() []string { + return m.NsgIds +} + +func (m AzureSynapseConnectionSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AzureSynapseConnectionSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingConnectionLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetConnectionLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingAzureSynapseConnectionTechnologyTypeEnum(string(m.TechnologyType)); !ok && m.TechnologyType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TechnologyType: %s. Supported values are: %s.", m.TechnologyType, strings.Join(GetAzureSynapseConnectionTechnologyTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AzureSynapseConnectionSummary) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAzureSynapseConnectionSummary AzureSynapseConnectionSummary + s := struct { + DiscriminatorParam string `json:"connectionType"` + MarshalTypeAzureSynapseConnectionSummary + }{ + "AZURE_SYNAPSE_ANALYTICS", + (MarshalTypeAzureSynapseConnectionSummary)(m), + } + + return json.Marshal(&s) +} diff --git a/goldengate/connection.go b/goldengate/connection.go index 38372c0e9b..a2454dd957 100644 --- a/goldengate/connection.go +++ b/goldengate/connection.go @@ -152,10 +152,18 @@ func (m *connection) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) mm := KafkaConnection{} err = json.Unmarshal(data, &mm) return mm, err + case "POSTGRESQL": + mm := PostgresqlConnection{} + err = json.Unmarshal(data, &mm) + return mm, err case "OCI_OBJECT_STORAGE": mm := OciObjectStorageConnection{} err = json.Unmarshal(data, &mm) return mm, err + case "KAFKA_SCHEMA_REGISTRY": + mm := KafkaSchemaRegistryConnection{} + err = json.Unmarshal(data, &mm) + return mm, err case "GOLDENGATE": mm := GoldenGateConnection{} err = json.Unmarshal(data, &mm) @@ -168,6 +176,14 @@ func (m *connection) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) mm := OracleConnection{} err = json.Unmarshal(data, &mm) return mm, err + case "AZURE_DATA_LAKE_STORAGE": + mm := AzureDataLakeStorageConnection{} + err = json.Unmarshal(data, &mm) + return mm, err + case "AZURE_SYNAPSE_ANALYTICS": + mm := AzureSynapseConnection{} + err = json.Unmarshal(data, &mm) + return mm, err default: return *m, nil } diff --git a/goldengate/connection_summary.go b/goldengate/connection_summary.go index 78bed3a72f..680960b220 100644 --- a/goldengate/connection_summary.go +++ b/goldengate/connection_summary.go @@ -152,6 +152,14 @@ func (m *connectionsummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, mm := GoldenGateConnectionSummary{} err = json.Unmarshal(data, &mm) return mm, err + case "KAFKA_SCHEMA_REGISTRY": + mm := KafkaSchemaRegistryConnectionSummary{} + err = json.Unmarshal(data, &mm) + return mm, err + case "POSTGRESQL": + mm := PostgresqlConnectionSummary{} + err = json.Unmarshal(data, &mm) + return mm, err case "ORACLE": mm := OracleConnectionSummary{} err = json.Unmarshal(data, &mm) @@ -168,6 +176,14 @@ func (m *connectionsummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, mm := OciObjectStorageConnectionSummary{} err = json.Unmarshal(data, &mm) return mm, err + case "AZURE_DATA_LAKE_STORAGE": + mm := AzureDataLakeStorageConnectionSummary{} + err = json.Unmarshal(data, &mm) + return mm, err + case "AZURE_SYNAPSE_ANALYTICS": + mm := AzureSynapseConnectionSummary{} + err = json.Unmarshal(data, &mm) + return mm, err default: return *m, nil } diff --git a/goldengate/connection_type.go b/goldengate/connection_type.go index 8d5cd76a33..287029cff0 100644 --- a/goldengate/connection_type.go +++ b/goldengate/connection_type.go @@ -18,27 +18,39 @@ type ConnectionTypeEnum string // Set of constants representing the allowable values for ConnectionTypeEnum const ( - ConnectionTypeGoldengate ConnectionTypeEnum = "GOLDENGATE" - ConnectionTypeKafka ConnectionTypeEnum = "KAFKA" - ConnectionTypeMysql ConnectionTypeEnum = "MYSQL" - ConnectionTypeOciObjectStorage ConnectionTypeEnum = "OCI_OBJECT_STORAGE" - ConnectionTypeOracle ConnectionTypeEnum = "ORACLE" + ConnectionTypeGoldengate ConnectionTypeEnum = "GOLDENGATE" + ConnectionTypeKafka ConnectionTypeEnum = "KAFKA" + ConnectionTypeKafkaSchemaRegistry ConnectionTypeEnum = "KAFKA_SCHEMA_REGISTRY" + ConnectionTypeMysql ConnectionTypeEnum = "MYSQL" + ConnectionTypeOciObjectStorage ConnectionTypeEnum = "OCI_OBJECT_STORAGE" + ConnectionTypeOracle ConnectionTypeEnum = "ORACLE" + ConnectionTypeAzureDataLakeStorage ConnectionTypeEnum = "AZURE_DATA_LAKE_STORAGE" + ConnectionTypePostgresql ConnectionTypeEnum = "POSTGRESQL" + ConnectionTypeAzureSynapseAnalytics ConnectionTypeEnum = "AZURE_SYNAPSE_ANALYTICS" ) var mappingConnectionTypeEnum = map[string]ConnectionTypeEnum{ - "GOLDENGATE": ConnectionTypeGoldengate, - "KAFKA": ConnectionTypeKafka, - "MYSQL": ConnectionTypeMysql, - "OCI_OBJECT_STORAGE": ConnectionTypeOciObjectStorage, - "ORACLE": ConnectionTypeOracle, + "GOLDENGATE": ConnectionTypeGoldengate, + "KAFKA": ConnectionTypeKafka, + "KAFKA_SCHEMA_REGISTRY": ConnectionTypeKafkaSchemaRegistry, + "MYSQL": ConnectionTypeMysql, + "OCI_OBJECT_STORAGE": ConnectionTypeOciObjectStorage, + "ORACLE": ConnectionTypeOracle, + "AZURE_DATA_LAKE_STORAGE": ConnectionTypeAzureDataLakeStorage, + "POSTGRESQL": ConnectionTypePostgresql, + "AZURE_SYNAPSE_ANALYTICS": ConnectionTypeAzureSynapseAnalytics, } var mappingConnectionTypeEnumLowerCase = map[string]ConnectionTypeEnum{ - "goldengate": ConnectionTypeGoldengate, - "kafka": ConnectionTypeKafka, - "mysql": ConnectionTypeMysql, - "oci_object_storage": ConnectionTypeOciObjectStorage, - "oracle": ConnectionTypeOracle, + "goldengate": ConnectionTypeGoldengate, + "kafka": ConnectionTypeKafka, + "kafka_schema_registry": ConnectionTypeKafkaSchemaRegistry, + "mysql": ConnectionTypeMysql, + "oci_object_storage": ConnectionTypeOciObjectStorage, + "oracle": ConnectionTypeOracle, + "azure_data_lake_storage": ConnectionTypeAzureDataLakeStorage, + "postgresql": ConnectionTypePostgresql, + "azure_synapse_analytics": ConnectionTypeAzureSynapseAnalytics, } // GetConnectionTypeEnumValues Enumerates the set of values for ConnectionTypeEnum @@ -55,9 +67,13 @@ func GetConnectionTypeEnumStringValues() []string { return []string{ "GOLDENGATE", "KAFKA", + "KAFKA_SCHEMA_REGISTRY", "MYSQL", "OCI_OBJECT_STORAGE", "ORACLE", + "AZURE_DATA_LAKE_STORAGE", + "POSTGRESQL", + "AZURE_SYNAPSE_ANALYTICS", } } diff --git a/goldengate/create_azure_data_lake_storage_connection_details.go b/goldengate/create_azure_data_lake_storage_connection_details.go new file mode 100644 index 0000000000..33c6a29461 --- /dev/null +++ b/goldengate/create_azure_data_lake_storage_connection_details.go @@ -0,0 +1,174 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateAzureDataLakeStorageConnectionDetails The information about a new Azure Data Lake Storage Connection. +type CreateAzureDataLakeStorageConnectionDetails struct { + + // An object's Display Name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Sets the Azure storage account name. + AccountName *string `mandatory:"true" json:"accountName"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` + + // A simple key-value pair that is applied without any predefined name, type, or scope. Exists + // for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer vault being + // referenced. + // If provided, this will reference a vault which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to manage secrets contained + // within this vault. + VaultId *string `mandatory:"false" json:"vaultId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer "Master" key being + // referenced. + // If provided, this will reference a key which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to utilize this key to + // manage secrets. + KeyId *string `mandatory:"false" json:"keyId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet being referenced. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // An array of Network Security Group OCIDs used to define network access for either Deployments or Connections. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // Azure storage account key. This property is required when 'authenticationType' is set to 'SHARED_KEY'. + // e.g.: pa3WbhVATzj56xD4DH1VjOUhApRGEGHvOo58eQJVWIzX+j8j4CUVFcTjpIqDSRaSa1Wo2LbWY5at+AStEgLOIQ== + AccountKey *string `mandatory:"false" json:"accountKey"` + + // Credential that uses a shared access signature (SAS) to authenticate to an Azure Service. This property is + // required when 'authenticationType' is set to 'SHARED_ACCESS_SIGNATURE'. + // e.g.: ?sv=2020-06-08&ss=bfqt&srt=sco&sp=rwdlacupyx&se=2020-09-10T20:27:28Z&st=2022-08-05T12:27:28Z&spr=https&sig=C1IgHsiLBmTSStYkXXGLTP8it0xBrArcgCqOsZbXwIQ%3D + SasToken *string `mandatory:"false" json:"sasToken"` + + // Azure tenant ID of the application. This property is required when 'authenticationType' is set to 'AZURE_ACTIVE_DIRECTORY'. + // e.g.: 14593954-d337-4a61-a364-9f758c64f97f + AzureTenantId *string `mandatory:"false" json:"azureTenantId"` + + // Azure client ID of the application. This property is required when 'authenticationType' is set to 'AZURE_ACTIVE_DIRECTORY'. + // e.g.: 06ecaabf-8b80-4ec8-a0ec-20cbf463703d + ClientId *string `mandatory:"false" json:"clientId"` + + // Azure client secret (aka application password) for authentication. This property is required when 'authenticationType' is set to 'AZURE_ACTIVE_DIRECTORY'. + // e.g.: dO29Q~F5-VwnA.lZdd11xFF_t5NAXCaGwDl9NbT1 + ClientSecret *string `mandatory:"false" json:"clientSecret"` + + // Azure Storage service endpoint. + // e.g: https://test.blob.core.windows.net + Endpoint *string `mandatory:"false" json:"endpoint"` + + // The Azure Data Lake Storage technology type. + TechnologyType AzureDataLakeStorageConnectionTechnologyTypeEnum `mandatory:"true" json:"technologyType"` + + // Used authentication mechanism to access Azure Data Lake Storage. + AuthenticationType AzureDataLakeStorageConnectionAuthenticationTypeEnum `mandatory:"true" json:"authenticationType"` +} + +//GetDisplayName returns DisplayName +func (m CreateAzureDataLakeStorageConnectionDetails) GetDisplayName() *string { + return m.DisplayName +} + +//GetDescription returns Description +func (m CreateAzureDataLakeStorageConnectionDetails) GetDescription() *string { + return m.Description +} + +//GetCompartmentId returns CompartmentId +func (m CreateAzureDataLakeStorageConnectionDetails) GetCompartmentId() *string { + return m.CompartmentId +} + +//GetFreeformTags returns FreeformTags +func (m CreateAzureDataLakeStorageConnectionDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetDefinedTags returns DefinedTags +func (m CreateAzureDataLakeStorageConnectionDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +//GetVaultId returns VaultId +func (m CreateAzureDataLakeStorageConnectionDetails) GetVaultId() *string { + return m.VaultId +} + +//GetKeyId returns KeyId +func (m CreateAzureDataLakeStorageConnectionDetails) GetKeyId() *string { + return m.KeyId +} + +//GetSubnetId returns SubnetId +func (m CreateAzureDataLakeStorageConnectionDetails) GetSubnetId() *string { + return m.SubnetId +} + +//GetNsgIds returns NsgIds +func (m CreateAzureDataLakeStorageConnectionDetails) GetNsgIds() []string { + return m.NsgIds +} + +func (m CreateAzureDataLakeStorageConnectionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateAzureDataLakeStorageConnectionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingAzureDataLakeStorageConnectionTechnologyTypeEnum(string(m.TechnologyType)); !ok && m.TechnologyType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TechnologyType: %s. Supported values are: %s.", m.TechnologyType, strings.Join(GetAzureDataLakeStorageConnectionTechnologyTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingAzureDataLakeStorageConnectionAuthenticationTypeEnum(string(m.AuthenticationType)); !ok && m.AuthenticationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AuthenticationType: %s. Supported values are: %s.", m.AuthenticationType, strings.Join(GetAzureDataLakeStorageConnectionAuthenticationTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m CreateAzureDataLakeStorageConnectionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateAzureDataLakeStorageConnectionDetails CreateAzureDataLakeStorageConnectionDetails + s := struct { + DiscriminatorParam string `json:"connectionType"` + MarshalTypeCreateAzureDataLakeStorageConnectionDetails + }{ + "AZURE_DATA_LAKE_STORAGE", + (MarshalTypeCreateAzureDataLakeStorageConnectionDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/goldengate/create_azure_synapse_connection_details.go b/goldengate/create_azure_synapse_connection_details.go new file mode 100644 index 0000000000..75d88cd361 --- /dev/null +++ b/goldengate/create_azure_synapse_connection_details.go @@ -0,0 +1,154 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateAzureSynapseConnectionDetails The information about a new Azure Synapse Analytics Connection. +type CreateAzureSynapseConnectionDetails struct { + + // An object's Display Name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // JDBC connection string. + // e.g.: 'jdbc:sqlserver://.sql.azuresynapse.net:1433;database=;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.sql.azuresynapse.net;loginTimeout=300;' + ConnectionString *string `mandatory:"true" json:"connectionString"` + + // The username Oracle GoldenGate uses to connect the associated RDBMS. This username must + // already exist and be available for use by the database. It must conform to the security + // requirements implemented by the database including length, case sensitivity, and so on. + Username *string `mandatory:"true" json:"username"` + + // The password Oracle GoldenGate uses to connect the associated RDBMS. It must conform to the + // specific security requirements implemented by the database including length, case + // sensitivity, and so on. + Password *string `mandatory:"true" json:"password"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` + + // A simple key-value pair that is applied without any predefined name, type, or scope. Exists + // for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer vault being + // referenced. + // If provided, this will reference a vault which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to manage secrets contained + // within this vault. + VaultId *string `mandatory:"false" json:"vaultId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer "Master" key being + // referenced. + // If provided, this will reference a key which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to utilize this key to + // manage secrets. + KeyId *string `mandatory:"false" json:"keyId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet being referenced. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // An array of Network Security Group OCIDs used to define network access for either Deployments or Connections. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // The Azure Synapse Analytics technology type. + TechnologyType AzureSynapseConnectionTechnologyTypeEnum `mandatory:"true" json:"technologyType"` +} + +//GetDisplayName returns DisplayName +func (m CreateAzureSynapseConnectionDetails) GetDisplayName() *string { + return m.DisplayName +} + +//GetDescription returns Description +func (m CreateAzureSynapseConnectionDetails) GetDescription() *string { + return m.Description +} + +//GetCompartmentId returns CompartmentId +func (m CreateAzureSynapseConnectionDetails) GetCompartmentId() *string { + return m.CompartmentId +} + +//GetFreeformTags returns FreeformTags +func (m CreateAzureSynapseConnectionDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetDefinedTags returns DefinedTags +func (m CreateAzureSynapseConnectionDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +//GetVaultId returns VaultId +func (m CreateAzureSynapseConnectionDetails) GetVaultId() *string { + return m.VaultId +} + +//GetKeyId returns KeyId +func (m CreateAzureSynapseConnectionDetails) GetKeyId() *string { + return m.KeyId +} + +//GetSubnetId returns SubnetId +func (m CreateAzureSynapseConnectionDetails) GetSubnetId() *string { + return m.SubnetId +} + +//GetNsgIds returns NsgIds +func (m CreateAzureSynapseConnectionDetails) GetNsgIds() []string { + return m.NsgIds +} + +func (m CreateAzureSynapseConnectionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateAzureSynapseConnectionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingAzureSynapseConnectionTechnologyTypeEnum(string(m.TechnologyType)); !ok && m.TechnologyType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TechnologyType: %s. Supported values are: %s.", m.TechnologyType, strings.Join(GetAzureSynapseConnectionTechnologyTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m CreateAzureSynapseConnectionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateAzureSynapseConnectionDetails CreateAzureSynapseConnectionDetails + s := struct { + DiscriminatorParam string `json:"connectionType"` + MarshalTypeCreateAzureSynapseConnectionDetails + }{ + "AZURE_SYNAPSE_ANALYTICS", + (MarshalTypeCreateAzureSynapseConnectionDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/goldengate/create_connection_details.go b/goldengate/create_connection_details.go index b1d3289139..331ffd599f 100644 --- a/goldengate/create_connection_details.go +++ b/goldengate/create_connection_details.go @@ -106,6 +106,22 @@ func (m *createconnectiondetails) UnmarshalPolymorphicJSON(data []byte) (interfa var err error switch m.ConnectionType { + case "POSTGRESQL": + mm := CreatePostgresqlConnectionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "KAFKA_SCHEMA_REGISTRY": + mm := CreateKafkaSchemaRegistryConnectionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "AZURE_SYNAPSE_ANALYTICS": + mm := CreateAzureSynapseConnectionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "AZURE_DATA_LAKE_STORAGE": + mm := CreateAzureDataLakeStorageConnectionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "MYSQL": mm := CreateMysqlConnectionDetails{} err = json.Unmarshal(data, &mm) diff --git a/goldengate/create_kafka_connection_details.go b/goldengate/create_kafka_connection_details.go index c462dd9d11..1772c67ca8 100644 --- a/goldengate/create_kafka_connection_details.go +++ b/goldengate/create_kafka_connection_details.go @@ -88,7 +88,7 @@ type CreateKafkaConnectionDetails struct { // The KeyStore password. KeyStorePassword *string `mandatory:"false" json:"keyStorePassword"` - // The password for the cert inside of of the KeyStore. + // The password for the cert inside of the KeyStore. // In case it differs from the KeyStore password, it should be provided. SslKeyPassword *string `mandatory:"false" json:"sslKeyPassword"` diff --git a/goldengate/create_kafka_schema_registry_connection_details.go b/goldengate/create_kafka_schema_registry_connection_details.go new file mode 100644 index 0000000000..276c9488a0 --- /dev/null +++ b/goldengate/create_kafka_schema_registry_connection_details.go @@ -0,0 +1,181 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateKafkaSchemaRegistryConnectionDetails The information about a new Kafka (e.g. Confluent) Schema Registry Connection. +type CreateKafkaSchemaRegistryConnectionDetails struct { + + // An object's Display Name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Kafka Schema Registry URL. + // e.g.: 'https://server1.us.oracle.com:8081' + Url *string `mandatory:"true" json:"url"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` + + // A simple key-value pair that is applied without any predefined name, type, or scope. Exists + // for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer vault being + // referenced. + // If provided, this will reference a vault which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to manage secrets contained + // within this vault. + VaultId *string `mandatory:"false" json:"vaultId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer "Master" key being + // referenced. + // If provided, this will reference a key which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to utilize this key to + // manage secrets. + KeyId *string `mandatory:"false" json:"keyId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet being referenced. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // An array of Network Security Group OCIDs used to define network access for either Deployments or Connections. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // The username to access Schema Registry using basic authentation. + // This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. + Username *string `mandatory:"false" json:"username"` + + // The password to access Schema Registry using basic authentation. + // This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. + Password *string `mandatory:"false" json:"password"` + + // The base64 encoded content of the TrustStore file. + TrustStore *string `mandatory:"false" json:"trustStore"` + + // The TrustStore password. + TrustStorePassword *string `mandatory:"false" json:"trustStorePassword"` + + // The base64 encoded content of the KeyStore file. + KeyStore *string `mandatory:"false" json:"keyStore"` + + // The KeyStore password. + KeyStorePassword *string `mandatory:"false" json:"keyStorePassword"` + + // The password for the cert inside the KeyStore. + // In case it differs from the KeyStore password, it should be provided. + SslKeyPassword *string `mandatory:"false" json:"sslKeyPassword"` + + // The private IP address of the connection's endpoint in the customer's VCN, typically a + // database endpoint or a big data endpoint (e.g. Kafka bootstrap server). + // In case the privateIp is provided, the subnetId must also be provided. + // In case the privateIp (and the subnetId) is not provided it is assumed the datasource is publicly accessible. + // In case the connection is accessible only privately, the lack of privateIp will result in not being able to access the connection. + PrivateIp *string `mandatory:"false" json:"privateIp"` + + // The Kafka (e.g. Confluent) Schema Registry technology type. + TechnologyType KafkaSchemaRegistryConnectionTechnologyTypeEnum `mandatory:"true" json:"technologyType"` + + // Used authentication mechanism to access Schema Registry. + AuthenticationType KafkaSchemaRegistryConnectionAuthenticationTypeEnum `mandatory:"true" json:"authenticationType"` +} + +//GetDisplayName returns DisplayName +func (m CreateKafkaSchemaRegistryConnectionDetails) GetDisplayName() *string { + return m.DisplayName +} + +//GetDescription returns Description +func (m CreateKafkaSchemaRegistryConnectionDetails) GetDescription() *string { + return m.Description +} + +//GetCompartmentId returns CompartmentId +func (m CreateKafkaSchemaRegistryConnectionDetails) GetCompartmentId() *string { + return m.CompartmentId +} + +//GetFreeformTags returns FreeformTags +func (m CreateKafkaSchemaRegistryConnectionDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetDefinedTags returns DefinedTags +func (m CreateKafkaSchemaRegistryConnectionDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +//GetVaultId returns VaultId +func (m CreateKafkaSchemaRegistryConnectionDetails) GetVaultId() *string { + return m.VaultId +} + +//GetKeyId returns KeyId +func (m CreateKafkaSchemaRegistryConnectionDetails) GetKeyId() *string { + return m.KeyId +} + +//GetSubnetId returns SubnetId +func (m CreateKafkaSchemaRegistryConnectionDetails) GetSubnetId() *string { + return m.SubnetId +} + +//GetNsgIds returns NsgIds +func (m CreateKafkaSchemaRegistryConnectionDetails) GetNsgIds() []string { + return m.NsgIds +} + +func (m CreateKafkaSchemaRegistryConnectionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateKafkaSchemaRegistryConnectionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingKafkaSchemaRegistryConnectionTechnologyTypeEnum(string(m.TechnologyType)); !ok && m.TechnologyType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TechnologyType: %s. Supported values are: %s.", m.TechnologyType, strings.Join(GetKafkaSchemaRegistryConnectionTechnologyTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingKafkaSchemaRegistryConnectionAuthenticationTypeEnum(string(m.AuthenticationType)); !ok && m.AuthenticationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AuthenticationType: %s. Supported values are: %s.", m.AuthenticationType, strings.Join(GetKafkaSchemaRegistryConnectionAuthenticationTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m CreateKafkaSchemaRegistryConnectionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateKafkaSchemaRegistryConnectionDetails CreateKafkaSchemaRegistryConnectionDetails + s := struct { + DiscriminatorParam string `json:"connectionType"` + MarshalTypeCreateKafkaSchemaRegistryConnectionDetails + }{ + "KAFKA_SCHEMA_REGISTRY", + (MarshalTypeCreateKafkaSchemaRegistryConnectionDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/goldengate/create_oci_object_storage_connection_details.go b/goldengate/create_oci_object_storage_connection_details.go index 14a90e914b..be78d3f40b 100644 --- a/goldengate/create_oci_object_storage_connection_details.go +++ b/goldengate/create_oci_object_storage_connection_details.go @@ -75,6 +75,9 @@ type CreateOciObjectStorageConnectionDetails struct { // The user must have write access to the bucket they want to connect to. UserId *string `mandatory:"false" json:"userId"` + // The passphrase of the private key. + PrivateKeyPassphrase *string `mandatory:"false" json:"privateKeyPassphrase"` + // The OCI Object Storage technology type. TechnologyType OciObjectStorageConnectionTechnologyTypeEnum `mandatory:"true" json:"technologyType"` } diff --git a/goldengate/create_ogg_deployment_details.go b/goldengate/create_ogg_deployment_details.go index a352bdd335..469b3aea5c 100644 --- a/goldengate/create_ogg_deployment_details.go +++ b/goldengate/create_ogg_deployment_details.go @@ -28,6 +28,7 @@ type CreateOggDeploymentDetails struct { // The password associated with the GoldenGate deployment console username. // The password must be 8 to 30 characters long and must contain at least 1 uppercase, 1 lowercase, 1 numeric, // and 1 special character. Special characters such as ‘$’, ‘^’, or ‘?’ are not allowed. + // This field will be deprecated and replaced by "passwordSecretId". AdminPassword *string `mandatory:"true" json:"adminPassword"` // A PEM-encoded SSL certificate. diff --git a/goldengate/create_postgresql_connection_details.go b/goldengate/create_postgresql_connection_details.go new file mode 100644 index 0000000000..0086fbc3f2 --- /dev/null +++ b/goldengate/create_postgresql_connection_details.go @@ -0,0 +1,194 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreatePostgresqlConnectionDetails The information about a new PostgreSQL Connection. +type CreatePostgresqlConnectionDetails struct { + + // An object's Display Name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The name of the database. + DatabaseName *string `mandatory:"true" json:"databaseName"` + + // The name or address of a host. + Host *string `mandatory:"true" json:"host"` + + // The port of an endpoint usually specified for a connection. + Port *int `mandatory:"true" json:"port"` + + // The username Oracle GoldenGate uses to connect the associated RDBMS. This username must + // already exist and be available for use by the database. It must conform to the security + // requirements implemented by the database including length, case sensitivity, and so on. + Username *string `mandatory:"true" json:"username"` + + // The password Oracle GoldenGate uses to connect the associated RDBMS. It must conform to the + // specific security requirements implemented by the database including length, case + // sensitivity, and so on. + Password *string `mandatory:"true" json:"password"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` + + // A simple key-value pair that is applied without any predefined name, type, or scope. Exists + // for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer vault being + // referenced. + // If provided, this will reference a vault which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to manage secrets contained + // within this vault. + VaultId *string `mandatory:"false" json:"vaultId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer "Master" key being + // referenced. + // If provided, this will reference a key which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to utilize this key to + // manage secrets. + KeyId *string `mandatory:"false" json:"keyId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet being referenced. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // An array of Network Security Group OCIDs used to define network access for either Deployments or Connections. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // An array of name-value pair attribute entries. + // Used as additional parameters in connection string. + AdditionalAttributes []NameValuePair `mandatory:"false" json:"additionalAttributes"` + + // The base64 encoded certificate of the trusted certificate authorities (Trusted CA) for PostgreSQL. + SslCa *string `mandatory:"false" json:"sslCa"` + + // The base64 encoded list of certificates revoked by the trusted certificate authorities (Trusted CA) for PostgreSQL. + SslCrl *string `mandatory:"false" json:"sslCrl"` + + // The base64 encoded certificate of the PostgreSQL server. + SslCert *string `mandatory:"false" json:"sslCert"` + + // The base64 encoded private key of the PostgreSQL server. + SslKey *string `mandatory:"false" json:"sslKey"` + + // The private IP address of the connection's endpoint in the customer's VCN, typically a + // database endpoint or a big data endpoint (e.g. Kafka bootstrap server). + // In case the privateIp is provided, the subnetId must also be provided. + // In case the privateIp (and the subnetId) is not provided it is assumed the datasource is publicly accessible. + // In case the connection is accessible only privately, the lack of privateIp will result in not being able to access the connection. + PrivateIp *string `mandatory:"false" json:"privateIp"` + + // The PostgreSQL technology type. + TechnologyType PostgresqlConnectionTechnologyTypeEnum `mandatory:"true" json:"technologyType"` + + // Security protocol for PostgreSQL. + SecurityProtocol PostgresqlConnectionSecurityProtocolEnum `mandatory:"true" json:"securityProtocol"` + + // SSL modes for PostgreSQL. + SslMode PostgresqlConnectionSslModeEnum `mandatory:"false" json:"sslMode,omitempty"` +} + +//GetDisplayName returns DisplayName +func (m CreatePostgresqlConnectionDetails) GetDisplayName() *string { + return m.DisplayName +} + +//GetDescription returns Description +func (m CreatePostgresqlConnectionDetails) GetDescription() *string { + return m.Description +} + +//GetCompartmentId returns CompartmentId +func (m CreatePostgresqlConnectionDetails) GetCompartmentId() *string { + return m.CompartmentId +} + +//GetFreeformTags returns FreeformTags +func (m CreatePostgresqlConnectionDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetDefinedTags returns DefinedTags +func (m CreatePostgresqlConnectionDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +//GetVaultId returns VaultId +func (m CreatePostgresqlConnectionDetails) GetVaultId() *string { + return m.VaultId +} + +//GetKeyId returns KeyId +func (m CreatePostgresqlConnectionDetails) GetKeyId() *string { + return m.KeyId +} + +//GetSubnetId returns SubnetId +func (m CreatePostgresqlConnectionDetails) GetSubnetId() *string { + return m.SubnetId +} + +//GetNsgIds returns NsgIds +func (m CreatePostgresqlConnectionDetails) GetNsgIds() []string { + return m.NsgIds +} + +func (m CreatePostgresqlConnectionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreatePostgresqlConnectionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingPostgresqlConnectionTechnologyTypeEnum(string(m.TechnologyType)); !ok && m.TechnologyType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TechnologyType: %s. Supported values are: %s.", m.TechnologyType, strings.Join(GetPostgresqlConnectionTechnologyTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingPostgresqlConnectionSecurityProtocolEnum(string(m.SecurityProtocol)); !ok && m.SecurityProtocol != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SecurityProtocol: %s. Supported values are: %s.", m.SecurityProtocol, strings.Join(GetPostgresqlConnectionSecurityProtocolEnumStringValues(), ","))) + } + if _, ok := GetMappingPostgresqlConnectionSslModeEnum(string(m.SslMode)); !ok && m.SslMode != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SslMode: %s. Supported values are: %s.", m.SslMode, strings.Join(GetPostgresqlConnectionSslModeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m CreatePostgresqlConnectionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreatePostgresqlConnectionDetails CreatePostgresqlConnectionDetails + s := struct { + DiscriminatorParam string `json:"connectionType"` + MarshalTypeCreatePostgresqlConnectionDetails + }{ + "POSTGRESQL", + (MarshalTypeCreatePostgresqlConnectionDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/goldengate/deployment_type.go b/goldengate/deployment_type.go index 5680200a3a..9f8a539520 100644 --- a/goldengate/deployment_type.go +++ b/goldengate/deployment_type.go @@ -18,24 +18,27 @@ type DeploymentTypeEnum string // Set of constants representing the allowable values for DeploymentTypeEnum const ( - DeploymentTypeOgg DeploymentTypeEnum = "OGG" - DeploymentTypeDatabaseOracle DeploymentTypeEnum = "DATABASE_ORACLE" - DeploymentTypeBigdata DeploymentTypeEnum = "BIGDATA" - DeploymentTypeDatabaseMysql DeploymentTypeEnum = "DATABASE_MYSQL" + DeploymentTypeOgg DeploymentTypeEnum = "OGG" + DeploymentTypeDatabaseOracle DeploymentTypeEnum = "DATABASE_ORACLE" + DeploymentTypeBigdata DeploymentTypeEnum = "BIGDATA" + DeploymentTypeDatabaseMysql DeploymentTypeEnum = "DATABASE_MYSQL" + DeploymentTypeDatabasePostgresql DeploymentTypeEnum = "DATABASE_POSTGRESQL" ) var mappingDeploymentTypeEnum = map[string]DeploymentTypeEnum{ - "OGG": DeploymentTypeOgg, - "DATABASE_ORACLE": DeploymentTypeDatabaseOracle, - "BIGDATA": DeploymentTypeBigdata, - "DATABASE_MYSQL": DeploymentTypeDatabaseMysql, + "OGG": DeploymentTypeOgg, + "DATABASE_ORACLE": DeploymentTypeDatabaseOracle, + "BIGDATA": DeploymentTypeBigdata, + "DATABASE_MYSQL": DeploymentTypeDatabaseMysql, + "DATABASE_POSTGRESQL": DeploymentTypeDatabasePostgresql, } var mappingDeploymentTypeEnumLowerCase = map[string]DeploymentTypeEnum{ - "ogg": DeploymentTypeOgg, - "database_oracle": DeploymentTypeDatabaseOracle, - "bigdata": DeploymentTypeBigdata, - "database_mysql": DeploymentTypeDatabaseMysql, + "ogg": DeploymentTypeOgg, + "database_oracle": DeploymentTypeDatabaseOracle, + "bigdata": DeploymentTypeBigdata, + "database_mysql": DeploymentTypeDatabaseMysql, + "database_postgresql": DeploymentTypeDatabasePostgresql, } // GetDeploymentTypeEnumValues Enumerates the set of values for DeploymentTypeEnum @@ -54,6 +57,7 @@ func GetDeploymentTypeEnumStringValues() []string { "DATABASE_ORACLE", "BIGDATA", "DATABASE_MYSQL", + "DATABASE_POSTGRESQL", } } diff --git a/goldengate/kafka_connection.go b/goldengate/kafka_connection.go index 3ed87aaced..cfeff49410 100644 --- a/goldengate/kafka_connection.go +++ b/goldengate/kafka_connection.go @@ -230,18 +230,24 @@ type KafkaConnectionTechnologyTypeEnum string // Set of constants representing the allowable values for KafkaConnectionTechnologyTypeEnum const ( - KafkaConnectionTechnologyTypeApacheKafka KafkaConnectionTechnologyTypeEnum = "APACHE_KAFKA" - KafkaConnectionTechnologyTypeOciStreaming KafkaConnectionTechnologyTypeEnum = "OCI_STREAMING" + KafkaConnectionTechnologyTypeApacheKafka KafkaConnectionTechnologyTypeEnum = "APACHE_KAFKA" + KafkaConnectionTechnologyTypeAzureEventHubs KafkaConnectionTechnologyTypeEnum = "AZURE_EVENT_HUBS" + KafkaConnectionTechnologyTypeConfluentKafka KafkaConnectionTechnologyTypeEnum = "CONFLUENT_KAFKA" + KafkaConnectionTechnologyTypeOciStreaming KafkaConnectionTechnologyTypeEnum = "OCI_STREAMING" ) var mappingKafkaConnectionTechnologyTypeEnum = map[string]KafkaConnectionTechnologyTypeEnum{ - "APACHE_KAFKA": KafkaConnectionTechnologyTypeApacheKafka, - "OCI_STREAMING": KafkaConnectionTechnologyTypeOciStreaming, + "APACHE_KAFKA": KafkaConnectionTechnologyTypeApacheKafka, + "AZURE_EVENT_HUBS": KafkaConnectionTechnologyTypeAzureEventHubs, + "CONFLUENT_KAFKA": KafkaConnectionTechnologyTypeConfluentKafka, + "OCI_STREAMING": KafkaConnectionTechnologyTypeOciStreaming, } var mappingKafkaConnectionTechnologyTypeEnumLowerCase = map[string]KafkaConnectionTechnologyTypeEnum{ - "apache_kafka": KafkaConnectionTechnologyTypeApacheKafka, - "oci_streaming": KafkaConnectionTechnologyTypeOciStreaming, + "apache_kafka": KafkaConnectionTechnologyTypeApacheKafka, + "azure_event_hubs": KafkaConnectionTechnologyTypeAzureEventHubs, + "confluent_kafka": KafkaConnectionTechnologyTypeConfluentKafka, + "oci_streaming": KafkaConnectionTechnologyTypeOciStreaming, } // GetKafkaConnectionTechnologyTypeEnumValues Enumerates the set of values for KafkaConnectionTechnologyTypeEnum @@ -257,6 +263,8 @@ func GetKafkaConnectionTechnologyTypeEnumValues() []KafkaConnectionTechnologyTyp func GetKafkaConnectionTechnologyTypeEnumStringValues() []string { return []string{ "APACHE_KAFKA", + "AZURE_EVENT_HUBS", + "CONFLUENT_KAFKA", "OCI_STREAMING", } } diff --git a/goldengate/kafka_schema_registry_connection.go b/goldengate/kafka_schema_registry_connection.go new file mode 100644 index 0000000000..4d6d0064fa --- /dev/null +++ b/goldengate/kafka_schema_registry_connection.go @@ -0,0 +1,311 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// KafkaSchemaRegistryConnection Represents the metadata of a Kafka (e.g. Confluent) Schema Registry Connection. +type KafkaSchemaRegistryConnection struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the connection being + // referenced. + Id *string `mandatory:"true" json:"id"` + + // An object's Display Name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The time the resource was created. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time the resource was last updated. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // Kafka Schema Registry URL. + // e.g.: 'https://server1.us.oracle.com:8081' + Url *string `mandatory:"true" json:"url"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` + + // A simple key-value pair that is applied without any predefined name, type, or scope. Exists + // for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle + // Cloud Infrastructure services. Each key is predefined and scoped to namespaces. For more + // information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // Describes the object's current state in detail. For example, it can be used to provide + // actionable information for a resource in a Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer vault being + // referenced. + // If provided, this will reference a vault which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to manage secrets contained + // within this vault. + VaultId *string `mandatory:"false" json:"vaultId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer "Master" key being + // referenced. + // If provided, this will reference a key which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to utilize this key to + // manage secrets. + KeyId *string `mandatory:"false" json:"keyId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet being referenced. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // List of ingress IP addresses, from where the GoldenGate deployment connects to this connection's privateIp. + IngressIps []IngressIpDetails `mandatory:"false" json:"ingressIps"` + + // An array of Network Security Group OCIDs used to define network access for either Deployments or Connections. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // The username to access Schema Registry using basic authentation. + // This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. + Username *string `mandatory:"false" json:"username"` + + // The private IP address of the connection's endpoint in the customer's VCN, typically a + // database endpoint or a big data endpoint (e.g. Kafka bootstrap server). + // In case the privateIp is provided, the subnetId must also be provided. + // In case the privateIp (and the subnetId) is not provided it is assumed the datasource is publicly accessible. + // In case the connection is accessible only privately, the lack of privateIp will result in not being able to access the connection. + PrivateIp *string `mandatory:"false" json:"privateIp"` + + // The Kafka (e.g. Confluent) Schema Registry technology type. + TechnologyType KafkaSchemaRegistryConnectionTechnologyTypeEnum `mandatory:"true" json:"technologyType"` + + // Used authentication mechanism to access Schema Registry. + AuthenticationType KafkaSchemaRegistryConnectionAuthenticationTypeEnum `mandatory:"true" json:"authenticationType"` + + // Possible lifecycle states for connection. + LifecycleState ConnectionLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +//GetId returns Id +func (m KafkaSchemaRegistryConnection) GetId() *string { + return m.Id +} + +//GetDisplayName returns DisplayName +func (m KafkaSchemaRegistryConnection) GetDisplayName() *string { + return m.DisplayName +} + +//GetDescription returns Description +func (m KafkaSchemaRegistryConnection) GetDescription() *string { + return m.Description +} + +//GetCompartmentId returns CompartmentId +func (m KafkaSchemaRegistryConnection) GetCompartmentId() *string { + return m.CompartmentId +} + +//GetFreeformTags returns FreeformTags +func (m KafkaSchemaRegistryConnection) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetDefinedTags returns DefinedTags +func (m KafkaSchemaRegistryConnection) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +//GetSystemTags returns SystemTags +func (m KafkaSchemaRegistryConnection) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +//GetLifecycleState returns LifecycleState +func (m KafkaSchemaRegistryConnection) GetLifecycleState() ConnectionLifecycleStateEnum { + return m.LifecycleState +} + +//GetLifecycleDetails returns LifecycleDetails +func (m KafkaSchemaRegistryConnection) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +//GetTimeCreated returns TimeCreated +func (m KafkaSchemaRegistryConnection) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +//GetTimeUpdated returns TimeUpdated +func (m KafkaSchemaRegistryConnection) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +//GetVaultId returns VaultId +func (m KafkaSchemaRegistryConnection) GetVaultId() *string { + return m.VaultId +} + +//GetKeyId returns KeyId +func (m KafkaSchemaRegistryConnection) GetKeyId() *string { + return m.KeyId +} + +//GetSubnetId returns SubnetId +func (m KafkaSchemaRegistryConnection) GetSubnetId() *string { + return m.SubnetId +} + +//GetIngressIps returns IngressIps +func (m KafkaSchemaRegistryConnection) GetIngressIps() []IngressIpDetails { + return m.IngressIps +} + +//GetNsgIds returns NsgIds +func (m KafkaSchemaRegistryConnection) GetNsgIds() []string { + return m.NsgIds +} + +func (m KafkaSchemaRegistryConnection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m KafkaSchemaRegistryConnection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingKafkaSchemaRegistryConnectionTechnologyTypeEnum(string(m.TechnologyType)); !ok && m.TechnologyType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TechnologyType: %s. Supported values are: %s.", m.TechnologyType, strings.Join(GetKafkaSchemaRegistryConnectionTechnologyTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingKafkaSchemaRegistryConnectionAuthenticationTypeEnum(string(m.AuthenticationType)); !ok && m.AuthenticationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AuthenticationType: %s. Supported values are: %s.", m.AuthenticationType, strings.Join(GetKafkaSchemaRegistryConnectionAuthenticationTypeEnumStringValues(), ","))) + } + + if _, ok := GetMappingConnectionLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetConnectionLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m KafkaSchemaRegistryConnection) MarshalJSON() (buff []byte, e error) { + type MarshalTypeKafkaSchemaRegistryConnection KafkaSchemaRegistryConnection + s := struct { + DiscriminatorParam string `json:"connectionType"` + MarshalTypeKafkaSchemaRegistryConnection + }{ + "KAFKA_SCHEMA_REGISTRY", + (MarshalTypeKafkaSchemaRegistryConnection)(m), + } + + return json.Marshal(&s) +} + +// KafkaSchemaRegistryConnectionTechnologyTypeEnum Enum with underlying type: string +type KafkaSchemaRegistryConnectionTechnologyTypeEnum string + +// Set of constants representing the allowable values for KafkaSchemaRegistryConnectionTechnologyTypeEnum +const ( + KafkaSchemaRegistryConnectionTechnologyTypeConfluentSchemaRegistry KafkaSchemaRegistryConnectionTechnologyTypeEnum = "CONFLUENT_SCHEMA_REGISTRY" +) + +var mappingKafkaSchemaRegistryConnectionTechnologyTypeEnum = map[string]KafkaSchemaRegistryConnectionTechnologyTypeEnum{ + "CONFLUENT_SCHEMA_REGISTRY": KafkaSchemaRegistryConnectionTechnologyTypeConfluentSchemaRegistry, +} + +var mappingKafkaSchemaRegistryConnectionTechnologyTypeEnumLowerCase = map[string]KafkaSchemaRegistryConnectionTechnologyTypeEnum{ + "confluent_schema_registry": KafkaSchemaRegistryConnectionTechnologyTypeConfluentSchemaRegistry, +} + +// GetKafkaSchemaRegistryConnectionTechnologyTypeEnumValues Enumerates the set of values for KafkaSchemaRegistryConnectionTechnologyTypeEnum +func GetKafkaSchemaRegistryConnectionTechnologyTypeEnumValues() []KafkaSchemaRegistryConnectionTechnologyTypeEnum { + values := make([]KafkaSchemaRegistryConnectionTechnologyTypeEnum, 0) + for _, v := range mappingKafkaSchemaRegistryConnectionTechnologyTypeEnum { + values = append(values, v) + } + return values +} + +// GetKafkaSchemaRegistryConnectionTechnologyTypeEnumStringValues Enumerates the set of values in String for KafkaSchemaRegistryConnectionTechnologyTypeEnum +func GetKafkaSchemaRegistryConnectionTechnologyTypeEnumStringValues() []string { + return []string{ + "CONFLUENT_SCHEMA_REGISTRY", + } +} + +// GetMappingKafkaSchemaRegistryConnectionTechnologyTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingKafkaSchemaRegistryConnectionTechnologyTypeEnum(val string) (KafkaSchemaRegistryConnectionTechnologyTypeEnum, bool) { + enum, ok := mappingKafkaSchemaRegistryConnectionTechnologyTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// KafkaSchemaRegistryConnectionAuthenticationTypeEnum Enum with underlying type: string +type KafkaSchemaRegistryConnectionAuthenticationTypeEnum string + +// Set of constants representing the allowable values for KafkaSchemaRegistryConnectionAuthenticationTypeEnum +const ( + KafkaSchemaRegistryConnectionAuthenticationTypeNone KafkaSchemaRegistryConnectionAuthenticationTypeEnum = "NONE" + KafkaSchemaRegistryConnectionAuthenticationTypeBasic KafkaSchemaRegistryConnectionAuthenticationTypeEnum = "BASIC" + KafkaSchemaRegistryConnectionAuthenticationTypeMutual KafkaSchemaRegistryConnectionAuthenticationTypeEnum = "MUTUAL" +) + +var mappingKafkaSchemaRegistryConnectionAuthenticationTypeEnum = map[string]KafkaSchemaRegistryConnectionAuthenticationTypeEnum{ + "NONE": KafkaSchemaRegistryConnectionAuthenticationTypeNone, + "BASIC": KafkaSchemaRegistryConnectionAuthenticationTypeBasic, + "MUTUAL": KafkaSchemaRegistryConnectionAuthenticationTypeMutual, +} + +var mappingKafkaSchemaRegistryConnectionAuthenticationTypeEnumLowerCase = map[string]KafkaSchemaRegistryConnectionAuthenticationTypeEnum{ + "none": KafkaSchemaRegistryConnectionAuthenticationTypeNone, + "basic": KafkaSchemaRegistryConnectionAuthenticationTypeBasic, + "mutual": KafkaSchemaRegistryConnectionAuthenticationTypeMutual, +} + +// GetKafkaSchemaRegistryConnectionAuthenticationTypeEnumValues Enumerates the set of values for KafkaSchemaRegistryConnectionAuthenticationTypeEnum +func GetKafkaSchemaRegistryConnectionAuthenticationTypeEnumValues() []KafkaSchemaRegistryConnectionAuthenticationTypeEnum { + values := make([]KafkaSchemaRegistryConnectionAuthenticationTypeEnum, 0) + for _, v := range mappingKafkaSchemaRegistryConnectionAuthenticationTypeEnum { + values = append(values, v) + } + return values +} + +// GetKafkaSchemaRegistryConnectionAuthenticationTypeEnumStringValues Enumerates the set of values in String for KafkaSchemaRegistryConnectionAuthenticationTypeEnum +func GetKafkaSchemaRegistryConnectionAuthenticationTypeEnumStringValues() []string { + return []string{ + "NONE", + "BASIC", + "MUTUAL", + } +} + +// GetMappingKafkaSchemaRegistryConnectionAuthenticationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingKafkaSchemaRegistryConnectionAuthenticationTypeEnum(val string) (KafkaSchemaRegistryConnectionAuthenticationTypeEnum, bool) { + enum, ok := mappingKafkaSchemaRegistryConnectionAuthenticationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/kafka_schema_registry_connection_summary.go b/goldengate/kafka_schema_registry_connection_summary.go new file mode 100644 index 0000000000..92b8e9f4d2 --- /dev/null +++ b/goldengate/kafka_schema_registry_connection_summary.go @@ -0,0 +1,227 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// KafkaSchemaRegistryConnectionSummary Summary of the Kafka (e.g. Confluent) Schema Registry Connection. +type KafkaSchemaRegistryConnectionSummary struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the connection being + // referenced. + Id *string `mandatory:"true" json:"id"` + + // An object's Display Name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The time the resource was created. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time the resource was last updated. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // Kafka Schema Registry URL. + // e.g.: 'https://server1.us.oracle.com:8081' + Url *string `mandatory:"true" json:"url"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` + + // A simple key-value pair that is applied without any predefined name, type, or scope. Exists + // for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle + // Cloud Infrastructure services. Each key is predefined and scoped to namespaces. For more + // information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // Describes the object's current state in detail. For example, it can be used to provide + // actionable information for a resource in a Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer vault being + // referenced. + // If provided, this will reference a vault which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to manage secrets contained + // within this vault. + VaultId *string `mandatory:"false" json:"vaultId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer "Master" key being + // referenced. + // If provided, this will reference a key which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to utilize this key to + // manage secrets. + KeyId *string `mandatory:"false" json:"keyId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet being referenced. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // List of ingress IP addresses, from where the GoldenGate deployment connects to this connection's privateIp. + IngressIps []IngressIpDetails `mandatory:"false" json:"ingressIps"` + + // An array of Network Security Group OCIDs used to define network access for either Deployments or Connections. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // The username to access Schema Registry using basic authentation. + // This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. + Username *string `mandatory:"false" json:"username"` + + // The private IP address of the connection's endpoint in the customer's VCN, typically a + // database endpoint or a big data endpoint (e.g. Kafka bootstrap server). + // In case the privateIp is provided, the subnetId must also be provided. + // In case the privateIp (and the subnetId) is not provided it is assumed the datasource is publicly accessible. + // In case the connection is accessible only privately, the lack of privateIp will result in not being able to access the connection. + PrivateIp *string `mandatory:"false" json:"privateIp"` + + // Possible lifecycle states for connection. + LifecycleState ConnectionLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The Kafka (e.g. Confluent) Schema Registry technology type. + TechnologyType KafkaSchemaRegistryConnectionTechnologyTypeEnum `mandatory:"true" json:"technologyType"` + + // Used authentication mechanism to access Schema Registry. + AuthenticationType KafkaSchemaRegistryConnectionAuthenticationTypeEnum `mandatory:"true" json:"authenticationType"` +} + +//GetId returns Id +func (m KafkaSchemaRegistryConnectionSummary) GetId() *string { + return m.Id +} + +//GetDisplayName returns DisplayName +func (m KafkaSchemaRegistryConnectionSummary) GetDisplayName() *string { + return m.DisplayName +} + +//GetDescription returns Description +func (m KafkaSchemaRegistryConnectionSummary) GetDescription() *string { + return m.Description +} + +//GetCompartmentId returns CompartmentId +func (m KafkaSchemaRegistryConnectionSummary) GetCompartmentId() *string { + return m.CompartmentId +} + +//GetFreeformTags returns FreeformTags +func (m KafkaSchemaRegistryConnectionSummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetDefinedTags returns DefinedTags +func (m KafkaSchemaRegistryConnectionSummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +//GetSystemTags returns SystemTags +func (m KafkaSchemaRegistryConnectionSummary) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +//GetLifecycleState returns LifecycleState +func (m KafkaSchemaRegistryConnectionSummary) GetLifecycleState() ConnectionLifecycleStateEnum { + return m.LifecycleState +} + +//GetLifecycleDetails returns LifecycleDetails +func (m KafkaSchemaRegistryConnectionSummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +//GetTimeCreated returns TimeCreated +func (m KafkaSchemaRegistryConnectionSummary) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +//GetTimeUpdated returns TimeUpdated +func (m KafkaSchemaRegistryConnectionSummary) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +//GetVaultId returns VaultId +func (m KafkaSchemaRegistryConnectionSummary) GetVaultId() *string { + return m.VaultId +} + +//GetKeyId returns KeyId +func (m KafkaSchemaRegistryConnectionSummary) GetKeyId() *string { + return m.KeyId +} + +//GetSubnetId returns SubnetId +func (m KafkaSchemaRegistryConnectionSummary) GetSubnetId() *string { + return m.SubnetId +} + +//GetIngressIps returns IngressIps +func (m KafkaSchemaRegistryConnectionSummary) GetIngressIps() []IngressIpDetails { + return m.IngressIps +} + +//GetNsgIds returns NsgIds +func (m KafkaSchemaRegistryConnectionSummary) GetNsgIds() []string { + return m.NsgIds +} + +func (m KafkaSchemaRegistryConnectionSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m KafkaSchemaRegistryConnectionSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingConnectionLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetConnectionLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingKafkaSchemaRegistryConnectionTechnologyTypeEnum(string(m.TechnologyType)); !ok && m.TechnologyType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TechnologyType: %s. Supported values are: %s.", m.TechnologyType, strings.Join(GetKafkaSchemaRegistryConnectionTechnologyTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingKafkaSchemaRegistryConnectionAuthenticationTypeEnum(string(m.AuthenticationType)); !ok && m.AuthenticationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AuthenticationType: %s. Supported values are: %s.", m.AuthenticationType, strings.Join(GetKafkaSchemaRegistryConnectionAuthenticationTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m KafkaSchemaRegistryConnectionSummary) MarshalJSON() (buff []byte, e error) { + type MarshalTypeKafkaSchemaRegistryConnectionSummary KafkaSchemaRegistryConnectionSummary + s := struct { + DiscriminatorParam string `json:"connectionType"` + MarshalTypeKafkaSchemaRegistryConnectionSummary + }{ + "KAFKA_SCHEMA_REGISTRY", + (MarshalTypeKafkaSchemaRegistryConnectionSummary)(m), + } + + return json.Marshal(&s) +} diff --git a/goldengate/list_connections_request_response.go b/goldengate/list_connections_request_response.go index 2d30613dd4..cb2980db2f 100644 --- a/goldengate/list_connections_request_response.go +++ b/goldengate/list_connections_request_response.go @@ -159,24 +159,27 @@ type ListConnectionsAssignableDeploymentTypeEnum string // Set of constants representing the allowable values for ListConnectionsAssignableDeploymentTypeEnum const ( - ListConnectionsAssignableDeploymentTypeOgg ListConnectionsAssignableDeploymentTypeEnum = "OGG" - ListConnectionsAssignableDeploymentTypeDatabaseOracle ListConnectionsAssignableDeploymentTypeEnum = "DATABASE_ORACLE" - ListConnectionsAssignableDeploymentTypeBigdata ListConnectionsAssignableDeploymentTypeEnum = "BIGDATA" - ListConnectionsAssignableDeploymentTypeDatabaseMysql ListConnectionsAssignableDeploymentTypeEnum = "DATABASE_MYSQL" + ListConnectionsAssignableDeploymentTypeOgg ListConnectionsAssignableDeploymentTypeEnum = "OGG" + ListConnectionsAssignableDeploymentTypeDatabaseOracle ListConnectionsAssignableDeploymentTypeEnum = "DATABASE_ORACLE" + ListConnectionsAssignableDeploymentTypeBigdata ListConnectionsAssignableDeploymentTypeEnum = "BIGDATA" + ListConnectionsAssignableDeploymentTypeDatabaseMysql ListConnectionsAssignableDeploymentTypeEnum = "DATABASE_MYSQL" + ListConnectionsAssignableDeploymentTypeDatabasePostgresql ListConnectionsAssignableDeploymentTypeEnum = "DATABASE_POSTGRESQL" ) var mappingListConnectionsAssignableDeploymentTypeEnum = map[string]ListConnectionsAssignableDeploymentTypeEnum{ - "OGG": ListConnectionsAssignableDeploymentTypeOgg, - "DATABASE_ORACLE": ListConnectionsAssignableDeploymentTypeDatabaseOracle, - "BIGDATA": ListConnectionsAssignableDeploymentTypeBigdata, - "DATABASE_MYSQL": ListConnectionsAssignableDeploymentTypeDatabaseMysql, + "OGG": ListConnectionsAssignableDeploymentTypeOgg, + "DATABASE_ORACLE": ListConnectionsAssignableDeploymentTypeDatabaseOracle, + "BIGDATA": ListConnectionsAssignableDeploymentTypeBigdata, + "DATABASE_MYSQL": ListConnectionsAssignableDeploymentTypeDatabaseMysql, + "DATABASE_POSTGRESQL": ListConnectionsAssignableDeploymentTypeDatabasePostgresql, } var mappingListConnectionsAssignableDeploymentTypeEnumLowerCase = map[string]ListConnectionsAssignableDeploymentTypeEnum{ - "ogg": ListConnectionsAssignableDeploymentTypeOgg, - "database_oracle": ListConnectionsAssignableDeploymentTypeDatabaseOracle, - "bigdata": ListConnectionsAssignableDeploymentTypeBigdata, - "database_mysql": ListConnectionsAssignableDeploymentTypeDatabaseMysql, + "ogg": ListConnectionsAssignableDeploymentTypeOgg, + "database_oracle": ListConnectionsAssignableDeploymentTypeDatabaseOracle, + "bigdata": ListConnectionsAssignableDeploymentTypeBigdata, + "database_mysql": ListConnectionsAssignableDeploymentTypeDatabaseMysql, + "database_postgresql": ListConnectionsAssignableDeploymentTypeDatabasePostgresql, } // GetListConnectionsAssignableDeploymentTypeEnumValues Enumerates the set of values for ListConnectionsAssignableDeploymentTypeEnum @@ -195,6 +198,7 @@ func GetListConnectionsAssignableDeploymentTypeEnumStringValues() []string { "DATABASE_ORACLE", "BIGDATA", "DATABASE_MYSQL", + "DATABASE_POSTGRESQL", } } diff --git a/goldengate/list_deployments_request_response.go b/goldengate/list_deployments_request_response.go index 72043cc49a..1255287102 100644 --- a/goldengate/list_deployments_request_response.go +++ b/goldengate/list_deployments_request_response.go @@ -150,27 +150,39 @@ type ListDeploymentsSupportedConnectionTypeEnum string // Set of constants representing the allowable values for ListDeploymentsSupportedConnectionTypeEnum const ( - ListDeploymentsSupportedConnectionTypeGoldengate ListDeploymentsSupportedConnectionTypeEnum = "GOLDENGATE" - ListDeploymentsSupportedConnectionTypeKafka ListDeploymentsSupportedConnectionTypeEnum = "KAFKA" - ListDeploymentsSupportedConnectionTypeMysql ListDeploymentsSupportedConnectionTypeEnum = "MYSQL" - ListDeploymentsSupportedConnectionTypeOciObjectStorage ListDeploymentsSupportedConnectionTypeEnum = "OCI_OBJECT_STORAGE" - ListDeploymentsSupportedConnectionTypeOracle ListDeploymentsSupportedConnectionTypeEnum = "ORACLE" + ListDeploymentsSupportedConnectionTypeGoldengate ListDeploymentsSupportedConnectionTypeEnum = "GOLDENGATE" + ListDeploymentsSupportedConnectionTypeKafka ListDeploymentsSupportedConnectionTypeEnum = "KAFKA" + ListDeploymentsSupportedConnectionTypeKafkaSchemaRegistry ListDeploymentsSupportedConnectionTypeEnum = "KAFKA_SCHEMA_REGISTRY" + ListDeploymentsSupportedConnectionTypeMysql ListDeploymentsSupportedConnectionTypeEnum = "MYSQL" + ListDeploymentsSupportedConnectionTypeOciObjectStorage ListDeploymentsSupportedConnectionTypeEnum = "OCI_OBJECT_STORAGE" + ListDeploymentsSupportedConnectionTypeOracle ListDeploymentsSupportedConnectionTypeEnum = "ORACLE" + ListDeploymentsSupportedConnectionTypeAzureDataLakeStorage ListDeploymentsSupportedConnectionTypeEnum = "AZURE_DATA_LAKE_STORAGE" + ListDeploymentsSupportedConnectionTypePostgresql ListDeploymentsSupportedConnectionTypeEnum = "POSTGRESQL" + ListDeploymentsSupportedConnectionTypeAzureSynapseAnalytics ListDeploymentsSupportedConnectionTypeEnum = "AZURE_SYNAPSE_ANALYTICS" ) var mappingListDeploymentsSupportedConnectionTypeEnum = map[string]ListDeploymentsSupportedConnectionTypeEnum{ - "GOLDENGATE": ListDeploymentsSupportedConnectionTypeGoldengate, - "KAFKA": ListDeploymentsSupportedConnectionTypeKafka, - "MYSQL": ListDeploymentsSupportedConnectionTypeMysql, - "OCI_OBJECT_STORAGE": ListDeploymentsSupportedConnectionTypeOciObjectStorage, - "ORACLE": ListDeploymentsSupportedConnectionTypeOracle, + "GOLDENGATE": ListDeploymentsSupportedConnectionTypeGoldengate, + "KAFKA": ListDeploymentsSupportedConnectionTypeKafka, + "KAFKA_SCHEMA_REGISTRY": ListDeploymentsSupportedConnectionTypeKafkaSchemaRegistry, + "MYSQL": ListDeploymentsSupportedConnectionTypeMysql, + "OCI_OBJECT_STORAGE": ListDeploymentsSupportedConnectionTypeOciObjectStorage, + "ORACLE": ListDeploymentsSupportedConnectionTypeOracle, + "AZURE_DATA_LAKE_STORAGE": ListDeploymentsSupportedConnectionTypeAzureDataLakeStorage, + "POSTGRESQL": ListDeploymentsSupportedConnectionTypePostgresql, + "AZURE_SYNAPSE_ANALYTICS": ListDeploymentsSupportedConnectionTypeAzureSynapseAnalytics, } var mappingListDeploymentsSupportedConnectionTypeEnumLowerCase = map[string]ListDeploymentsSupportedConnectionTypeEnum{ - "goldengate": ListDeploymentsSupportedConnectionTypeGoldengate, - "kafka": ListDeploymentsSupportedConnectionTypeKafka, - "mysql": ListDeploymentsSupportedConnectionTypeMysql, - "oci_object_storage": ListDeploymentsSupportedConnectionTypeOciObjectStorage, - "oracle": ListDeploymentsSupportedConnectionTypeOracle, + "goldengate": ListDeploymentsSupportedConnectionTypeGoldengate, + "kafka": ListDeploymentsSupportedConnectionTypeKafka, + "kafka_schema_registry": ListDeploymentsSupportedConnectionTypeKafkaSchemaRegistry, + "mysql": ListDeploymentsSupportedConnectionTypeMysql, + "oci_object_storage": ListDeploymentsSupportedConnectionTypeOciObjectStorage, + "oracle": ListDeploymentsSupportedConnectionTypeOracle, + "azure_data_lake_storage": ListDeploymentsSupportedConnectionTypeAzureDataLakeStorage, + "postgresql": ListDeploymentsSupportedConnectionTypePostgresql, + "azure_synapse_analytics": ListDeploymentsSupportedConnectionTypeAzureSynapseAnalytics, } // GetListDeploymentsSupportedConnectionTypeEnumValues Enumerates the set of values for ListDeploymentsSupportedConnectionTypeEnum @@ -187,9 +199,13 @@ func GetListDeploymentsSupportedConnectionTypeEnumStringValues() []string { return []string{ "GOLDENGATE", "KAFKA", + "KAFKA_SCHEMA_REGISTRY", "MYSQL", "OCI_OBJECT_STORAGE", "ORACLE", + "AZURE_DATA_LAKE_STORAGE", + "POSTGRESQL", + "AZURE_SYNAPSE_ANALYTICS", } } diff --git a/goldengate/postgresql_connection.go b/goldengate/postgresql_connection.go new file mode 100644 index 0000000000..050f519952 --- /dev/null +++ b/goldengate/postgresql_connection.go @@ -0,0 +1,393 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PostgresqlConnection Represents the metadata of a PostgreSQL Database Connection. +type PostgresqlConnection struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the connection being + // referenced. + Id *string `mandatory:"true" json:"id"` + + // An object's Display Name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The time the resource was created. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time the resource was last updated. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // The name of the database. + DatabaseName *string `mandatory:"true" json:"databaseName"` + + // The name or address of a host. + Host *string `mandatory:"true" json:"host"` + + // The port of an endpoint usually specified for a connection. + Port *int `mandatory:"true" json:"port"` + + // The username Oracle GoldenGate uses to connect the associated RDBMS. This username must + // already exist and be available for use by the database. It must conform to the security + // requirements implemented by the database including length, case sensitivity, and so on. + Username *string `mandatory:"true" json:"username"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` + + // A simple key-value pair that is applied without any predefined name, type, or scope. Exists + // for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle + // Cloud Infrastructure services. Each key is predefined and scoped to namespaces. For more + // information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // Describes the object's current state in detail. For example, it can be used to provide + // actionable information for a resource in a Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer vault being + // referenced. + // If provided, this will reference a vault which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to manage secrets contained + // within this vault. + VaultId *string `mandatory:"false" json:"vaultId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer "Master" key being + // referenced. + // If provided, this will reference a key which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to utilize this key to + // manage secrets. + KeyId *string `mandatory:"false" json:"keyId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet being referenced. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // List of ingress IP addresses, from where the GoldenGate deployment connects to this connection's privateIp. + IngressIps []IngressIpDetails `mandatory:"false" json:"ingressIps"` + + // An array of Network Security Group OCIDs used to define network access for either Deployments or Connections. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // An array of name-value pair attribute entries. + // Used as additional parameters in connection string. + AdditionalAttributes []NameValuePair `mandatory:"false" json:"additionalAttributes"` + + // The private IP address of the connection's endpoint in the customer's VCN, typically a + // database endpoint or a big data endpoint (e.g. Kafka bootstrap server). + // In case the privateIp is provided, the subnetId must also be provided. + // In case the privateIp (and the subnetId) is not provided it is assumed the datasource is publicly accessible. + // In case the connection is accessible only privately, the lack of privateIp will result in not being able to access the connection. + PrivateIp *string `mandatory:"false" json:"privateIp"` + + // The PostgreSQL technology type. + TechnologyType PostgresqlConnectionTechnologyTypeEnum `mandatory:"true" json:"technologyType"` + + // Security protocol for PostgreSQL. + SecurityProtocol PostgresqlConnectionSecurityProtocolEnum `mandatory:"true" json:"securityProtocol"` + + // SSL mode for PostgreSQL. + SslMode PostgresqlConnectionSslModeEnum `mandatory:"false" json:"sslMode,omitempty"` + + // Possible lifecycle states for connection. + LifecycleState ConnectionLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +//GetId returns Id +func (m PostgresqlConnection) GetId() *string { + return m.Id +} + +//GetDisplayName returns DisplayName +func (m PostgresqlConnection) GetDisplayName() *string { + return m.DisplayName +} + +//GetDescription returns Description +func (m PostgresqlConnection) GetDescription() *string { + return m.Description +} + +//GetCompartmentId returns CompartmentId +func (m PostgresqlConnection) GetCompartmentId() *string { + return m.CompartmentId +} + +//GetFreeformTags returns FreeformTags +func (m PostgresqlConnection) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetDefinedTags returns DefinedTags +func (m PostgresqlConnection) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +//GetSystemTags returns SystemTags +func (m PostgresqlConnection) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +//GetLifecycleState returns LifecycleState +func (m PostgresqlConnection) GetLifecycleState() ConnectionLifecycleStateEnum { + return m.LifecycleState +} + +//GetLifecycleDetails returns LifecycleDetails +func (m PostgresqlConnection) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +//GetTimeCreated returns TimeCreated +func (m PostgresqlConnection) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +//GetTimeUpdated returns TimeUpdated +func (m PostgresqlConnection) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +//GetVaultId returns VaultId +func (m PostgresqlConnection) GetVaultId() *string { + return m.VaultId +} + +//GetKeyId returns KeyId +func (m PostgresqlConnection) GetKeyId() *string { + return m.KeyId +} + +//GetSubnetId returns SubnetId +func (m PostgresqlConnection) GetSubnetId() *string { + return m.SubnetId +} + +//GetIngressIps returns IngressIps +func (m PostgresqlConnection) GetIngressIps() []IngressIpDetails { + return m.IngressIps +} + +//GetNsgIds returns NsgIds +func (m PostgresqlConnection) GetNsgIds() []string { + return m.NsgIds +} + +func (m PostgresqlConnection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PostgresqlConnection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPostgresqlConnectionTechnologyTypeEnum(string(m.TechnologyType)); !ok && m.TechnologyType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TechnologyType: %s. Supported values are: %s.", m.TechnologyType, strings.Join(GetPostgresqlConnectionTechnologyTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingPostgresqlConnectionSecurityProtocolEnum(string(m.SecurityProtocol)); !ok && m.SecurityProtocol != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SecurityProtocol: %s. Supported values are: %s.", m.SecurityProtocol, strings.Join(GetPostgresqlConnectionSecurityProtocolEnumStringValues(), ","))) + } + if _, ok := GetMappingPostgresqlConnectionSslModeEnum(string(m.SslMode)); !ok && m.SslMode != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SslMode: %s. Supported values are: %s.", m.SslMode, strings.Join(GetPostgresqlConnectionSslModeEnumStringValues(), ","))) + } + + if _, ok := GetMappingConnectionLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetConnectionLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m PostgresqlConnection) MarshalJSON() (buff []byte, e error) { + type MarshalTypePostgresqlConnection PostgresqlConnection + s := struct { + DiscriminatorParam string `json:"connectionType"` + MarshalTypePostgresqlConnection + }{ + "POSTGRESQL", + (MarshalTypePostgresqlConnection)(m), + } + + return json.Marshal(&s) +} + +// PostgresqlConnectionTechnologyTypeEnum Enum with underlying type: string +type PostgresqlConnectionTechnologyTypeEnum string + +// Set of constants representing the allowable values for PostgresqlConnectionTechnologyTypeEnum +const ( + PostgresqlConnectionTechnologyTypePostgresqlServer PostgresqlConnectionTechnologyTypeEnum = "POSTGRESQL_SERVER" + PostgresqlConnectionTechnologyTypeAmazonAuroraPostgresql PostgresqlConnectionTechnologyTypeEnum = "AMAZON_AURORA_POSTGRESQL" + PostgresqlConnectionTechnologyTypeAmazonRdsPostgresql PostgresqlConnectionTechnologyTypeEnum = "AMAZON_RDS_POSTGRESQL" + PostgresqlConnectionTechnologyTypeAzurePostgresql PostgresqlConnectionTechnologyTypeEnum = "AZURE_POSTGRESQL" + PostgresqlConnectionTechnologyTypeGoogleCloudSqlPostgresql PostgresqlConnectionTechnologyTypeEnum = "GOOGLE_CLOUD_SQL_POSTGRESQL" +) + +var mappingPostgresqlConnectionTechnologyTypeEnum = map[string]PostgresqlConnectionTechnologyTypeEnum{ + "POSTGRESQL_SERVER": PostgresqlConnectionTechnologyTypePostgresqlServer, + "AMAZON_AURORA_POSTGRESQL": PostgresqlConnectionTechnologyTypeAmazonAuroraPostgresql, + "AMAZON_RDS_POSTGRESQL": PostgresqlConnectionTechnologyTypeAmazonRdsPostgresql, + "AZURE_POSTGRESQL": PostgresqlConnectionTechnologyTypeAzurePostgresql, + "GOOGLE_CLOUD_SQL_POSTGRESQL": PostgresqlConnectionTechnologyTypeGoogleCloudSqlPostgresql, +} + +var mappingPostgresqlConnectionTechnologyTypeEnumLowerCase = map[string]PostgresqlConnectionTechnologyTypeEnum{ + "postgresql_server": PostgresqlConnectionTechnologyTypePostgresqlServer, + "amazon_aurora_postgresql": PostgresqlConnectionTechnologyTypeAmazonAuroraPostgresql, + "amazon_rds_postgresql": PostgresqlConnectionTechnologyTypeAmazonRdsPostgresql, + "azure_postgresql": PostgresqlConnectionTechnologyTypeAzurePostgresql, + "google_cloud_sql_postgresql": PostgresqlConnectionTechnologyTypeGoogleCloudSqlPostgresql, +} + +// GetPostgresqlConnectionTechnologyTypeEnumValues Enumerates the set of values for PostgresqlConnectionTechnologyTypeEnum +func GetPostgresqlConnectionTechnologyTypeEnumValues() []PostgresqlConnectionTechnologyTypeEnum { + values := make([]PostgresqlConnectionTechnologyTypeEnum, 0) + for _, v := range mappingPostgresqlConnectionTechnologyTypeEnum { + values = append(values, v) + } + return values +} + +// GetPostgresqlConnectionTechnologyTypeEnumStringValues Enumerates the set of values in String for PostgresqlConnectionTechnologyTypeEnum +func GetPostgresqlConnectionTechnologyTypeEnumStringValues() []string { + return []string{ + "POSTGRESQL_SERVER", + "AMAZON_AURORA_POSTGRESQL", + "AMAZON_RDS_POSTGRESQL", + "AZURE_POSTGRESQL", + "GOOGLE_CLOUD_SQL_POSTGRESQL", + } +} + +// GetMappingPostgresqlConnectionTechnologyTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPostgresqlConnectionTechnologyTypeEnum(val string) (PostgresqlConnectionTechnologyTypeEnum, bool) { + enum, ok := mappingPostgresqlConnectionTechnologyTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// PostgresqlConnectionSecurityProtocolEnum Enum with underlying type: string +type PostgresqlConnectionSecurityProtocolEnum string + +// Set of constants representing the allowable values for PostgresqlConnectionSecurityProtocolEnum +const ( + PostgresqlConnectionSecurityProtocolPlain PostgresqlConnectionSecurityProtocolEnum = "PLAIN" + PostgresqlConnectionSecurityProtocolTls PostgresqlConnectionSecurityProtocolEnum = "TLS" + PostgresqlConnectionSecurityProtocolMtls PostgresqlConnectionSecurityProtocolEnum = "MTLS" +) + +var mappingPostgresqlConnectionSecurityProtocolEnum = map[string]PostgresqlConnectionSecurityProtocolEnum{ + "PLAIN": PostgresqlConnectionSecurityProtocolPlain, + "TLS": PostgresqlConnectionSecurityProtocolTls, + "MTLS": PostgresqlConnectionSecurityProtocolMtls, +} + +var mappingPostgresqlConnectionSecurityProtocolEnumLowerCase = map[string]PostgresqlConnectionSecurityProtocolEnum{ + "plain": PostgresqlConnectionSecurityProtocolPlain, + "tls": PostgresqlConnectionSecurityProtocolTls, + "mtls": PostgresqlConnectionSecurityProtocolMtls, +} + +// GetPostgresqlConnectionSecurityProtocolEnumValues Enumerates the set of values for PostgresqlConnectionSecurityProtocolEnum +func GetPostgresqlConnectionSecurityProtocolEnumValues() []PostgresqlConnectionSecurityProtocolEnum { + values := make([]PostgresqlConnectionSecurityProtocolEnum, 0) + for _, v := range mappingPostgresqlConnectionSecurityProtocolEnum { + values = append(values, v) + } + return values +} + +// GetPostgresqlConnectionSecurityProtocolEnumStringValues Enumerates the set of values in String for PostgresqlConnectionSecurityProtocolEnum +func GetPostgresqlConnectionSecurityProtocolEnumStringValues() []string { + return []string{ + "PLAIN", + "TLS", + "MTLS", + } +} + +// GetMappingPostgresqlConnectionSecurityProtocolEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPostgresqlConnectionSecurityProtocolEnum(val string) (PostgresqlConnectionSecurityProtocolEnum, bool) { + enum, ok := mappingPostgresqlConnectionSecurityProtocolEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// PostgresqlConnectionSslModeEnum Enum with underlying type: string +type PostgresqlConnectionSslModeEnum string + +// Set of constants representing the allowable values for PostgresqlConnectionSslModeEnum +const ( + PostgresqlConnectionSslModePrefer PostgresqlConnectionSslModeEnum = "PREFER" + PostgresqlConnectionSslModeRequire PostgresqlConnectionSslModeEnum = "REQUIRE" + PostgresqlConnectionSslModeVerifyCa PostgresqlConnectionSslModeEnum = "VERIFY_CA" + PostgresqlConnectionSslModeVerifyFull PostgresqlConnectionSslModeEnum = "VERIFY_FULL" +) + +var mappingPostgresqlConnectionSslModeEnum = map[string]PostgresqlConnectionSslModeEnum{ + "PREFER": PostgresqlConnectionSslModePrefer, + "REQUIRE": PostgresqlConnectionSslModeRequire, + "VERIFY_CA": PostgresqlConnectionSslModeVerifyCa, + "VERIFY_FULL": PostgresqlConnectionSslModeVerifyFull, +} + +var mappingPostgresqlConnectionSslModeEnumLowerCase = map[string]PostgresqlConnectionSslModeEnum{ + "prefer": PostgresqlConnectionSslModePrefer, + "require": PostgresqlConnectionSslModeRequire, + "verify_ca": PostgresqlConnectionSslModeVerifyCa, + "verify_full": PostgresqlConnectionSslModeVerifyFull, +} + +// GetPostgresqlConnectionSslModeEnumValues Enumerates the set of values for PostgresqlConnectionSslModeEnum +func GetPostgresqlConnectionSslModeEnumValues() []PostgresqlConnectionSslModeEnum { + values := make([]PostgresqlConnectionSslModeEnum, 0) + for _, v := range mappingPostgresqlConnectionSslModeEnum { + values = append(values, v) + } + return values +} + +// GetPostgresqlConnectionSslModeEnumStringValues Enumerates the set of values in String for PostgresqlConnectionSslModeEnum +func GetPostgresqlConnectionSslModeEnumStringValues() []string { + return []string{ + "PREFER", + "REQUIRE", + "VERIFY_CA", + "VERIFY_FULL", + } +} + +// GetMappingPostgresqlConnectionSslModeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPostgresqlConnectionSslModeEnum(val string) (PostgresqlConnectionSslModeEnum, bool) { + enum, ok := mappingPostgresqlConnectionSslModeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/goldengate/postgresql_connection_summary.go b/goldengate/postgresql_connection_summary.go new file mode 100644 index 0000000000..b96b5f8a64 --- /dev/null +++ b/goldengate/postgresql_connection_summary.go @@ -0,0 +1,243 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PostgresqlConnectionSummary Summary of the PostgreSQL Database Connection. +type PostgresqlConnectionSummary struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the connection being + // referenced. + Id *string `mandatory:"true" json:"id"` + + // An object's Display Name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment being referenced. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The time the resource was created. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time the resource was last updated. The format is defined by + // RFC3339 (https://tools.ietf.org/html/rfc3339), such as `2016-08-25T21:10:29.600Z`. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // The name of the database. + DatabaseName *string `mandatory:"true" json:"databaseName"` + + // The name or address of a host. + Host *string `mandatory:"true" json:"host"` + + // The port of an endpoint usually specified for a connection. + Port *int `mandatory:"true" json:"port"` + + // The username Oracle GoldenGate uses to connect the associated RDBMS. This username must + // already exist and be available for use by the database. It must conform to the security + // requirements implemented by the database including length, case sensitivity, and so on. + Username *string `mandatory:"true" json:"username"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` + + // A simple key-value pair that is applied without any predefined name, type, or scope. Exists + // for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle + // Cloud Infrastructure services. Each key is predefined and scoped to namespaces. For more + // information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // Describes the object's current state in detail. For example, it can be used to provide + // actionable information for a resource in a Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer vault being + // referenced. + // If provided, this will reference a vault which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to manage secrets contained + // within this vault. + VaultId *string `mandatory:"false" json:"vaultId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer "Master" key being + // referenced. + // If provided, this will reference a key which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to utilize this key to + // manage secrets. + KeyId *string `mandatory:"false" json:"keyId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the subnet being referenced. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // List of ingress IP addresses, from where the GoldenGate deployment connects to this connection's privateIp. + IngressIps []IngressIpDetails `mandatory:"false" json:"ingressIps"` + + // An array of Network Security Group OCIDs used to define network access for either Deployments or Connections. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // An array of name-value pair attribute entries. + // Used as additional parameters in connection string. + AdditionalAttributes []NameValuePair `mandatory:"false" json:"additionalAttributes"` + + // The private IP address of the connection's endpoint in the customer's VCN, typically a + // database endpoint or a big data endpoint (e.g. Kafka bootstrap server). + // In case the privateIp is provided, the subnetId must also be provided. + // In case the privateIp (and the subnetId) is not provided it is assumed the datasource is publicly accessible. + // In case the connection is accessible only privately, the lack of privateIp will result in not being able to access the connection. + PrivateIp *string `mandatory:"false" json:"privateIp"` + + // Possible lifecycle states for connection. + LifecycleState ConnectionLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The PostgreSQL technology type. + TechnologyType PostgresqlConnectionTechnologyTypeEnum `mandatory:"true" json:"technologyType"` + + // Security protocol for PostgreSQL. + SecurityProtocol PostgresqlConnectionSecurityProtocolEnum `mandatory:"true" json:"securityProtocol"` + + // SSL modes for PostgreSQL. + SslMode PostgresqlConnectionSslModeEnum `mandatory:"false" json:"sslMode,omitempty"` +} + +//GetId returns Id +func (m PostgresqlConnectionSummary) GetId() *string { + return m.Id +} + +//GetDisplayName returns DisplayName +func (m PostgresqlConnectionSummary) GetDisplayName() *string { + return m.DisplayName +} + +//GetDescription returns Description +func (m PostgresqlConnectionSummary) GetDescription() *string { + return m.Description +} + +//GetCompartmentId returns CompartmentId +func (m PostgresqlConnectionSummary) GetCompartmentId() *string { + return m.CompartmentId +} + +//GetFreeformTags returns FreeformTags +func (m PostgresqlConnectionSummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetDefinedTags returns DefinedTags +func (m PostgresqlConnectionSummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +//GetSystemTags returns SystemTags +func (m PostgresqlConnectionSummary) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +//GetLifecycleState returns LifecycleState +func (m PostgresqlConnectionSummary) GetLifecycleState() ConnectionLifecycleStateEnum { + return m.LifecycleState +} + +//GetLifecycleDetails returns LifecycleDetails +func (m PostgresqlConnectionSummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +//GetTimeCreated returns TimeCreated +func (m PostgresqlConnectionSummary) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +//GetTimeUpdated returns TimeUpdated +func (m PostgresqlConnectionSummary) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +//GetVaultId returns VaultId +func (m PostgresqlConnectionSummary) GetVaultId() *string { + return m.VaultId +} + +//GetKeyId returns KeyId +func (m PostgresqlConnectionSummary) GetKeyId() *string { + return m.KeyId +} + +//GetSubnetId returns SubnetId +func (m PostgresqlConnectionSummary) GetSubnetId() *string { + return m.SubnetId +} + +//GetIngressIps returns IngressIps +func (m PostgresqlConnectionSummary) GetIngressIps() []IngressIpDetails { + return m.IngressIps +} + +//GetNsgIds returns NsgIds +func (m PostgresqlConnectionSummary) GetNsgIds() []string { + return m.NsgIds +} + +func (m PostgresqlConnectionSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PostgresqlConnectionSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingConnectionLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetConnectionLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingPostgresqlConnectionTechnologyTypeEnum(string(m.TechnologyType)); !ok && m.TechnologyType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TechnologyType: %s. Supported values are: %s.", m.TechnologyType, strings.Join(GetPostgresqlConnectionTechnologyTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingPostgresqlConnectionSecurityProtocolEnum(string(m.SecurityProtocol)); !ok && m.SecurityProtocol != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SecurityProtocol: %s. Supported values are: %s.", m.SecurityProtocol, strings.Join(GetPostgresqlConnectionSecurityProtocolEnumStringValues(), ","))) + } + if _, ok := GetMappingPostgresqlConnectionSslModeEnum(string(m.SslMode)); !ok && m.SslMode != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SslMode: %s. Supported values are: %s.", m.SslMode, strings.Join(GetPostgresqlConnectionSslModeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m PostgresqlConnectionSummary) MarshalJSON() (buff []byte, e error) { + type MarshalTypePostgresqlConnectionSummary PostgresqlConnectionSummary + s := struct { + DiscriminatorParam string `json:"connectionType"` + MarshalTypePostgresqlConnectionSummary + }{ + "POSTGRESQL", + (MarshalTypePostgresqlConnectionSummary)(m), + } + + return json.Marshal(&s) +} diff --git a/goldengate/technology_type.go b/goldengate/technology_type.go index d70db20398..61800952b5 100644 --- a/goldengate/technology_type.go +++ b/goldengate/technology_type.go @@ -18,60 +18,90 @@ type TechnologyTypeEnum string // Set of constants representing the allowable values for TechnologyTypeEnum const ( - TechnologyTypeOciAutonomousDatabase TechnologyTypeEnum = "OCI_AUTONOMOUS_DATABASE" - TechnologyTypeOciMysql TechnologyTypeEnum = "OCI_MYSQL" - TechnologyTypeOciObjectStorage TechnologyTypeEnum = "OCI_OBJECT_STORAGE" - TechnologyTypeOciStreaming TechnologyTypeEnum = "OCI_STREAMING" - TechnologyTypeOracleDatabase TechnologyTypeEnum = "ORACLE_DATABASE" - TechnologyTypeOracleExadata TechnologyTypeEnum = "ORACLE_EXADATA" - TechnologyTypeAmazonRdsOracle TechnologyTypeEnum = "AMAZON_RDS_ORACLE" - TechnologyTypeAmazonAuroraMysql TechnologyTypeEnum = "AMAZON_AURORA_MYSQL" - TechnologyTypeAmazonRdsMariadb TechnologyTypeEnum = "AMAZON_RDS_MARIADB" - TechnologyTypeAmazonRdsMysql TechnologyTypeEnum = "AMAZON_RDS_MYSQL" - TechnologyTypeApacheKafka TechnologyTypeEnum = "APACHE_KAFKA" - TechnologyTypeAzureMysql TechnologyTypeEnum = "AZURE_MYSQL" - TechnologyTypeGoldengate TechnologyTypeEnum = "GOLDENGATE" - TechnologyTypeGoogleCloudSqlMysql TechnologyTypeEnum = "GOOGLE_CLOUD_SQL_MYSQL" - TechnologyTypeMariadb TechnologyTypeEnum = "MARIADB" - TechnologyTypeMysqlServer TechnologyTypeEnum = "MYSQL_SERVER" + TechnologyTypeGoldengate TechnologyTypeEnum = "GOLDENGATE" + TechnologyTypeOciAutonomousDatabase TechnologyTypeEnum = "OCI_AUTONOMOUS_DATABASE" + TechnologyTypeOciMysql TechnologyTypeEnum = "OCI_MYSQL" + TechnologyTypeOciObjectStorage TechnologyTypeEnum = "OCI_OBJECT_STORAGE" + TechnologyTypeOciStreaming TechnologyTypeEnum = "OCI_STREAMING" + TechnologyTypeOracleDatabase TechnologyTypeEnum = "ORACLE_DATABASE" + TechnologyTypeOracleExadata TechnologyTypeEnum = "ORACLE_EXADATA" + TechnologyTypeAmazonRdsOracle TechnologyTypeEnum = "AMAZON_RDS_ORACLE" + TechnologyTypeAmazonAuroraMysql TechnologyTypeEnum = "AMAZON_AURORA_MYSQL" + TechnologyTypeAmazonAuroraPostgresql TechnologyTypeEnum = "AMAZON_AURORA_POSTGRESQL" + TechnologyTypeAmazonRdsMariadb TechnologyTypeEnum = "AMAZON_RDS_MARIADB" + TechnologyTypeAmazonRdsMysql TechnologyTypeEnum = "AMAZON_RDS_MYSQL" + TechnologyTypeAmazonRdsPostgresql TechnologyTypeEnum = "AMAZON_RDS_POSTGRESQL" + TechnologyTypeApacheKafka TechnologyTypeEnum = "APACHE_KAFKA" + TechnologyTypeAzureDataLakeStorage TechnologyTypeEnum = "AZURE_DATA_LAKE_STORAGE" + TechnologyTypeAzureEventHubs TechnologyTypeEnum = "AZURE_EVENT_HUBS" + TechnologyTypeAzureMysql TechnologyTypeEnum = "AZURE_MYSQL" + TechnologyTypeAzurePostgresql TechnologyTypeEnum = "AZURE_POSTGRESQL" + TechnologyTypeAzureSynapseAnalytics TechnologyTypeEnum = "AZURE_SYNAPSE_ANALYTICS" + TechnologyTypeConfluentKafka TechnologyTypeEnum = "CONFLUENT_KAFKA" + TechnologyTypeConfluentSchemaRegistry TechnologyTypeEnum = "CONFLUENT_SCHEMA_REGISTRY" + TechnologyTypeGoogleCloudSqlMysql TechnologyTypeEnum = "GOOGLE_CLOUD_SQL_MYSQL" + TechnologyTypeGoogleCloudSqlPostgresql TechnologyTypeEnum = "GOOGLE_CLOUD_SQL_POSTGRESQL" + TechnologyTypeMariadb TechnologyTypeEnum = "MARIADB" + TechnologyTypeMysqlServer TechnologyTypeEnum = "MYSQL_SERVER" + TechnologyTypePostgresqlServer TechnologyTypeEnum = "POSTGRESQL_SERVER" ) var mappingTechnologyTypeEnum = map[string]TechnologyTypeEnum{ - "OCI_AUTONOMOUS_DATABASE": TechnologyTypeOciAutonomousDatabase, - "OCI_MYSQL": TechnologyTypeOciMysql, - "OCI_OBJECT_STORAGE": TechnologyTypeOciObjectStorage, - "OCI_STREAMING": TechnologyTypeOciStreaming, - "ORACLE_DATABASE": TechnologyTypeOracleDatabase, - "ORACLE_EXADATA": TechnologyTypeOracleExadata, - "AMAZON_RDS_ORACLE": TechnologyTypeAmazonRdsOracle, - "AMAZON_AURORA_MYSQL": TechnologyTypeAmazonAuroraMysql, - "AMAZON_RDS_MARIADB": TechnologyTypeAmazonRdsMariadb, - "AMAZON_RDS_MYSQL": TechnologyTypeAmazonRdsMysql, - "APACHE_KAFKA": TechnologyTypeApacheKafka, - "AZURE_MYSQL": TechnologyTypeAzureMysql, - "GOLDENGATE": TechnologyTypeGoldengate, - "GOOGLE_CLOUD_SQL_MYSQL": TechnologyTypeGoogleCloudSqlMysql, - "MARIADB": TechnologyTypeMariadb, - "MYSQL_SERVER": TechnologyTypeMysqlServer, + "GOLDENGATE": TechnologyTypeGoldengate, + "OCI_AUTONOMOUS_DATABASE": TechnologyTypeOciAutonomousDatabase, + "OCI_MYSQL": TechnologyTypeOciMysql, + "OCI_OBJECT_STORAGE": TechnologyTypeOciObjectStorage, + "OCI_STREAMING": TechnologyTypeOciStreaming, + "ORACLE_DATABASE": TechnologyTypeOracleDatabase, + "ORACLE_EXADATA": TechnologyTypeOracleExadata, + "AMAZON_RDS_ORACLE": TechnologyTypeAmazonRdsOracle, + "AMAZON_AURORA_MYSQL": TechnologyTypeAmazonAuroraMysql, + "AMAZON_AURORA_POSTGRESQL": TechnologyTypeAmazonAuroraPostgresql, + "AMAZON_RDS_MARIADB": TechnologyTypeAmazonRdsMariadb, + "AMAZON_RDS_MYSQL": TechnologyTypeAmazonRdsMysql, + "AMAZON_RDS_POSTGRESQL": TechnologyTypeAmazonRdsPostgresql, + "APACHE_KAFKA": TechnologyTypeApacheKafka, + "AZURE_DATA_LAKE_STORAGE": TechnologyTypeAzureDataLakeStorage, + "AZURE_EVENT_HUBS": TechnologyTypeAzureEventHubs, + "AZURE_MYSQL": TechnologyTypeAzureMysql, + "AZURE_POSTGRESQL": TechnologyTypeAzurePostgresql, + "AZURE_SYNAPSE_ANALYTICS": TechnologyTypeAzureSynapseAnalytics, + "CONFLUENT_KAFKA": TechnologyTypeConfluentKafka, + "CONFLUENT_SCHEMA_REGISTRY": TechnologyTypeConfluentSchemaRegistry, + "GOOGLE_CLOUD_SQL_MYSQL": TechnologyTypeGoogleCloudSqlMysql, + "GOOGLE_CLOUD_SQL_POSTGRESQL": TechnologyTypeGoogleCloudSqlPostgresql, + "MARIADB": TechnologyTypeMariadb, + "MYSQL_SERVER": TechnologyTypeMysqlServer, + "POSTGRESQL_SERVER": TechnologyTypePostgresqlServer, } var mappingTechnologyTypeEnumLowerCase = map[string]TechnologyTypeEnum{ - "oci_autonomous_database": TechnologyTypeOciAutonomousDatabase, - "oci_mysql": TechnologyTypeOciMysql, - "oci_object_storage": TechnologyTypeOciObjectStorage, - "oci_streaming": TechnologyTypeOciStreaming, - "oracle_database": TechnologyTypeOracleDatabase, - "oracle_exadata": TechnologyTypeOracleExadata, - "amazon_rds_oracle": TechnologyTypeAmazonRdsOracle, - "amazon_aurora_mysql": TechnologyTypeAmazonAuroraMysql, - "amazon_rds_mariadb": TechnologyTypeAmazonRdsMariadb, - "amazon_rds_mysql": TechnologyTypeAmazonRdsMysql, - "apache_kafka": TechnologyTypeApacheKafka, - "azure_mysql": TechnologyTypeAzureMysql, - "goldengate": TechnologyTypeGoldengate, - "google_cloud_sql_mysql": TechnologyTypeGoogleCloudSqlMysql, - "mariadb": TechnologyTypeMariadb, - "mysql_server": TechnologyTypeMysqlServer, + "goldengate": TechnologyTypeGoldengate, + "oci_autonomous_database": TechnologyTypeOciAutonomousDatabase, + "oci_mysql": TechnologyTypeOciMysql, + "oci_object_storage": TechnologyTypeOciObjectStorage, + "oci_streaming": TechnologyTypeOciStreaming, + "oracle_database": TechnologyTypeOracleDatabase, + "oracle_exadata": TechnologyTypeOracleExadata, + "amazon_rds_oracle": TechnologyTypeAmazonRdsOracle, + "amazon_aurora_mysql": TechnologyTypeAmazonAuroraMysql, + "amazon_aurora_postgresql": TechnologyTypeAmazonAuroraPostgresql, + "amazon_rds_mariadb": TechnologyTypeAmazonRdsMariadb, + "amazon_rds_mysql": TechnologyTypeAmazonRdsMysql, + "amazon_rds_postgresql": TechnologyTypeAmazonRdsPostgresql, + "apache_kafka": TechnologyTypeApacheKafka, + "azure_data_lake_storage": TechnologyTypeAzureDataLakeStorage, + "azure_event_hubs": TechnologyTypeAzureEventHubs, + "azure_mysql": TechnologyTypeAzureMysql, + "azure_postgresql": TechnologyTypeAzurePostgresql, + "azure_synapse_analytics": TechnologyTypeAzureSynapseAnalytics, + "confluent_kafka": TechnologyTypeConfluentKafka, + "confluent_schema_registry": TechnologyTypeConfluentSchemaRegistry, + "google_cloud_sql_mysql": TechnologyTypeGoogleCloudSqlMysql, + "google_cloud_sql_postgresql": TechnologyTypeGoogleCloudSqlPostgresql, + "mariadb": TechnologyTypeMariadb, + "mysql_server": TechnologyTypeMysqlServer, + "postgresql_server": TechnologyTypePostgresqlServer, } // GetTechnologyTypeEnumValues Enumerates the set of values for TechnologyTypeEnum @@ -86,6 +116,7 @@ func GetTechnologyTypeEnumValues() []TechnologyTypeEnum { // GetTechnologyTypeEnumStringValues Enumerates the set of values in String for TechnologyTypeEnum func GetTechnologyTypeEnumStringValues() []string { return []string{ + "GOLDENGATE", "OCI_AUTONOMOUS_DATABASE", "OCI_MYSQL", "OCI_OBJECT_STORAGE", @@ -94,14 +125,23 @@ func GetTechnologyTypeEnumStringValues() []string { "ORACLE_EXADATA", "AMAZON_RDS_ORACLE", "AMAZON_AURORA_MYSQL", + "AMAZON_AURORA_POSTGRESQL", "AMAZON_RDS_MARIADB", "AMAZON_RDS_MYSQL", + "AMAZON_RDS_POSTGRESQL", "APACHE_KAFKA", + "AZURE_DATA_LAKE_STORAGE", + "AZURE_EVENT_HUBS", "AZURE_MYSQL", - "GOLDENGATE", + "AZURE_POSTGRESQL", + "AZURE_SYNAPSE_ANALYTICS", + "CONFLUENT_KAFKA", + "CONFLUENT_SCHEMA_REGISTRY", "GOOGLE_CLOUD_SQL_MYSQL", + "GOOGLE_CLOUD_SQL_POSTGRESQL", "MARIADB", "MYSQL_SERVER", + "POSTGRESQL_SERVER", } } diff --git a/goldengate/update_azure_data_lake_storage_connection_details.go b/goldengate/update_azure_data_lake_storage_connection_details.go new file mode 100644 index 0000000000..248eaf1e42 --- /dev/null +++ b/goldengate/update_azure_data_lake_storage_connection_details.go @@ -0,0 +1,152 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateAzureDataLakeStorageConnectionDetails The information to update a Azure Data Lake Storage Connection. +type UpdateAzureDataLakeStorageConnectionDetails struct { + + // An object's Display Name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` + + // A simple key-value pair that is applied without any predefined name, type, or scope. Exists + // for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer vault being + // referenced. + // If provided, this will reference a vault which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to manage secrets contained + // within this vault. + VaultId *string `mandatory:"false" json:"vaultId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer "Master" key being + // referenced. + // If provided, this will reference a key which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to utilize this key to + // manage secrets. + KeyId *string `mandatory:"false" json:"keyId"` + + // An array of Network Security Group OCIDs used to define network access for either Deployments or Connections. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // Sets the Azure storage account name. + AccountName *string `mandatory:"false" json:"accountName"` + + // Azure storage account key. This property is required when 'authenticationType' is set to 'SHARED_KEY'. + // e.g.: pa3WbhVATzj56xD4DH1VjOUhApRGEGHvOo58eQJVWIzX+j8j4CUVFcTjpIqDSRaSa1Wo2LbWY5at+AStEgLOIQ== + AccountKey *string `mandatory:"false" json:"accountKey"` + + // Credential that uses a shared access signature (SAS) to authenticate to an Azure Service. This property is + // required when 'authenticationType' is set to 'SHARED_ACCESS_SIGNATURE'. + // e.g.: ?sv=2020-06-08&ss=bfqt&srt=sco&sp=rwdlacupyx&se=2020-09-10T20:27:28Z&st=2022-08-05T12:27:28Z&spr=https&sig=C1IgHsiLBmTSStYkXXGLTP8it0xBrArcgCqOsZbXwIQ%3D + SasToken *string `mandatory:"false" json:"sasToken"` + + // Azure tenant ID of the application. This property is required when 'authenticationType' is set to 'AZURE_ACTIVE_DIRECTORY'. + // e.g.: 14593954-d337-4a61-a364-9f758c64f97f + AzureTenantId *string `mandatory:"false" json:"azureTenantId"` + + // Azure client ID of the application. This property is required when 'authenticationType' is set to 'AZURE_ACTIVE_DIRECTORY'. + // e.g.: 06ecaabf-8b80-4ec8-a0ec-20cbf463703d + ClientId *string `mandatory:"false" json:"clientId"` + + // Azure client secret (aka application password) for authentication. This property is required when 'authenticationType' is set to 'AZURE_ACTIVE_DIRECTORY'. + // e.g.: dO29Q~F5-VwnA.lZdd11xFF_t5NAXCaGwDl9NbT1 + ClientSecret *string `mandatory:"false" json:"clientSecret"` + + // Azure Storage service endpoint. + // e.g: https://test.blob.core.windows.net + Endpoint *string `mandatory:"false" json:"endpoint"` + + // Used authentication mechanism to access Azure Data Lake Storage. + AuthenticationType AzureDataLakeStorageConnectionAuthenticationTypeEnum `mandatory:"false" json:"authenticationType,omitempty"` +} + +//GetDisplayName returns DisplayName +func (m UpdateAzureDataLakeStorageConnectionDetails) GetDisplayName() *string { + return m.DisplayName +} + +//GetDescription returns Description +func (m UpdateAzureDataLakeStorageConnectionDetails) GetDescription() *string { + return m.Description +} + +//GetFreeformTags returns FreeformTags +func (m UpdateAzureDataLakeStorageConnectionDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetDefinedTags returns DefinedTags +func (m UpdateAzureDataLakeStorageConnectionDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +//GetVaultId returns VaultId +func (m UpdateAzureDataLakeStorageConnectionDetails) GetVaultId() *string { + return m.VaultId +} + +//GetKeyId returns KeyId +func (m UpdateAzureDataLakeStorageConnectionDetails) GetKeyId() *string { + return m.KeyId +} + +//GetNsgIds returns NsgIds +func (m UpdateAzureDataLakeStorageConnectionDetails) GetNsgIds() []string { + return m.NsgIds +} + +func (m UpdateAzureDataLakeStorageConnectionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateAzureDataLakeStorageConnectionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingAzureDataLakeStorageConnectionAuthenticationTypeEnum(string(m.AuthenticationType)); !ok && m.AuthenticationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AuthenticationType: %s. Supported values are: %s.", m.AuthenticationType, strings.Join(GetAzureDataLakeStorageConnectionAuthenticationTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UpdateAzureDataLakeStorageConnectionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateAzureDataLakeStorageConnectionDetails UpdateAzureDataLakeStorageConnectionDetails + s := struct { + DiscriminatorParam string `json:"connectionType"` + MarshalTypeUpdateAzureDataLakeStorageConnectionDetails + }{ + "AZURE_DATA_LAKE_STORAGE", + (MarshalTypeUpdateAzureDataLakeStorageConnectionDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/goldengate/update_azure_synapse_connection_details.go b/goldengate/update_azure_synapse_connection_details.go new file mode 100644 index 0000000000..f7494d085e --- /dev/null +++ b/goldengate/update_azure_synapse_connection_details.go @@ -0,0 +1,132 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateAzureSynapseConnectionDetails The information to update a Azure Synapse Analytics Connection. +type UpdateAzureSynapseConnectionDetails struct { + + // An object's Display Name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` + + // A simple key-value pair that is applied without any predefined name, type, or scope. Exists + // for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer vault being + // referenced. + // If provided, this will reference a vault which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to manage secrets contained + // within this vault. + VaultId *string `mandatory:"false" json:"vaultId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer "Master" key being + // referenced. + // If provided, this will reference a key which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to utilize this key to + // manage secrets. + KeyId *string `mandatory:"false" json:"keyId"` + + // An array of Network Security Group OCIDs used to define network access for either Deployments or Connections. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // JDBC connection string. + // e.g.: 'jdbc:sqlserver://.sql.azuresynapse.net:1433;database=;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.sql.azuresynapse.net;loginTimeout=300;' + ConnectionString *string `mandatory:"false" json:"connectionString"` + + // The username Oracle GoldenGate uses to connect the associated RDBMS. This username must + // already exist and be available for use by the database. It must conform to the security + // requirements implemented by the database including length, case sensitivity, and so on. + Username *string `mandatory:"false" json:"username"` + + // The password Oracle GoldenGate uses to connect the associated RDBMS. It must conform to the + // specific security requirements implemented by the database including length, case + // sensitivity, and so on. + Password *string `mandatory:"false" json:"password"` +} + +//GetDisplayName returns DisplayName +func (m UpdateAzureSynapseConnectionDetails) GetDisplayName() *string { + return m.DisplayName +} + +//GetDescription returns Description +func (m UpdateAzureSynapseConnectionDetails) GetDescription() *string { + return m.Description +} + +//GetFreeformTags returns FreeformTags +func (m UpdateAzureSynapseConnectionDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetDefinedTags returns DefinedTags +func (m UpdateAzureSynapseConnectionDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +//GetVaultId returns VaultId +func (m UpdateAzureSynapseConnectionDetails) GetVaultId() *string { + return m.VaultId +} + +//GetKeyId returns KeyId +func (m UpdateAzureSynapseConnectionDetails) GetKeyId() *string { + return m.KeyId +} + +//GetNsgIds returns NsgIds +func (m UpdateAzureSynapseConnectionDetails) GetNsgIds() []string { + return m.NsgIds +} + +func (m UpdateAzureSynapseConnectionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateAzureSynapseConnectionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UpdateAzureSynapseConnectionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateAzureSynapseConnectionDetails UpdateAzureSynapseConnectionDetails + s := struct { + DiscriminatorParam string `json:"connectionType"` + MarshalTypeUpdateAzureSynapseConnectionDetails + }{ + "AZURE_SYNAPSE_ANALYTICS", + (MarshalTypeUpdateAzureSynapseConnectionDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/goldengate/update_connection_details.go b/goldengate/update_connection_details.go index 23696fe059..a3d932d470 100644 --- a/goldengate/update_connection_details.go +++ b/goldengate/update_connection_details.go @@ -96,10 +96,18 @@ func (m *updateconnectiondetails) UnmarshalPolymorphicJSON(data []byte) (interfa var err error switch m.ConnectionType { + case "POSTGRESQL": + mm := UpdatePostgresqlConnectionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "ORACLE": mm := UpdateOracleConnectionDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "KAFKA_SCHEMA_REGISTRY": + mm := UpdateKafkaSchemaRegistryConnectionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "OCI_OBJECT_STORAGE": mm := UpdateOciObjectStorageConnectionDetails{} err = json.Unmarshal(data, &mm) @@ -112,10 +120,18 @@ func (m *updateconnectiondetails) UnmarshalPolymorphicJSON(data []byte) (interfa mm := UpdateKafkaConnectionDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "AZURE_DATA_LAKE_STORAGE": + mm := UpdateAzureDataLakeStorageConnectionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "GOLDENGATE": mm := UpdateGoldenGateConnectionDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "AZURE_SYNAPSE_ANALYTICS": + mm := UpdateAzureSynapseConnectionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err default: return *m, nil } diff --git a/goldengate/update_kafka_connection_details.go b/goldengate/update_kafka_connection_details.go index 243cd96329..7a051e626a 100644 --- a/goldengate/update_kafka_connection_details.go +++ b/goldengate/update_kafka_connection_details.go @@ -82,7 +82,7 @@ type UpdateKafkaConnectionDetails struct { // The KeyStore password. KeyStorePassword *string `mandatory:"false" json:"keyStorePassword"` - // The password for the cert inside of of the KeyStore. + // The password for the cert inside of the KeyStore. // In case it differs from the KeyStore password, it should be provided. SslKeyPassword *string `mandatory:"false" json:"sslKeyPassword"` diff --git a/goldengate/update_kafka_schema_registry_connection_details.go b/goldengate/update_kafka_schema_registry_connection_details.go new file mode 100644 index 0000000000..784b7ef437 --- /dev/null +++ b/goldengate/update_kafka_schema_registry_connection_details.go @@ -0,0 +1,159 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateKafkaSchemaRegistryConnectionDetails The information to update Kafka (e.g. Confluent) Schema Registry Connection. +type UpdateKafkaSchemaRegistryConnectionDetails struct { + + // An object's Display Name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` + + // A simple key-value pair that is applied without any predefined name, type, or scope. Exists + // for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer vault being + // referenced. + // If provided, this will reference a vault which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to manage secrets contained + // within this vault. + VaultId *string `mandatory:"false" json:"vaultId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer "Master" key being + // referenced. + // If provided, this will reference a key which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to utilize this key to + // manage secrets. + KeyId *string `mandatory:"false" json:"keyId"` + + // An array of Network Security Group OCIDs used to define network access for either Deployments or Connections. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // Kafka Schema Registry URL. + // e.g.: 'https://server1.us.oracle.com:8081' + Url *string `mandatory:"false" json:"url"` + + // The username to access Schema Registry using basic authentation. + // This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. + Username *string `mandatory:"false" json:"username"` + + // The password to access Schema Registry using basic authentation. + // This value is injected into 'schema.registry.basic.auth.user.info=user:password' configuration property. + Password *string `mandatory:"false" json:"password"` + + // The base64 encoded content of the TrustStore file. + TrustStore *string `mandatory:"false" json:"trustStore"` + + // The TrustStore password. + TrustStorePassword *string `mandatory:"false" json:"trustStorePassword"` + + // The base64 encoded content of the KeyStore file. + KeyStore *string `mandatory:"false" json:"keyStore"` + + // The KeyStore password. + KeyStorePassword *string `mandatory:"false" json:"keyStorePassword"` + + // The password for the cert inside the KeyStore. + // In case it differs from the KeyStore password, it should be provided. + SslKeyPassword *string `mandatory:"false" json:"sslKeyPassword"` + + // The private IP address of the connection's endpoint in the customer's VCN, typically a + // database endpoint or a big data endpoint (e.g. Kafka bootstrap server). + // In case the privateIp is provided, the subnetId must also be provided. + // In case the privateIp (and the subnetId) is not provided it is assumed the datasource is publicly accessible. + // In case the connection is accessible only privately, the lack of privateIp will result in not being able to access the connection. + PrivateIp *string `mandatory:"false" json:"privateIp"` + + // Used authentication mechanism to access Schema Registry. + AuthenticationType KafkaSchemaRegistryConnectionAuthenticationTypeEnum `mandatory:"false" json:"authenticationType,omitempty"` +} + +//GetDisplayName returns DisplayName +func (m UpdateKafkaSchemaRegistryConnectionDetails) GetDisplayName() *string { + return m.DisplayName +} + +//GetDescription returns Description +func (m UpdateKafkaSchemaRegistryConnectionDetails) GetDescription() *string { + return m.Description +} + +//GetFreeformTags returns FreeformTags +func (m UpdateKafkaSchemaRegistryConnectionDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetDefinedTags returns DefinedTags +func (m UpdateKafkaSchemaRegistryConnectionDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +//GetVaultId returns VaultId +func (m UpdateKafkaSchemaRegistryConnectionDetails) GetVaultId() *string { + return m.VaultId +} + +//GetKeyId returns KeyId +func (m UpdateKafkaSchemaRegistryConnectionDetails) GetKeyId() *string { + return m.KeyId +} + +//GetNsgIds returns NsgIds +func (m UpdateKafkaSchemaRegistryConnectionDetails) GetNsgIds() []string { + return m.NsgIds +} + +func (m UpdateKafkaSchemaRegistryConnectionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateKafkaSchemaRegistryConnectionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingKafkaSchemaRegistryConnectionAuthenticationTypeEnum(string(m.AuthenticationType)); !ok && m.AuthenticationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AuthenticationType: %s. Supported values are: %s.", m.AuthenticationType, strings.Join(GetKafkaSchemaRegistryConnectionAuthenticationTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UpdateKafkaSchemaRegistryConnectionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateKafkaSchemaRegistryConnectionDetails UpdateKafkaSchemaRegistryConnectionDetails + s := struct { + DiscriminatorParam string `json:"connectionType"` + MarshalTypeUpdateKafkaSchemaRegistryConnectionDetails + }{ + "KAFKA_SCHEMA_REGISTRY", + (MarshalTypeUpdateKafkaSchemaRegistryConnectionDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/goldengate/update_oci_object_storage_connection_details.go b/goldengate/update_oci_object_storage_connection_details.go index 44a25869d0..f4b0568c9e 100644 --- a/goldengate/update_oci_object_storage_connection_details.go +++ b/goldengate/update_oci_object_storage_connection_details.go @@ -65,6 +65,9 @@ type UpdateOciObjectStorageConnectionDetails struct { // See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm PrivateKeyFile *string `mandatory:"false" json:"privateKeyFile"` + // The passphrase of the private key. + PrivateKeyPassphrase *string `mandatory:"false" json:"privateKeyPassphrase"` + // The fingerprint of the API Key of the user specified by the userId. // See documentation: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm PublicKeyFingerprint *string `mandatory:"false" json:"publicKeyFingerprint"` diff --git a/goldengate/update_ogg_deployment_details.go b/goldengate/update_ogg_deployment_details.go index d365994e31..69512e903c 100644 --- a/goldengate/update_ogg_deployment_details.go +++ b/goldengate/update_ogg_deployment_details.go @@ -24,6 +24,7 @@ type UpdateOggDeploymentDetails struct { // The password associated with the GoldenGate deployment console username. // The password must be 8 to 30 characters long and must contain at least 1 uppercase, 1 lowercase, 1 numeric, // and 1 special character. Special characters such as ‘$’, ‘^’, or ‘?’ are not allowed. + // This field will be deprecated and replaced by "passwordSecretId". AdminPassword *string `mandatory:"false" json:"adminPassword"` // A PEM-encoded SSL certificate. diff --git a/goldengate/update_postgresql_connection_details.go b/goldengate/update_postgresql_connection_details.go new file mode 100644 index 0000000000..aa8bb564d8 --- /dev/null +++ b/goldengate/update_postgresql_connection_details.go @@ -0,0 +1,172 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// GoldenGate API +// +// Use the Oracle Cloud Infrastructure GoldenGate APIs to perform data replication operations. +// + +package goldengate + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdatePostgresqlConnectionDetails The information to update a PostgreSQL Database Connection. +type UpdatePostgresqlConnectionDetails struct { + + // An object's Display Name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Metadata about this specific object. + Description *string `mandatory:"false" json:"description"` + + // A simple key-value pair that is applied without any predefined name, type, or scope. Exists + // for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Tags defined for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer vault being + // referenced. + // If provided, this will reference a vault which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to manage secrets contained + // within this vault. + VaultId *string `mandatory:"false" json:"vaultId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the customer "Master" key being + // referenced. + // If provided, this will reference a key which the customer will be required to ensure + // the policies are established to permit the GoldenGate Service to utilize this key to + // manage secrets. + KeyId *string `mandatory:"false" json:"keyId"` + + // An array of Network Security Group OCIDs used to define network access for either Deployments or Connections. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // The name of the database. + DatabaseName *string `mandatory:"false" json:"databaseName"` + + // The name or address of a host. + Host *string `mandatory:"false" json:"host"` + + // The port of an endpoint usually specified for a connection. + Port *int `mandatory:"false" json:"port"` + + // The username Oracle GoldenGate uses to connect the associated RDBMS. This username must + // already exist and be available for use by the database. It must conform to the security + // requirements implemented by the database including length, case sensitivity, and so on. + Username *string `mandatory:"false" json:"username"` + + // The password Oracle GoldenGate uses to connect the associated RDBMS. It must conform to the + // specific security requirements implemented by the database including length, case + // sensitivity, and so on. + Password *string `mandatory:"false" json:"password"` + + // An array of name-value pair attribute entries. + // Used as additional parameters in connection string. + AdditionalAttributes []NameValuePair `mandatory:"false" json:"additionalAttributes"` + + // The base64 encoded certificate of the trusted certificate authorities (Trusted CA) for PostgreSQL. + SslCa *string `mandatory:"false" json:"sslCa"` + + // The base64 encoded list of certificates revoked by the trusted certificate authorities (Trusted CA) for PostgreSQL. + SslCrl *string `mandatory:"false" json:"sslCrl"` + + // The base64 encoded certificate of the PostgreSQL server. + SslCert *string `mandatory:"false" json:"sslCert"` + + // The base64 encoded private key of the PostgreSQL server. + SslKey *string `mandatory:"false" json:"sslKey"` + + // The private IP address of the connection's endpoint in the customer's VCN, typically a + // database endpoint or a big data endpoint (e.g. Kafka bootstrap server). + // In case the privateIp is provided, the subnetId must also be provided. + // In case the privateIp (and the subnetId) is not provided it is assumed the datasource is publicly accessible. + // In case the connection is accessible only privately, the lack of privateIp will result in not being able to access the connection. + PrivateIp *string `mandatory:"false" json:"privateIp"` + + // Security protocol for PostgreSQL. + SecurityProtocol PostgresqlConnectionSecurityProtocolEnum `mandatory:"false" json:"securityProtocol,omitempty"` + + // SSL modes for PostgreSQL. + SslMode PostgresqlConnectionSslModeEnum `mandatory:"false" json:"sslMode,omitempty"` +} + +//GetDisplayName returns DisplayName +func (m UpdatePostgresqlConnectionDetails) GetDisplayName() *string { + return m.DisplayName +} + +//GetDescription returns Description +func (m UpdatePostgresqlConnectionDetails) GetDescription() *string { + return m.Description +} + +//GetFreeformTags returns FreeformTags +func (m UpdatePostgresqlConnectionDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +//GetDefinedTags returns DefinedTags +func (m UpdatePostgresqlConnectionDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +//GetVaultId returns VaultId +func (m UpdatePostgresqlConnectionDetails) GetVaultId() *string { + return m.VaultId +} + +//GetKeyId returns KeyId +func (m UpdatePostgresqlConnectionDetails) GetKeyId() *string { + return m.KeyId +} + +//GetNsgIds returns NsgIds +func (m UpdatePostgresqlConnectionDetails) GetNsgIds() []string { + return m.NsgIds +} + +func (m UpdatePostgresqlConnectionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdatePostgresqlConnectionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingPostgresqlConnectionSecurityProtocolEnum(string(m.SecurityProtocol)); !ok && m.SecurityProtocol != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SecurityProtocol: %s. Supported values are: %s.", m.SecurityProtocol, strings.Join(GetPostgresqlConnectionSecurityProtocolEnumStringValues(), ","))) + } + if _, ok := GetMappingPostgresqlConnectionSslModeEnum(string(m.SslMode)); !ok && m.SslMode != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SslMode: %s. Supported values are: %s.", m.SslMode, strings.Join(GetPostgresqlConnectionSslModeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UpdatePostgresqlConnectionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdatePostgresqlConnectionDetails UpdatePostgresqlConnectionDetails + s := struct { + DiscriminatorParam string `json:"connectionType"` + MarshalTypeUpdatePostgresqlConnectionDetails + }{ + "POSTGRESQL", + (MarshalTypeUpdatePostgresqlConnectionDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/queue/action_type.go b/queue/action_type.go new file mode 100644 index 0000000000..1d9939d606 --- /dev/null +++ b/queue/action_type.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "strings" +) + +// ActionTypeEnum Enum with underlying type: string +type ActionTypeEnum string + +// Set of constants representing the allowable values for ActionTypeEnum +const ( + ActionTypeCreated ActionTypeEnum = "CREATED" + ActionTypeUpdated ActionTypeEnum = "UPDATED" + ActionTypeDeleted ActionTypeEnum = "DELETED" + ActionTypeInProgress ActionTypeEnum = "IN_PROGRESS" + ActionTypeRelated ActionTypeEnum = "RELATED" +) + +var mappingActionTypeEnum = map[string]ActionTypeEnum{ + "CREATED": ActionTypeCreated, + "UPDATED": ActionTypeUpdated, + "DELETED": ActionTypeDeleted, + "IN_PROGRESS": ActionTypeInProgress, + "RELATED": ActionTypeRelated, +} + +var mappingActionTypeEnumLowerCase = map[string]ActionTypeEnum{ + "created": ActionTypeCreated, + "updated": ActionTypeUpdated, + "deleted": ActionTypeDeleted, + "in_progress": ActionTypeInProgress, + "related": ActionTypeRelated, +} + +// GetActionTypeEnumValues Enumerates the set of values for ActionTypeEnum +func GetActionTypeEnumValues() []ActionTypeEnum { + values := make([]ActionTypeEnum, 0) + for _, v := range mappingActionTypeEnum { + values = append(values, v) + } + return values +} + +// GetActionTypeEnumStringValues Enumerates the set of values in String for ActionTypeEnum +func GetActionTypeEnumStringValues() []string { + return []string{ + "CREATED", + "UPDATED", + "DELETED", + "IN_PROGRESS", + "RELATED", + } +} + +// GetMappingActionTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingActionTypeEnum(val string) (ActionTypeEnum, bool) { + enum, ok := mappingActionTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/queue/change_queue_compartment_details.go b/queue/change_queue_compartment_details.go new file mode 100644 index 0000000000..7752eea590 --- /dev/null +++ b/queue/change_queue_compartment_details.go @@ -0,0 +1,40 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeQueueCompartmentDetails The information to be updated. +type ChangeQueueCompartmentDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment + // into which the resource should be moved. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeQueueCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeQueueCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/change_queue_compartment_request_response.go b/queue/change_queue_compartment_request_response.go new file mode 100644 index 0000000000..1baf837f1b --- /dev/null +++ b/queue/change_queue_compartment_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeQueueCompartmentRequest wrapper for the ChangeQueueCompartment operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/ChangeQueueCompartment.go.html to see an example of how to use ChangeQueueCompartmentRequest. +type ChangeQueueCompartmentRequest struct { + + // unique Queue identifier + QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` + + // The information to be updated. + ChangeQueueCompartmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeQueueCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeQueueCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeQueueCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeQueueCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeQueueCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeQueueCompartmentResponse wrapper for the ChangeQueueCompartment operation +type ChangeQueueCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeQueueCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeQueueCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/databasemigration/create_agent_details.go b/queue/create_queue_details.go similarity index 55% rename from databasemigration/create_agent_details.go rename to queue/create_queue_details.go index 90fb3d60d0..57b0def52d 100644 --- a/databasemigration/create_agent_details.go +++ b/queue/create_queue_details.go @@ -2,12 +2,12 @@ // This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. // Code generated. DO NOT EDIT. -// Database Migration API +// Queue API // -// Use the Oracle Cloud Infrastructure Database Migration APIs to perform database migration operations. +// A description of the Queue API // -package databasemigration +package queue import ( "fmt" @@ -15,23 +15,29 @@ import ( "strings" ) -// CreateAgentDetails ODMS Agent Details -type CreateAgentDetails struct { +// CreateQueueDetails The information about new Queue. +type CreateQueueDetails struct { - // The OCID of the compartment. + // Queue Identifier + DisplayName *string `mandatory:"true" json:"displayName"` + + // Compartment Identifier CompartmentId *string `mandatory:"true" json:"compartmentId"` - // ODMS Agent name - DisplayName *string `mandatory:"true" json:"displayName"` + // The retention period of the messages in the queue, in seconds. + RetentionInSeconds *int `mandatory:"false" json:"retentionInSeconds"` + + // The default visibility of the messages consumed from the queue. + VisibilityInSeconds *int `mandatory:"false" json:"visibilityInSeconds"` - // The OCID of the Stream - StreamId *string `mandatory:"true" json:"streamId"` + // The default polling timeout of the messages in the queue, in seconds. + TimeoutInSeconds *int `mandatory:"false" json:"timeoutInSeconds"` - // ODMS Agent public key as a Base64 Encoded string. - PublicKey *string `mandatory:"true" json:"publicKey"` + // The number of times a message can be delivered to a consumer before being moved to the dead letter queue. A value of 0 indicates that the DLQ is not used. + DeadLetterQueueDeliveryCount *int `mandatory:"false" json:"deadLetterQueueDeliveryCount"` - // ODMS Agent version - Version *string `mandatory:"true" json:"version"` + // Id of the custom master encryption key which will be used to encrypt messages content + CustomEncryptionKeyId *string `mandatory:"false" json:"customEncryptionKeyId"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. // Example: `{"bar-key": "value"}` @@ -42,14 +48,14 @@ type CreateAgentDetails struct { DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` } -func (m CreateAgentDetails) String() string { +func (m CreateQueueDetails) String() string { return common.PointerString(m) } // ValidateEnumValue returns an error when providing an unsupported enum value // This function is being called during constructing API request process // Not recommended for calling this function directly -func (m CreateAgentDetails) ValidateEnumValue() (bool, error) { +func (m CreateQueueDetails) ValidateEnumValue() (bool, error) { errMessage := []string{} if len(errMessage) > 0 { diff --git a/queue/create_queue_request_response.go b/queue/create_queue_request_response.go new file mode 100644 index 0000000000..ed0e7b8730 --- /dev/null +++ b/queue/create_queue_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateQueueRequest wrapper for the CreateQueue operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/CreateQueue.go.html to see an example of how to use CreateQueueRequest. +type CreateQueueRequest struct { + + // Details for the new Queue. + CreateQueueDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateQueueRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateQueueRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateQueueRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateQueueRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateQueueRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateQueueResponse wrapper for the CreateQueue operation +type CreateQueueResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateQueueResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateQueueResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/queue/delete_message_request_response.go b/queue/delete_message_request_response.go new file mode 100644 index 0000000000..c453489769 --- /dev/null +++ b/queue/delete_message_request_response.go @@ -0,0 +1,90 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteMessageRequest wrapper for the DeleteMessage operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/DeleteMessage.go.html to see an example of how to use DeleteMessageRequest. +type DeleteMessageRequest struct { + + // unique Queue identifier + QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` + + // The receipt of the message retrieved from a GetMessages call. + MessageReceipt *string `mandatory:"true" contributesTo:"path" name:"messageReceipt"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteMessageRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteMessageRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteMessageRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteMessageRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteMessageRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteMessageResponse wrapper for the DeleteMessage operation +type DeleteMessageResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteMessageResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteMessageResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/databasemigration/par_link.go b/queue/delete_messages_details.go similarity index 66% rename from databasemigration/par_link.go rename to queue/delete_messages_details.go index b6a40e980d..6864c9f4bc 100644 --- a/databasemigration/par_link.go +++ b/queue/delete_messages_details.go @@ -2,12 +2,12 @@ // This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. // Code generated. DO NOT EDIT. -// Database Migration API +// Queue API // -// Use the Oracle Cloud Infrastructure Database Migration APIs to perform database migration operations. +// A description of the Queue API // -package databasemigration +package queue import ( "fmt" @@ -15,21 +15,21 @@ import ( "strings" ) -// ParLink Pre-Authenticated Request Link for ODMS Agent log use. -type ParLink struct { +// DeleteMessagesDetails The details of a DeleteMessages request. +type DeleteMessagesDetails struct { - // Pre-Authenticated Request URI. - ParLink *string `mandatory:"true" json:"parLink"` + // The array of messages to delete from a queue. + Entries []DeleteMessagesDetailsEntry `mandatory:"true" json:"entries"` } -func (m ParLink) String() string { +func (m DeleteMessagesDetails) String() string { return common.PointerString(m) } // ValidateEnumValue returns an error when providing an unsupported enum value // This function is being called during constructing API request process // Not recommended for calling this function directly -func (m ParLink) ValidateEnumValue() (bool, error) { +func (m DeleteMessagesDetails) ValidateEnumValue() (bool, error) { errMessage := []string{} if len(errMessage) > 0 { diff --git a/databasemigration/generate_token.go b/queue/delete_messages_details_entry.go similarity index 65% rename from databasemigration/generate_token.go rename to queue/delete_messages_details_entry.go index 65ab3c5f09..9828bca78f 100644 --- a/databasemigration/generate_token.go +++ b/queue/delete_messages_details_entry.go @@ -2,12 +2,12 @@ // This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. // Code generated. DO NOT EDIT. -// Database Migration API +// Queue API // -// Use the Oracle Cloud Infrastructure Database Migration APIs to perform database migration operations. +// A description of the Queue API // -package databasemigration +package queue import ( "fmt" @@ -15,21 +15,21 @@ import ( "strings" ) -// GenerateToken ODMS Agent token details. -type GenerateToken struct { +// DeleteMessagesDetailsEntry Object that represents a message to delete from a queue. +type DeleteMessagesDetailsEntry struct { - // Resource Principals Token in serialized form. - RptBlob *string `mandatory:"true" json:"rptBlob"` + // The receipt of the message to delete + Receipt *string `mandatory:"true" json:"receipt"` } -func (m GenerateToken) String() string { +func (m DeleteMessagesDetailsEntry) String() string { return common.PointerString(m) } // ValidateEnumValue returns an error when providing an unsupported enum value // This function is being called during constructing API request process // Not recommended for calling this function directly -func (m GenerateToken) ValidateEnumValue() (bool, error) { +func (m DeleteMessagesDetailsEntry) ValidateEnumValue() (bool, error) { errMessage := []string{} if len(errMessage) > 0 { diff --git a/queue/delete_messages_request_response.go b/queue/delete_messages_request_response.go new file mode 100644 index 0000000000..1d94b5f067 --- /dev/null +++ b/queue/delete_messages_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteMessagesRequest wrapper for the DeleteMessages operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/DeleteMessages.go.html to see an example of how to use DeleteMessagesRequest. +type DeleteMessagesRequest struct { + + // unique Queue identifier + QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` + + // Details for the messages to delete. + DeleteMessagesDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteMessagesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteMessagesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteMessagesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteMessagesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteMessagesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteMessagesResponse wrapper for the DeleteMessages operation +type DeleteMessagesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DeleteMessagesResult instance + DeleteMessagesResult `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteMessagesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteMessagesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/queue/delete_messages_result.go b/queue/delete_messages_result.go new file mode 100644 index 0000000000..0374ca2356 --- /dev/null +++ b/queue/delete_messages_result.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DeleteMessagesResult The response to a DeleteMessages request. It indicates the number of server and client failures as well as an array of entries for successful and failed actions. +type DeleteMessagesResult struct { + + // The number of messages that failed to be deleted from the queue because of a server failure. + ServerFailures *int `mandatory:"true" json:"serverFailures"` + + // The number of messages that failed to be deleted from the queue because of a client failure such as an invalid receipt. + ClientFailures *int `mandatory:"true" json:"clientFailures"` + + // An array of items representing the result of each action. + // The order is guaranteed to be the same as in the `DeleteMessagesDetails` object. + // If a message was successfully deleted from the queue, the entry does not contain any fields. + // If a message failed to be deleted from the queue, the entry includes the `errorCode` and `errorMessage` fields. + Entries []DeleteMessagesResultEntry `mandatory:"true" json:"entries"` +} + +func (m DeleteMessagesResult) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DeleteMessagesResult) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/delete_messages_result_entry.go b/queue/delete_messages_result_entry.go new file mode 100644 index 0000000000..806bf870a4 --- /dev/null +++ b/queue/delete_messages_result_entry.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DeleteMessagesResultEntry Represents the result of a DeleteMessages request, whether it was successful or not. +// If a message was successfully deleted from the queue, the entry does not contain any fields. +// If a message failed to be deleted from the queue, the entry includes the `errorCode` and `errorMessage` fields. +type DeleteMessagesResultEntry struct { + + // The error code, in case the message was not successfully deleted from the queue. + ErrorCode *int `mandatory:"false" json:"errorCode"` + + // A human-readable error message associated with the error code. + ErrorMessage *string `mandatory:"false" json:"errorMessage"` +} + +func (m DeleteMessagesResultEntry) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DeleteMessagesResultEntry) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/delete_queue_request_response.go b/queue/delete_queue_request_response.go new file mode 100644 index 0000000000..3128ca1d30 --- /dev/null +++ b/queue/delete_queue_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteQueueRequest wrapper for the DeleteQueue operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/DeleteQueue.go.html to see an example of how to use DeleteQueueRequest. +type DeleteQueueRequest struct { + + // unique Queue identifier + QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteQueueRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteQueueRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteQueueRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteQueueRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteQueueRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteQueueResponse wrapper for the DeleteQueue operation +type DeleteQueueResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteQueueResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteQueueResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/queue/get_message.go b/queue/get_message.go new file mode 100644 index 0000000000..666c453e8c --- /dev/null +++ b/queue/get_message.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GetMessage A message consumed from a queue. +type GetMessage struct { + + // The id of the message - this is only used for tracing and debugging purposes and isn't used as a parameter in any request. + Id *int64 `mandatory:"true" json:"id"` + + // The content of the message + Content *string `mandatory:"true" json:"content"` + + // A receipt is a base64urlencode opaque token, uniquely representing a message. + // The receipt can be used to delete a message or update its visibility. + Receipt *string `mandatory:"true" json:"receipt"` + + // The number of time the message has been delivered to a consumer. + DeliveryCount *int `mandatory:"true" json:"deliveryCount"` + + // The time after which the message will be visible to other consumers. An RFC3339 formatted datetime string + VisibleAfter *common.SDKTime `mandatory:"true" json:"visibleAfter"` + + // The time after which the message will be automatically deleted. An RFC3339 formatted datetime string + ExpireAfter *common.SDKTime `mandatory:"true" json:"expireAfter"` +} + +func (m GetMessage) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m GetMessage) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/get_messages.go b/queue/get_messages.go new file mode 100644 index 0000000000..581428aa71 --- /dev/null +++ b/queue/get_messages.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GetMessages A list of messages from a queue. +type GetMessages struct { + + // List of messages from a queue. + Messages []GetMessage `mandatory:"true" json:"messages"` +} + +func (m GetMessages) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m GetMessages) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/get_messages_request_response.go b/queue/get_messages_request_response.go new file mode 100644 index 0000000000..8821f46436 --- /dev/null +++ b/queue/get_messages_request_response.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetMessagesRequest wrapper for the GetMessages operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/GetMessages.go.html to see an example of how to use GetMessagesRequest. +type GetMessagesRequest struct { + + // unique Queue identifier + QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` + + // If the visibilityInSeconds parameter is set, messages will be hidden for visibilityInSeconds seconds and won't be consumable by other consumers during that time. + // If it isn't set it defaults to the value set at the queue level. The minimum is 0 and the maximum is 43,200 (12 hours). + // Using a visibilityInSeconds of 0, effectively acts as a peek functionality. + // Messages retrieved that way, aren't meant to be deleted because they will most likely be delivered to another consumer as their visibility won't change, but will still increase the delivery count by one. + VisibilityInSeconds *int `mandatory:"false" contributesTo:"query" name:"visibilityInSeconds"` + + // If the timeoutInSeconds parameter isn't set or set to a value greater than zero, the request is using the long-polling mode and will only return when a message is available for consumption (it does not wait for limit messages but still only returns at-most limit messages) or after timeoutInSeconds seconds (in which case it will return an empty response) whichever comes first. + // If the parameter is set to zero, the request is using the short-polling mode and immediately returns whether messages have been retrieved or not. + // In same rare-cases a long-polling request could be interrupted (returned with empty response) before the end of the timeout. + // The minimum is 0 (long polling disabled), the maximum is 30 seconds and default is 30 seconds. + TimeoutInSeconds *int `mandatory:"false" contributesTo:"query" name:"timeoutInSeconds"` + + // The limit parameter controls how many messages is returned at-most. + // The default is 1, the minimum is 1 and the maximum is 32. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetMessagesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetMessagesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetMessagesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetMessagesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetMessagesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetMessagesResponse wrapper for the GetMessages operation +type GetMessagesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The GetMessages instance + GetMessages `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetMessagesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetMessagesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/queue/get_queue_request_response.go b/queue/get_queue_request_response.go new file mode 100644 index 0000000000..0d81973ca3 --- /dev/null +++ b/queue/get_queue_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetQueueRequest wrapper for the GetQueue operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/GetQueue.go.html to see an example of how to use GetQueueRequest. +type GetQueueRequest struct { + + // unique Queue identifier + QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetQueueRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetQueueRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetQueueRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetQueueRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetQueueRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetQueueResponse wrapper for the GetQueue operation +type GetQueueResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Queue instance + Queue `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetQueueResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetQueueResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/queue/get_stats_request_response.go b/queue/get_stats_request_response.go new file mode 100644 index 0000000000..1e0f84de46 --- /dev/null +++ b/queue/get_stats_request_response.go @@ -0,0 +1,90 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetStatsRequest wrapper for the GetStats operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/GetStats.go.html to see an example of how to use GetStatsRequest. +type GetStatsRequest struct { + + // unique Queue identifier + QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetStatsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetStatsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetStatsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetStatsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetStatsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetStatsResponse wrapper for the GetStats operation +type GetStatsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The QueueStats instance + QueueStats `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetStatsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetStatsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/queue/get_work_request_request_response.go b/queue/get_work_request_request_response.go new file mode 100644 index 0000000000..a39ae11ae9 --- /dev/null +++ b/queue/get_work_request_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetWorkRequestRequest wrapper for the GetWorkRequest operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/GetWorkRequest.go.html to see an example of how to use GetWorkRequestRequest. +type GetWorkRequestRequest struct { + + // The ID of the asynchronous request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetWorkRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetWorkRequestRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetWorkRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetWorkRequestRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetWorkRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetWorkRequestResponse wrapper for the GetWorkRequest operation +type GetWorkRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The WorkRequest instance + WorkRequest `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // A decimal number representing the number of seconds the client should wait before polling this endpoint again. + RetryAfter *int `presentIn:"header" name:"retry-after"` +} + +func (response GetWorkRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetWorkRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/queue/list_queues_request_response.go b/queue/list_queues_request_response.go new file mode 100644 index 0000000000..198ebfb65f --- /dev/null +++ b/queue/list_queues_request_response.go @@ -0,0 +1,209 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListQueuesRequest wrapper for the ListQueues operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/ListQueues.go.html to see an example of how to use ListQueuesRequest. +type ListQueuesRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources their lifecycleState matches the given lifecycleState. + LifecycleState QueueLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // unique Queue identifier + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'asc' or 'desc'. + SortOrder ListQueuesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default. + SortBy ListQueuesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListQueuesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListQueuesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListQueuesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListQueuesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListQueuesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingQueueLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetQueueLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListQueuesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListQueuesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListQueuesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListQueuesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListQueuesResponse wrapper for the ListQueues operation +type ListQueuesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of QueueCollection instances + QueueCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListQueuesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListQueuesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListQueuesSortOrderEnum Enum with underlying type: string +type ListQueuesSortOrderEnum string + +// Set of constants representing the allowable values for ListQueuesSortOrderEnum +const ( + ListQueuesSortOrderAsc ListQueuesSortOrderEnum = "ASC" + ListQueuesSortOrderDesc ListQueuesSortOrderEnum = "DESC" +) + +var mappingListQueuesSortOrderEnum = map[string]ListQueuesSortOrderEnum{ + "ASC": ListQueuesSortOrderAsc, + "DESC": ListQueuesSortOrderDesc, +} + +var mappingListQueuesSortOrderEnumLowerCase = map[string]ListQueuesSortOrderEnum{ + "asc": ListQueuesSortOrderAsc, + "desc": ListQueuesSortOrderDesc, +} + +// GetListQueuesSortOrderEnumValues Enumerates the set of values for ListQueuesSortOrderEnum +func GetListQueuesSortOrderEnumValues() []ListQueuesSortOrderEnum { + values := make([]ListQueuesSortOrderEnum, 0) + for _, v := range mappingListQueuesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListQueuesSortOrderEnumStringValues Enumerates the set of values in String for ListQueuesSortOrderEnum +func GetListQueuesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListQueuesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListQueuesSortOrderEnum(val string) (ListQueuesSortOrderEnum, bool) { + enum, ok := mappingListQueuesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListQueuesSortByEnum Enum with underlying type: string +type ListQueuesSortByEnum string + +// Set of constants representing the allowable values for ListQueuesSortByEnum +const ( + ListQueuesSortByTimecreated ListQueuesSortByEnum = "timeCreated" + ListQueuesSortByDisplayname ListQueuesSortByEnum = "displayName" +) + +var mappingListQueuesSortByEnum = map[string]ListQueuesSortByEnum{ + "timeCreated": ListQueuesSortByTimecreated, + "displayName": ListQueuesSortByDisplayname, +} + +var mappingListQueuesSortByEnumLowerCase = map[string]ListQueuesSortByEnum{ + "timecreated": ListQueuesSortByTimecreated, + "displayname": ListQueuesSortByDisplayname, +} + +// GetListQueuesSortByEnumValues Enumerates the set of values for ListQueuesSortByEnum +func GetListQueuesSortByEnumValues() []ListQueuesSortByEnum { + values := make([]ListQueuesSortByEnum, 0) + for _, v := range mappingListQueuesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListQueuesSortByEnumStringValues Enumerates the set of values in String for ListQueuesSortByEnum +func GetListQueuesSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListQueuesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListQueuesSortByEnum(val string) (ListQueuesSortByEnum, bool) { + enum, ok := mappingListQueuesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/queue/list_work_request_errors_request_response.go b/queue/list_work_request_errors_request_response.go new file mode 100644 index 0000000000..c5fa496b74 --- /dev/null +++ b/queue/list_work_request_errors_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListWorkRequestErrorsRequest wrapper for the ListWorkRequestErrors operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrorsRequest. +type ListWorkRequestErrorsRequest struct { + + // The ID of the asynchronous request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListWorkRequestErrorsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListWorkRequestErrorsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListWorkRequestErrorsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListWorkRequestErrorsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListWorkRequestErrorsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListWorkRequestErrorsResponse wrapper for the ListWorkRequestErrors operation +type ListWorkRequestErrorsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of WorkRequestErrorCollection instances + WorkRequestErrorCollection `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListWorkRequestErrorsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListWorkRequestErrorsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/queue/list_work_request_logs_request_response.go b/queue/list_work_request_logs_request_response.go new file mode 100644 index 0000000000..2dab8b45a8 --- /dev/null +++ b/queue/list_work_request_logs_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListWorkRequestLogsRequest wrapper for the ListWorkRequestLogs operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogsRequest. +type ListWorkRequestLogsRequest struct { + + // The ID of the asynchronous request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListWorkRequestLogsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListWorkRequestLogsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListWorkRequestLogsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListWorkRequestLogsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListWorkRequestLogsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListWorkRequestLogsResponse wrapper for the ListWorkRequestLogs operation +type ListWorkRequestLogsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of WorkRequestLogEntryCollection instances + WorkRequestLogEntryCollection `presentIn:"body"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListWorkRequestLogsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListWorkRequestLogsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/queue/list_work_requests_request_response.go b/queue/list_work_requests_request_response.go new file mode 100644 index 0000000000..e87d75d6fb --- /dev/null +++ b/queue/list_work_requests_request_response.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListWorkRequestsRequest wrapper for the ListWorkRequests operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/ListWorkRequests.go.html to see an example of how to use ListWorkRequestsRequest. +type ListWorkRequestsRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // The ID of the asynchronous work request. + WorkRequestId *string `mandatory:"false" contributesTo:"query" name:"workRequestId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListWorkRequestsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListWorkRequestsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListWorkRequestsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListWorkRequestsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListWorkRequestsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListWorkRequestsResponse wrapper for the ListWorkRequests operation +type ListWorkRequestsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of WorkRequestSummaryCollection instances + WorkRequestSummaryCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListWorkRequestsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListWorkRequestsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/queue/operation_status.go b/queue/operation_status.go new file mode 100644 index 0000000000..151712973e --- /dev/null +++ b/queue/operation_status.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "strings" +) + +// OperationStatusEnum Enum with underlying type: string +type OperationStatusEnum string + +// Set of constants representing the allowable values for OperationStatusEnum +const ( + OperationStatusAccepted OperationStatusEnum = "ACCEPTED" + OperationStatusInProgress OperationStatusEnum = "IN_PROGRESS" + OperationStatusFailed OperationStatusEnum = "FAILED" + OperationStatusSucceeded OperationStatusEnum = "SUCCEEDED" + OperationStatusCanceling OperationStatusEnum = "CANCELING" + OperationStatusCanceled OperationStatusEnum = "CANCELED" +) + +var mappingOperationStatusEnum = map[string]OperationStatusEnum{ + "ACCEPTED": OperationStatusAccepted, + "IN_PROGRESS": OperationStatusInProgress, + "FAILED": OperationStatusFailed, + "SUCCEEDED": OperationStatusSucceeded, + "CANCELING": OperationStatusCanceling, + "CANCELED": OperationStatusCanceled, +} + +var mappingOperationStatusEnumLowerCase = map[string]OperationStatusEnum{ + "accepted": OperationStatusAccepted, + "in_progress": OperationStatusInProgress, + "failed": OperationStatusFailed, + "succeeded": OperationStatusSucceeded, + "canceling": OperationStatusCanceling, + "canceled": OperationStatusCanceled, +} + +// GetOperationStatusEnumValues Enumerates the set of values for OperationStatusEnum +func GetOperationStatusEnumValues() []OperationStatusEnum { + values := make([]OperationStatusEnum, 0) + for _, v := range mappingOperationStatusEnum { + values = append(values, v) + } + return values +} + +// GetOperationStatusEnumStringValues Enumerates the set of values in String for OperationStatusEnum +func GetOperationStatusEnumStringValues() []string { + return []string{ + "ACCEPTED", + "IN_PROGRESS", + "FAILED", + "SUCCEEDED", + "CANCELING", + "CANCELED", + } +} + +// GetMappingOperationStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingOperationStatusEnum(val string) (OperationStatusEnum, bool) { + enum, ok := mappingOperationStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/queue/operation_type.go b/queue/operation_type.go new file mode 100644 index 0000000000..7424f61d12 --- /dev/null +++ b/queue/operation_type.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "strings" +) + +// OperationTypeEnum Enum with underlying type: string +type OperationTypeEnum string + +// Set of constants representing the allowable values for OperationTypeEnum +const ( + OperationTypeCreateQueue OperationTypeEnum = "CREATE_QUEUE" + OperationTypeUpdateQueue OperationTypeEnum = "UPDATE_QUEUE" + OperationTypeDeleteQueue OperationTypeEnum = "DELETE_QUEUE" + OperationTypeMoveQueue OperationTypeEnum = "MOVE_QUEUE" + OperationTypePurgeQueue OperationTypeEnum = "PURGE_QUEUE" +) + +var mappingOperationTypeEnum = map[string]OperationTypeEnum{ + "CREATE_QUEUE": OperationTypeCreateQueue, + "UPDATE_QUEUE": OperationTypeUpdateQueue, + "DELETE_QUEUE": OperationTypeDeleteQueue, + "MOVE_QUEUE": OperationTypeMoveQueue, + "PURGE_QUEUE": OperationTypePurgeQueue, +} + +var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{ + "create_queue": OperationTypeCreateQueue, + "update_queue": OperationTypeUpdateQueue, + "delete_queue": OperationTypeDeleteQueue, + "move_queue": OperationTypeMoveQueue, + "purge_queue": OperationTypePurgeQueue, +} + +// GetOperationTypeEnumValues Enumerates the set of values for OperationTypeEnum +func GetOperationTypeEnumValues() []OperationTypeEnum { + values := make([]OperationTypeEnum, 0) + for _, v := range mappingOperationTypeEnum { + values = append(values, v) + } + return values +} + +// GetOperationTypeEnumStringValues Enumerates the set of values in String for OperationTypeEnum +func GetOperationTypeEnumStringValues() []string { + return []string{ + "CREATE_QUEUE", + "UPDATE_QUEUE", + "DELETE_QUEUE", + "MOVE_QUEUE", + "PURGE_QUEUE", + } +} + +// GetMappingOperationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingOperationTypeEnum(val string) (OperationTypeEnum, bool) { + enum, ok := mappingOperationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/queue/purge_queue_details.go b/queue/purge_queue_details.go new file mode 100644 index 0000000000..a9b5672785 --- /dev/null +++ b/queue/purge_queue_details.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PurgeQueueDetails Purge parameters. +type PurgeQueueDetails struct { + + // Type of the purge to perform: + // - NORMAL - purge only normal queue + // - DLQ - purge only DLQ + // - BOTH - purge both normal queue and DLQ + PurgeType PurgeQueueDetailsPurgeTypeEnum `mandatory:"true" json:"purgeType"` +} + +func (m PurgeQueueDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PurgeQueueDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPurgeQueueDetailsPurgeTypeEnum(string(m.PurgeType)); !ok && m.PurgeType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PurgeType: %s. Supported values are: %s.", m.PurgeType, strings.Join(GetPurgeQueueDetailsPurgeTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PurgeQueueDetailsPurgeTypeEnum Enum with underlying type: string +type PurgeQueueDetailsPurgeTypeEnum string + +// Set of constants representing the allowable values for PurgeQueueDetailsPurgeTypeEnum +const ( + PurgeQueueDetailsPurgeTypeNormal PurgeQueueDetailsPurgeTypeEnum = "NORMAL" + PurgeQueueDetailsPurgeTypeDlq PurgeQueueDetailsPurgeTypeEnum = "DLQ" + PurgeQueueDetailsPurgeTypeBoth PurgeQueueDetailsPurgeTypeEnum = "BOTH" +) + +var mappingPurgeQueueDetailsPurgeTypeEnum = map[string]PurgeQueueDetailsPurgeTypeEnum{ + "NORMAL": PurgeQueueDetailsPurgeTypeNormal, + "DLQ": PurgeQueueDetailsPurgeTypeDlq, + "BOTH": PurgeQueueDetailsPurgeTypeBoth, +} + +var mappingPurgeQueueDetailsPurgeTypeEnumLowerCase = map[string]PurgeQueueDetailsPurgeTypeEnum{ + "normal": PurgeQueueDetailsPurgeTypeNormal, + "dlq": PurgeQueueDetailsPurgeTypeDlq, + "both": PurgeQueueDetailsPurgeTypeBoth, +} + +// GetPurgeQueueDetailsPurgeTypeEnumValues Enumerates the set of values for PurgeQueueDetailsPurgeTypeEnum +func GetPurgeQueueDetailsPurgeTypeEnumValues() []PurgeQueueDetailsPurgeTypeEnum { + values := make([]PurgeQueueDetailsPurgeTypeEnum, 0) + for _, v := range mappingPurgeQueueDetailsPurgeTypeEnum { + values = append(values, v) + } + return values +} + +// GetPurgeQueueDetailsPurgeTypeEnumStringValues Enumerates the set of values in String for PurgeQueueDetailsPurgeTypeEnum +func GetPurgeQueueDetailsPurgeTypeEnumStringValues() []string { + return []string{ + "NORMAL", + "DLQ", + "BOTH", + } +} + +// GetMappingPurgeQueueDetailsPurgeTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPurgeQueueDetailsPurgeTypeEnum(val string) (PurgeQueueDetailsPurgeTypeEnum, bool) { + enum, ok := mappingPurgeQueueDetailsPurgeTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/queue/purge_queue_request_response.go b/queue/purge_queue_request_response.go new file mode 100644 index 0000000000..879bb92f5b --- /dev/null +++ b/queue/purge_queue_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PurgeQueueRequest wrapper for the PurgeQueue operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/PurgeQueue.go.html to see an example of how to use PurgeQueueRequest. +type PurgeQueueRequest struct { + + // unique Queue identifier + QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` + + // The information to be updated. + PurgeQueueDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PurgeQueueRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PurgeQueueRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PurgeQueueRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PurgeQueueRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PurgeQueueRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PurgeQueueResponse wrapper for the PurgeQueue operation +type PurgeQueueResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response PurgeQueueResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PurgeQueueResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/queue/put_message.go b/queue/put_message.go new file mode 100644 index 0000000000..ac3e163d94 --- /dev/null +++ b/queue/put_message.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PutMessage A message that has been published in a queue. +type PutMessage struct { + + // The id of the message + Id *int64 `mandatory:"true" json:"id"` +} + +func (m PutMessage) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PutMessage) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/put_messages.go b/queue/put_messages.go new file mode 100644 index 0000000000..5f01e47563 --- /dev/null +++ b/queue/put_messages.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PutMessages A list of the messages published in a queue. +type PutMessages struct { + + // The messages that have been published in a queue. + Messages []PutMessage `mandatory:"true" json:"messages"` +} + +func (m PutMessages) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PutMessages) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/put_messages_details.go b/queue/put_messages_details.go new file mode 100644 index 0000000000..95e0487036 --- /dev/null +++ b/queue/put_messages_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PutMessagesDetails The details of a PutMessages request. +type PutMessagesDetails struct { + + // The array of messages to put into a queue. + Messages []PutMessagesDetailsEntry `mandatory:"true" json:"messages"` +} + +func (m PutMessagesDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PutMessagesDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/put_messages_details_entry.go b/queue/put_messages_details_entry.go new file mode 100644 index 0000000000..781c5b72ad --- /dev/null +++ b/queue/put_messages_details_entry.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PutMessagesDetailsEntry Object that represents a message to publish into a queue. +type PutMessagesDetailsEntry struct { + + // The content of the message + Content *string `mandatory:"true" json:"content"` +} + +func (m PutMessagesDetailsEntry) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PutMessagesDetailsEntry) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/put_messages_request_response.go b/queue/put_messages_request_response.go new file mode 100644 index 0000000000..bb0d97ce28 --- /dev/null +++ b/queue/put_messages_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PutMessagesRequest wrapper for the PutMessages operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/PutMessages.go.html to see an example of how to use PutMessagesRequest. +type PutMessagesRequest struct { + + // unique Queue identifier + QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` + + // Details for the messages to publish. + PutMessagesDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PutMessagesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PutMessagesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PutMessagesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PutMessagesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PutMessagesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PutMessagesResponse wrapper for the PutMessages operation +type PutMessagesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PutMessages instance + PutMessages `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response PutMessagesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PutMessagesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/queue/queue.go b/queue/queue.go new file mode 100644 index 0000000000..29939ce1a2 --- /dev/null +++ b/queue/queue.go @@ -0,0 +1,148 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Queue Description of Queue. +type Queue struct { + + // Unique identifier that is immutable on creation + Id *string `mandatory:"true" json:"id"` + + // Compartment Identifier + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The time the the Queue was created. An RFC3339 formatted datetime string + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time the Queue was updated. An RFC3339 formatted datetime string + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // The current state of the Queue. + LifecycleState QueueLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The endpoint to use to consume or publish messages in the queue. + MessagesEndpoint *string `mandatory:"true" json:"messagesEndpoint"` + + // The retention period of the messages in the queue, in seconds. + RetentionInSeconds *int `mandatory:"true" json:"retentionInSeconds"` + + // The default visibility of the messages consumed from the queue. + VisibilityInSeconds *int `mandatory:"true" json:"visibilityInSeconds"` + + // The default polling timeout of the messages in the queue, in seconds. + TimeoutInSeconds *int `mandatory:"true" json:"timeoutInSeconds"` + + // The number of times a message can be delivered to a consumer before being moved to the dead letter queue. A value of 0 indicates that the DLQ is not used. + DeadLetterQueueDeliveryCount *int `mandatory:"true" json:"deadLetterQueueDeliveryCount"` + + // Queue Identifier, can be renamed + DisplayName *string `mandatory:"false" json:"displayName"` + + // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // Id of the custom master encryption key which will be used to encrypt messages content + CustomEncryptionKeyId *string `mandatory:"false" json:"customEncryptionKeyId"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m Queue) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Queue) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingQueueLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetQueueLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// QueueLifecycleStateEnum Enum with underlying type: string +type QueueLifecycleStateEnum string + +// Set of constants representing the allowable values for QueueLifecycleStateEnum +const ( + QueueLifecycleStateCreating QueueLifecycleStateEnum = "CREATING" + QueueLifecycleStateUpdating QueueLifecycleStateEnum = "UPDATING" + QueueLifecycleStateActive QueueLifecycleStateEnum = "ACTIVE" + QueueLifecycleStateDeleting QueueLifecycleStateEnum = "DELETING" + QueueLifecycleStateDeleted QueueLifecycleStateEnum = "DELETED" + QueueLifecycleStateFailed QueueLifecycleStateEnum = "FAILED" +) + +var mappingQueueLifecycleStateEnum = map[string]QueueLifecycleStateEnum{ + "CREATING": QueueLifecycleStateCreating, + "UPDATING": QueueLifecycleStateUpdating, + "ACTIVE": QueueLifecycleStateActive, + "DELETING": QueueLifecycleStateDeleting, + "DELETED": QueueLifecycleStateDeleted, + "FAILED": QueueLifecycleStateFailed, +} + +var mappingQueueLifecycleStateEnumLowerCase = map[string]QueueLifecycleStateEnum{ + "creating": QueueLifecycleStateCreating, + "updating": QueueLifecycleStateUpdating, + "active": QueueLifecycleStateActive, + "deleting": QueueLifecycleStateDeleting, + "deleted": QueueLifecycleStateDeleted, + "failed": QueueLifecycleStateFailed, +} + +// GetQueueLifecycleStateEnumValues Enumerates the set of values for QueueLifecycleStateEnum +func GetQueueLifecycleStateEnumValues() []QueueLifecycleStateEnum { + values := make([]QueueLifecycleStateEnum, 0) + for _, v := range mappingQueueLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetQueueLifecycleStateEnumStringValues Enumerates the set of values in String for QueueLifecycleStateEnum +func GetQueueLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "UPDATING", + "ACTIVE", + "DELETING", + "DELETED", + "FAILED", + } +} + +// GetMappingQueueLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingQueueLifecycleStateEnum(val string) (QueueLifecycleStateEnum, bool) { + enum, ok := mappingQueueLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/queue/queue_client.go b/queue/queue_client.go new file mode 100644 index 0000000000..0feea0e04c --- /dev/null +++ b/queue/queue_client.go @@ -0,0 +1,492 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/common/auth" + "net/http" +) + +//QueueClient a client for Queue +type QueueClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewQueueClientWithConfigurationProvider Creates a new default Queue client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewQueueClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client QueueClient, err error) { + provider, err := auth.GetGenericConfigurationProvider(configProvider) + if err != nil { + return client, err + } + baseClient, e := common.NewClientWithConfig(provider) + if e != nil { + return client, e + } + return newQueueClientFromBaseClient(baseClient, provider) +} + +// NewQueueClientWithOboToken Creates a new default Queue client with the given configuration provider. +// The obotoken will be added to default headers and signed; the configuration provider will be used for the signer +// as well as reading the region +func NewQueueClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client QueueClient, err error) { + baseClient, err := common.NewClientWithOboToken(configProvider, oboToken) + if err != nil { + return client, err + } + + return newQueueClientFromBaseClient(baseClient, configProvider) +} + +func newQueueClientFromBaseClient(baseClient common.BaseClient, configProvider common.ConfigurationProvider) (client QueueClient, err error) { + // Queue service default circuit breaker is enabled + baseClient.Configuration.CircuitBreaker = common.NewCircuitBreaker(common.DefaultCircuitBreakerSettingWithServiceName("Queue")) + common.ConfigCircuitBreakerFromEnvVar(&baseClient) + common.ConfigCircuitBreakerFromGlobalVar(&baseClient) + + client = QueueClient{BaseClient: baseClient} + client.BasePath = "20210201" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *QueueClient) SetRegion(region string) { + client.Host = common.StringToRegion(region).EndpointForTemplate("queue", "https://messaging.{region}.oci.{secondLevelDomain}") +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *QueueClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { + if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { + return err + } + + // Error has been checked already + region, _ := configProvider.Region() + client.SetRegion(region) + if client.Host == "" { + return fmt.Errorf("Invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") + } + client.config = &configProvider + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *QueueClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// DeleteMessage Deletes from the queue the message represented by the receipt. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/DeleteMessage.go.html to see an example of how to use DeleteMessage API. +// A default retry strategy applies to this operation DeleteMessage() +func (client QueueClient) DeleteMessage(ctx context.Context, request DeleteMessageRequest) (response DeleteMessageResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteMessage, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteMessageResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteMessageResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteMessageResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteMessageResponse") + } + return +} + +// deleteMessage implements the OCIOperation interface (enables retrying operations) +func (client QueueClient) deleteMessage(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/queues/{queueId}/messages/{messageReceipt}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteMessageResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Queue", "DeleteMessage", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteMessages Deletes multiple messages from the queue. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/DeleteMessages.go.html to see an example of how to use DeleteMessages API. +// A default retry strategy applies to this operation DeleteMessages() +func (client QueueClient) DeleteMessages(ctx context.Context, request DeleteMessagesRequest) (response DeleteMessagesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteMessages, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteMessagesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteMessagesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteMessagesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteMessagesResponse") + } + return +} + +// deleteMessages implements the OCIOperation interface (enables retrying operations) +func (client QueueClient) deleteMessages(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/queues/{queueId}/messages/actions/deleteMessages", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteMessagesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Queue", "DeleteMessages", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetMessages Consumes message from the queue. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/GetMessages.go.html to see an example of how to use GetMessages API. +func (client QueueClient) GetMessages(ctx context.Context, request GetMessagesRequest) (response GetMessagesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getMessages, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetMessagesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetMessagesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetMessagesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetMessagesResponse") + } + return +} + +// getMessages implements the OCIOperation interface (enables retrying operations) +func (client QueueClient) getMessages(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/queues/{queueId}/messages", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetMessagesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Queue", "GetMessages", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetStats Gets the statistics for the queue and its dead letter queue. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/GetStats.go.html to see an example of how to use GetStats API. +// A default retry strategy applies to this operation GetStats() +func (client QueueClient) GetStats(ctx context.Context, request GetStatsRequest) (response GetStatsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getStats, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetStatsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetStatsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetStatsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetStatsResponse") + } + return +} + +// getStats implements the OCIOperation interface (enables retrying operations) +func (client QueueClient) getStats(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/queues/{queueId}/stats", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetStatsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Queue", "GetStats", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// PutMessages Puts messages in the queue +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/PutMessages.go.html to see an example of how to use PutMessages API. +func (client QueueClient) PutMessages(ctx context.Context, request PutMessagesRequest) (response PutMessagesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.putMessages, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = PutMessagesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = PutMessagesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(PutMessagesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into PutMessagesResponse") + } + return +} + +// putMessages implements the OCIOperation interface (enables retrying operations) +func (client QueueClient) putMessages(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/queues/{queueId}/messages", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response PutMessagesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Queue", "PutMessages", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateMessage Updates the visibility of the message represented by the receipt. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/UpdateMessage.go.html to see an example of how to use UpdateMessage API. +// A default retry strategy applies to this operation UpdateMessage() +func (client QueueClient) UpdateMessage(ctx context.Context, request UpdateMessageRequest) (response UpdateMessageResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateMessage, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateMessageResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateMessageResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateMessageResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateMessageResponse") + } + return +} + +// updateMessage implements the OCIOperation interface (enables retrying operations) +func (client QueueClient) updateMessage(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/queues/{queueId}/messages/{messageReceipt}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateMessageResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Queue", "UpdateMessage", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateMessages Updates multiple messages in the queue. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/UpdateMessages.go.html to see an example of how to use UpdateMessages API. +// A default retry strategy applies to this operation UpdateMessages() +func (client QueueClient) UpdateMessages(ctx context.Context, request UpdateMessagesRequest) (response UpdateMessagesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateMessages, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateMessagesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateMessagesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateMessagesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateMessagesResponse") + } + return +} + +// updateMessages implements the OCIOperation interface (enables retrying operations) +func (client QueueClient) updateMessages(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/queues/{queueId}/messages/actions/updateMessages", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateMessagesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Queue", "UpdateMessages", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/queue/queue_collection.go b/queue/queue_collection.go new file mode 100644 index 0000000000..86e60339c7 --- /dev/null +++ b/queue/queue_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// QueueCollection Results of a queue search. Contains both QueueSummary items and other information, such as metadata. +type QueueCollection struct { + + // List of queues. + Items []QueueSummary `mandatory:"true" json:"items"` +} + +func (m QueueCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m QueueCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/queue_queueadmin_client.go b/queue/queue_queueadmin_client.go new file mode 100644 index 0000000000..c50d1d3b90 --- /dev/null +++ b/queue/queue_queueadmin_client.go @@ -0,0 +1,732 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/common/auth" + "net/http" +) + +//QueueAdminClient a client for QueueAdmin +type QueueAdminClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewQueueAdminClientWithConfigurationProvider Creates a new default QueueAdmin client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewQueueAdminClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client QueueAdminClient, err error) { + provider, err := auth.GetGenericConfigurationProvider(configProvider) + if err != nil { + return client, err + } + baseClient, e := common.NewClientWithConfig(provider) + if e != nil { + return client, e + } + return newQueueAdminClientFromBaseClient(baseClient, provider) +} + +// NewQueueAdminClientWithOboToken Creates a new default QueueAdmin client with the given configuration provider. +// The obotoken will be added to default headers and signed; the configuration provider will be used for the signer +// as well as reading the region +func NewQueueAdminClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client QueueAdminClient, err error) { + baseClient, err := common.NewClientWithOboToken(configProvider, oboToken) + if err != nil { + return client, err + } + + return newQueueAdminClientFromBaseClient(baseClient, configProvider) +} + +func newQueueAdminClientFromBaseClient(baseClient common.BaseClient, configProvider common.ConfigurationProvider) (client QueueAdminClient, err error) { + // QueueAdmin service default circuit breaker is enabled + baseClient.Configuration.CircuitBreaker = common.NewCircuitBreaker(common.DefaultCircuitBreakerSettingWithServiceName("QueueAdmin")) + common.ConfigCircuitBreakerFromEnvVar(&baseClient) + common.ConfigCircuitBreakerFromGlobalVar(&baseClient) + + client = QueueAdminClient{BaseClient: baseClient} + client.BasePath = "20210201" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *QueueAdminClient) SetRegion(region string) { + client.Host = common.StringToRegion(region).EndpointForTemplate("queue", "https://messaging.{region}.oci.{secondLevelDomain}") +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *QueueAdminClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { + if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { + return err + } + + // Error has been checked already + region, _ := configProvider.Region() + client.SetRegion(region) + if client.Host == "" { + return fmt.Errorf("Invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") + } + client.config = &configProvider + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *QueueAdminClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// ChangeQueueCompartment Moves a Queue resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/ChangeQueueCompartment.go.html to see an example of how to use ChangeQueueCompartment API. +// A default retry strategy applies to this operation ChangeQueueCompartment() +func (client QueueAdminClient) ChangeQueueCompartment(ctx context.Context, request ChangeQueueCompartmentRequest) (response ChangeQueueCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.changeQueueCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeQueueCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeQueueCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeQueueCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeQueueCompartmentResponse") + } + return +} + +// changeQueueCompartment implements the OCIOperation interface (enables retrying operations) +func (client QueueAdminClient) changeQueueCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/queues/{queueId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ChangeQueueCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "QueueAdmin", "ChangeQueueCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateQueue Creates a new Queue. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/CreateQueue.go.html to see an example of how to use CreateQueue API. +// A default retry strategy applies to this operation CreateQueue() +func (client QueueAdminClient) CreateQueue(ctx context.Context, request CreateQueueRequest) (response CreateQueueResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createQueue, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateQueueResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateQueueResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateQueueResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateQueueResponse") + } + return +} + +// createQueue implements the OCIOperation interface (enables retrying operations) +func (client QueueAdminClient) createQueue(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/queues", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateQueueResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "QueueAdmin", "CreateQueue", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteQueue Deletes a Queue resource by identifier +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/DeleteQueue.go.html to see an example of how to use DeleteQueue API. +// A default retry strategy applies to this operation DeleteQueue() +func (client QueueAdminClient) DeleteQueue(ctx context.Context, request DeleteQueueRequest) (response DeleteQueueResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteQueue, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteQueueResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteQueueResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteQueueResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteQueueResponse") + } + return +} + +// deleteQueue implements the OCIOperation interface (enables retrying operations) +func (client QueueAdminClient) deleteQueue(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/queues/{queueId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteQueueResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "QueueAdmin", "DeleteQueue", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetQueue Gets a Queue by identifier +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/GetQueue.go.html to see an example of how to use GetQueue API. +// A default retry strategy applies to this operation GetQueue() +func (client QueueAdminClient) GetQueue(ctx context.Context, request GetQueueRequest) (response GetQueueResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getQueue, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetQueueResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetQueueResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetQueueResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetQueueResponse") + } + return +} + +// getQueue implements the OCIOperation interface (enables retrying operations) +func (client QueueAdminClient) getQueue(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/queues/{queueId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetQueueResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "QueueAdmin", "GetQueue", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetWorkRequest Gets the status of the work request with the given ID. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/GetWorkRequest.go.html to see an example of how to use GetWorkRequest API. +// A default retry strategy applies to this operation GetWorkRequest() +func (client QueueAdminClient) GetWorkRequest(ctx context.Context, request GetWorkRequestRequest) (response GetWorkRequestResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getWorkRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetWorkRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetWorkRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetWorkRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetWorkRequestResponse") + } + return +} + +// getWorkRequest implements the OCIOperation interface (enables retrying operations) +func (client QueueAdminClient) getWorkRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetWorkRequestResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "QueueAdmin", "GetWorkRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListQueues Returns a list of Queues. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/ListQueues.go.html to see an example of how to use ListQueues API. +// A default retry strategy applies to this operation ListQueues() +func (client QueueAdminClient) ListQueues(ctx context.Context, request ListQueuesRequest) (response ListQueuesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listQueues, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListQueuesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListQueuesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListQueuesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListQueuesResponse") + } + return +} + +// listQueues implements the OCIOperation interface (enables retrying operations) +func (client QueueAdminClient) listQueues(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/queues", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListQueuesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "QueueAdmin", "ListQueues", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequestErrors Return a (paginated) list of errors for a given work request. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrors API. +// A default retry strategy applies to this operation ListWorkRequestErrors() +func (client QueueAdminClient) ListWorkRequestErrors(ctx context.Context, request ListWorkRequestErrorsRequest) (response ListWorkRequestErrorsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequestErrors, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkRequestErrorsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkRequestErrorsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListWorkRequestErrorsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestErrorsResponse") + } + return +} + +// listWorkRequestErrors implements the OCIOperation interface (enables retrying operations) +func (client QueueAdminClient) listWorkRequestErrors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/errors", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListWorkRequestErrorsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "QueueAdmin", "ListWorkRequestErrors", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequestLogs Return a (paginated) list of logs for a given work request. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogs API. +// A default retry strategy applies to this operation ListWorkRequestLogs() +func (client QueueAdminClient) ListWorkRequestLogs(ctx context.Context, request ListWorkRequestLogsRequest) (response ListWorkRequestLogsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequestLogs, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkRequestLogsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkRequestLogsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListWorkRequestLogsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestLogsResponse") + } + return +} + +// listWorkRequestLogs implements the OCIOperation interface (enables retrying operations) +func (client QueueAdminClient) listWorkRequestLogs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/logs", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListWorkRequestLogsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "QueueAdmin", "ListWorkRequestLogs", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequests Lists the work requests in a compartment. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/ListWorkRequests.go.html to see an example of how to use ListWorkRequests API. +// A default retry strategy applies to this operation ListWorkRequests() +func (client QueueAdminClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequests, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkRequestsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkRequestsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListWorkRequestsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestsResponse") + } + return +} + +// listWorkRequests implements the OCIOperation interface (enables retrying operations) +func (client QueueAdminClient) listWorkRequests(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListWorkRequestsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "QueueAdmin", "ListWorkRequests", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// PurgeQueue Deletes all messages present in the queue at the time of invocation. Only one concurrent purge operation is supported for any given queue. +// However multiple concurrent purge operations are supported for different queues. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/PurgeQueue.go.html to see an example of how to use PurgeQueue API. +// A default retry strategy applies to this operation PurgeQueue() +func (client QueueAdminClient) PurgeQueue(ctx context.Context, request PurgeQueueRequest) (response PurgeQueueResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.purgeQueue, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = PurgeQueueResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = PurgeQueueResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(PurgeQueueResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into PurgeQueueResponse") + } + return +} + +// purgeQueue implements the OCIOperation interface (enables retrying operations) +func (client QueueAdminClient) purgeQueue(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/queues/{queueId}/actions/purge", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response PurgeQueueResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "QueueAdmin", "PurgeQueue", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateQueue Updates the Queue +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/UpdateQueue.go.html to see an example of how to use UpdateQueue API. +// A default retry strategy applies to this operation UpdateQueue() +func (client QueueAdminClient) UpdateQueue(ctx context.Context, request UpdateQueueRequest) (response UpdateQueueResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateQueue, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateQueueResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateQueueResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateQueueResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateQueueResponse") + } + return +} + +// updateQueue implements the OCIOperation interface (enables retrying operations) +func (client QueueAdminClient) updateQueue(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/queues/{queueId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateQueueResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "QueueAdmin", "UpdateQueue", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/queue/queue_stats.go b/queue/queue_stats.go new file mode 100644 index 0000000000..f109e0fc70 --- /dev/null +++ b/queue/queue_stats.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// QueueStats The stats for a queue and its dead letter queue. +type QueueStats struct { + Queue *Stats `mandatory:"true" json:"queue"` + + Dlq *Stats `mandatory:"true" json:"dlq"` +} + +func (m QueueStats) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m QueueStats) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/queue_summary.go b/queue/queue_summary.go new file mode 100644 index 0000000000..c95a44963c --- /dev/null +++ b/queue/queue_summary.go @@ -0,0 +1,75 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// QueueSummary Summary of the Queue. +type QueueSummary struct { + + // Unique identifier that is immutable on creation + Id *string `mandatory:"true" json:"id"` + + // Compartment Identifier + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The time the the Queue was created. An RFC3339 formatted datetime string + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time the Queue was updated. An RFC3339 formatted datetime string + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // The current state of the Queue. + LifecycleState QueueLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The endpoint to use to get or put messages in the queue. + MessagesEndpoint *string `mandatory:"true" json:"messagesEndpoint"` + + // Queue Identifier, can be renamed + DisplayName *string `mandatory:"false" json:"displayName"` + + // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m QueueSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m QueueSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingQueueLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetQueueLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/sort_order.go b/queue/sort_order.go new file mode 100644 index 0000000000..7070e7278d --- /dev/null +++ b/queue/sort_order.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "strings" +) + +// SortOrderEnum Enum with underlying type: string +type SortOrderEnum string + +// Set of constants representing the allowable values for SortOrderEnum +const ( + SortOrderAsc SortOrderEnum = "ASC" + SortOrderDesc SortOrderEnum = "DESC" +) + +var mappingSortOrderEnum = map[string]SortOrderEnum{ + "ASC": SortOrderAsc, + "DESC": SortOrderDesc, +} + +var mappingSortOrderEnumLowerCase = map[string]SortOrderEnum{ + "asc": SortOrderAsc, + "desc": SortOrderDesc, +} + +// GetSortOrderEnumValues Enumerates the set of values for SortOrderEnum +func GetSortOrderEnumValues() []SortOrderEnum { + values := make([]SortOrderEnum, 0) + for _, v := range mappingSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetSortOrderEnumStringValues Enumerates the set of values in String for SortOrderEnum +func GetSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSortOrderEnum(val string) (SortOrderEnum, bool) { + enum, ok := mappingSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/queue/stats.go b/queue/stats.go new file mode 100644 index 0000000000..1e95bcf7bb --- /dev/null +++ b/queue/stats.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Stats The stats for a queue or a dead letter queue. +type Stats struct { + + // The approximate number of visible messages (available for delivery) currently in the queue. + VisibleMessages *int64 `mandatory:"true" json:"visibleMessages"` + + // The approximate number of messages delivered to a consumer but not yet deleted and so unavailable for re-delivery. + InFlightMessages *int64 `mandatory:"true" json:"inFlightMessages"` + + // The approximate size of the queue in bytes. Sum of the size of visible of in-flight messages. + SizeInBytes *int64 `mandatory:"true" json:"sizeInBytes"` +} + +func (m Stats) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Stats) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/update_message_details.go b/queue/update_message_details.go new file mode 100644 index 0000000000..5dd2f31694 --- /dev/null +++ b/queue/update_message_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateMessageDetails Updates the visibility of a message +type UpdateMessageDetails struct { + + // The new visibility of the message relative to the current time (as-per the clock of the server receiving the request). + VisibilityInSeconds *int `mandatory:"true" json:"visibilityInSeconds"` +} + +func (m UpdateMessageDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateMessageDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/update_message_request_response.go b/queue/update_message_request_response.go new file mode 100644 index 0000000000..2211ab30bd --- /dev/null +++ b/queue/update_message_request_response.go @@ -0,0 +1,96 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateMessageRequest wrapper for the UpdateMessage operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/UpdateMessage.go.html to see an example of how to use UpdateMessageRequest. +type UpdateMessageRequest struct { + + // unique Queue identifier + QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` + + // The receipt of the message retrieved from a GetMessages call. + MessageReceipt *string `mandatory:"true" contributesTo:"path" name:"messageReceipt"` + + // Details for the message to update. + UpdateMessageDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateMessageRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateMessageRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateMessageRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateMessageRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateMessageRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateMessageResponse wrapper for the UpdateMessage operation +type UpdateMessageResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The UpdatedMessage instance + UpdatedMessage `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateMessageResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateMessageResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/queue/update_messages_details.go b/queue/update_messages_details.go new file mode 100644 index 0000000000..7115252455 --- /dev/null +++ b/queue/update_messages_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateMessagesDetails The details of a UpdateMessages request. +type UpdateMessagesDetails struct { + + // The array of messages to update in a queue. + Entries []UpdateMessagesDetailsEntry `mandatory:"true" json:"entries"` +} + +func (m UpdateMessagesDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateMessagesDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/update_messages_details_entry.go b/queue/update_messages_details_entry.go new file mode 100644 index 0000000000..48d31e93e8 --- /dev/null +++ b/queue/update_messages_details_entry.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateMessagesDetailsEntry Object that represents a message to update in a queue. +type UpdateMessagesDetailsEntry struct { + + // The receipt of the message to update + Receipt *string `mandatory:"true" json:"receipt"` + + // The new visibility of the message relative to the current time (as-per the clock of the server receiving the request). + VisibilityInSeconds *int `mandatory:"true" json:"visibilityInSeconds"` +} + +func (m UpdateMessagesDetailsEntry) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateMessagesDetailsEntry) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/update_messages_request_response.go b/queue/update_messages_request_response.go new file mode 100644 index 0000000000..9fe239efca --- /dev/null +++ b/queue/update_messages_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateMessagesRequest wrapper for the UpdateMessages operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/UpdateMessages.go.html to see an example of how to use UpdateMessagesRequest. +type UpdateMessagesRequest struct { + + // unique Queue identifier + QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` + + // Details for the messages to update. + UpdateMessagesDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateMessagesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateMessagesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateMessagesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateMessagesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateMessagesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateMessagesResponse wrapper for the UpdateMessages operation +type UpdateMessagesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The UpdateMessagesResult instance + UpdateMessagesResult `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateMessagesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateMessagesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/queue/update_messages_result.go b/queue/update_messages_result.go new file mode 100644 index 0000000000..4665799c24 --- /dev/null +++ b/queue/update_messages_result.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateMessagesResult The response to a UpdateMessages request. It indicates the number of server and client failures as well as an array of entries for successful and failed actions. +type UpdateMessagesResult struct { + + // The number of messages that failed to be updated in the queue because of a server failure. + ServerFailures *int `mandatory:"true" json:"serverFailures"` + + // The number of messages that failed to be updated in the queue because of a client failure such as an invalid receipt or invalid visibilityInSeconds. + ClientFailures *int `mandatory:"true" json:"clientFailures"` + + // An array of items representing the result of each action. + // The order is guaranteed to be the same as in the `UpdateMessagesDetails` object. + // If a message was successfully updated in the queue, the entry includes the `id` and `visibleAfter` fields. + // If a message failed to be updated in the queue, the entry includes the `errorCode` and `errorMessage` fields. + Entries []UpdateMessagesResultEntry `mandatory:"true" json:"entries"` +} + +func (m UpdateMessagesResult) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateMessagesResult) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/update_messages_result_entry.go b/queue/update_messages_result_entry.go new file mode 100644 index 0000000000..651e168a4b --- /dev/null +++ b/queue/update_messages_result_entry.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateMessagesResultEntry Represents the result of a UpdateMessages request, whether it was successful or not. +// If a message was successfully updated in the queue, the entry includes the `id` and `visibleAfter` fields. +// If a message failed to be updated in the queue, the entry includes the `errorCode` and `errorMessage` fields. +type UpdateMessagesResultEntry struct { + + // The id of the message that's been updated. + Id *int64 `mandatory:"false" json:"id"` + + // The time after which the message will be visible to other consumers. An RFC3339 formatted datetime string + VisibleAfter *common.SDKTime `mandatory:"false" json:"visibleAfter"` + + // The error code, in case the message was not successfully updated in the queue. + ErrorCode *int `mandatory:"false" json:"errorCode"` + + // A human-readable error message associated with the error code. + ErrorMessage *string `mandatory:"false" json:"errorMessage"` +} + +func (m UpdateMessagesResultEntry) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateMessagesResultEntry) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/update_queue_details.go b/queue/update_queue_details.go new file mode 100644 index 0000000000..f7afcfa19e --- /dev/null +++ b/queue/update_queue_details.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateQueueDetails The information to be updated. +type UpdateQueueDetails struct { + + // Queue Identifier + DisplayName *string `mandatory:"false" json:"displayName"` + + // The default visibility of the messages consumed from the queue. + VisibilityInSeconds *int `mandatory:"false" json:"visibilityInSeconds"` + + // The default polling timeout of the messages in the queue, in seconds. + TimeoutInSeconds *int `mandatory:"false" json:"timeoutInSeconds"` + + // The number of times a message can be delivered to a consumer before being moved to the dead letter queue. + // A value of 0 indicates that the DLQ is not used. + // Changing that value to a lower threshold does not retro-actively move in-flight messages in the dead letter queue. + DeadLetterQueueDeliveryCount *int `mandatory:"false" json:"deadLetterQueueDeliveryCount"` + + // Id of the custom master encryption key which will be used to encrypt messages content. String of length 0 means the custom key should be removed from queue + CustomEncryptionKeyId *string `mandatory:"false" json:"customEncryptionKeyId"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m UpdateQueueDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateQueueDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/update_queue_request_response.go b/queue/update_queue_request_response.go new file mode 100644 index 0000000000..dcbf7ace8a --- /dev/null +++ b/queue/update_queue_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateQueueRequest wrapper for the UpdateQueue operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/queue/UpdateQueue.go.html to see an example of how to use UpdateQueueRequest. +type UpdateQueueRequest struct { + + // unique Queue identifier + QueueId *string `mandatory:"true" contributesTo:"path" name:"queueId"` + + // The information to be updated. + UpdateQueueDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateQueueRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateQueueRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateQueueRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateQueueRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateQueueRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateQueueResponse wrapper for the UpdateQueue operation +type UpdateQueueResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateQueueResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateQueueResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/queue/updated_message.go b/queue/updated_message.go new file mode 100644 index 0000000000..77c8082492 --- /dev/null +++ b/queue/updated_message.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdatedMessage An updated message with the new visibility. +type UpdatedMessage struct { + + // The id of the message that's been updated. + Id *int64 `mandatory:"true" json:"id"` + + // The time after which the message will be visible to other consumers. An RFC3339 formatted datetime string + VisibleAfter *common.SDKTime `mandatory:"true" json:"visibleAfter"` +} + +func (m UpdatedMessage) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdatedMessage) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/work_request.go b/queue/work_request.go new file mode 100644 index 0000000000..019d4ff9be --- /dev/null +++ b/queue/work_request.go @@ -0,0 +1,74 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequest A description of workrequest status +type WorkRequest struct { + + // Type of the work request + OperationType OperationTypeEnum `mandatory:"true" json:"operationType"` + + // Status of current work request. + Status OperationStatusEnum `mandatory:"true" json:"status"` + + // The id of the work request. + Id *string `mandatory:"true" json:"id"` + + // The ocid of the compartment that contains the work request. Work requests should be scoped to + // the same compartment as the resource the work request affects. If the work request affects multiple resources, + // and those resources are not in the same compartment, it is up to the service team to pick the primary + // resource whose compartment should be used + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The resources affected by this work request. + Resources []WorkRequestResource `mandatory:"true" json:"resources"` + + // Percentage of the request completed. + PercentComplete *float32 `mandatory:"true" json:"percentComplete"` + + // The date and time the request was created, as described in + // RFC 3339 (https://tools.ietf.org/rfc/rfc3339), section 14.29. + TimeAccepted *common.SDKTime `mandatory:"true" json:"timeAccepted"` + + // The date and time the request was started, as described in RFC 3339 (https://tools.ietf.org/rfc/rfc3339), + // section 14.29. + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The date and time the object was finished, as described in RFC 3339 (https://tools.ietf.org/rfc/rfc3339). + TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` +} + +func (m WorkRequest) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingOperationTypeEnum(string(m.OperationType)); !ok && m.OperationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OperationType: %s. Supported values are: %s.", m.OperationType, strings.Join(GetOperationTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingOperationStatusEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetOperationStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/work_request_error.go b/queue/work_request_error.go new file mode 100644 index 0000000000..3a82506636 --- /dev/null +++ b/queue/work_request_error.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestError An error encountered while executing a work request. +type WorkRequestError struct { + + // A machine-usable code for the error that occured. Error codes are listed on + // (https://docs.cloud.oracle.com/Content/API/References/apierrors.htm) + Code *string `mandatory:"true" json:"code"` + + // A human readable description of the issue encountered. + Message *string `mandatory:"true" json:"message"` + + // The time the error occured. An RFC3339 formatted datetime string. + Timestamp *common.SDKTime `mandatory:"true" json:"timestamp"` +} + +func (m WorkRequestError) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestError) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/work_request_error_collection.go b/queue/work_request_error_collection.go new file mode 100644 index 0000000000..3b6bb55abf --- /dev/null +++ b/queue/work_request_error_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestErrorCollection Results of a workRequestError search. Contains both WorkRequestError items and other information, such as metadata. +type WorkRequestErrorCollection struct { + + // List of workRequestError objects. + Items []WorkRequestError `mandatory:"true" json:"items"` +} + +func (m WorkRequestErrorCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestErrorCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/work_request_log_entry.go b/queue/work_request_log_entry.go new file mode 100644 index 0000000000..32cc33e73f --- /dev/null +++ b/queue/work_request_log_entry.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestLogEntry A log message from the execution of a work request. +type WorkRequestLogEntry struct { + + // Human-readable log message. + Message *string `mandatory:"true" json:"message"` + + // The time the log message was written. An RFC3339 formatted datetime string + Timestamp *common.SDKTime `mandatory:"true" json:"timestamp"` +} + +func (m WorkRequestLogEntry) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestLogEntry) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/work_request_log_entry_collection.go b/queue/work_request_log_entry_collection.go new file mode 100644 index 0000000000..6a9a016965 --- /dev/null +++ b/queue/work_request_log_entry_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestLogEntryCollection Results of a workRequestLog search. Contains both workRequestLog items and other information, such as metadata. +type WorkRequestLogEntryCollection struct { + + // List of workRequestLogEntries. + Items []WorkRequestLogEntry `mandatory:"true" json:"items"` +} + +func (m WorkRequestLogEntryCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestLogEntryCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/work_request_resource.go b/queue/work_request_resource.go new file mode 100644 index 0000000000..11881ee349 --- /dev/null +++ b/queue/work_request_resource.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestResource A resource created or operated on by a work request. +type WorkRequestResource struct { + + // The resource type the work request affects. + EntityType *string `mandatory:"true" json:"entityType"` + + // The way in which this resource is affected by the work tracked in the work request. + // A resource being created, updated, or deleted will remain in the IN_PROGRESS state until + // work is complete for that resource at which point it will transition to CREATED, UPDATED, + // or DELETED, respectively. + ActionType ActionTypeEnum `mandatory:"true" json:"actionType"` + + // The identifier of the resource the work request affects. + Identifier *string `mandatory:"true" json:"identifier"` + + // The URI path that the user can do a GET on to access the resource metadata + EntityUri *string `mandatory:"false" json:"entityUri"` +} + +func (m WorkRequestResource) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestResource) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingActionTypeEnum(string(m.ActionType)); !ok && m.ActionType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ActionType: %s. Supported values are: %s.", m.ActionType, strings.Join(GetActionTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/work_request_summary.go b/queue/work_request_summary.go new file mode 100644 index 0000000000..1a067b2547 --- /dev/null +++ b/queue/work_request_summary.go @@ -0,0 +1,74 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestSummary A summary of the status of a work request. +type WorkRequestSummary struct { + + // Type of the work request + OperationType OperationTypeEnum `mandatory:"true" json:"operationType"` + + // Status of current work request. + Status OperationStatusEnum `mandatory:"true" json:"status"` + + // The id of the work request. + Id *string `mandatory:"true" json:"id"` + + // The ocid of the compartment that contains the work request. Work requests should be scoped to + // the same compartment as the resource the work request affects. If the work request affects multiple resources, + // and those resources are not in the same compartment, it is up to the service team to pick the primary + // resource whose compartment should be used + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The resources affected by this work request. + Resources []WorkRequestResource `mandatory:"true" json:"resources"` + + // Percentage of the request completed. + PercentComplete *float32 `mandatory:"true" json:"percentComplete"` + + // The date and time the request was created, as described in + // RFC 3339 (https://tools.ietf.org/rfc/rfc3339), section 14.29. + TimeAccepted *common.SDKTime `mandatory:"true" json:"timeAccepted"` + + // The date and time the request was started, as described in RFC 3339 (https://tools.ietf.org/rfc/rfc3339), + // section 14.29. + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The date and time the object was finished, as described in RFC 3339 (https://tools.ietf.org/rfc/rfc3339). + TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` +} + +func (m WorkRequestSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingOperationTypeEnum(string(m.OperationType)); !ok && m.OperationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OperationType: %s. Supported values are: %s.", m.OperationType, strings.Join(GetOperationTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingOperationStatusEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetOperationStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/queue/work_request_summary_collection.go b/queue/work_request_summary_collection.go new file mode 100644 index 0000000000..e449f53612 --- /dev/null +++ b/queue/work_request_summary_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Queue API +// +// A description of the Queue API +// + +package queue + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestSummaryCollection Results of a workRequest search. Contains both WorkRequest items and other information, such as metadata. +type WorkRequestSummaryCollection struct { + + // List of workRequestSummary objects. + Items []WorkRequestSummary `mandatory:"true" json:"items"` +} + +func (m WorkRequestSummaryCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestSummaryCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/servicemesh/access_policy_rule_details.go b/servicemesh/access_policy_rule_details.go new file mode 100644 index 0000000000..8beae068aa --- /dev/null +++ b/servicemesh/access_policy_rule_details.go @@ -0,0 +1,123 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Service Mesh API +// +// Use the Service Mesh API to manage mesh, virtual service, access policy and other mesh related items. +// + +package servicemesh + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AccessPolicyRuleDetails Access policy rule. +type AccessPolicyRuleDetails struct { + + // Action for the traffic between the source and the destination. + Action AccessPolicyRuleDetailsActionEnum `mandatory:"true" json:"action"` + + Source AccessPolicyTargetDetails `mandatory:"true" json:"source"` + + Destination AccessPolicyTargetDetails `mandatory:"true" json:"destination"` +} + +func (m AccessPolicyRuleDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AccessPolicyRuleDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAccessPolicyRuleDetailsActionEnum(string(m.Action)); !ok && m.Action != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Action: %s. Supported values are: %s.", m.Action, strings.Join(GetAccessPolicyRuleDetailsActionEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *AccessPolicyRuleDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + Action AccessPolicyRuleDetailsActionEnum `json:"action"` + Source accesspolicytargetdetails `json:"source"` + Destination accesspolicytargetdetails `json:"destination"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Action = model.Action + + nn, e = model.Source.UnmarshalPolymorphicJSON(model.Source.JsonData) + if e != nil { + return + } + if nn != nil { + m.Source = nn.(AccessPolicyTargetDetails) + } else { + m.Source = nil + } + + nn, e = model.Destination.UnmarshalPolymorphicJSON(model.Destination.JsonData) + if e != nil { + return + } + if nn != nil { + m.Destination = nn.(AccessPolicyTargetDetails) + } else { + m.Destination = nil + } + + return +} + +// AccessPolicyRuleDetailsActionEnum Enum with underlying type: string +type AccessPolicyRuleDetailsActionEnum string + +// Set of constants representing the allowable values for AccessPolicyRuleDetailsActionEnum +const ( + AccessPolicyRuleDetailsActionAllow AccessPolicyRuleDetailsActionEnum = "ALLOW" +) + +var mappingAccessPolicyRuleDetailsActionEnum = map[string]AccessPolicyRuleDetailsActionEnum{ + "ALLOW": AccessPolicyRuleDetailsActionAllow, +} + +var mappingAccessPolicyRuleDetailsActionEnumLowerCase = map[string]AccessPolicyRuleDetailsActionEnum{ + "allow": AccessPolicyRuleDetailsActionAllow, +} + +// GetAccessPolicyRuleDetailsActionEnumValues Enumerates the set of values for AccessPolicyRuleDetailsActionEnum +func GetAccessPolicyRuleDetailsActionEnumValues() []AccessPolicyRuleDetailsActionEnum { + values := make([]AccessPolicyRuleDetailsActionEnum, 0) + for _, v := range mappingAccessPolicyRuleDetailsActionEnum { + values = append(values, v) + } + return values +} + +// GetAccessPolicyRuleDetailsActionEnumStringValues Enumerates the set of values in String for AccessPolicyRuleDetailsActionEnum +func GetAccessPolicyRuleDetailsActionEnumStringValues() []string { + return []string{ + "ALLOW", + } +} + +// GetMappingAccessPolicyRuleDetailsActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAccessPolicyRuleDetailsActionEnum(val string) (AccessPolicyRuleDetailsActionEnum, bool) { + enum, ok := mappingAccessPolicyRuleDetailsActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/servicemesh/access_policy_target_details.go b/servicemesh/access_policy_target_details.go new file mode 100644 index 0000000000..73f51045e1 --- /dev/null +++ b/servicemesh/access_policy_target_details.go @@ -0,0 +1,138 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Service Mesh API +// +// Use the Service Mesh API to manage mesh, virtual service, access policy and other mesh related items. +// + +package servicemesh + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AccessPolicyTargetDetails Target of the access policy. This can either be the source or the destination of the traffic. +type AccessPolicyTargetDetails interface { +} + +type accesspolicytargetdetails struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *accesspolicytargetdetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshaleraccesspolicytargetdetails accesspolicytargetdetails + s := struct { + Model Unmarshaleraccesspolicytargetdetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *accesspolicytargetdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "EXTERNAL_SERVICE": + mm := ExternalServiceAccessPolicyTargetDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "VIRTUAL_SERVICE": + mm := VirtualServiceAccessPolicyTargetDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "ALL_VIRTUAL_SERVICES": + mm := AllVirtualServicesAccessPolicyTargetDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "INGRESS_GATEWAY": + mm := IngressGatewayAccessPolicyTargetDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + return *m, nil + } +} + +func (m accesspolicytargetdetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m accesspolicytargetdetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AccessPolicyTargetDetailsTypeEnum Enum with underlying type: string +type AccessPolicyTargetDetailsTypeEnum string + +// Set of constants representing the allowable values for AccessPolicyTargetDetailsTypeEnum +const ( + AccessPolicyTargetDetailsTypeAllVirtualServices AccessPolicyTargetDetailsTypeEnum = "ALL_VIRTUAL_SERVICES" + AccessPolicyTargetDetailsTypeVirtualService AccessPolicyTargetDetailsTypeEnum = "VIRTUAL_SERVICE" + AccessPolicyTargetDetailsTypeExternalService AccessPolicyTargetDetailsTypeEnum = "EXTERNAL_SERVICE" + AccessPolicyTargetDetailsTypeIngressGateway AccessPolicyTargetDetailsTypeEnum = "INGRESS_GATEWAY" +) + +var mappingAccessPolicyTargetDetailsTypeEnum = map[string]AccessPolicyTargetDetailsTypeEnum{ + "ALL_VIRTUAL_SERVICES": AccessPolicyTargetDetailsTypeAllVirtualServices, + "VIRTUAL_SERVICE": AccessPolicyTargetDetailsTypeVirtualService, + "EXTERNAL_SERVICE": AccessPolicyTargetDetailsTypeExternalService, + "INGRESS_GATEWAY": AccessPolicyTargetDetailsTypeIngressGateway, +} + +var mappingAccessPolicyTargetDetailsTypeEnumLowerCase = map[string]AccessPolicyTargetDetailsTypeEnum{ + "all_virtual_services": AccessPolicyTargetDetailsTypeAllVirtualServices, + "virtual_service": AccessPolicyTargetDetailsTypeVirtualService, + "external_service": AccessPolicyTargetDetailsTypeExternalService, + "ingress_gateway": AccessPolicyTargetDetailsTypeIngressGateway, +} + +// GetAccessPolicyTargetDetailsTypeEnumValues Enumerates the set of values for AccessPolicyTargetDetailsTypeEnum +func GetAccessPolicyTargetDetailsTypeEnumValues() []AccessPolicyTargetDetailsTypeEnum { + values := make([]AccessPolicyTargetDetailsTypeEnum, 0) + for _, v := range mappingAccessPolicyTargetDetailsTypeEnum { + values = append(values, v) + } + return values +} + +// GetAccessPolicyTargetDetailsTypeEnumStringValues Enumerates the set of values in String for AccessPolicyTargetDetailsTypeEnum +func GetAccessPolicyTargetDetailsTypeEnumStringValues() []string { + return []string{ + "ALL_VIRTUAL_SERVICES", + "VIRTUAL_SERVICE", + "EXTERNAL_SERVICE", + "INGRESS_GATEWAY", + } +} + +// GetMappingAccessPolicyTargetDetailsTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAccessPolicyTargetDetailsTypeEnum(val string) (AccessPolicyTargetDetailsTypeEnum, bool) { + enum, ok := mappingAccessPolicyTargetDetailsTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/servicemesh/all_virtual_services_access_policy_target_details.go b/servicemesh/all_virtual_services_access_policy_target_details.go new file mode 100644 index 0000000000..69589aa593 --- /dev/null +++ b/servicemesh/all_virtual_services_access_policy_target_details.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Service Mesh API +// +// Use the Service Mesh API to manage mesh, virtual service, access policy and other mesh related items. +// + +package servicemesh + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AllVirtualServicesAccessPolicyTargetDetails An internal virtual service directs traffic to all virtual services in a mesh using this target type or vice versa. +type AllVirtualServicesAccessPolicyTargetDetails struct { +} + +func (m AllVirtualServicesAccessPolicyTargetDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AllVirtualServicesAccessPolicyTargetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AllVirtualServicesAccessPolicyTargetDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAllVirtualServicesAccessPolicyTargetDetails AllVirtualServicesAccessPolicyTargetDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAllVirtualServicesAccessPolicyTargetDetails + }{ + "ALL_VIRTUAL_SERVICES", + (MarshalTypeAllVirtualServicesAccessPolicyTargetDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/servicemesh/cancel_work_request_request_response.go b/servicemesh/cancel_work_request_request_response.go new file mode 100644 index 0000000000..06e2e702c0 --- /dev/null +++ b/servicemesh/cancel_work_request_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package servicemesh + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CancelWorkRequestRequest wrapper for the CancelWorkRequest operation +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/CancelWorkRequest.go.html to see an example of how to use CancelWorkRequestRequest. +type CancelWorkRequestRequest struct { + + // The ID of the asynchronous request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CancelWorkRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CancelWorkRequestRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CancelWorkRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CancelWorkRequestRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CancelWorkRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CancelWorkRequestResponse wrapper for the CancelWorkRequest operation +type CancelWorkRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CancelWorkRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CancelWorkRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/servicemesh/create_access_policy_details.go b/servicemesh/create_access_policy_details.go index c904c78df6..9570459777 100644 --- a/servicemesh/create_access_policy_details.go +++ b/servicemesh/create_access_policy_details.go @@ -29,14 +29,14 @@ type CreateAccessPolicyDetails struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. CompartmentId *string `mandatory:"true" json:"compartmentId"` + // List of applicable rules + Rules []AccessPolicyRuleDetails `mandatory:"true" json:"rules"` + // Description of the resource. It can be changed after creation. // Avoid entering confidential information. // Example: `This is my new resource` Description *string `mandatory:"false" json:"description"` - // List of applicable rules - Rules []AccessPolicyRule `mandatory:"false" json:"rules"` - // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. // Example: `{"bar-key": "value"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` diff --git a/servicemesh/create_ingress_gateway_details.go b/servicemesh/create_ingress_gateway_details.go index 6f9ac61153..991771655d 100644 --- a/servicemesh/create_ingress_gateway_details.go +++ b/servicemesh/create_ingress_gateway_details.go @@ -39,7 +39,7 @@ type CreateIngressGatewayDetails struct { AccessLogging *AccessLoggingConfiguration `mandatory:"false" json:"accessLogging"` - Mtls *CreateIngressGatewayMutualTransportLayerSecurityDetails `mandatory:"false" json:"mtls"` + Mtls *IngressGatewayMutualTransportLayerSecurityDetails `mandatory:"false" json:"mtls"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. // Example: `{"bar-key": "value"}` diff --git a/servicemesh/create_ingress_gateway_route_table_details.go b/servicemesh/create_ingress_gateway_route_table_details.go index 7f2a5588b8..ef92628f7f 100644 --- a/servicemesh/create_ingress_gateway_route_table_details.go +++ b/servicemesh/create_ingress_gateway_route_table_details.go @@ -28,7 +28,7 @@ type CreateIngressGatewayRouteTableDetails struct { Name *string `mandatory:"true" json:"name"` // The route rules for the ingress gateway. - RouteRules []IngressGatewayTrafficRouteRule `mandatory:"true" json:"routeRules"` + RouteRules []IngressGatewayTrafficRouteRuleDetails `mandatory:"true" json:"routeRules"` // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. CompartmentId *string `mandatory:"true" json:"compartmentId"` @@ -69,14 +69,14 @@ func (m CreateIngressGatewayRouteTableDetails) ValidateEnumValue() (bool, error) // UnmarshalJSON unmarshals from json func (m *CreateIngressGatewayRouteTableDetails) UnmarshalJSON(data []byte) (e error) { model := struct { - Description *string `json:"description"` - Priority *int `json:"priority"` - FreeformTags map[string]string `json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `json:"definedTags"` - IngressGatewayId *string `json:"ingressGatewayId"` - Name *string `json:"name"` - RouteRules []ingressgatewaytrafficrouterule `json:"routeRules"` - CompartmentId *string `json:"compartmentId"` + Description *string `json:"description"` + Priority *int `json:"priority"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + IngressGatewayId *string `json:"ingressGatewayId"` + Name *string `json:"name"` + RouteRules []ingressgatewaytrafficrouteruledetails `json:"routeRules"` + CompartmentId *string `json:"compartmentId"` }{} e = json.Unmarshal(data, &model) @@ -96,14 +96,14 @@ func (m *CreateIngressGatewayRouteTableDetails) UnmarshalJSON(data []byte) (e er m.Name = model.Name - m.RouteRules = make([]IngressGatewayTrafficRouteRule, len(model.RouteRules)) + m.RouteRules = make([]IngressGatewayTrafficRouteRuleDetails, len(model.RouteRules)) for i, n := range model.RouteRules { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) if e != nil { return e } if nn != nil { - m.RouteRules[i] = nn.(IngressGatewayTrafficRouteRule) + m.RouteRules[i] = nn.(IngressGatewayTrafficRouteRuleDetails) } else { m.RouteRules[i] = nil } diff --git a/servicemesh/create_virtual_deployment_details.go b/servicemesh/create_virtual_deployment_details.go index fc6d7a8c5c..f778581cce 100644 --- a/servicemesh/create_virtual_deployment_details.go +++ b/servicemesh/create_virtual_deployment_details.go @@ -27,11 +27,6 @@ type CreateVirtualDeploymentDetails struct { // Example: `My unique resource name` Name *string `mandatory:"true" json:"name"` - ServiceDiscovery ServiceDiscoveryConfiguration `mandatory:"true" json:"serviceDiscovery"` - - // The listeners for the virtual deployment. - Listeners []VirtualDeploymentListener `mandatory:"true" json:"listeners"` - // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. CompartmentId *string `mandatory:"true" json:"compartmentId"` @@ -40,6 +35,11 @@ type CreateVirtualDeploymentDetails struct { // Example: `This is my new resource` Description *string `mandatory:"false" json:"description"` + ServiceDiscovery ServiceDiscoveryConfiguration `mandatory:"false" json:"serviceDiscovery"` + + // The listeners for the virtual deployment. + Listeners []VirtualDeploymentListener `mandatory:"false" json:"listeners"` + AccessLogging *AccessLoggingConfiguration `mandatory:"false" json:"accessLogging"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. @@ -71,13 +71,13 @@ func (m CreateVirtualDeploymentDetails) ValidateEnumValue() (bool, error) { func (m *CreateVirtualDeploymentDetails) UnmarshalJSON(data []byte) (e error) { model := struct { Description *string `json:"description"` + ServiceDiscovery servicediscoveryconfiguration `json:"serviceDiscovery"` + Listeners []VirtualDeploymentListener `json:"listeners"` AccessLogging *AccessLoggingConfiguration `json:"accessLogging"` FreeformTags map[string]string `json:"freeformTags"` DefinedTags map[string]map[string]interface{} `json:"definedTags"` VirtualServiceId *string `json:"virtualServiceId"` Name *string `json:"name"` - ServiceDiscovery servicediscoveryconfiguration `json:"serviceDiscovery"` - Listeners []VirtualDeploymentListener `json:"listeners"` CompartmentId *string `json:"compartmentId"` }{} @@ -88,16 +88,6 @@ func (m *CreateVirtualDeploymentDetails) UnmarshalJSON(data []byte) (e error) { var nn interface{} m.Description = model.Description - m.AccessLogging = model.AccessLogging - - m.FreeformTags = model.FreeformTags - - m.DefinedTags = model.DefinedTags - - m.VirtualServiceId = model.VirtualServiceId - - m.Name = model.Name - nn, e = model.ServiceDiscovery.UnmarshalPolymorphicJSON(model.ServiceDiscovery.JsonData) if e != nil { return @@ -113,6 +103,16 @@ func (m *CreateVirtualDeploymentDetails) UnmarshalJSON(data []byte) (e error) { m.Listeners[i] = n } + m.AccessLogging = model.AccessLogging + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.VirtualServiceId = model.VirtualServiceId + + m.Name = model.Name + m.CompartmentId = model.CompartmentId return diff --git a/servicemesh/create_virtual_service_details.go b/servicemesh/create_virtual_service_details.go index 489fd668f3..52361d234a 100644 --- a/servicemesh/create_virtual_service_details.go +++ b/servicemesh/create_virtual_service_details.go @@ -42,7 +42,7 @@ type CreateVirtualServiceDetails struct { // Can be omitted if the virtual service will only have TCP virtual deployments. Hosts []string `mandatory:"false" json:"hosts"` - Mtls *CreateMutualTransportLayerSecurityDetails `mandatory:"false" json:"mtls"` + Mtls *VirtualServiceMutualTransportLayerSecurityDetails `mandatory:"false" json:"mtls"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. // Example: `{"bar-key": "value"}` diff --git a/servicemesh/create_virtual_service_route_table_details.go b/servicemesh/create_virtual_service_route_table_details.go index 7e34ff3d3a..4376142fd5 100644 --- a/servicemesh/create_virtual_service_route_table_details.go +++ b/servicemesh/create_virtual_service_route_table_details.go @@ -28,7 +28,7 @@ type CreateVirtualServiceRouteTableDetails struct { Name *string `mandatory:"true" json:"name"` // The route rules for the virtual service. - RouteRules []VirtualServiceTrafficRouteRule `mandatory:"true" json:"routeRules"` + RouteRules []VirtualServiceTrafficRouteRuleDetails `mandatory:"true" json:"routeRules"` // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. CompartmentId *string `mandatory:"true" json:"compartmentId"` @@ -69,14 +69,14 @@ func (m CreateVirtualServiceRouteTableDetails) ValidateEnumValue() (bool, error) // UnmarshalJSON unmarshals from json func (m *CreateVirtualServiceRouteTableDetails) UnmarshalJSON(data []byte) (e error) { model := struct { - Description *string `json:"description"` - Priority *int `json:"priority"` - FreeformTags map[string]string `json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `json:"definedTags"` - VirtualServiceId *string `json:"virtualServiceId"` - Name *string `json:"name"` - RouteRules []virtualservicetrafficrouterule `json:"routeRules"` - CompartmentId *string `json:"compartmentId"` + Description *string `json:"description"` + Priority *int `json:"priority"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + VirtualServiceId *string `json:"virtualServiceId"` + Name *string `json:"name"` + RouteRules []virtualservicetrafficrouteruledetails `json:"routeRules"` + CompartmentId *string `json:"compartmentId"` }{} e = json.Unmarshal(data, &model) @@ -96,14 +96,14 @@ func (m *CreateVirtualServiceRouteTableDetails) UnmarshalJSON(data []byte) (e er m.Name = model.Name - m.RouteRules = make([]VirtualServiceTrafficRouteRule, len(model.RouteRules)) + m.RouteRules = make([]VirtualServiceTrafficRouteRuleDetails, len(model.RouteRules)) for i, n := range model.RouteRules { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) if e != nil { return e } if nn != nil { - m.RouteRules[i] = nn.(VirtualServiceTrafficRouteRule) + m.RouteRules[i] = nn.(VirtualServiceTrafficRouteRuleDetails) } else { m.RouteRules[i] = nil } diff --git a/servicemesh/disabled_service_discovery_configuration.go b/servicemesh/disabled_service_discovery_configuration.go new file mode 100644 index 0000000000..3f965eb5f1 --- /dev/null +++ b/servicemesh/disabled_service_discovery_configuration.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Service Mesh API +// +// Use the Service Mesh API to manage mesh, virtual service, access policy and other mesh related items. +// + +package servicemesh + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DisabledServiceDiscoveryConfiguration Disabled service discovery configuration for virtual deployments. +type DisabledServiceDiscoveryConfiguration struct { +} + +func (m DisabledServiceDiscoveryConfiguration) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DisabledServiceDiscoveryConfiguration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m DisabledServiceDiscoveryConfiguration) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDisabledServiceDiscoveryConfiguration DisabledServiceDiscoveryConfiguration + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeDisabledServiceDiscoveryConfiguration + }{ + "DISABLED", + (MarshalTypeDisabledServiceDiscoveryConfiguration)(m), + } + + return json.Marshal(&s) +} diff --git a/servicemesh/external_service_access_policy_target_details.go b/servicemesh/external_service_access_policy_target_details.go new file mode 100644 index 0000000000..7beb657c35 --- /dev/null +++ b/servicemesh/external_service_access_policy_target_details.go @@ -0,0 +1,117 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Service Mesh API +// +// Use the Service Mesh API to manage mesh, virtual service, access policy and other mesh related items. +// + +package servicemesh + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExternalServiceAccessPolicyTargetDetails External service target that internal virtual services direct traffic to. +type ExternalServiceAccessPolicyTargetDetails struct { + + // The hostnames of the external service. Only applicable for HTTP and HTTPS protocols. + // Wildcard hostnames are supported in the prefix form. + // Examples of valid hostnames are "www.example.com", "*.example.com", "*.com", "*". + // Hostname "*" can be used to allow all hosts. + Hostnames []string `mandatory:"false" json:"hostnames"` + + // The ipAddresses of the external service in CIDR notation. Only applicable for TCP protocol. + // All requests matching the given CIDR notation will pass through. + // In case a wildcard CIDR "0.0.0.0/0" is provided, the same port cannot be used for a virtual service communication. + IpAddresses []string `mandatory:"false" json:"ipAddresses"` + + // Ports exposed by an external service. If left empty all ports will be allowed. + Ports []int `mandatory:"false" json:"ports"` + + // Protocol of the external service + Protocol ExternalServiceAccessPolicyTargetDetailsProtocolEnum `mandatory:"false" json:"protocol,omitempty"` +} + +func (m ExternalServiceAccessPolicyTargetDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ExternalServiceAccessPolicyTargetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingExternalServiceAccessPolicyTargetDetailsProtocolEnum(string(m.Protocol)); !ok && m.Protocol != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Protocol: %s. Supported values are: %s.", m.Protocol, strings.Join(GetExternalServiceAccessPolicyTargetDetailsProtocolEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ExternalServiceAccessPolicyTargetDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeExternalServiceAccessPolicyTargetDetails ExternalServiceAccessPolicyTargetDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeExternalServiceAccessPolicyTargetDetails + }{ + "EXTERNAL_SERVICE", + (MarshalTypeExternalServiceAccessPolicyTargetDetails)(m), + } + + return json.Marshal(&s) +} + +// ExternalServiceAccessPolicyTargetDetailsProtocolEnum Enum with underlying type: string +type ExternalServiceAccessPolicyTargetDetailsProtocolEnum string + +// Set of constants representing the allowable values for ExternalServiceAccessPolicyTargetDetailsProtocolEnum +const ( + ExternalServiceAccessPolicyTargetDetailsProtocolHttp ExternalServiceAccessPolicyTargetDetailsProtocolEnum = "HTTP" + ExternalServiceAccessPolicyTargetDetailsProtocolHttps ExternalServiceAccessPolicyTargetDetailsProtocolEnum = "HTTPS" + ExternalServiceAccessPolicyTargetDetailsProtocolTcp ExternalServiceAccessPolicyTargetDetailsProtocolEnum = "TCP" +) + +var mappingExternalServiceAccessPolicyTargetDetailsProtocolEnum = map[string]ExternalServiceAccessPolicyTargetDetailsProtocolEnum{ + "HTTP": ExternalServiceAccessPolicyTargetDetailsProtocolHttp, + "HTTPS": ExternalServiceAccessPolicyTargetDetailsProtocolHttps, + "TCP": ExternalServiceAccessPolicyTargetDetailsProtocolTcp, +} + +var mappingExternalServiceAccessPolicyTargetDetailsProtocolEnumLowerCase = map[string]ExternalServiceAccessPolicyTargetDetailsProtocolEnum{ + "http": ExternalServiceAccessPolicyTargetDetailsProtocolHttp, + "https": ExternalServiceAccessPolicyTargetDetailsProtocolHttps, + "tcp": ExternalServiceAccessPolicyTargetDetailsProtocolTcp, +} + +// GetExternalServiceAccessPolicyTargetDetailsProtocolEnumValues Enumerates the set of values for ExternalServiceAccessPolicyTargetDetailsProtocolEnum +func GetExternalServiceAccessPolicyTargetDetailsProtocolEnumValues() []ExternalServiceAccessPolicyTargetDetailsProtocolEnum { + values := make([]ExternalServiceAccessPolicyTargetDetailsProtocolEnum, 0) + for _, v := range mappingExternalServiceAccessPolicyTargetDetailsProtocolEnum { + values = append(values, v) + } + return values +} + +// GetExternalServiceAccessPolicyTargetDetailsProtocolEnumStringValues Enumerates the set of values in String for ExternalServiceAccessPolicyTargetDetailsProtocolEnum +func GetExternalServiceAccessPolicyTargetDetailsProtocolEnumStringValues() []string { + return []string{ + "HTTP", + "HTTPS", + "TCP", + } +} + +// GetMappingExternalServiceAccessPolicyTargetDetailsProtocolEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingExternalServiceAccessPolicyTargetDetailsProtocolEnum(val string) (ExternalServiceAccessPolicyTargetDetailsProtocolEnum, bool) { + enum, ok := mappingExternalServiceAccessPolicyTargetDetailsProtocolEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/servicemesh/get_work_request_request_response.go b/servicemesh/get_work_request_request_response.go index ac3a485faf..cdfbe3264b 100644 --- a/servicemesh/get_work_request_request_response.go +++ b/servicemesh/get_work_request_request_response.go @@ -75,6 +75,9 @@ type GetWorkRequestResponse struct { // The WorkRequest instance WorkRequest `presentIn:"body"` + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + // Unique Oracle-assigned identifier for the request. If you need to contact // Oracle about a particular request, please provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` diff --git a/servicemesh/http_ingress_gateway_traffic_route_rule_details.go b/servicemesh/http_ingress_gateway_traffic_route_rule_details.go new file mode 100644 index 0000000000..d0242e43a0 --- /dev/null +++ b/servicemesh/http_ingress_gateway_traffic_route_rule_details.go @@ -0,0 +1,123 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Service Mesh API +// +// Use the Service Mesh API to manage mesh, virtual service, access policy and other mesh related items. +// + +package servicemesh + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// HttpIngressGatewayTrafficRouteRuleDetails Rule for routing incoming ingress gateway traffic with HTTP protocol +type HttpIngressGatewayTrafficRouteRuleDetails struct { + + // The destination of the request. + Destinations []VirtualServiceTrafficRuleTargetDetails `mandatory:"true" json:"destinations"` + + IngressGatewayHost *IngressGatewayHostRef `mandatory:"false" json:"ingressGatewayHost"` + + // Route to match + Path *string `mandatory:"false" json:"path"` + + // If true, the rule will check that the content-type header has a application/grpc + // or one of the various application/grpc+ values. + IsGrpc *bool `mandatory:"false" json:"isGrpc"` + + // If true, the hostname will be rewritten to the target virtual deployment's DNS hostname. + IsHostRewriteEnabled *bool `mandatory:"false" json:"isHostRewriteEnabled"` + + // If true, the matched path prefix will be rewritten to '/' before being directed to the target virtual deployment. + IsPathRewriteEnabled *bool `mandatory:"false" json:"isPathRewriteEnabled"` + + // Match type for the route + PathType HttpIngressGatewayTrafficRouteRuleDetailsPathTypeEnum `mandatory:"false" json:"pathType,omitempty"` +} + +//GetIngressGatewayHost returns IngressGatewayHost +func (m HttpIngressGatewayTrafficRouteRuleDetails) GetIngressGatewayHost() *IngressGatewayHostRef { + return m.IngressGatewayHost +} + +//GetDestinations returns Destinations +func (m HttpIngressGatewayTrafficRouteRuleDetails) GetDestinations() []VirtualServiceTrafficRuleTargetDetails { + return m.Destinations +} + +func (m HttpIngressGatewayTrafficRouteRuleDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m HttpIngressGatewayTrafficRouteRuleDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingHttpIngressGatewayTrafficRouteRuleDetailsPathTypeEnum(string(m.PathType)); !ok && m.PathType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PathType: %s. Supported values are: %s.", m.PathType, strings.Join(GetHttpIngressGatewayTrafficRouteRuleDetailsPathTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m HttpIngressGatewayTrafficRouteRuleDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeHttpIngressGatewayTrafficRouteRuleDetails HttpIngressGatewayTrafficRouteRuleDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeHttpIngressGatewayTrafficRouteRuleDetails + }{ + "HTTP", + (MarshalTypeHttpIngressGatewayTrafficRouteRuleDetails)(m), + } + + return json.Marshal(&s) +} + +// HttpIngressGatewayTrafficRouteRuleDetailsPathTypeEnum Enum with underlying type: string +type HttpIngressGatewayTrafficRouteRuleDetailsPathTypeEnum string + +// Set of constants representing the allowable values for HttpIngressGatewayTrafficRouteRuleDetailsPathTypeEnum +const ( + HttpIngressGatewayTrafficRouteRuleDetailsPathTypePrefix HttpIngressGatewayTrafficRouteRuleDetailsPathTypeEnum = "PREFIX" +) + +var mappingHttpIngressGatewayTrafficRouteRuleDetailsPathTypeEnum = map[string]HttpIngressGatewayTrafficRouteRuleDetailsPathTypeEnum{ + "PREFIX": HttpIngressGatewayTrafficRouteRuleDetailsPathTypePrefix, +} + +var mappingHttpIngressGatewayTrafficRouteRuleDetailsPathTypeEnumLowerCase = map[string]HttpIngressGatewayTrafficRouteRuleDetailsPathTypeEnum{ + "prefix": HttpIngressGatewayTrafficRouteRuleDetailsPathTypePrefix, +} + +// GetHttpIngressGatewayTrafficRouteRuleDetailsPathTypeEnumValues Enumerates the set of values for HttpIngressGatewayTrafficRouteRuleDetailsPathTypeEnum +func GetHttpIngressGatewayTrafficRouteRuleDetailsPathTypeEnumValues() []HttpIngressGatewayTrafficRouteRuleDetailsPathTypeEnum { + values := make([]HttpIngressGatewayTrafficRouteRuleDetailsPathTypeEnum, 0) + for _, v := range mappingHttpIngressGatewayTrafficRouteRuleDetailsPathTypeEnum { + values = append(values, v) + } + return values +} + +// GetHttpIngressGatewayTrafficRouteRuleDetailsPathTypeEnumStringValues Enumerates the set of values in String for HttpIngressGatewayTrafficRouteRuleDetailsPathTypeEnum +func GetHttpIngressGatewayTrafficRouteRuleDetailsPathTypeEnumStringValues() []string { + return []string{ + "PREFIX", + } +} + +// GetMappingHttpIngressGatewayTrafficRouteRuleDetailsPathTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingHttpIngressGatewayTrafficRouteRuleDetailsPathTypeEnum(val string) (HttpIngressGatewayTrafficRouteRuleDetailsPathTypeEnum, bool) { + enum, ok := mappingHttpIngressGatewayTrafficRouteRuleDetailsPathTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/servicemesh/http_virtual_service_traffic_route_rule_details.go b/servicemesh/http_virtual_service_traffic_route_rule_details.go new file mode 100644 index 0000000000..29d596babc --- /dev/null +++ b/servicemesh/http_virtual_service_traffic_route_rule_details.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Service Mesh API +// +// Use the Service Mesh API to manage mesh, virtual service, access policy and other mesh related items. +// + +package servicemesh + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// HttpVirtualServiceTrafficRouteRuleDetails Rule for routing incoming Virtual Service traffic with HTTP protocol +type HttpVirtualServiceTrafficRouteRuleDetails struct { + + // The destination of the request. + Destinations []VirtualDeploymentTrafficRuleTargetDetails `mandatory:"true" json:"destinations"` + + // Route to match + Path *string `mandatory:"false" json:"path"` + + // If true, the rule will check that the content-type header has a application/grpc + // or one of the various application/grpc+ values. + IsGrpc *bool `mandatory:"false" json:"isGrpc"` + + // Match type for the route + PathType HttpVirtualServiceTrafficRouteRuleDetailsPathTypeEnum `mandatory:"false" json:"pathType,omitempty"` +} + +//GetDestinations returns Destinations +func (m HttpVirtualServiceTrafficRouteRuleDetails) GetDestinations() []VirtualDeploymentTrafficRuleTargetDetails { + return m.Destinations +} + +func (m HttpVirtualServiceTrafficRouteRuleDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m HttpVirtualServiceTrafficRouteRuleDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingHttpVirtualServiceTrafficRouteRuleDetailsPathTypeEnum(string(m.PathType)); !ok && m.PathType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PathType: %s. Supported values are: %s.", m.PathType, strings.Join(GetHttpVirtualServiceTrafficRouteRuleDetailsPathTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m HttpVirtualServiceTrafficRouteRuleDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeHttpVirtualServiceTrafficRouteRuleDetails HttpVirtualServiceTrafficRouteRuleDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeHttpVirtualServiceTrafficRouteRuleDetails + }{ + "HTTP", + (MarshalTypeHttpVirtualServiceTrafficRouteRuleDetails)(m), + } + + return json.Marshal(&s) +} + +// HttpVirtualServiceTrafficRouteRuleDetailsPathTypeEnum Enum with underlying type: string +type HttpVirtualServiceTrafficRouteRuleDetailsPathTypeEnum string + +// Set of constants representing the allowable values for HttpVirtualServiceTrafficRouteRuleDetailsPathTypeEnum +const ( + HttpVirtualServiceTrafficRouteRuleDetailsPathTypePrefix HttpVirtualServiceTrafficRouteRuleDetailsPathTypeEnum = "PREFIX" +) + +var mappingHttpVirtualServiceTrafficRouteRuleDetailsPathTypeEnum = map[string]HttpVirtualServiceTrafficRouteRuleDetailsPathTypeEnum{ + "PREFIX": HttpVirtualServiceTrafficRouteRuleDetailsPathTypePrefix, +} + +var mappingHttpVirtualServiceTrafficRouteRuleDetailsPathTypeEnumLowerCase = map[string]HttpVirtualServiceTrafficRouteRuleDetailsPathTypeEnum{ + "prefix": HttpVirtualServiceTrafficRouteRuleDetailsPathTypePrefix, +} + +// GetHttpVirtualServiceTrafficRouteRuleDetailsPathTypeEnumValues Enumerates the set of values for HttpVirtualServiceTrafficRouteRuleDetailsPathTypeEnum +func GetHttpVirtualServiceTrafficRouteRuleDetailsPathTypeEnumValues() []HttpVirtualServiceTrafficRouteRuleDetailsPathTypeEnum { + values := make([]HttpVirtualServiceTrafficRouteRuleDetailsPathTypeEnum, 0) + for _, v := range mappingHttpVirtualServiceTrafficRouteRuleDetailsPathTypeEnum { + values = append(values, v) + } + return values +} + +// GetHttpVirtualServiceTrafficRouteRuleDetailsPathTypeEnumStringValues Enumerates the set of values in String for HttpVirtualServiceTrafficRouteRuleDetailsPathTypeEnum +func GetHttpVirtualServiceTrafficRouteRuleDetailsPathTypeEnumStringValues() []string { + return []string{ + "PREFIX", + } +} + +// GetMappingHttpVirtualServiceTrafficRouteRuleDetailsPathTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingHttpVirtualServiceTrafficRouteRuleDetailsPathTypeEnum(val string) (HttpVirtualServiceTrafficRouteRuleDetailsPathTypeEnum, bool) { + enum, ok := mappingHttpVirtualServiceTrafficRouteRuleDetailsPathTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/servicemesh/ingress_gateway.go b/servicemesh/ingress_gateway.go index 7e6769463e..91d0a2edad 100644 --- a/servicemesh/ingress_gateway.go +++ b/servicemesh/ingress_gateway.go @@ -38,9 +38,6 @@ type IngressGateway struct { // The time when this resource was updated in an RFC3339 formatted datetime string. TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` - // Array of hostnames and their listener configuration that this gateway will bind to. - Hosts []IngressGatewayHost `mandatory:"true" json:"hosts"` - // The current state of the Resource. LifecycleState IngressGatewayLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` @@ -49,6 +46,9 @@ type IngressGateway struct { // Example: `This is my new resource` Description *string `mandatory:"false" json:"description"` + // Array of hostnames and their listener configuration that this gateway will bind to. + Hosts []IngressGatewayHost `mandatory:"false" json:"hosts"` + Mtls *IngressGatewayMutualTransportLayerSecurity `mandatory:"false" json:"mtls"` AccessLogging *AccessLoggingConfiguration `mandatory:"false" json:"accessLogging"` diff --git a/servicemesh/ingress_gateway_access_policy_target.go b/servicemesh/ingress_gateway_access_policy_target.go index 56d2ef629e..0afb8f1247 100644 --- a/servicemesh/ingress_gateway_access_policy_target.go +++ b/servicemesh/ingress_gateway_access_policy_target.go @@ -20,7 +20,7 @@ import ( type IngressGatewayAccessPolicyTarget struct { // The OCID of the ingress gateway resource. - IngressGatewayId *string `mandatory:"true" json:"ingressGatewayId"` + IngressGatewayId *string `mandatory:"false" json:"ingressGatewayId"` } func (m IngressGatewayAccessPolicyTarget) String() string { diff --git a/servicemesh/ingress_gateway_access_policy_target_details.go b/servicemesh/ingress_gateway_access_policy_target_details.go new file mode 100644 index 0000000000..426202f94e --- /dev/null +++ b/servicemesh/ingress_gateway_access_policy_target_details.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Service Mesh API +// +// Use the Service Mesh API to manage mesh, virtual service, access policy and other mesh related items. +// + +package servicemesh + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IngressGatewayAccessPolicyTargetDetails Ingress gateway target that virtual services in mesh receive traffic from. +type IngressGatewayAccessPolicyTargetDetails struct { + + // The OCID of the ingress gateway resource. + IngressGatewayId *string `mandatory:"true" json:"ingressGatewayId"` +} + +func (m IngressGatewayAccessPolicyTargetDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IngressGatewayAccessPolicyTargetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m IngressGatewayAccessPolicyTargetDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeIngressGatewayAccessPolicyTargetDetails IngressGatewayAccessPolicyTargetDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeIngressGatewayAccessPolicyTargetDetails + }{ + "INGRESS_GATEWAY", + (MarshalTypeIngressGatewayAccessPolicyTargetDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/servicemesh/create_ingress_gateway_mutual_transport_layer_security_details.go b/servicemesh/ingress_gateway_mutual_transport_layer_security_details.go similarity index 78% rename from servicemesh/create_ingress_gateway_mutual_transport_layer_security_details.go rename to servicemesh/ingress_gateway_mutual_transport_layer_security_details.go index 0e938ba278..50995f9d84 100644 --- a/servicemesh/create_ingress_gateway_mutual_transport_layer_security_details.go +++ b/servicemesh/ingress_gateway_mutual_transport_layer_security_details.go @@ -15,8 +15,8 @@ import ( "strings" ) -// CreateIngressGatewayMutualTransportLayerSecurityDetails Mutual TLS settings used when sending requests to virtual services within the mesh. -type CreateIngressGatewayMutualTransportLayerSecurityDetails struct { +// IngressGatewayMutualTransportLayerSecurityDetails Mutual TLS settings used when sending requests to virtual services within the mesh. +type IngressGatewayMutualTransportLayerSecurityDetails struct { // The number of days the mTLS certificate is valid. This value should be less than the Maximum Validity Duration // for Certificates (Days) setting on the Certificate Authority associated with this Mesh. The certificate will @@ -25,14 +25,14 @@ type CreateIngressGatewayMutualTransportLayerSecurityDetails struct { MaximumValidity *int `mandatory:"false" json:"maximumValidity"` } -func (m CreateIngressGatewayMutualTransportLayerSecurityDetails) String() string { +func (m IngressGatewayMutualTransportLayerSecurityDetails) String() string { return common.PointerString(m) } // ValidateEnumValue returns an error when providing an unsupported enum value // This function is being called during constructing API request process // Not recommended for calling this function directly -func (m CreateIngressGatewayMutualTransportLayerSecurityDetails) ValidateEnumValue() (bool, error) { +func (m IngressGatewayMutualTransportLayerSecurityDetails) ValidateEnumValue() (bool, error) { errMessage := []string{} if len(errMessage) > 0 { diff --git a/servicemesh/ingress_gateway_route_table.go b/servicemesh/ingress_gateway_route_table.go index 552ec1fddf..c3d3227696 100644 --- a/servicemesh/ingress_gateway_route_table.go +++ b/servicemesh/ingress_gateway_route_table.go @@ -33,9 +33,6 @@ type IngressGatewayRouteTable struct { // Example: `My unique resource name` Name *string `mandatory:"true" json:"name"` - // The route rules for the ingress gateway. - RouteRules []IngressGatewayTrafficRouteRule `mandatory:"true" json:"routeRules"` - // The time when this resource was created in an RFC3339 formatted datetime string. TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` @@ -53,6 +50,9 @@ type IngressGatewayRouteTable struct { // The priority of the route table. A lower value means a higher priority. The routes are declared based on the priority. Priority *int `mandatory:"false" json:"priority"` + // The route rules for the ingress gateway. + RouteRules []IngressGatewayTrafficRouteRule `mandatory:"false" json:"routeRules"` + // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` @@ -93,6 +93,7 @@ func (m *IngressGatewayRouteTable) UnmarshalJSON(data []byte) (e error) { model := struct { Description *string `json:"description"` Priority *int `json:"priority"` + RouteRules []ingressgatewaytrafficrouterule `json:"routeRules"` LifecycleDetails *string `json:"lifecycleDetails"` FreeformTags map[string]string `json:"freeformTags"` DefinedTags map[string]map[string]interface{} `json:"definedTags"` @@ -101,7 +102,6 @@ func (m *IngressGatewayRouteTable) UnmarshalJSON(data []byte) (e error) { CompartmentId *string `json:"compartmentId"` IngressGatewayId *string `json:"ingressGatewayId"` Name *string `json:"name"` - RouteRules []ingressgatewaytrafficrouterule `json:"routeRules"` TimeCreated *common.SDKTime `json:"timeCreated"` TimeUpdated *common.SDKTime `json:"timeUpdated"` LifecycleState IngressGatewayRouteTableLifecycleStateEnum `json:"lifecycleState"` @@ -116,6 +116,19 @@ func (m *IngressGatewayRouteTable) UnmarshalJSON(data []byte) (e error) { m.Priority = model.Priority + m.RouteRules = make([]IngressGatewayTrafficRouteRule, len(model.RouteRules)) + for i, n := range model.RouteRules { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.RouteRules[i] = nn.(IngressGatewayTrafficRouteRule) + } else { + m.RouteRules[i] = nil + } + } + m.LifecycleDetails = model.LifecycleDetails m.FreeformTags = model.FreeformTags @@ -132,19 +145,6 @@ func (m *IngressGatewayRouteTable) UnmarshalJSON(data []byte) (e error) { m.Name = model.Name - m.RouteRules = make([]IngressGatewayTrafficRouteRule, len(model.RouteRules)) - for i, n := range model.RouteRules { - nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) - if e != nil { - return e - } - if nn != nil { - m.RouteRules[i] = nn.(IngressGatewayTrafficRouteRule) - } else { - m.RouteRules[i] = nil - } - } - m.TimeCreated = model.TimeCreated m.TimeUpdated = model.TimeUpdated diff --git a/servicemesh/ingress_gateway_traffic_route_rule_details.go b/servicemesh/ingress_gateway_traffic_route_rule_details.go new file mode 100644 index 0000000000..8d123b404c --- /dev/null +++ b/servicemesh/ingress_gateway_traffic_route_rule_details.go @@ -0,0 +1,149 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Service Mesh API +// +// Use the Service Mesh API to manage mesh, virtual service, access policy and other mesh related items. +// + +package servicemesh + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IngressGatewayTrafficRouteRuleDetails Rule for routing incoming ingress gateway traffic to a virtual service. +type IngressGatewayTrafficRouteRuleDetails interface { + + // The destination of the request. + GetDestinations() []VirtualServiceTrafficRuleTargetDetails + + GetIngressGatewayHost() *IngressGatewayHostRef +} + +type ingressgatewaytrafficrouteruledetails struct { + JsonData []byte + Destinations []VirtualServiceTrafficRuleTargetDetails `mandatory:"true" json:"destinations"` + IngressGatewayHost *IngressGatewayHostRef `mandatory:"false" json:"ingressGatewayHost"` + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *ingressgatewaytrafficrouteruledetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshaleringressgatewaytrafficrouteruledetails ingressgatewaytrafficrouteruledetails + s := struct { + Model Unmarshaleringressgatewaytrafficrouteruledetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Destinations = s.Model.Destinations + m.IngressGatewayHost = s.Model.IngressGatewayHost + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *ingressgatewaytrafficrouteruledetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "TLS_PASSTHROUGH": + mm := TlsPassthroughIngressGatewayTrafficRouteRuleDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "TCP": + mm := TcpIngressGatewayTrafficRouteRuleDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "HTTP": + mm := HttpIngressGatewayTrafficRouteRuleDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + return *m, nil + } +} + +//GetDestinations returns Destinations +func (m ingressgatewaytrafficrouteruledetails) GetDestinations() []VirtualServiceTrafficRuleTargetDetails { + return m.Destinations +} + +//GetIngressGatewayHost returns IngressGatewayHost +func (m ingressgatewaytrafficrouteruledetails) GetIngressGatewayHost() *IngressGatewayHostRef { + return m.IngressGatewayHost +} + +func (m ingressgatewaytrafficrouteruledetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ingressgatewaytrafficrouteruledetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// IngressGatewayTrafficRouteRuleDetailsTypeEnum Enum with underlying type: string +type IngressGatewayTrafficRouteRuleDetailsTypeEnum string + +// Set of constants representing the allowable values for IngressGatewayTrafficRouteRuleDetailsTypeEnum +const ( + IngressGatewayTrafficRouteRuleDetailsTypeHttp IngressGatewayTrafficRouteRuleDetailsTypeEnum = "HTTP" + IngressGatewayTrafficRouteRuleDetailsTypeTlsPassthrough IngressGatewayTrafficRouteRuleDetailsTypeEnum = "TLS_PASSTHROUGH" + IngressGatewayTrafficRouteRuleDetailsTypeTcp IngressGatewayTrafficRouteRuleDetailsTypeEnum = "TCP" +) + +var mappingIngressGatewayTrafficRouteRuleDetailsTypeEnum = map[string]IngressGatewayTrafficRouteRuleDetailsTypeEnum{ + "HTTP": IngressGatewayTrafficRouteRuleDetailsTypeHttp, + "TLS_PASSTHROUGH": IngressGatewayTrafficRouteRuleDetailsTypeTlsPassthrough, + "TCP": IngressGatewayTrafficRouteRuleDetailsTypeTcp, +} + +var mappingIngressGatewayTrafficRouteRuleDetailsTypeEnumLowerCase = map[string]IngressGatewayTrafficRouteRuleDetailsTypeEnum{ + "http": IngressGatewayTrafficRouteRuleDetailsTypeHttp, + "tls_passthrough": IngressGatewayTrafficRouteRuleDetailsTypeTlsPassthrough, + "tcp": IngressGatewayTrafficRouteRuleDetailsTypeTcp, +} + +// GetIngressGatewayTrafficRouteRuleDetailsTypeEnumValues Enumerates the set of values for IngressGatewayTrafficRouteRuleDetailsTypeEnum +func GetIngressGatewayTrafficRouteRuleDetailsTypeEnumValues() []IngressGatewayTrafficRouteRuleDetailsTypeEnum { + values := make([]IngressGatewayTrafficRouteRuleDetailsTypeEnum, 0) + for _, v := range mappingIngressGatewayTrafficRouteRuleDetailsTypeEnum { + values = append(values, v) + } + return values +} + +// GetIngressGatewayTrafficRouteRuleDetailsTypeEnumStringValues Enumerates the set of values in String for IngressGatewayTrafficRouteRuleDetailsTypeEnum +func GetIngressGatewayTrafficRouteRuleDetailsTypeEnumStringValues() []string { + return []string{ + "HTTP", + "TLS_PASSTHROUGH", + "TCP", + } +} + +// GetMappingIngressGatewayTrafficRouteRuleDetailsTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIngressGatewayTrafficRouteRuleDetailsTypeEnum(val string) (IngressGatewayTrafficRouteRuleDetailsTypeEnum, bool) { + enum, ok := mappingIngressGatewayTrafficRouteRuleDetailsTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/servicemesh/list_access_policies_request_response.go b/servicemesh/list_access_policies_request_response.go index 57af42616c..68520763a1 100644 --- a/servicemesh/list_access_policies_request_response.go +++ b/servicemesh/list_access_policies_request_response.go @@ -46,7 +46,7 @@ type ListAccessPoliciesRequest struct { Id *string `mandatory:"false" contributesTo:"query" name:"id"` // A filter to return only resources that match the life cycle state given. - LifecycleState *string `mandatory:"false" contributesTo:"query" name:"lifecycleState"` + LifecycleState AccessPolicyLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. @@ -90,6 +90,9 @@ func (request ListAccessPoliciesRequest) ValidateEnumValue() (bool, error) { if _, ok := GetMappingListAccessPoliciesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListAccessPoliciesSortByEnumStringValues(), ","))) } + if _, ok := GetMappingAccessPolicyLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetAccessPolicyLifecycleStateEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/servicemesh/list_ingress_gateway_route_tables_request_response.go b/servicemesh/list_ingress_gateway_route_tables_request_response.go index f3648bdb87..90d29d5f47 100644 --- a/servicemesh/list_ingress_gateway_route_tables_request_response.go +++ b/servicemesh/list_ingress_gateway_route_tables_request_response.go @@ -46,7 +46,7 @@ type ListIngressGatewayRouteTablesRequest struct { Id *string `mandatory:"false" contributesTo:"query" name:"id"` // A filter to return only resources that match the life cycle state given. - LifecycleState *string `mandatory:"false" contributesTo:"query" name:"lifecycleState"` + LifecycleState IngressGatewayRouteTableLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. @@ -90,6 +90,9 @@ func (request ListIngressGatewayRouteTablesRequest) ValidateEnumValue() (bool, e if _, ok := GetMappingListIngressGatewayRouteTablesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListIngressGatewayRouteTablesSortByEnumStringValues(), ","))) } + if _, ok := GetMappingIngressGatewayRouteTableLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetIngressGatewayRouteTableLifecycleStateEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/servicemesh/list_ingress_gateways_request_response.go b/servicemesh/list_ingress_gateways_request_response.go index 46d229c691..1c0b17028f 100644 --- a/servicemesh/list_ingress_gateways_request_response.go +++ b/servicemesh/list_ingress_gateways_request_response.go @@ -46,7 +46,7 @@ type ListIngressGatewaysRequest struct { Id *string `mandatory:"false" contributesTo:"query" name:"id"` // A filter to return only resources that match the life cycle state given. - LifecycleState *string `mandatory:"false" contributesTo:"query" name:"lifecycleState"` + LifecycleState IngressGatewayLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. @@ -90,6 +90,9 @@ func (request ListIngressGatewaysRequest) ValidateEnumValue() (bool, error) { if _, ok := GetMappingListIngressGatewaysSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListIngressGatewaysSortByEnumStringValues(), ","))) } + if _, ok := GetMappingIngressGatewayLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetIngressGatewayLifecycleStateEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/servicemesh/list_meshes_request_response.go b/servicemesh/list_meshes_request_response.go index 8e42640985..214a966b44 100644 --- a/servicemesh/list_meshes_request_response.go +++ b/servicemesh/list_meshes_request_response.go @@ -40,7 +40,7 @@ type ListMeshesRequest struct { OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` // A filter to return only resources that match the life cycle state given. - LifecycleState *string `mandatory:"false" contributesTo:"query" name:"lifecycleState"` + LifecycleState MeshLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` // Unique Mesh identifier. Id *string `mandatory:"false" contributesTo:"query" name:"id"` @@ -87,6 +87,9 @@ func (request ListMeshesRequest) ValidateEnumValue() (bool, error) { if _, ok := GetMappingListMeshesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListMeshesSortByEnumStringValues(), ","))) } + if _, ok := GetMappingMeshLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetMeshLifecycleStateEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/servicemesh/list_virtual_deployments_request_response.go b/servicemesh/list_virtual_deployments_request_response.go index cb02ef5c39..1970726f78 100644 --- a/servicemesh/list_virtual_deployments_request_response.go +++ b/servicemesh/list_virtual_deployments_request_response.go @@ -46,7 +46,7 @@ type ListVirtualDeploymentsRequest struct { Id *string `mandatory:"false" contributesTo:"query" name:"id"` // A filter to return only resources that match the life cycle state given. - LifecycleState *string `mandatory:"false" contributesTo:"query" name:"lifecycleState"` + LifecycleState VirtualDeploymentLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. @@ -90,6 +90,9 @@ func (request ListVirtualDeploymentsRequest) ValidateEnumValue() (bool, error) { if _, ok := GetMappingListVirtualDeploymentsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListVirtualDeploymentsSortByEnumStringValues(), ","))) } + if _, ok := GetMappingVirtualDeploymentLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetVirtualDeploymentLifecycleStateEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/servicemesh/list_virtual_service_route_tables_request_response.go b/servicemesh/list_virtual_service_route_tables_request_response.go index 722e478f78..0be176b413 100644 --- a/servicemesh/list_virtual_service_route_tables_request_response.go +++ b/servicemesh/list_virtual_service_route_tables_request_response.go @@ -46,7 +46,7 @@ type ListVirtualServiceRouteTablesRequest struct { Id *string `mandatory:"false" contributesTo:"query" name:"id"` // A filter to return only resources that match the life cycle state given. - LifecycleState *string `mandatory:"false" contributesTo:"query" name:"lifecycleState"` + LifecycleState VirtualServiceRouteTableLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. @@ -90,6 +90,9 @@ func (request ListVirtualServiceRouteTablesRequest) ValidateEnumValue() (bool, e if _, ok := GetMappingListVirtualServiceRouteTablesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListVirtualServiceRouteTablesSortByEnumStringValues(), ","))) } + if _, ok := GetMappingVirtualServiceRouteTableLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetVirtualServiceRouteTableLifecycleStateEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/servicemesh/list_virtual_services_request_response.go b/servicemesh/list_virtual_services_request_response.go index 12b280f025..4a6d9aba38 100644 --- a/servicemesh/list_virtual_services_request_response.go +++ b/servicemesh/list_virtual_services_request_response.go @@ -46,7 +46,7 @@ type ListVirtualServicesRequest struct { Id *string `mandatory:"false" contributesTo:"query" name:"id"` // A filter to return only resources that match the life cycle state given. - LifecycleState *string `mandatory:"false" contributesTo:"query" name:"lifecycleState"` + LifecycleState VirtualServiceLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. @@ -90,6 +90,9 @@ func (request ListVirtualServicesRequest) ValidateEnumValue() (bool, error) { if _, ok := GetMappingListVirtualServicesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListVirtualServicesSortByEnumStringValues(), ","))) } + if _, ok := GetMappingVirtualServiceLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetVirtualServiceLifecycleStateEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } diff --git a/servicemesh/list_work_request_errors_request_response.go b/servicemesh/list_work_request_errors_request_response.go index 478e2b3a76..1078b38803 100644 --- a/servicemesh/list_work_request_errors_request_response.go +++ b/servicemesh/list_work_request_errors_request_response.go @@ -30,6 +30,12 @@ type ListWorkRequestErrorsRequest struct { // The maximum number of items to return. Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListWorkRequestErrorsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + SortBy ListWorkRequestErrorsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata @@ -66,6 +72,12 @@ func (request ListWorkRequestErrorsRequest) RetryPolicy() *common.RetryPolicy { // Not recommended for calling this function directly func (request ListWorkRequestErrorsRequest) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingListWorkRequestErrorsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListWorkRequestErrorsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListWorkRequestErrorsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListWorkRequestErrorsSortByEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -99,3 +111,83 @@ func (response ListWorkRequestErrorsResponse) String() string { func (response ListWorkRequestErrorsResponse) HTTPResponse() *http.Response { return response.RawResponse } + +// ListWorkRequestErrorsSortOrderEnum Enum with underlying type: string +type ListWorkRequestErrorsSortOrderEnum string + +// Set of constants representing the allowable values for ListWorkRequestErrorsSortOrderEnum +const ( + ListWorkRequestErrorsSortOrderAsc ListWorkRequestErrorsSortOrderEnum = "ASC" + ListWorkRequestErrorsSortOrderDesc ListWorkRequestErrorsSortOrderEnum = "DESC" +) + +var mappingListWorkRequestErrorsSortOrderEnum = map[string]ListWorkRequestErrorsSortOrderEnum{ + "ASC": ListWorkRequestErrorsSortOrderAsc, + "DESC": ListWorkRequestErrorsSortOrderDesc, +} + +var mappingListWorkRequestErrorsSortOrderEnumLowerCase = map[string]ListWorkRequestErrorsSortOrderEnum{ + "asc": ListWorkRequestErrorsSortOrderAsc, + "desc": ListWorkRequestErrorsSortOrderDesc, +} + +// GetListWorkRequestErrorsSortOrderEnumValues Enumerates the set of values for ListWorkRequestErrorsSortOrderEnum +func GetListWorkRequestErrorsSortOrderEnumValues() []ListWorkRequestErrorsSortOrderEnum { + values := make([]ListWorkRequestErrorsSortOrderEnum, 0) + for _, v := range mappingListWorkRequestErrorsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestErrorsSortOrderEnumStringValues Enumerates the set of values in String for ListWorkRequestErrorsSortOrderEnum +func GetListWorkRequestErrorsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListWorkRequestErrorsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestErrorsSortOrderEnum(val string) (ListWorkRequestErrorsSortOrderEnum, bool) { + enum, ok := mappingListWorkRequestErrorsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListWorkRequestErrorsSortByEnum Enum with underlying type: string +type ListWorkRequestErrorsSortByEnum string + +// Set of constants representing the allowable values for ListWorkRequestErrorsSortByEnum +const ( + ListWorkRequestErrorsSortByTimestamp ListWorkRequestErrorsSortByEnum = "timestamp" +) + +var mappingListWorkRequestErrorsSortByEnum = map[string]ListWorkRequestErrorsSortByEnum{ + "timestamp": ListWorkRequestErrorsSortByTimestamp, +} + +var mappingListWorkRequestErrorsSortByEnumLowerCase = map[string]ListWorkRequestErrorsSortByEnum{ + "timestamp": ListWorkRequestErrorsSortByTimestamp, +} + +// GetListWorkRequestErrorsSortByEnumValues Enumerates the set of values for ListWorkRequestErrorsSortByEnum +func GetListWorkRequestErrorsSortByEnumValues() []ListWorkRequestErrorsSortByEnum { + values := make([]ListWorkRequestErrorsSortByEnum, 0) + for _, v := range mappingListWorkRequestErrorsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestErrorsSortByEnumStringValues Enumerates the set of values in String for ListWorkRequestErrorsSortByEnum +func GetListWorkRequestErrorsSortByEnumStringValues() []string { + return []string{ + "timestamp", + } +} + +// GetMappingListWorkRequestErrorsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestErrorsSortByEnum(val string) (ListWorkRequestErrorsSortByEnum, bool) { + enum, ok := mappingListWorkRequestErrorsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/servicemesh/list_work_request_logs_request_response.go b/servicemesh/list_work_request_logs_request_response.go index c3809f3e67..864b246b50 100644 --- a/servicemesh/list_work_request_logs_request_response.go +++ b/servicemesh/list_work_request_logs_request_response.go @@ -30,6 +30,12 @@ type ListWorkRequestLogsRequest struct { // The maximum number of items to return. Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListWorkRequestLogsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + SortBy ListWorkRequestLogsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata @@ -66,6 +72,12 @@ func (request ListWorkRequestLogsRequest) RetryPolicy() *common.RetryPolicy { // Not recommended for calling this function directly func (request ListWorkRequestLogsRequest) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingListWorkRequestLogsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListWorkRequestLogsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListWorkRequestLogsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListWorkRequestLogsSortByEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -99,3 +111,83 @@ func (response ListWorkRequestLogsResponse) String() string { func (response ListWorkRequestLogsResponse) HTTPResponse() *http.Response { return response.RawResponse } + +// ListWorkRequestLogsSortOrderEnum Enum with underlying type: string +type ListWorkRequestLogsSortOrderEnum string + +// Set of constants representing the allowable values for ListWorkRequestLogsSortOrderEnum +const ( + ListWorkRequestLogsSortOrderAsc ListWorkRequestLogsSortOrderEnum = "ASC" + ListWorkRequestLogsSortOrderDesc ListWorkRequestLogsSortOrderEnum = "DESC" +) + +var mappingListWorkRequestLogsSortOrderEnum = map[string]ListWorkRequestLogsSortOrderEnum{ + "ASC": ListWorkRequestLogsSortOrderAsc, + "DESC": ListWorkRequestLogsSortOrderDesc, +} + +var mappingListWorkRequestLogsSortOrderEnumLowerCase = map[string]ListWorkRequestLogsSortOrderEnum{ + "asc": ListWorkRequestLogsSortOrderAsc, + "desc": ListWorkRequestLogsSortOrderDesc, +} + +// GetListWorkRequestLogsSortOrderEnumValues Enumerates the set of values for ListWorkRequestLogsSortOrderEnum +func GetListWorkRequestLogsSortOrderEnumValues() []ListWorkRequestLogsSortOrderEnum { + values := make([]ListWorkRequestLogsSortOrderEnum, 0) + for _, v := range mappingListWorkRequestLogsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestLogsSortOrderEnumStringValues Enumerates the set of values in String for ListWorkRequestLogsSortOrderEnum +func GetListWorkRequestLogsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListWorkRequestLogsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestLogsSortOrderEnum(val string) (ListWorkRequestLogsSortOrderEnum, bool) { + enum, ok := mappingListWorkRequestLogsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListWorkRequestLogsSortByEnum Enum with underlying type: string +type ListWorkRequestLogsSortByEnum string + +// Set of constants representing the allowable values for ListWorkRequestLogsSortByEnum +const ( + ListWorkRequestLogsSortByTimestamp ListWorkRequestLogsSortByEnum = "timestamp" +) + +var mappingListWorkRequestLogsSortByEnum = map[string]ListWorkRequestLogsSortByEnum{ + "timestamp": ListWorkRequestLogsSortByTimestamp, +} + +var mappingListWorkRequestLogsSortByEnumLowerCase = map[string]ListWorkRequestLogsSortByEnum{ + "timestamp": ListWorkRequestLogsSortByTimestamp, +} + +// GetListWorkRequestLogsSortByEnumValues Enumerates the set of values for ListWorkRequestLogsSortByEnum +func GetListWorkRequestLogsSortByEnumValues() []ListWorkRequestLogsSortByEnum { + values := make([]ListWorkRequestLogsSortByEnum, 0) + for _, v := range mappingListWorkRequestLogsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestLogsSortByEnumStringValues Enumerates the set of values in String for ListWorkRequestLogsSortByEnum +func GetListWorkRequestLogsSortByEnumStringValues() []string { + return []string{ + "timestamp", + } +} + +// GetMappingListWorkRequestLogsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestLogsSortByEnum(val string) (ListWorkRequestLogsSortByEnum, bool) { + enum, ok := mappingListWorkRequestLogsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/servicemesh/list_work_requests_request_response.go b/servicemesh/list_work_requests_request_response.go index 49fc2a9a68..0f315e027f 100644 --- a/servicemesh/list_work_requests_request_response.go +++ b/servicemesh/list_work_requests_request_response.go @@ -24,6 +24,18 @@ type ListWorkRequestsRequest struct { // The ID of the asynchronous work request. WorkRequestId *string `mandatory:"false" contributesTo:"query" name:"workRequestId"` + // A filter to return work requests that match the given resourceId. + ResourceId *string `mandatory:"false" contributesTo:"query" name:"resourceId"` + + // A filter to return only resources that match the operation status given. + OperationStatus ListWorkRequestsOperationStatusEnum `mandatory:"false" contributesTo:"query" name:"operationStatus" omitEmpty:"true"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListWorkRequestsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. + SortBy ListWorkRequestsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + // The client request ID for tracing. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` @@ -69,6 +81,15 @@ func (request ListWorkRequestsRequest) RetryPolicy() *common.RetryPolicy { // Not recommended for calling this function directly func (request ListWorkRequestsRequest) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingListWorkRequestsOperationStatusEnum(string(request.OperationStatus)); !ok && request.OperationStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OperationStatus: %s. Supported values are: %s.", request.OperationStatus, strings.Join(GetListWorkRequestsOperationStatusEnumStringValues(), ","))) + } + if _, ok := GetMappingListWorkRequestsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListWorkRequestsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListWorkRequestsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListWorkRequestsSortByEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -102,3 +123,149 @@ func (response ListWorkRequestsResponse) String() string { func (response ListWorkRequestsResponse) HTTPResponse() *http.Response { return response.RawResponse } + +// ListWorkRequestsOperationStatusEnum Enum with underlying type: string +type ListWorkRequestsOperationStatusEnum string + +// Set of constants representing the allowable values for ListWorkRequestsOperationStatusEnum +const ( + ListWorkRequestsOperationStatusAccepted ListWorkRequestsOperationStatusEnum = "ACCEPTED" + ListWorkRequestsOperationStatusInProgress ListWorkRequestsOperationStatusEnum = "IN_PROGRESS" + ListWorkRequestsOperationStatusFailed ListWorkRequestsOperationStatusEnum = "FAILED" + ListWorkRequestsOperationStatusSucceeded ListWorkRequestsOperationStatusEnum = "SUCCEEDED" + ListWorkRequestsOperationStatusWaiting ListWorkRequestsOperationStatusEnum = "WAITING" + ListWorkRequestsOperationStatusNeedsAttention ListWorkRequestsOperationStatusEnum = "NEEDS_ATTENTION" + ListWorkRequestsOperationStatusCanceling ListWorkRequestsOperationStatusEnum = "CANCELING" + ListWorkRequestsOperationStatusCanceled ListWorkRequestsOperationStatusEnum = "CANCELED" +) + +var mappingListWorkRequestsOperationStatusEnum = map[string]ListWorkRequestsOperationStatusEnum{ + "ACCEPTED": ListWorkRequestsOperationStatusAccepted, + "IN_PROGRESS": ListWorkRequestsOperationStatusInProgress, + "FAILED": ListWorkRequestsOperationStatusFailed, + "SUCCEEDED": ListWorkRequestsOperationStatusSucceeded, + "WAITING": ListWorkRequestsOperationStatusWaiting, + "NEEDS_ATTENTION": ListWorkRequestsOperationStatusNeedsAttention, + "CANCELING": ListWorkRequestsOperationStatusCanceling, + "CANCELED": ListWorkRequestsOperationStatusCanceled, +} + +var mappingListWorkRequestsOperationStatusEnumLowerCase = map[string]ListWorkRequestsOperationStatusEnum{ + "accepted": ListWorkRequestsOperationStatusAccepted, + "in_progress": ListWorkRequestsOperationStatusInProgress, + "failed": ListWorkRequestsOperationStatusFailed, + "succeeded": ListWorkRequestsOperationStatusSucceeded, + "waiting": ListWorkRequestsOperationStatusWaiting, + "needs_attention": ListWorkRequestsOperationStatusNeedsAttention, + "canceling": ListWorkRequestsOperationStatusCanceling, + "canceled": ListWorkRequestsOperationStatusCanceled, +} + +// GetListWorkRequestsOperationStatusEnumValues Enumerates the set of values for ListWorkRequestsOperationStatusEnum +func GetListWorkRequestsOperationStatusEnumValues() []ListWorkRequestsOperationStatusEnum { + values := make([]ListWorkRequestsOperationStatusEnum, 0) + for _, v := range mappingListWorkRequestsOperationStatusEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestsOperationStatusEnumStringValues Enumerates the set of values in String for ListWorkRequestsOperationStatusEnum +func GetListWorkRequestsOperationStatusEnumStringValues() []string { + return []string{ + "ACCEPTED", + "IN_PROGRESS", + "FAILED", + "SUCCEEDED", + "WAITING", + "NEEDS_ATTENTION", + "CANCELING", + "CANCELED", + } +} + +// GetMappingListWorkRequestsOperationStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestsOperationStatusEnum(val string) (ListWorkRequestsOperationStatusEnum, bool) { + enum, ok := mappingListWorkRequestsOperationStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListWorkRequestsSortOrderEnum Enum with underlying type: string +type ListWorkRequestsSortOrderEnum string + +// Set of constants representing the allowable values for ListWorkRequestsSortOrderEnum +const ( + ListWorkRequestsSortOrderAsc ListWorkRequestsSortOrderEnum = "ASC" + ListWorkRequestsSortOrderDesc ListWorkRequestsSortOrderEnum = "DESC" +) + +var mappingListWorkRequestsSortOrderEnum = map[string]ListWorkRequestsSortOrderEnum{ + "ASC": ListWorkRequestsSortOrderAsc, + "DESC": ListWorkRequestsSortOrderDesc, +} + +var mappingListWorkRequestsSortOrderEnumLowerCase = map[string]ListWorkRequestsSortOrderEnum{ + "asc": ListWorkRequestsSortOrderAsc, + "desc": ListWorkRequestsSortOrderDesc, +} + +// GetListWorkRequestsSortOrderEnumValues Enumerates the set of values for ListWorkRequestsSortOrderEnum +func GetListWorkRequestsSortOrderEnumValues() []ListWorkRequestsSortOrderEnum { + values := make([]ListWorkRequestsSortOrderEnum, 0) + for _, v := range mappingListWorkRequestsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestsSortOrderEnumStringValues Enumerates the set of values in String for ListWorkRequestsSortOrderEnum +func GetListWorkRequestsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListWorkRequestsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestsSortOrderEnum(val string) (ListWorkRequestsSortOrderEnum, bool) { + enum, ok := mappingListWorkRequestsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListWorkRequestsSortByEnum Enum with underlying type: string +type ListWorkRequestsSortByEnum string + +// Set of constants representing the allowable values for ListWorkRequestsSortByEnum +const ( + ListWorkRequestsSortByTimeaccepted ListWorkRequestsSortByEnum = "timeAccepted" +) + +var mappingListWorkRequestsSortByEnum = map[string]ListWorkRequestsSortByEnum{ + "timeAccepted": ListWorkRequestsSortByTimeaccepted, +} + +var mappingListWorkRequestsSortByEnumLowerCase = map[string]ListWorkRequestsSortByEnum{ + "timeaccepted": ListWorkRequestsSortByTimeaccepted, +} + +// GetListWorkRequestsSortByEnumValues Enumerates the set of values for ListWorkRequestsSortByEnum +func GetListWorkRequestsSortByEnumValues() []ListWorkRequestsSortByEnum { + values := make([]ListWorkRequestsSortByEnum, 0) + for _, v := range mappingListWorkRequestsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestsSortByEnumStringValues Enumerates the set of values in String for ListWorkRequestsSortByEnum +func GetListWorkRequestsSortByEnumStringValues() []string { + return []string{ + "timeAccepted", + } +} + +// GetMappingListWorkRequestsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestsSortByEnum(val string) (ListWorkRequestsSortByEnum, bool) { + enum, ok := mappingListWorkRequestsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/servicemesh/mesh.go b/servicemesh/mesh.go index 5a04dbf6ea..90916af65e 100644 --- a/servicemesh/mesh.go +++ b/servicemesh/mesh.go @@ -26,10 +26,6 @@ type Mesh struct { // Example: `My new resource` DisplayName *string `mandatory:"true" json:"displayName"` - // A list of certificate authority resources to use for creating leaf certificates for mTLS authentication. - // Currently we only support one certificate authority, but this may expand in future releases. - CertificateAuthorities []CertificateAuthority `mandatory:"true" json:"certificateAuthorities"` - // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. CompartmentId *string `mandatory:"true" json:"compartmentId"` @@ -47,6 +43,11 @@ type Mesh struct { // Example: `This is my new resource` Description *string `mandatory:"false" json:"description"` + // A list of certificate authority resources to use for creating leaf certificates for mTLS authentication. + // Currently we only support one certificate authority, but this may expand in future releases. Request with + // more than one certificate authority will be rejected. + CertificateAuthorities []CertificateAuthority `mandatory:"false" json:"certificateAuthorities"` + Mtls *MeshMutualTransportLayerSecurity `mandatory:"false" json:"mtls"` // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state. diff --git a/servicemesh/operation_status.go b/servicemesh/operation_status.go index c42cd490b4..b5e9df3b52 100644 --- a/servicemesh/operation_status.go +++ b/servicemesh/operation_status.go @@ -18,33 +18,36 @@ type OperationStatusEnum string // Set of constants representing the allowable values for OperationStatusEnum const ( - OperationStatusAccepted OperationStatusEnum = "ACCEPTED" - OperationStatusInProgress OperationStatusEnum = "IN_PROGRESS" - OperationStatusFailed OperationStatusEnum = "FAILED" - OperationStatusSucceeded OperationStatusEnum = "SUCCEEDED" - OperationStatusWaiting OperationStatusEnum = "WAITING" - OperationStatusCanceling OperationStatusEnum = "CANCELING" - OperationStatusCanceled OperationStatusEnum = "CANCELED" + OperationStatusAccepted OperationStatusEnum = "ACCEPTED" + OperationStatusInProgress OperationStatusEnum = "IN_PROGRESS" + OperationStatusFailed OperationStatusEnum = "FAILED" + OperationStatusSucceeded OperationStatusEnum = "SUCCEEDED" + OperationStatusWaiting OperationStatusEnum = "WAITING" + OperationStatusNeedsAttention OperationStatusEnum = "NEEDS_ATTENTION" + OperationStatusCanceling OperationStatusEnum = "CANCELING" + OperationStatusCanceled OperationStatusEnum = "CANCELED" ) var mappingOperationStatusEnum = map[string]OperationStatusEnum{ - "ACCEPTED": OperationStatusAccepted, - "IN_PROGRESS": OperationStatusInProgress, - "FAILED": OperationStatusFailed, - "SUCCEEDED": OperationStatusSucceeded, - "WAITING": OperationStatusWaiting, - "CANCELING": OperationStatusCanceling, - "CANCELED": OperationStatusCanceled, + "ACCEPTED": OperationStatusAccepted, + "IN_PROGRESS": OperationStatusInProgress, + "FAILED": OperationStatusFailed, + "SUCCEEDED": OperationStatusSucceeded, + "WAITING": OperationStatusWaiting, + "NEEDS_ATTENTION": OperationStatusNeedsAttention, + "CANCELING": OperationStatusCanceling, + "CANCELED": OperationStatusCanceled, } var mappingOperationStatusEnumLowerCase = map[string]OperationStatusEnum{ - "accepted": OperationStatusAccepted, - "in_progress": OperationStatusInProgress, - "failed": OperationStatusFailed, - "succeeded": OperationStatusSucceeded, - "waiting": OperationStatusWaiting, - "canceling": OperationStatusCanceling, - "canceled": OperationStatusCanceled, + "accepted": OperationStatusAccepted, + "in_progress": OperationStatusInProgress, + "failed": OperationStatusFailed, + "succeeded": OperationStatusSucceeded, + "waiting": OperationStatusWaiting, + "needs_attention": OperationStatusNeedsAttention, + "canceling": OperationStatusCanceling, + "canceled": OperationStatusCanceled, } // GetOperationStatusEnumValues Enumerates the set of values for OperationStatusEnum @@ -64,6 +67,7 @@ func GetOperationStatusEnumStringValues() []string { "FAILED", "SUCCEEDED", "WAITING", + "NEEDS_ATTENTION", "CANCELING", "CANCELED", } diff --git a/servicemesh/service_discovery_configuration.go b/servicemesh/service_discovery_configuration.go index 1102faef29..30a9d838bc 100644 --- a/servicemesh/service_discovery_configuration.go +++ b/servicemesh/service_discovery_configuration.go @@ -54,6 +54,10 @@ func (m *servicediscoveryconfiguration) UnmarshalPolymorphicJSON(data []byte) (i mm := DnsServiceDiscoveryConfiguration{} err = json.Unmarshal(data, &mm) return mm, err + case "DISABLED": + mm := DisabledServiceDiscoveryConfiguration{} + err = json.Unmarshal(data, &mm) + return mm, err default: return *m, nil } @@ -80,15 +84,18 @@ type ServiceDiscoveryConfigurationTypeEnum string // Set of constants representing the allowable values for ServiceDiscoveryConfigurationTypeEnum const ( - ServiceDiscoveryConfigurationTypeDns ServiceDiscoveryConfigurationTypeEnum = "DNS" + ServiceDiscoveryConfigurationTypeDns ServiceDiscoveryConfigurationTypeEnum = "DNS" + ServiceDiscoveryConfigurationTypeDisabled ServiceDiscoveryConfigurationTypeEnum = "DISABLED" ) var mappingServiceDiscoveryConfigurationTypeEnum = map[string]ServiceDiscoveryConfigurationTypeEnum{ - "DNS": ServiceDiscoveryConfigurationTypeDns, + "DNS": ServiceDiscoveryConfigurationTypeDns, + "DISABLED": ServiceDiscoveryConfigurationTypeDisabled, } var mappingServiceDiscoveryConfigurationTypeEnumLowerCase = map[string]ServiceDiscoveryConfigurationTypeEnum{ - "dns": ServiceDiscoveryConfigurationTypeDns, + "dns": ServiceDiscoveryConfigurationTypeDns, + "disabled": ServiceDiscoveryConfigurationTypeDisabled, } // GetServiceDiscoveryConfigurationTypeEnumValues Enumerates the set of values for ServiceDiscoveryConfigurationTypeEnum @@ -104,6 +111,7 @@ func GetServiceDiscoveryConfigurationTypeEnumValues() []ServiceDiscoveryConfigur func GetServiceDiscoveryConfigurationTypeEnumStringValues() []string { return []string{ "DNS", + "DISABLED", } } diff --git a/servicemesh/servicemesh_client.go b/servicemesh/servicemesh_client.go index b0835a64d2..d8fe00320d 100644 --- a/servicemesh/servicemesh_client.go +++ b/servicemesh/servicemesh_client.go @@ -56,7 +56,7 @@ func newServiceMeshClientFromBaseClient(baseClient common.BaseClient, configProv common.ConfigCircuitBreakerFromGlobalVar(&baseClient) client = ServiceMeshClient{BaseClient: baseClient} - client.BasePath = "20210930" + client.BasePath = "20220615" err = client.setConfigurationProvider(configProvider) return } @@ -87,14 +87,73 @@ func (client *ServiceMeshClient) ConfigurationProvider() *common.ConfigurationPr return client.config } +// CancelWorkRequest Cancels the work request with the given ID. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/CancelWorkRequest.go.html to see an example of how to use CancelWorkRequest API. +// A default retry strategy applies to this operation CancelWorkRequest() +func (client ServiceMeshClient) CancelWorkRequest(ctx context.Context, request CancelWorkRequestRequest) (response CancelWorkRequestResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.cancelWorkRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CancelWorkRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CancelWorkRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CancelWorkRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CancelWorkRequestResponse") + } + return +} + +// cancelWorkRequest implements the OCIOperation interface (enables retrying operations) +func (client ServiceMeshClient) cancelWorkRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/workRequests/{workRequestId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CancelWorkRequestResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/WorkRequest/CancelWorkRequest" + err = common.PostProcessServiceError(err, "ServiceMesh", "CancelWorkRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ChangeAccessPolicyCompartment Moves an AccessPolicy resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource. // // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/ChangeAccessPolicyCompartment.go.html to see an example of how to use ChangeAccessPolicyCompartment API. +// A default retry strategy applies to this operation ChangeAccessPolicyCompartment() func (client ServiceMeshClient) ChangeAccessPolicyCompartment(ctx context.Context, request ChangeAccessPolicyCompartmentRequest) (response ChangeAccessPolicyCompartmentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -140,7 +199,7 @@ func (client ServiceMeshClient) changeAccessPolicyCompartment(ctx context.Contex defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/AccessPolicy/ChangeAccessPolicyCompartment" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/AccessPolicy/ChangeAccessPolicyCompartment" err = common.PostProcessServiceError(err, "ServiceMesh", "ChangeAccessPolicyCompartment", apiReferenceLink) return response, err } @@ -154,9 +213,10 @@ func (client ServiceMeshClient) changeAccessPolicyCompartment(ctx context.Contex // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/ChangeIngressGatewayCompartment.go.html to see an example of how to use ChangeIngressGatewayCompartment API. +// A default retry strategy applies to this operation ChangeIngressGatewayCompartment() func (client ServiceMeshClient) ChangeIngressGatewayCompartment(ctx context.Context, request ChangeIngressGatewayCompartmentRequest) (response ChangeIngressGatewayCompartmentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -202,7 +262,7 @@ func (client ServiceMeshClient) changeIngressGatewayCompartment(ctx context.Cont defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/IngressGateway/ChangeIngressGatewayCompartment" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/IngressGateway/ChangeIngressGatewayCompartment" err = common.PostProcessServiceError(err, "ServiceMesh", "ChangeIngressGatewayCompartment", apiReferenceLink) return response, err } @@ -216,9 +276,10 @@ func (client ServiceMeshClient) changeIngressGatewayCompartment(ctx context.Cont // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/ChangeIngressGatewayRouteTableCompartment.go.html to see an example of how to use ChangeIngressGatewayRouteTableCompartment API. +// A default retry strategy applies to this operation ChangeIngressGatewayRouteTableCompartment() func (client ServiceMeshClient) ChangeIngressGatewayRouteTableCompartment(ctx context.Context, request ChangeIngressGatewayRouteTableCompartmentRequest) (response ChangeIngressGatewayRouteTableCompartmentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -264,7 +325,7 @@ func (client ServiceMeshClient) changeIngressGatewayRouteTableCompartment(ctx co defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/IngressGatewayRouteTable/ChangeIngressGatewayRouteTableCompartment" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/IngressGatewayRouteTable/ChangeIngressGatewayRouteTableCompartment" err = common.PostProcessServiceError(err, "ServiceMesh", "ChangeIngressGatewayRouteTableCompartment", apiReferenceLink) return response, err } @@ -278,9 +339,10 @@ func (client ServiceMeshClient) changeIngressGatewayRouteTableCompartment(ctx co // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/ChangeMeshCompartment.go.html to see an example of how to use ChangeMeshCompartment API. +// A default retry strategy applies to this operation ChangeMeshCompartment() func (client ServiceMeshClient) ChangeMeshCompartment(ctx context.Context, request ChangeMeshCompartmentRequest) (response ChangeMeshCompartmentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -326,7 +388,7 @@ func (client ServiceMeshClient) changeMeshCompartment(ctx context.Context, reque defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/Mesh/ChangeMeshCompartment" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/Mesh/ChangeMeshCompartment" err = common.PostProcessServiceError(err, "ServiceMesh", "ChangeMeshCompartment", apiReferenceLink) return response, err } @@ -340,9 +402,10 @@ func (client ServiceMeshClient) changeMeshCompartment(ctx context.Context, reque // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/ChangeVirtualDeploymentCompartment.go.html to see an example of how to use ChangeVirtualDeploymentCompartment API. +// A default retry strategy applies to this operation ChangeVirtualDeploymentCompartment() func (client ServiceMeshClient) ChangeVirtualDeploymentCompartment(ctx context.Context, request ChangeVirtualDeploymentCompartmentRequest) (response ChangeVirtualDeploymentCompartmentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -388,7 +451,7 @@ func (client ServiceMeshClient) changeVirtualDeploymentCompartment(ctx context.C defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/VirtualDeployment/ChangeVirtualDeploymentCompartment" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/VirtualDeployment/ChangeVirtualDeploymentCompartment" err = common.PostProcessServiceError(err, "ServiceMesh", "ChangeVirtualDeploymentCompartment", apiReferenceLink) return response, err } @@ -402,9 +465,10 @@ func (client ServiceMeshClient) changeVirtualDeploymentCompartment(ctx context.C // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/ChangeVirtualServiceCompartment.go.html to see an example of how to use ChangeVirtualServiceCompartment API. +// A default retry strategy applies to this operation ChangeVirtualServiceCompartment() func (client ServiceMeshClient) ChangeVirtualServiceCompartment(ctx context.Context, request ChangeVirtualServiceCompartmentRequest) (response ChangeVirtualServiceCompartmentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -450,7 +514,7 @@ func (client ServiceMeshClient) changeVirtualServiceCompartment(ctx context.Cont defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/VirtualService/ChangeVirtualServiceCompartment" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/VirtualService/ChangeVirtualServiceCompartment" err = common.PostProcessServiceError(err, "ServiceMesh", "ChangeVirtualServiceCompartment", apiReferenceLink) return response, err } @@ -464,9 +528,10 @@ func (client ServiceMeshClient) changeVirtualServiceCompartment(ctx context.Cont // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/ChangeVirtualServiceRouteTableCompartment.go.html to see an example of how to use ChangeVirtualServiceRouteTableCompartment API. +// A default retry strategy applies to this operation ChangeVirtualServiceRouteTableCompartment() func (client ServiceMeshClient) ChangeVirtualServiceRouteTableCompartment(ctx context.Context, request ChangeVirtualServiceRouteTableCompartmentRequest) (response ChangeVirtualServiceRouteTableCompartmentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -512,7 +577,7 @@ func (client ServiceMeshClient) changeVirtualServiceRouteTableCompartment(ctx co defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/VirtualServiceRouteTable/ChangeVirtualServiceRouteTableCompartment" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/VirtualServiceRouteTable/ChangeVirtualServiceRouteTableCompartment" err = common.PostProcessServiceError(err, "ServiceMesh", "ChangeVirtualServiceRouteTableCompartment", apiReferenceLink) return response, err } @@ -526,9 +591,10 @@ func (client ServiceMeshClient) changeVirtualServiceRouteTableCompartment(ctx co // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/CreateAccessPolicy.go.html to see an example of how to use CreateAccessPolicy API. +// A default retry strategy applies to this operation CreateAccessPolicy() func (client ServiceMeshClient) CreateAccessPolicy(ctx context.Context, request CreateAccessPolicyRequest) (response CreateAccessPolicyResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -574,7 +640,7 @@ func (client ServiceMeshClient) createAccessPolicy(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/AccessPolicy/CreateAccessPolicy" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/AccessPolicy/CreateAccessPolicy" err = common.PostProcessServiceError(err, "ServiceMesh", "CreateAccessPolicy", apiReferenceLink) return response, err } @@ -588,9 +654,10 @@ func (client ServiceMeshClient) createAccessPolicy(ctx context.Context, request // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/CreateIngressGateway.go.html to see an example of how to use CreateIngressGateway API. +// A default retry strategy applies to this operation CreateIngressGateway() func (client ServiceMeshClient) CreateIngressGateway(ctx context.Context, request CreateIngressGatewayRequest) (response CreateIngressGatewayResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -636,7 +703,7 @@ func (client ServiceMeshClient) createIngressGateway(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/IngressGateway/CreateIngressGateway" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/IngressGateway/CreateIngressGateway" err = common.PostProcessServiceError(err, "ServiceMesh", "CreateIngressGateway", apiReferenceLink) return response, err } @@ -650,9 +717,10 @@ func (client ServiceMeshClient) createIngressGateway(ctx context.Context, reques // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/CreateIngressGatewayRouteTable.go.html to see an example of how to use CreateIngressGatewayRouteTable API. +// A default retry strategy applies to this operation CreateIngressGatewayRouteTable() func (client ServiceMeshClient) CreateIngressGatewayRouteTable(ctx context.Context, request CreateIngressGatewayRouteTableRequest) (response CreateIngressGatewayRouteTableResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -698,7 +766,7 @@ func (client ServiceMeshClient) createIngressGatewayRouteTable(ctx context.Conte defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/IngressGatewayRouteTable/CreateIngressGatewayRouteTable" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/IngressGatewayRouteTable/CreateIngressGatewayRouteTable" err = common.PostProcessServiceError(err, "ServiceMesh", "CreateIngressGatewayRouteTable", apiReferenceLink) return response, err } @@ -712,9 +780,10 @@ func (client ServiceMeshClient) createIngressGatewayRouteTable(ctx context.Conte // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/CreateMesh.go.html to see an example of how to use CreateMesh API. +// A default retry strategy applies to this operation CreateMesh() func (client ServiceMeshClient) CreateMesh(ctx context.Context, request CreateMeshRequest) (response CreateMeshResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -760,7 +829,7 @@ func (client ServiceMeshClient) createMesh(ctx context.Context, request common.O defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/Mesh/CreateMesh" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/Mesh/CreateMesh" err = common.PostProcessServiceError(err, "ServiceMesh", "CreateMesh", apiReferenceLink) return response, err } @@ -774,9 +843,10 @@ func (client ServiceMeshClient) createMesh(ctx context.Context, request common.O // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/CreateVirtualDeployment.go.html to see an example of how to use CreateVirtualDeployment API. +// A default retry strategy applies to this operation CreateVirtualDeployment() func (client ServiceMeshClient) CreateVirtualDeployment(ctx context.Context, request CreateVirtualDeploymentRequest) (response CreateVirtualDeploymentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -822,7 +892,7 @@ func (client ServiceMeshClient) createVirtualDeployment(ctx context.Context, req defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/VirtualDeployment/CreateVirtualDeployment" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/VirtualDeployment/CreateVirtualDeployment" err = common.PostProcessServiceError(err, "ServiceMesh", "CreateVirtualDeployment", apiReferenceLink) return response, err } @@ -836,9 +906,10 @@ func (client ServiceMeshClient) createVirtualDeployment(ctx context.Context, req // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/CreateVirtualService.go.html to see an example of how to use CreateVirtualService API. +// A default retry strategy applies to this operation CreateVirtualService() func (client ServiceMeshClient) CreateVirtualService(ctx context.Context, request CreateVirtualServiceRequest) (response CreateVirtualServiceResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -884,7 +955,7 @@ func (client ServiceMeshClient) createVirtualService(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/VirtualService/CreateVirtualService" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/VirtualService/CreateVirtualService" err = common.PostProcessServiceError(err, "ServiceMesh", "CreateVirtualService", apiReferenceLink) return response, err } @@ -898,9 +969,10 @@ func (client ServiceMeshClient) createVirtualService(ctx context.Context, reques // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/CreateVirtualServiceRouteTable.go.html to see an example of how to use CreateVirtualServiceRouteTable API. +// A default retry strategy applies to this operation CreateVirtualServiceRouteTable() func (client ServiceMeshClient) CreateVirtualServiceRouteTable(ctx context.Context, request CreateVirtualServiceRouteTableRequest) (response CreateVirtualServiceRouteTableResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -946,7 +1018,7 @@ func (client ServiceMeshClient) createVirtualServiceRouteTable(ctx context.Conte defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/VirtualServiceRouteTable/CreateVirtualServiceRouteTable" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/VirtualServiceRouteTable/CreateVirtualServiceRouteTable" err = common.PostProcessServiceError(err, "ServiceMesh", "CreateVirtualServiceRouteTable", apiReferenceLink) return response, err } @@ -960,9 +1032,10 @@ func (client ServiceMeshClient) createVirtualServiceRouteTable(ctx context.Conte // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/DeleteAccessPolicy.go.html to see an example of how to use DeleteAccessPolicy API. +// A default retry strategy applies to this operation DeleteAccessPolicy() func (client ServiceMeshClient) DeleteAccessPolicy(ctx context.Context, request DeleteAccessPolicyRequest) (response DeleteAccessPolicyResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1003,7 +1076,7 @@ func (client ServiceMeshClient) deleteAccessPolicy(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/AccessPolicy/DeleteAccessPolicy" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/AccessPolicy/DeleteAccessPolicy" err = common.PostProcessServiceError(err, "ServiceMesh", "DeleteAccessPolicy", apiReferenceLink) return response, err } @@ -1017,9 +1090,10 @@ func (client ServiceMeshClient) deleteAccessPolicy(ctx context.Context, request // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/DeleteIngressGateway.go.html to see an example of how to use DeleteIngressGateway API. +// A default retry strategy applies to this operation DeleteIngressGateway() func (client ServiceMeshClient) DeleteIngressGateway(ctx context.Context, request DeleteIngressGatewayRequest) (response DeleteIngressGatewayResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1060,7 +1134,7 @@ func (client ServiceMeshClient) deleteIngressGateway(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/IngressGateway/DeleteIngressGateway" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/IngressGateway/DeleteIngressGateway" err = common.PostProcessServiceError(err, "ServiceMesh", "DeleteIngressGateway", apiReferenceLink) return response, err } @@ -1074,9 +1148,10 @@ func (client ServiceMeshClient) deleteIngressGateway(ctx context.Context, reques // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/DeleteIngressGatewayRouteTable.go.html to see an example of how to use DeleteIngressGatewayRouteTable API. +// A default retry strategy applies to this operation DeleteIngressGatewayRouteTable() func (client ServiceMeshClient) DeleteIngressGatewayRouteTable(ctx context.Context, request DeleteIngressGatewayRouteTableRequest) (response DeleteIngressGatewayRouteTableResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1117,7 +1192,7 @@ func (client ServiceMeshClient) deleteIngressGatewayRouteTable(ctx context.Conte defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/IngressGatewayRouteTable/DeleteIngressGatewayRouteTable" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/IngressGatewayRouteTable/DeleteIngressGatewayRouteTable" err = common.PostProcessServiceError(err, "ServiceMesh", "DeleteIngressGatewayRouteTable", apiReferenceLink) return response, err } @@ -1131,9 +1206,10 @@ func (client ServiceMeshClient) deleteIngressGatewayRouteTable(ctx context.Conte // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/DeleteMesh.go.html to see an example of how to use DeleteMesh API. +// A default retry strategy applies to this operation DeleteMesh() func (client ServiceMeshClient) DeleteMesh(ctx context.Context, request DeleteMeshRequest) (response DeleteMeshResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1174,7 +1250,7 @@ func (client ServiceMeshClient) deleteMesh(ctx context.Context, request common.O defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/Mesh/DeleteMesh" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/Mesh/DeleteMesh" err = common.PostProcessServiceError(err, "ServiceMesh", "DeleteMesh", apiReferenceLink) return response, err } @@ -1188,9 +1264,10 @@ func (client ServiceMeshClient) deleteMesh(ctx context.Context, request common.O // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/DeleteVirtualDeployment.go.html to see an example of how to use DeleteVirtualDeployment API. +// A default retry strategy applies to this operation DeleteVirtualDeployment() func (client ServiceMeshClient) DeleteVirtualDeployment(ctx context.Context, request DeleteVirtualDeploymentRequest) (response DeleteVirtualDeploymentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1231,7 +1308,7 @@ func (client ServiceMeshClient) deleteVirtualDeployment(ctx context.Context, req defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/VirtualDeployment/DeleteVirtualDeployment" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/VirtualDeployment/DeleteVirtualDeployment" err = common.PostProcessServiceError(err, "ServiceMesh", "DeleteVirtualDeployment", apiReferenceLink) return response, err } @@ -1245,9 +1322,10 @@ func (client ServiceMeshClient) deleteVirtualDeployment(ctx context.Context, req // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/DeleteVirtualService.go.html to see an example of how to use DeleteVirtualService API. +// A default retry strategy applies to this operation DeleteVirtualService() func (client ServiceMeshClient) DeleteVirtualService(ctx context.Context, request DeleteVirtualServiceRequest) (response DeleteVirtualServiceResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1288,7 +1366,7 @@ func (client ServiceMeshClient) deleteVirtualService(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/VirtualService/DeleteVirtualService" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/VirtualService/DeleteVirtualService" err = common.PostProcessServiceError(err, "ServiceMesh", "DeleteVirtualService", apiReferenceLink) return response, err } @@ -1302,9 +1380,10 @@ func (client ServiceMeshClient) deleteVirtualService(ctx context.Context, reques // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/DeleteVirtualServiceRouteTable.go.html to see an example of how to use DeleteVirtualServiceRouteTable API. +// A default retry strategy applies to this operation DeleteVirtualServiceRouteTable() func (client ServiceMeshClient) DeleteVirtualServiceRouteTable(ctx context.Context, request DeleteVirtualServiceRouteTableRequest) (response DeleteVirtualServiceRouteTableResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1345,7 +1424,7 @@ func (client ServiceMeshClient) deleteVirtualServiceRouteTable(ctx context.Conte defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/VirtualServiceRouteTable/DeleteVirtualServiceRouteTable" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/VirtualServiceRouteTable/DeleteVirtualServiceRouteTable" err = common.PostProcessServiceError(err, "ServiceMesh", "DeleteVirtualServiceRouteTable", apiReferenceLink) return response, err } @@ -1359,9 +1438,10 @@ func (client ServiceMeshClient) deleteVirtualServiceRouteTable(ctx context.Conte // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/GetAccessPolicy.go.html to see an example of how to use GetAccessPolicy API. +// A default retry strategy applies to this operation GetAccessPolicy() func (client ServiceMeshClient) GetAccessPolicy(ctx context.Context, request GetAccessPolicyRequest) (response GetAccessPolicyResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1402,7 +1482,7 @@ func (client ServiceMeshClient) getAccessPolicy(ctx context.Context, request com defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/AccessPolicy/GetAccessPolicy" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/AccessPolicy/GetAccessPolicy" err = common.PostProcessServiceError(err, "ServiceMesh", "GetAccessPolicy", apiReferenceLink) return response, err } @@ -1416,9 +1496,10 @@ func (client ServiceMeshClient) getAccessPolicy(ctx context.Context, request com // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/GetIngressGateway.go.html to see an example of how to use GetIngressGateway API. +// A default retry strategy applies to this operation GetIngressGateway() func (client ServiceMeshClient) GetIngressGateway(ctx context.Context, request GetIngressGatewayRequest) (response GetIngressGatewayResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1459,7 +1540,7 @@ func (client ServiceMeshClient) getIngressGateway(ctx context.Context, request c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/IngressGateway/GetIngressGateway" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/IngressGateway/GetIngressGateway" err = common.PostProcessServiceError(err, "ServiceMesh", "GetIngressGateway", apiReferenceLink) return response, err } @@ -1473,9 +1554,10 @@ func (client ServiceMeshClient) getIngressGateway(ctx context.Context, request c // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/GetIngressGatewayRouteTable.go.html to see an example of how to use GetIngressGatewayRouteTable API. +// A default retry strategy applies to this operation GetIngressGatewayRouteTable() func (client ServiceMeshClient) GetIngressGatewayRouteTable(ctx context.Context, request GetIngressGatewayRouteTableRequest) (response GetIngressGatewayRouteTableResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1516,7 +1598,7 @@ func (client ServiceMeshClient) getIngressGatewayRouteTable(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/IngressGatewayRouteTable/GetIngressGatewayRouteTable" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/IngressGatewayRouteTable/GetIngressGatewayRouteTable" err = common.PostProcessServiceError(err, "ServiceMesh", "GetIngressGatewayRouteTable", apiReferenceLink) return response, err } @@ -1530,9 +1612,10 @@ func (client ServiceMeshClient) getIngressGatewayRouteTable(ctx context.Context, // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/GetMesh.go.html to see an example of how to use GetMesh API. +// A default retry strategy applies to this operation GetMesh() func (client ServiceMeshClient) GetMesh(ctx context.Context, request GetMeshRequest) (response GetMeshResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1573,7 +1656,7 @@ func (client ServiceMeshClient) getMesh(ctx context.Context, request common.OCIR defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/Mesh/GetMesh" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/Mesh/GetMesh" err = common.PostProcessServiceError(err, "ServiceMesh", "GetMesh", apiReferenceLink) return response, err } @@ -1587,9 +1670,10 @@ func (client ServiceMeshClient) getMesh(ctx context.Context, request common.OCIR // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/GetProxyDetails.go.html to see an example of how to use GetProxyDetails API. +// A default retry strategy applies to this operation GetProxyDetails() func (client ServiceMeshClient) GetProxyDetails(ctx context.Context, request GetProxyDetailsRequest) (response GetProxyDetailsResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1630,7 +1714,7 @@ func (client ServiceMeshClient) getProxyDetails(ctx context.Context, request com defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/ProxyDetails/GetProxyDetails" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/ProxyDetails/GetProxyDetails" err = common.PostProcessServiceError(err, "ServiceMesh", "GetProxyDetails", apiReferenceLink) return response, err } @@ -1644,9 +1728,10 @@ func (client ServiceMeshClient) getProxyDetails(ctx context.Context, request com // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/GetVirtualDeployment.go.html to see an example of how to use GetVirtualDeployment API. +// A default retry strategy applies to this operation GetVirtualDeployment() func (client ServiceMeshClient) GetVirtualDeployment(ctx context.Context, request GetVirtualDeploymentRequest) (response GetVirtualDeploymentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1687,7 +1772,7 @@ func (client ServiceMeshClient) getVirtualDeployment(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/VirtualDeployment/GetVirtualDeployment" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/VirtualDeployment/GetVirtualDeployment" err = common.PostProcessServiceError(err, "ServiceMesh", "GetVirtualDeployment", apiReferenceLink) return response, err } @@ -1701,9 +1786,10 @@ func (client ServiceMeshClient) getVirtualDeployment(ctx context.Context, reques // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/GetVirtualService.go.html to see an example of how to use GetVirtualService API. +// A default retry strategy applies to this operation GetVirtualService() func (client ServiceMeshClient) GetVirtualService(ctx context.Context, request GetVirtualServiceRequest) (response GetVirtualServiceResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1744,7 +1830,7 @@ func (client ServiceMeshClient) getVirtualService(ctx context.Context, request c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/VirtualService/GetVirtualService" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/VirtualService/GetVirtualService" err = common.PostProcessServiceError(err, "ServiceMesh", "GetVirtualService", apiReferenceLink) return response, err } @@ -1758,9 +1844,10 @@ func (client ServiceMeshClient) getVirtualService(ctx context.Context, request c // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/GetVirtualServiceRouteTable.go.html to see an example of how to use GetVirtualServiceRouteTable API. +// A default retry strategy applies to this operation GetVirtualServiceRouteTable() func (client ServiceMeshClient) GetVirtualServiceRouteTable(ctx context.Context, request GetVirtualServiceRouteTableRequest) (response GetVirtualServiceRouteTableResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1801,7 +1888,7 @@ func (client ServiceMeshClient) getVirtualServiceRouteTable(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/VirtualServiceRouteTable/GetVirtualServiceRouteTable" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/VirtualServiceRouteTable/GetVirtualServiceRouteTable" err = common.PostProcessServiceError(err, "ServiceMesh", "GetVirtualServiceRouteTable", apiReferenceLink) return response, err } @@ -1815,9 +1902,10 @@ func (client ServiceMeshClient) getVirtualServiceRouteTable(ctx context.Context, // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/GetWorkRequest.go.html to see an example of how to use GetWorkRequest API. +// A default retry strategy applies to this operation GetWorkRequest() func (client ServiceMeshClient) GetWorkRequest(ctx context.Context, request GetWorkRequestRequest) (response GetWorkRequestResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1858,7 +1946,7 @@ func (client ServiceMeshClient) getWorkRequest(ctx context.Context, request comm defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/WorkRequest/GetWorkRequest" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/WorkRequest/GetWorkRequest" err = common.PostProcessServiceError(err, "ServiceMesh", "GetWorkRequest", apiReferenceLink) return response, err } @@ -1872,9 +1960,10 @@ func (client ServiceMeshClient) getWorkRequest(ctx context.Context, request comm // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/ListAccessPolicies.go.html to see an example of how to use ListAccessPolicies API. +// A default retry strategy applies to this operation ListAccessPolicies() func (client ServiceMeshClient) ListAccessPolicies(ctx context.Context, request ListAccessPoliciesRequest) (response ListAccessPoliciesResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1915,7 +2004,7 @@ func (client ServiceMeshClient) listAccessPolicies(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/AccessPolicy/ListAccessPolicies" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/AccessPolicy/ListAccessPolicies" err = common.PostProcessServiceError(err, "ServiceMesh", "ListAccessPolicies", apiReferenceLink) return response, err } @@ -1929,9 +2018,10 @@ func (client ServiceMeshClient) listAccessPolicies(ctx context.Context, request // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/ListIngressGatewayRouteTables.go.html to see an example of how to use ListIngressGatewayRouteTables API. +// A default retry strategy applies to this operation ListIngressGatewayRouteTables() func (client ServiceMeshClient) ListIngressGatewayRouteTables(ctx context.Context, request ListIngressGatewayRouteTablesRequest) (response ListIngressGatewayRouteTablesResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -1972,7 +2062,7 @@ func (client ServiceMeshClient) listIngressGatewayRouteTables(ctx context.Contex defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/IngressGatewayRouteTable/ListIngressGatewayRouteTables" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/IngressGatewayRouteTable/ListIngressGatewayRouteTables" err = common.PostProcessServiceError(err, "ServiceMesh", "ListIngressGatewayRouteTables", apiReferenceLink) return response, err } @@ -1986,9 +2076,10 @@ func (client ServiceMeshClient) listIngressGatewayRouteTables(ctx context.Contex // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/ListIngressGateways.go.html to see an example of how to use ListIngressGateways API. +// A default retry strategy applies to this operation ListIngressGateways() func (client ServiceMeshClient) ListIngressGateways(ctx context.Context, request ListIngressGatewaysRequest) (response ListIngressGatewaysResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -2029,7 +2120,7 @@ func (client ServiceMeshClient) listIngressGateways(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/IngressGateway/ListIngressGateways" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/IngressGateway/ListIngressGateways" err = common.PostProcessServiceError(err, "ServiceMesh", "ListIngressGateways", apiReferenceLink) return response, err } @@ -2043,9 +2134,10 @@ func (client ServiceMeshClient) listIngressGateways(ctx context.Context, request // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/ListMeshes.go.html to see an example of how to use ListMeshes API. +// A default retry strategy applies to this operation ListMeshes() func (client ServiceMeshClient) ListMeshes(ctx context.Context, request ListMeshesRequest) (response ListMeshesResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -2086,7 +2178,7 @@ func (client ServiceMeshClient) listMeshes(ctx context.Context, request common.O defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/Mesh/ListMeshes" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/Mesh/ListMeshes" err = common.PostProcessServiceError(err, "ServiceMesh", "ListMeshes", apiReferenceLink) return response, err } @@ -2100,9 +2192,10 @@ func (client ServiceMeshClient) listMeshes(ctx context.Context, request common.O // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/ListVirtualDeployments.go.html to see an example of how to use ListVirtualDeployments API. +// A default retry strategy applies to this operation ListVirtualDeployments() func (client ServiceMeshClient) ListVirtualDeployments(ctx context.Context, request ListVirtualDeploymentsRequest) (response ListVirtualDeploymentsResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -2143,7 +2236,7 @@ func (client ServiceMeshClient) listVirtualDeployments(ctx context.Context, requ defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/VirtualDeployment/ListVirtualDeployments" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/VirtualDeployment/ListVirtualDeployments" err = common.PostProcessServiceError(err, "ServiceMesh", "ListVirtualDeployments", apiReferenceLink) return response, err } @@ -2157,9 +2250,10 @@ func (client ServiceMeshClient) listVirtualDeployments(ctx context.Context, requ // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/ListVirtualServiceRouteTables.go.html to see an example of how to use ListVirtualServiceRouteTables API. +// A default retry strategy applies to this operation ListVirtualServiceRouteTables() func (client ServiceMeshClient) ListVirtualServiceRouteTables(ctx context.Context, request ListVirtualServiceRouteTablesRequest) (response ListVirtualServiceRouteTablesResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -2200,7 +2294,7 @@ func (client ServiceMeshClient) listVirtualServiceRouteTables(ctx context.Contex defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/VirtualServiceRouteTable/ListVirtualServiceRouteTables" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/VirtualServiceRouteTable/ListVirtualServiceRouteTables" err = common.PostProcessServiceError(err, "ServiceMesh", "ListVirtualServiceRouteTables", apiReferenceLink) return response, err } @@ -2214,9 +2308,10 @@ func (client ServiceMeshClient) listVirtualServiceRouteTables(ctx context.Contex // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/ListVirtualServices.go.html to see an example of how to use ListVirtualServices API. +// A default retry strategy applies to this operation ListVirtualServices() func (client ServiceMeshClient) ListVirtualServices(ctx context.Context, request ListVirtualServicesRequest) (response ListVirtualServicesResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -2257,7 +2352,7 @@ func (client ServiceMeshClient) listVirtualServices(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/VirtualService/ListVirtualServices" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/VirtualService/ListVirtualServices" err = common.PostProcessServiceError(err, "ServiceMesh", "ListVirtualServices", apiReferenceLink) return response, err } @@ -2271,9 +2366,10 @@ func (client ServiceMeshClient) listVirtualServices(ctx context.Context, request // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrors API. +// A default retry strategy applies to this operation ListWorkRequestErrors() func (client ServiceMeshClient) ListWorkRequestErrors(ctx context.Context, request ListWorkRequestErrorsRequest) (response ListWorkRequestErrorsResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -2314,7 +2410,7 @@ func (client ServiceMeshClient) listWorkRequestErrors(ctx context.Context, reque defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/WorkRequest/ListWorkRequestErrors" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/WorkRequest/ListWorkRequestErrors" err = common.PostProcessServiceError(err, "ServiceMesh", "ListWorkRequestErrors", apiReferenceLink) return response, err } @@ -2328,9 +2424,10 @@ func (client ServiceMeshClient) listWorkRequestErrors(ctx context.Context, reque // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogs API. +// A default retry strategy applies to this operation ListWorkRequestLogs() func (client ServiceMeshClient) ListWorkRequestLogs(ctx context.Context, request ListWorkRequestLogsRequest) (response ListWorkRequestLogsResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -2371,7 +2468,7 @@ func (client ServiceMeshClient) listWorkRequestLogs(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/WorkRequest/ListWorkRequestLogs" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/WorkRequest/ListWorkRequestLogs" err = common.PostProcessServiceError(err, "ServiceMesh", "ListWorkRequestLogs", apiReferenceLink) return response, err } @@ -2385,9 +2482,10 @@ func (client ServiceMeshClient) listWorkRequestLogs(ctx context.Context, request // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/ListWorkRequests.go.html to see an example of how to use ListWorkRequests API. +// A default retry strategy applies to this operation ListWorkRequests() func (client ServiceMeshClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -2428,7 +2526,7 @@ func (client ServiceMeshClient) listWorkRequests(ctx context.Context, request co defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/WorkRequest/ListWorkRequests" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/WorkRequest/ListWorkRequests" err = common.PostProcessServiceError(err, "ServiceMesh", "ListWorkRequests", apiReferenceLink) return response, err } @@ -2442,9 +2540,10 @@ func (client ServiceMeshClient) listWorkRequests(ctx context.Context, request co // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/UpdateAccessPolicy.go.html to see an example of how to use UpdateAccessPolicy API. +// A default retry strategy applies to this operation UpdateAccessPolicy() func (client ServiceMeshClient) UpdateAccessPolicy(ctx context.Context, request UpdateAccessPolicyRequest) (response UpdateAccessPolicyResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -2490,7 +2589,7 @@ func (client ServiceMeshClient) updateAccessPolicy(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/AccessPolicy/UpdateAccessPolicy" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/AccessPolicy/UpdateAccessPolicy" err = common.PostProcessServiceError(err, "ServiceMesh", "UpdateAccessPolicy", apiReferenceLink) return response, err } @@ -2504,9 +2603,10 @@ func (client ServiceMeshClient) updateAccessPolicy(ctx context.Context, request // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/UpdateIngressGateway.go.html to see an example of how to use UpdateIngressGateway API. +// A default retry strategy applies to this operation UpdateIngressGateway() func (client ServiceMeshClient) UpdateIngressGateway(ctx context.Context, request UpdateIngressGatewayRequest) (response UpdateIngressGatewayResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -2552,7 +2652,7 @@ func (client ServiceMeshClient) updateIngressGateway(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/IngressGateway/UpdateIngressGateway" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/IngressGateway/UpdateIngressGateway" err = common.PostProcessServiceError(err, "ServiceMesh", "UpdateIngressGateway", apiReferenceLink) return response, err } @@ -2566,9 +2666,10 @@ func (client ServiceMeshClient) updateIngressGateway(ctx context.Context, reques // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/UpdateIngressGatewayRouteTable.go.html to see an example of how to use UpdateIngressGatewayRouteTable API. +// A default retry strategy applies to this operation UpdateIngressGatewayRouteTable() func (client ServiceMeshClient) UpdateIngressGatewayRouteTable(ctx context.Context, request UpdateIngressGatewayRouteTableRequest) (response UpdateIngressGatewayRouteTableResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -2614,7 +2715,7 @@ func (client ServiceMeshClient) updateIngressGatewayRouteTable(ctx context.Conte defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/IngressGatewayRouteTable/UpdateIngressGatewayRouteTable" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/IngressGatewayRouteTable/UpdateIngressGatewayRouteTable" err = common.PostProcessServiceError(err, "ServiceMesh", "UpdateIngressGatewayRouteTable", apiReferenceLink) return response, err } @@ -2628,9 +2729,10 @@ func (client ServiceMeshClient) updateIngressGatewayRouteTable(ctx context.Conte // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/UpdateMesh.go.html to see an example of how to use UpdateMesh API. +// A default retry strategy applies to this operation UpdateMesh() func (client ServiceMeshClient) UpdateMesh(ctx context.Context, request UpdateMeshRequest) (response UpdateMeshResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -2676,7 +2778,7 @@ func (client ServiceMeshClient) updateMesh(ctx context.Context, request common.O defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/Mesh/UpdateMesh" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/Mesh/UpdateMesh" err = common.PostProcessServiceError(err, "ServiceMesh", "UpdateMesh", apiReferenceLink) return response, err } @@ -2690,9 +2792,10 @@ func (client ServiceMeshClient) updateMesh(ctx context.Context, request common.O // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/UpdateVirtualDeployment.go.html to see an example of how to use UpdateVirtualDeployment API. +// A default retry strategy applies to this operation UpdateVirtualDeployment() func (client ServiceMeshClient) UpdateVirtualDeployment(ctx context.Context, request UpdateVirtualDeploymentRequest) (response UpdateVirtualDeploymentResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -2738,7 +2841,7 @@ func (client ServiceMeshClient) updateVirtualDeployment(ctx context.Context, req defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/VirtualDeployment/UpdateVirtualDeployment" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/VirtualDeployment/UpdateVirtualDeployment" err = common.PostProcessServiceError(err, "ServiceMesh", "UpdateVirtualDeployment", apiReferenceLink) return response, err } @@ -2752,9 +2855,10 @@ func (client ServiceMeshClient) updateVirtualDeployment(ctx context.Context, req // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/UpdateVirtualService.go.html to see an example of how to use UpdateVirtualService API. +// A default retry strategy applies to this operation UpdateVirtualService() func (client ServiceMeshClient) UpdateVirtualService(ctx context.Context, request UpdateVirtualServiceRequest) (response UpdateVirtualServiceResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -2800,7 +2904,7 @@ func (client ServiceMeshClient) updateVirtualService(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/VirtualService/UpdateVirtualService" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/VirtualService/UpdateVirtualService" err = common.PostProcessServiceError(err, "ServiceMesh", "UpdateVirtualService", apiReferenceLink) return response, err } @@ -2814,9 +2918,10 @@ func (client ServiceMeshClient) updateVirtualService(ctx context.Context, reques // See also // // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/servicemesh/UpdateVirtualServiceRouteTable.go.html to see an example of how to use UpdateVirtualServiceRouteTable API. +// A default retry strategy applies to this operation UpdateVirtualServiceRouteTable() func (client ServiceMeshClient) UpdateVirtualServiceRouteTable(ctx context.Context, request UpdateVirtualServiceRouteTableRequest) (response UpdateVirtualServiceRouteTableResponse, err error) { var ociResponse common.OCIResponse - policy := common.NoRetryPolicy() + policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { policy = *client.RetryPolicy() } @@ -2862,7 +2967,7 @@ func (client ServiceMeshClient) updateVirtualServiceRouteTable(ctx context.Conte defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20210930/VirtualServiceRouteTable/UpdateVirtualServiceRouteTable" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/service-mesh/20220615/VirtualServiceRouteTable/UpdateVirtualServiceRouteTable" err = common.PostProcessServiceError(err, "ServiceMesh", "UpdateVirtualServiceRouteTable", apiReferenceLink) return response, err } diff --git a/servicemesh/tcp_ingress_gateway_traffic_route_rule_details.go b/servicemesh/tcp_ingress_gateway_traffic_route_rule_details.go new file mode 100644 index 0000000000..583752a861 --- /dev/null +++ b/servicemesh/tcp_ingress_gateway_traffic_route_rule_details.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Service Mesh API +// +// Use the Service Mesh API to manage mesh, virtual service, access policy and other mesh related items. +// + +package servicemesh + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TcpIngressGatewayTrafficRouteRuleDetails Rule for routing incoming ingress gateway traffic with TCP protocol. +type TcpIngressGatewayTrafficRouteRuleDetails struct { + + // The destination of the request. + Destinations []VirtualServiceTrafficRuleTargetDetails `mandatory:"true" json:"destinations"` + + IngressGatewayHost *IngressGatewayHostRef `mandatory:"false" json:"ingressGatewayHost"` +} + +//GetIngressGatewayHost returns IngressGatewayHost +func (m TcpIngressGatewayTrafficRouteRuleDetails) GetIngressGatewayHost() *IngressGatewayHostRef { + return m.IngressGatewayHost +} + +//GetDestinations returns Destinations +func (m TcpIngressGatewayTrafficRouteRuleDetails) GetDestinations() []VirtualServiceTrafficRuleTargetDetails { + return m.Destinations +} + +func (m TcpIngressGatewayTrafficRouteRuleDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TcpIngressGatewayTrafficRouteRuleDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m TcpIngressGatewayTrafficRouteRuleDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeTcpIngressGatewayTrafficRouteRuleDetails TcpIngressGatewayTrafficRouteRuleDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeTcpIngressGatewayTrafficRouteRuleDetails + }{ + "TCP", + (MarshalTypeTcpIngressGatewayTrafficRouteRuleDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/servicemesh/tcp_virtual_service_traffic_route_rule_details.go b/servicemesh/tcp_virtual_service_traffic_route_rule_details.go new file mode 100644 index 0000000000..02aa0899ba --- /dev/null +++ b/servicemesh/tcp_virtual_service_traffic_route_rule_details.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Service Mesh API +// +// Use the Service Mesh API to manage mesh, virtual service, access policy and other mesh related items. +// + +package servicemesh + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TcpVirtualServiceTrafficRouteRuleDetails Rule for routing incoming Virtual Service traffic with TCP protocol +type TcpVirtualServiceTrafficRouteRuleDetails struct { + + // The destination of the request. + Destinations []VirtualDeploymentTrafficRuleTargetDetails `mandatory:"true" json:"destinations"` +} + +//GetDestinations returns Destinations +func (m TcpVirtualServiceTrafficRouteRuleDetails) GetDestinations() []VirtualDeploymentTrafficRuleTargetDetails { + return m.Destinations +} + +func (m TcpVirtualServiceTrafficRouteRuleDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TcpVirtualServiceTrafficRouteRuleDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m TcpVirtualServiceTrafficRouteRuleDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeTcpVirtualServiceTrafficRouteRuleDetails TcpVirtualServiceTrafficRouteRuleDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeTcpVirtualServiceTrafficRouteRuleDetails + }{ + "TCP", + (MarshalTypeTcpVirtualServiceTrafficRouteRuleDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/servicemesh/tls_passthrough_ingress_gateway_traffic_route_rule_details.go b/servicemesh/tls_passthrough_ingress_gateway_traffic_route_rule_details.go new file mode 100644 index 0000000000..f9594feba3 --- /dev/null +++ b/servicemesh/tls_passthrough_ingress_gateway_traffic_route_rule_details.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Service Mesh API +// +// Use the Service Mesh API to manage mesh, virtual service, access policy and other mesh related items. +// + +package servicemesh + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TlsPassthroughIngressGatewayTrafficRouteRuleDetails Rule for routing incoming ingress gateway traffic with TCP protocol. +type TlsPassthroughIngressGatewayTrafficRouteRuleDetails struct { + + // The destination of the request. + Destinations []VirtualServiceTrafficRuleTargetDetails `mandatory:"true" json:"destinations"` + + IngressGatewayHost *IngressGatewayHostRef `mandatory:"false" json:"ingressGatewayHost"` +} + +//GetIngressGatewayHost returns IngressGatewayHost +func (m TlsPassthroughIngressGatewayTrafficRouteRuleDetails) GetIngressGatewayHost() *IngressGatewayHostRef { + return m.IngressGatewayHost +} + +//GetDestinations returns Destinations +func (m TlsPassthroughIngressGatewayTrafficRouteRuleDetails) GetDestinations() []VirtualServiceTrafficRuleTargetDetails { + return m.Destinations +} + +func (m TlsPassthroughIngressGatewayTrafficRouteRuleDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TlsPassthroughIngressGatewayTrafficRouteRuleDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m TlsPassthroughIngressGatewayTrafficRouteRuleDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeTlsPassthroughIngressGatewayTrafficRouteRuleDetails TlsPassthroughIngressGatewayTrafficRouteRuleDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeTlsPassthroughIngressGatewayTrafficRouteRuleDetails + }{ + "TLS_PASSTHROUGH", + (MarshalTypeTlsPassthroughIngressGatewayTrafficRouteRuleDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/servicemesh/tls_passthrough_virtual_service_traffic_route_rule_details.go b/servicemesh/tls_passthrough_virtual_service_traffic_route_rule_details.go new file mode 100644 index 0000000000..4c7666b428 --- /dev/null +++ b/servicemesh/tls_passthrough_virtual_service_traffic_route_rule_details.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Service Mesh API +// +// Use the Service Mesh API to manage mesh, virtual service, access policy and other mesh related items. +// + +package servicemesh + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TlsPassthroughVirtualServiceTrafficRouteRuleDetails Rule for routing incoming Virtual Service traffic with TLS_PASSTHROUGH protocol +type TlsPassthroughVirtualServiceTrafficRouteRuleDetails struct { + + // The destination of the request. + Destinations []VirtualDeploymentTrafficRuleTargetDetails `mandatory:"true" json:"destinations"` +} + +//GetDestinations returns Destinations +func (m TlsPassthroughVirtualServiceTrafficRouteRuleDetails) GetDestinations() []VirtualDeploymentTrafficRuleTargetDetails { + return m.Destinations +} + +func (m TlsPassthroughVirtualServiceTrafficRouteRuleDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TlsPassthroughVirtualServiceTrafficRouteRuleDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m TlsPassthroughVirtualServiceTrafficRouteRuleDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeTlsPassthroughVirtualServiceTrafficRouteRuleDetails TlsPassthroughVirtualServiceTrafficRouteRuleDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeTlsPassthroughVirtualServiceTrafficRouteRuleDetails + }{ + "TLS_PASSTHROUGH", + (MarshalTypeTlsPassthroughVirtualServiceTrafficRouteRuleDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/servicemesh/traffic_rule_target_details.go b/servicemesh/traffic_rule_target_details.go new file mode 100644 index 0000000000..926f5c9de9 --- /dev/null +++ b/servicemesh/traffic_rule_target_details.go @@ -0,0 +1,122 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Service Mesh API +// +// Use the Service Mesh API to manage mesh, virtual service, access policy and other mesh related items. +// + +package servicemesh + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TrafficRuleTargetDetails Target of the traffic router rule. +type TrafficRuleTargetDetails interface { +} + +type trafficruletargetdetails struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *trafficruletargetdetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalertrafficruletargetdetails trafficruletargetdetails + s := struct { + Model Unmarshalertrafficruletargetdetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *trafficruletargetdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "VIRTUAL_DEPLOYMENT": + mm := VirtualDeploymentTrafficRuleTargetDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "VIRTUAL_SERVICE": + mm := VirtualServiceTrafficRuleTargetDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + return *m, nil + } +} + +func (m trafficruletargetdetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m trafficruletargetdetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// TrafficRuleTargetDetailsTypeEnum Enum with underlying type: string +type TrafficRuleTargetDetailsTypeEnum string + +// Set of constants representing the allowable values for TrafficRuleTargetDetailsTypeEnum +const ( + TrafficRuleTargetDetailsTypeDeployment TrafficRuleTargetDetailsTypeEnum = "VIRTUAL_DEPLOYMENT" + TrafficRuleTargetDetailsTypeService TrafficRuleTargetDetailsTypeEnum = "VIRTUAL_SERVICE" +) + +var mappingTrafficRuleTargetDetailsTypeEnum = map[string]TrafficRuleTargetDetailsTypeEnum{ + "VIRTUAL_DEPLOYMENT": TrafficRuleTargetDetailsTypeDeployment, + "VIRTUAL_SERVICE": TrafficRuleTargetDetailsTypeService, +} + +var mappingTrafficRuleTargetDetailsTypeEnumLowerCase = map[string]TrafficRuleTargetDetailsTypeEnum{ + "virtual_deployment": TrafficRuleTargetDetailsTypeDeployment, + "virtual_service": TrafficRuleTargetDetailsTypeService, +} + +// GetTrafficRuleTargetDetailsTypeEnumValues Enumerates the set of values for TrafficRuleTargetDetailsTypeEnum +func GetTrafficRuleTargetDetailsTypeEnumValues() []TrafficRuleTargetDetailsTypeEnum { + values := make([]TrafficRuleTargetDetailsTypeEnum, 0) + for _, v := range mappingTrafficRuleTargetDetailsTypeEnum { + values = append(values, v) + } + return values +} + +// GetTrafficRuleTargetDetailsTypeEnumStringValues Enumerates the set of values in String for TrafficRuleTargetDetailsTypeEnum +func GetTrafficRuleTargetDetailsTypeEnumStringValues() []string { + return []string{ + "VIRTUAL_DEPLOYMENT", + "VIRTUAL_SERVICE", + } +} + +// GetMappingTrafficRuleTargetDetailsTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingTrafficRuleTargetDetailsTypeEnum(val string) (TrafficRuleTargetDetailsTypeEnum, bool) { + enum, ok := mappingTrafficRuleTargetDetailsTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/servicemesh/update_access_policy_details.go b/servicemesh/update_access_policy_details.go index cb51a5ecd5..22ad1345b7 100644 --- a/servicemesh/update_access_policy_details.go +++ b/servicemesh/update_access_policy_details.go @@ -24,7 +24,7 @@ type UpdateAccessPolicyDetails struct { Description *string `mandatory:"false" json:"description"` // List of applicable rules. - Rules []AccessPolicyRule `mandatory:"false" json:"rules"` + Rules []AccessPolicyRuleDetails `mandatory:"false" json:"rules"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. // Example: `{"bar-key": "value"}` diff --git a/servicemesh/update_ingress_gateway_details.go b/servicemesh/update_ingress_gateway_details.go index 2d79fcd31f..4045db28cc 100644 --- a/servicemesh/update_ingress_gateway_details.go +++ b/servicemesh/update_ingress_gateway_details.go @@ -28,7 +28,7 @@ type UpdateIngressGatewayDetails struct { AccessLogging *AccessLoggingConfiguration `mandatory:"false" json:"accessLogging"` - Mtls *CreateIngressGatewayMutualTransportLayerSecurityDetails `mandatory:"false" json:"mtls"` + Mtls *IngressGatewayMutualTransportLayerSecurityDetails `mandatory:"false" json:"mtls"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. // Example: `{"bar-key": "value"}` diff --git a/servicemesh/update_ingress_gateway_route_table_details.go b/servicemesh/update_ingress_gateway_route_table_details.go index c5cd51d0cb..cdd0773601 100644 --- a/servicemesh/update_ingress_gateway_route_table_details.go +++ b/servicemesh/update_ingress_gateway_route_table_details.go @@ -28,7 +28,7 @@ type UpdateIngressGatewayRouteTableDetails struct { Priority *int `mandatory:"false" json:"priority"` // The route rules for the ingress gateway. - RouteRules []IngressGatewayTrafficRouteRule `mandatory:"false" json:"routeRules"` + RouteRules []IngressGatewayTrafficRouteRuleDetails `mandatory:"false" json:"routeRules"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. // Example: `{"bar-key": "value"}` @@ -58,11 +58,11 @@ func (m UpdateIngressGatewayRouteTableDetails) ValidateEnumValue() (bool, error) // UnmarshalJSON unmarshals from json func (m *UpdateIngressGatewayRouteTableDetails) UnmarshalJSON(data []byte) (e error) { model := struct { - Description *string `json:"description"` - Priority *int `json:"priority"` - RouteRules []ingressgatewaytrafficrouterule `json:"routeRules"` - FreeformTags map[string]string `json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `json:"definedTags"` + Description *string `json:"description"` + Priority *int `json:"priority"` + RouteRules []ingressgatewaytrafficrouteruledetails `json:"routeRules"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` }{} e = json.Unmarshal(data, &model) @@ -74,14 +74,14 @@ func (m *UpdateIngressGatewayRouteTableDetails) UnmarshalJSON(data []byte) (e er m.Priority = model.Priority - m.RouteRules = make([]IngressGatewayTrafficRouteRule, len(model.RouteRules)) + m.RouteRules = make([]IngressGatewayTrafficRouteRuleDetails, len(model.RouteRules)) for i, n := range model.RouteRules { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) if e != nil { return e } if nn != nil { - m.RouteRules[i] = nn.(IngressGatewayTrafficRouteRule) + m.RouteRules[i] = nn.(IngressGatewayTrafficRouteRuleDetails) } else { m.RouteRules[i] = nil } diff --git a/servicemesh/update_virtual_service_details.go b/servicemesh/update_virtual_service_details.go index f89a3b2856..ffaf7602f5 100644 --- a/servicemesh/update_virtual_service_details.go +++ b/servicemesh/update_virtual_service_details.go @@ -31,7 +31,7 @@ type UpdateVirtualServiceDetails struct { // Can be omitted if the virtual service will only have TCP virtual deployments. Hosts []string `mandatory:"false" json:"hosts"` - Mtls *CreateMutualTransportLayerSecurityDetails `mandatory:"false" json:"mtls"` + Mtls *VirtualServiceMutualTransportLayerSecurityDetails `mandatory:"false" json:"mtls"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. // Example: `{"bar-key": "value"}` diff --git a/servicemesh/update_virtual_service_route_table_details.go b/servicemesh/update_virtual_service_route_table_details.go index bbd8bb86f7..d9024f44b6 100644 --- a/servicemesh/update_virtual_service_route_table_details.go +++ b/servicemesh/update_virtual_service_route_table_details.go @@ -28,7 +28,7 @@ type UpdateVirtualServiceRouteTableDetails struct { Priority *int `mandatory:"false" json:"priority"` // The route rules for the virtual service. - RouteRules []VirtualServiceTrafficRouteRule `mandatory:"false" json:"routeRules"` + RouteRules []VirtualServiceTrafficRouteRuleDetails `mandatory:"false" json:"routeRules"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. // Example: `{"bar-key": "value"}` @@ -58,11 +58,11 @@ func (m UpdateVirtualServiceRouteTableDetails) ValidateEnumValue() (bool, error) // UnmarshalJSON unmarshals from json func (m *UpdateVirtualServiceRouteTableDetails) UnmarshalJSON(data []byte) (e error) { model := struct { - Description *string `json:"description"` - Priority *int `json:"priority"` - RouteRules []virtualservicetrafficrouterule `json:"routeRules"` - FreeformTags map[string]string `json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `json:"definedTags"` + Description *string `json:"description"` + Priority *int `json:"priority"` + RouteRules []virtualservicetrafficrouteruledetails `json:"routeRules"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` }{} e = json.Unmarshal(data, &model) @@ -74,14 +74,14 @@ func (m *UpdateVirtualServiceRouteTableDetails) UnmarshalJSON(data []byte) (e er m.Priority = model.Priority - m.RouteRules = make([]VirtualServiceTrafficRouteRule, len(model.RouteRules)) + m.RouteRules = make([]VirtualServiceTrafficRouteRuleDetails, len(model.RouteRules)) for i, n := range model.RouteRules { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) if e != nil { return e } if nn != nil { - m.RouteRules[i] = nn.(VirtualServiceTrafficRouteRule) + m.RouteRules[i] = nn.(VirtualServiceTrafficRouteRuleDetails) } else { m.RouteRules[i] = nil } diff --git a/servicemesh/virtual_deployment.go b/servicemesh/virtual_deployment.go index d130a21a14..91bb3f1d27 100644 --- a/servicemesh/virtual_deployment.go +++ b/servicemesh/virtual_deployment.go @@ -33,11 +33,6 @@ type VirtualDeployment struct { // Example: `My unique resource name` Name *string `mandatory:"true" json:"name"` - ServiceDiscovery ServiceDiscoveryConfiguration `mandatory:"true" json:"serviceDiscovery"` - - // The listeners for the virtual deployment - Listeners []VirtualDeploymentListener `mandatory:"true" json:"listeners"` - // The time when this resource was created in an RFC3339 formatted datetime string. TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` @@ -52,6 +47,11 @@ type VirtualDeployment struct { // Example: `This is my new resource` Description *string `mandatory:"false" json:"description"` + ServiceDiscovery ServiceDiscoveryConfiguration `mandatory:"false" json:"serviceDiscovery"` + + // The listeners for the virtual deployment + Listeners []VirtualDeploymentListener `mandatory:"false" json:"listeners"` + AccessLogging *AccessLoggingConfiguration `mandatory:"false" json:"accessLogging"` // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state. @@ -93,6 +93,8 @@ func (m VirtualDeployment) ValidateEnumValue() (bool, error) { func (m *VirtualDeployment) UnmarshalJSON(data []byte) (e error) { model := struct { Description *string `json:"description"` + ServiceDiscovery servicediscoveryconfiguration `json:"serviceDiscovery"` + Listeners []VirtualDeploymentListener `json:"listeners"` AccessLogging *AccessLoggingConfiguration `json:"accessLogging"` LifecycleDetails *string `json:"lifecycleDetails"` FreeformTags map[string]string `json:"freeformTags"` @@ -102,8 +104,6 @@ func (m *VirtualDeployment) UnmarshalJSON(data []byte) (e error) { CompartmentId *string `json:"compartmentId"` VirtualServiceId *string `json:"virtualServiceId"` Name *string `json:"name"` - ServiceDiscovery servicediscoveryconfiguration `json:"serviceDiscovery"` - Listeners []VirtualDeploymentListener `json:"listeners"` TimeCreated *common.SDKTime `json:"timeCreated"` TimeUpdated *common.SDKTime `json:"timeUpdated"` LifecycleState VirtualDeploymentLifecycleStateEnum `json:"lifecycleState"` @@ -116,6 +116,21 @@ func (m *VirtualDeployment) UnmarshalJSON(data []byte) (e error) { var nn interface{} m.Description = model.Description + nn, e = model.ServiceDiscovery.UnmarshalPolymorphicJSON(model.ServiceDiscovery.JsonData) + if e != nil { + return + } + if nn != nil { + m.ServiceDiscovery = nn.(ServiceDiscoveryConfiguration) + } else { + m.ServiceDiscovery = nil + } + + m.Listeners = make([]VirtualDeploymentListener, len(model.Listeners)) + for i, n := range model.Listeners { + m.Listeners[i] = n + } + m.AccessLogging = model.AccessLogging m.LifecycleDetails = model.LifecycleDetails @@ -134,21 +149,6 @@ func (m *VirtualDeployment) UnmarshalJSON(data []byte) (e error) { m.Name = model.Name - nn, e = model.ServiceDiscovery.UnmarshalPolymorphicJSON(model.ServiceDiscovery.JsonData) - if e != nil { - return - } - if nn != nil { - m.ServiceDiscovery = nn.(ServiceDiscoveryConfiguration) - } else { - m.ServiceDiscovery = nil - } - - m.Listeners = make([]VirtualDeploymentListener, len(model.Listeners)) - for i, n := range model.Listeners { - m.Listeners[i] = n - } - m.TimeCreated = model.TimeCreated m.TimeUpdated = model.TimeUpdated diff --git a/servicemesh/virtual_deployment_traffic_rule_target.go b/servicemesh/virtual_deployment_traffic_rule_target.go index 9c17c650a7..b4b956584e 100644 --- a/servicemesh/virtual_deployment_traffic_rule_target.go +++ b/servicemesh/virtual_deployment_traffic_rule_target.go @@ -19,12 +19,12 @@ import ( // VirtualDeploymentTrafficRuleTarget Traffic router target for a virtual service version. type VirtualDeploymentTrafficRuleTarget struct { - // The OCID of the virtual deployment where the request will be routed. - VirtualDeploymentId *string `mandatory:"true" json:"virtualDeploymentId"` - // Weight of traffic target. Weight *int `mandatory:"true" json:"weight"` + // The OCID of the virtual deployment where the request will be routed. + VirtualDeploymentId *string `mandatory:"false" json:"virtualDeploymentId"` + // Port on virtual deployment to target. // If port is missing, the rule will target all ports on the virtual deployment. Port *int `mandatory:"false" json:"port"` diff --git a/servicemesh/virtual_deployment_traffic_rule_target_details.go b/servicemesh/virtual_deployment_traffic_rule_target_details.go new file mode 100644 index 0000000000..09e1618bc5 --- /dev/null +++ b/servicemesh/virtual_deployment_traffic_rule_target_details.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Service Mesh API +// +// Use the Service Mesh API to manage mesh, virtual service, access policy and other mesh related items. +// + +package servicemesh + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VirtualDeploymentTrafficRuleTargetDetails Traffic router target for a virtual service version. +type VirtualDeploymentTrafficRuleTargetDetails struct { + + // The OCID of the virtual deployment where the request will be routed. + VirtualDeploymentId *string `mandatory:"true" json:"virtualDeploymentId"` + + // Weight of traffic target. + Weight *int `mandatory:"true" json:"weight"` + + // Port on virtual deployment to target. + // If port is missing, the rule will target all ports on the virtual deployment. + Port *int `mandatory:"false" json:"port"` +} + +func (m VirtualDeploymentTrafficRuleTargetDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VirtualDeploymentTrafficRuleTargetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m VirtualDeploymentTrafficRuleTargetDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVirtualDeploymentTrafficRuleTargetDetails VirtualDeploymentTrafficRuleTargetDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeVirtualDeploymentTrafficRuleTargetDetails + }{ + "VIRTUAL_DEPLOYMENT", + (MarshalTypeVirtualDeploymentTrafficRuleTargetDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/servicemesh/virtual_service_access_policy_target.go b/servicemesh/virtual_service_access_policy_target.go index 339665751c..6c3ec4e504 100644 --- a/servicemesh/virtual_service_access_policy_target.go +++ b/servicemesh/virtual_service_access_policy_target.go @@ -20,7 +20,7 @@ import ( type VirtualServiceAccessPolicyTarget struct { // The OCID of the virtual service resource. - VirtualServiceId *string `mandatory:"true" json:"virtualServiceId"` + VirtualServiceId *string `mandatory:"false" json:"virtualServiceId"` } func (m VirtualServiceAccessPolicyTarget) String() string { diff --git a/servicemesh/virtual_service_access_policy_target_details.go b/servicemesh/virtual_service_access_policy_target_details.go new file mode 100644 index 0000000000..6ea06f787c --- /dev/null +++ b/servicemesh/virtual_service_access_policy_target_details.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Service Mesh API +// +// Use the Service Mesh API to manage mesh, virtual service, access policy and other mesh related items. +// + +package servicemesh + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VirtualServiceAccessPolicyTargetDetails Virtual service target which communicates with other virtual services in a mesh. +type VirtualServiceAccessPolicyTargetDetails struct { + + // The OCID of the virtual service resource. + VirtualServiceId *string `mandatory:"true" json:"virtualServiceId"` +} + +func (m VirtualServiceAccessPolicyTargetDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VirtualServiceAccessPolicyTargetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m VirtualServiceAccessPolicyTargetDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVirtualServiceAccessPolicyTargetDetails VirtualServiceAccessPolicyTargetDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeVirtualServiceAccessPolicyTargetDetails + }{ + "VIRTUAL_SERVICE", + (MarshalTypeVirtualServiceAccessPolicyTargetDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/servicemesh/create_mutual_transport_layer_security_details.go b/servicemesh/virtual_service_mutual_transport_layer_security_details.go similarity index 82% rename from servicemesh/create_mutual_transport_layer_security_details.go rename to servicemesh/virtual_service_mutual_transport_layer_security_details.go index 4949414287..39f2181dac 100644 --- a/servicemesh/create_mutual_transport_layer_security_details.go +++ b/servicemesh/virtual_service_mutual_transport_layer_security_details.go @@ -15,8 +15,8 @@ import ( "strings" ) -// CreateMutualTransportLayerSecurityDetails The mTLS authentication mode to use when receiving requests from other virtual services or ingress gateways within the mesh. -type CreateMutualTransportLayerSecurityDetails struct { +// VirtualServiceMutualTransportLayerSecurityDetails The mTLS authentication mode to use when receiving requests from other virtual services or ingress gateways within the mesh. +type VirtualServiceMutualTransportLayerSecurityDetails struct { // DISABLED: Connection is not tunneled. // PERMISSIVE: Connection can be either plaintext or an mTLS tunnel. @@ -30,14 +30,14 @@ type CreateMutualTransportLayerSecurityDetails struct { MaximumValidity *int `mandatory:"false" json:"maximumValidity"` } -func (m CreateMutualTransportLayerSecurityDetails) String() string { +func (m VirtualServiceMutualTransportLayerSecurityDetails) String() string { return common.PointerString(m) } // ValidateEnumValue returns an error when providing an unsupported enum value // This function is being called during constructing API request process // Not recommended for calling this function directly -func (m CreateMutualTransportLayerSecurityDetails) ValidateEnumValue() (bool, error) { +func (m VirtualServiceMutualTransportLayerSecurityDetails) ValidateEnumValue() (bool, error) { errMessage := []string{} if _, ok := GetMappingMutualTransportLayerSecurityModeEnum(string(m.Mode)); !ok && m.Mode != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Mode: %s. Supported values are: %s.", m.Mode, strings.Join(GetMutualTransportLayerSecurityModeEnumStringValues(), ","))) diff --git a/servicemesh/virtual_service_route_table.go b/servicemesh/virtual_service_route_table.go index 92dce2b23d..43ef31ae22 100644 --- a/servicemesh/virtual_service_route_table.go +++ b/servicemesh/virtual_service_route_table.go @@ -33,9 +33,6 @@ type VirtualServiceRouteTable struct { // Example: `My unique resource name` Name *string `mandatory:"true" json:"name"` - // The route rules for the virtual service. - RouteRules []VirtualServiceTrafficRouteRule `mandatory:"true" json:"routeRules"` - // The time when this resource was created in an RFC3339 formatted datetime string. TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` @@ -53,6 +50,9 @@ type VirtualServiceRouteTable struct { // The priority of the route table. Lower value means higher priority. The routes are declared based on the priority. Priority *int `mandatory:"false" json:"priority"` + // The route rules for the virtual service. + RouteRules []VirtualServiceTrafficRouteRule `mandatory:"false" json:"routeRules"` + // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` @@ -93,6 +93,7 @@ func (m *VirtualServiceRouteTable) UnmarshalJSON(data []byte) (e error) { model := struct { Description *string `json:"description"` Priority *int `json:"priority"` + RouteRules []virtualservicetrafficrouterule `json:"routeRules"` LifecycleDetails *string `json:"lifecycleDetails"` FreeformTags map[string]string `json:"freeformTags"` DefinedTags map[string]map[string]interface{} `json:"definedTags"` @@ -101,7 +102,6 @@ func (m *VirtualServiceRouteTable) UnmarshalJSON(data []byte) (e error) { CompartmentId *string `json:"compartmentId"` VirtualServiceId *string `json:"virtualServiceId"` Name *string `json:"name"` - RouteRules []virtualservicetrafficrouterule `json:"routeRules"` TimeCreated *common.SDKTime `json:"timeCreated"` TimeUpdated *common.SDKTime `json:"timeUpdated"` LifecycleState VirtualServiceRouteTableLifecycleStateEnum `json:"lifecycleState"` @@ -116,6 +116,19 @@ func (m *VirtualServiceRouteTable) UnmarshalJSON(data []byte) (e error) { m.Priority = model.Priority + m.RouteRules = make([]VirtualServiceTrafficRouteRule, len(model.RouteRules)) + for i, n := range model.RouteRules { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.RouteRules[i] = nn.(VirtualServiceTrafficRouteRule) + } else { + m.RouteRules[i] = nil + } + } + m.LifecycleDetails = model.LifecycleDetails m.FreeformTags = model.FreeformTags @@ -132,19 +145,6 @@ func (m *VirtualServiceRouteTable) UnmarshalJSON(data []byte) (e error) { m.Name = model.Name - m.RouteRules = make([]VirtualServiceTrafficRouteRule, len(model.RouteRules)) - for i, n := range model.RouteRules { - nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) - if e != nil { - return e - } - if nn != nil { - m.RouteRules[i] = nn.(VirtualServiceTrafficRouteRule) - } else { - m.RouteRules[i] = nil - } - } - m.TimeCreated = model.TimeCreated m.TimeUpdated = model.TimeUpdated diff --git a/servicemesh/virtual_service_traffic_route_rule_details.go b/servicemesh/virtual_service_traffic_route_rule_details.go new file mode 100644 index 0000000000..1f6e755d2e --- /dev/null +++ b/servicemesh/virtual_service_traffic_route_rule_details.go @@ -0,0 +1,140 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Service Mesh API +// +// Use the Service Mesh API to manage mesh, virtual service, access policy and other mesh related items. +// + +package servicemesh + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VirtualServiceTrafficRouteRuleDetails Rule for routing incoming virtual service traffic to a version. +type VirtualServiceTrafficRouteRuleDetails interface { + + // The destination of the request. + GetDestinations() []VirtualDeploymentTrafficRuleTargetDetails +} + +type virtualservicetrafficrouteruledetails struct { + JsonData []byte + Destinations []VirtualDeploymentTrafficRuleTargetDetails `mandatory:"true" json:"destinations"` + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *virtualservicetrafficrouteruledetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalervirtualservicetrafficrouteruledetails virtualservicetrafficrouteruledetails + s := struct { + Model Unmarshalervirtualservicetrafficrouteruledetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Destinations = s.Model.Destinations + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *virtualservicetrafficrouteruledetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "TCP": + mm := TcpVirtualServiceTrafficRouteRuleDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "TLS_PASSTHROUGH": + mm := TlsPassthroughVirtualServiceTrafficRouteRuleDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "HTTP": + mm := HttpVirtualServiceTrafficRouteRuleDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + return *m, nil + } +} + +//GetDestinations returns Destinations +func (m virtualservicetrafficrouteruledetails) GetDestinations() []VirtualDeploymentTrafficRuleTargetDetails { + return m.Destinations +} + +func (m virtualservicetrafficrouteruledetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m virtualservicetrafficrouteruledetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// VirtualServiceTrafficRouteRuleDetailsTypeEnum Enum with underlying type: string +type VirtualServiceTrafficRouteRuleDetailsTypeEnum string + +// Set of constants representing the allowable values for VirtualServiceTrafficRouteRuleDetailsTypeEnum +const ( + VirtualServiceTrafficRouteRuleDetailsTypeHttp VirtualServiceTrafficRouteRuleDetailsTypeEnum = "HTTP" + VirtualServiceTrafficRouteRuleDetailsTypeTlsPassthrough VirtualServiceTrafficRouteRuleDetailsTypeEnum = "TLS_PASSTHROUGH" + VirtualServiceTrafficRouteRuleDetailsTypeTcp VirtualServiceTrafficRouteRuleDetailsTypeEnum = "TCP" +) + +var mappingVirtualServiceTrafficRouteRuleDetailsTypeEnum = map[string]VirtualServiceTrafficRouteRuleDetailsTypeEnum{ + "HTTP": VirtualServiceTrafficRouteRuleDetailsTypeHttp, + "TLS_PASSTHROUGH": VirtualServiceTrafficRouteRuleDetailsTypeTlsPassthrough, + "TCP": VirtualServiceTrafficRouteRuleDetailsTypeTcp, +} + +var mappingVirtualServiceTrafficRouteRuleDetailsTypeEnumLowerCase = map[string]VirtualServiceTrafficRouteRuleDetailsTypeEnum{ + "http": VirtualServiceTrafficRouteRuleDetailsTypeHttp, + "tls_passthrough": VirtualServiceTrafficRouteRuleDetailsTypeTlsPassthrough, + "tcp": VirtualServiceTrafficRouteRuleDetailsTypeTcp, +} + +// GetVirtualServiceTrafficRouteRuleDetailsTypeEnumValues Enumerates the set of values for VirtualServiceTrafficRouteRuleDetailsTypeEnum +func GetVirtualServiceTrafficRouteRuleDetailsTypeEnumValues() []VirtualServiceTrafficRouteRuleDetailsTypeEnum { + values := make([]VirtualServiceTrafficRouteRuleDetailsTypeEnum, 0) + for _, v := range mappingVirtualServiceTrafficRouteRuleDetailsTypeEnum { + values = append(values, v) + } + return values +} + +// GetVirtualServiceTrafficRouteRuleDetailsTypeEnumStringValues Enumerates the set of values in String for VirtualServiceTrafficRouteRuleDetailsTypeEnum +func GetVirtualServiceTrafficRouteRuleDetailsTypeEnumStringValues() []string { + return []string{ + "HTTP", + "TLS_PASSTHROUGH", + "TCP", + } +} + +// GetMappingVirtualServiceTrafficRouteRuleDetailsTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVirtualServiceTrafficRouteRuleDetailsTypeEnum(val string) (VirtualServiceTrafficRouteRuleDetailsTypeEnum, bool) { + enum, ok := mappingVirtualServiceTrafficRouteRuleDetailsTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/servicemesh/virtual_service_traffic_rule_target.go b/servicemesh/virtual_service_traffic_rule_target.go index ebb4235555..0c4213e3a1 100644 --- a/servicemesh/virtual_service_traffic_rule_target.go +++ b/servicemesh/virtual_service_traffic_rule_target.go @@ -20,7 +20,7 @@ import ( type VirtualServiceTrafficRuleTarget struct { // The OCID of the virtual service where the request will be routed. - VirtualServiceId *string `mandatory:"true" json:"virtualServiceId"` + VirtualServiceId *string `mandatory:"false" json:"virtualServiceId"` // The port on the virtual service to target. // Mandatory if the virtual deployments are listening on multiple ports. diff --git a/servicemesh/virtual_service_traffic_rule_target_details.go b/servicemesh/virtual_service_traffic_rule_target_details.go new file mode 100644 index 0000000000..11db8fca36 --- /dev/null +++ b/servicemesh/virtual_service_traffic_rule_target_details.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Service Mesh API +// +// Use the Service Mesh API to manage mesh, virtual service, access policy and other mesh related items. +// + +package servicemesh + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VirtualServiceTrafficRuleTargetDetails Traffic router target for an ingress gateway. +type VirtualServiceTrafficRuleTargetDetails struct { + + // The OCID of the virtual service where the request will be routed. + VirtualServiceId *string `mandatory:"true" json:"virtualServiceId"` + + // The port on the virtual service to target. + // Mandatory if the virtual deployments are listening on multiple ports. + Port *int `mandatory:"false" json:"port"` + + // Weight of traffic target. + Weight *int `mandatory:"false" json:"weight"` +} + +func (m VirtualServiceTrafficRuleTargetDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VirtualServiceTrafficRuleTargetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m VirtualServiceTrafficRuleTargetDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVirtualServiceTrafficRuleTargetDetails VirtualServiceTrafficRuleTargetDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeVirtualServiceTrafficRuleTargetDetails + }{ + "VIRTUAL_SERVICE", + (MarshalTypeVirtualServiceTrafficRuleTargetDetails)(m), + } + + return json.Marshal(&s) +}