diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b82251c72..3ad50ec8ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,28 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) +## 65.48.0 - 2023-08-29 +### Added +- Support for creating and updating network monitors in the Application Performance Monitoring Synthetics service +- Support for integration of GoldenGate service for replication in the Database Migration Service +- Support for displaying resource usage information on autonomous container database and cloud autonomous vm cluster get operations in the Database service +- Support for FastConnect Media Access Control Security (MACSec) fail open option in the Network Monitoring service +- Support for generic bare metal types and configuration maps in compute instance platform configuration in the Compute service +- Support for encrypted FastConnect in the Network Monitoring service +- Support for new parameters on customer premises equipment and virtual circuit create operations in the Network Monitoring service +- Support for virtual circuit associated tunnels in the Network Monitoring service +- Support for additional parameters on dynamic routing gateway create and update operations in the Network Monitoring service +- Support for assigning an IPv6 address to a compute instance during instance launch or secondary VNIC attach in the Compute service + +### Breaking Changes +- The models `AnalyticsCluster`, `AnalyticsClusterMemoryEstimate`, `AnalyticsClusterMemoryEstimateStatus`, `AnalyticsClusterNode`, `AnalyticsClusterSchemaMemoryEstimate`, `AnalyticsClusterSummary`, `AnalyticsClusterTableMemoryEstimate`, `UpdateAnalyticsClusterDetails`, `AddAnalyticsClusterRequest`, `DeleteAnalyticsClusterRequest`, `GenerateAnalyticsClusterMemoryEstimateRequest`, `GetAnalyticsClusterRequest`, `RestartAnalyticsClusterRequest`, `StartAnalyticsClusterRequest`, `StopAnalyticsClusterRequest`, `UpdateAnalyticsClusterRequest`, `DeleteAnalyticsClusterResponse`, `GetAnalyticsClusterMemoryEstimateResponse`, `RestartAnalyticsClusterResponse`, `StartAnalyticsClusterResponse`, `StopAnalyticsClusterResponse`, `UpdateAnalyticsClusterResponse` were removed in the MySQL Database service +- The properties `IsAnalyticsClusterAttached` and `AnalyticsCluster` were removed from `DbSystem` and `DbSystemSummary` models in the MySQL Database service +- The enum member `ANALYTICSCLUSTER` was removed from the enum `IsSupportedForEnum` in the models `ShapeSummary` and `ListShapesRequest` in the MySQL Database service +- The enum members `ADD_ANALYTICS_CLUSTER`, `UPDATE_ANALYTICS_CLUSTER`, `DELETE_ANALYTICS_CLUSTER`, `START_ANALYTICS_CLUSTER`, `STOP_ANALYTICS_CLUSTER`, `RESTART_ANALYTICS_CLUSTER`, `GENERATE_ANALYTICS_CLUSTER_MEMORY_ESTIMATE` were removed from the enum `WorkRequestOperationType` in the MySQL Database service +- The property `IsAnalyticsClusterAttached` was removed from the model `ListDbSystemsRequest` in the MySQL Database service +- The operations `AddAnalyticsCluster`, `DeleteAnalyticsCluster`, `GenerateAnalyticsClusterMemoryEstimate`, `GetAnalyticsCluster`, `GetAnalyticsClusterMemoryEstimate`, `RestartAnalyticsCluster`, `StartAnalyticsCluster`, `StopAnalyticsCluster`, `UpdateAnalyticsCluster` were removed from the `DbSystemClient` in the MySQL Database service + + ## 65.47.2 - 2023-08-22 ### Added - Support for Compute Cloud at Customer service diff --git a/Makefile b/Makefile index 9c87a1bab7..339845f297 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,10 @@ EXCLUDED_CLEAN_DIRECTORIES = objectstorage/transfer* build: lint $(TARGETS_BUILD) +static-check: + @staticcheck ./... + @echo "Success: No static check warnings" + test: build $(TARGETS_TEST) test-only: $(TARGETS_TEST) diff --git a/README.md b/README.md index 73be2be75c..897fc18ed6 100644 --- a/README.md +++ b/README.md @@ -207,6 +207,36 @@ go install github.com/gofrs/flock ``` go install github.com/golang/lint/golint ``` +- Install [staticcheck](https://github.com/dominikh/go-tools) with the command: +``` +go install honnef.co/go/tools/cmd/staticcheck@2023.1.3 +``` + +### Linting and Staticcheck +Linting (performed by golint) can be done with the following command: + +``` +make lint +``` +This command is also run by the make build and make test commands. +Linting will perform a number of formatting changes across the code base. + +Staticcheck can be run with: + +``` +make static-check +``` +Staticcheck will provide formatting warnings but will not make any changes to any files. +You can also cause staticcheck to be run before calls to "git commit" with the pre-commit plugin. + +``` +pre-commit install +``` +You can install pre-commit itself, you can use your package manager of choice, such as + +``` +brew install pre-commit +``` ### Build Building is provided by the make file at the root of the project. To build the project execute. diff --git a/accessgovernancecp/accessgovernancecp_client.go b/accessgovernancecp/accessgovernancecp_client.go index 9a736ae8e2..48c92325fa 100644 --- a/accessgovernancecp/accessgovernancecp_client.go +++ b/accessgovernancecp/accessgovernancecp_client.go @@ -80,7 +80,7 @@ func (client *AccessGovernanceCPClient) setConfigurationProvider(configProvider 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/adm/adm_applicationdependencymanagement_client.go b/adm/adm_applicationdependencymanagement_client.go index 07506be2e9..a0c2a00892 100644 --- a/adm/adm_applicationdependencymanagement_client.go +++ b/adm/adm_applicationdependencymanagement_client.go @@ -80,7 +80,7 @@ func (client *ApplicationDependencyManagementClient) setConfigurationProvider(co 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/adm/create_vulnerability_audit_details.go b/adm/create_vulnerability_audit_details.go index 44f7e100a5..0bed5fcedc 100644 --- a/adm/create_vulnerability_audit_details.go +++ b/adm/create_vulnerability_audit_details.go @@ -89,10 +89,7 @@ func (m *CreateVulnerabilityAuditDetails) UnmarshalJSON(data []byte) (e error) { m.CompartmentId = model.CompartmentId m.ApplicationDependencies = make([]ApplicationDependency, len(model.ApplicationDependencies)) - for i, n := range model.ApplicationDependencies { - m.ApplicationDependencies[i] = n - } - + copy(m.ApplicationDependencies, model.ApplicationDependencies) m.Configuration = model.Configuration m.DisplayName = model.DisplayName diff --git a/adm/vulnerability_audit.go b/adm/vulnerability_audit.go index dd7c033faa..4ac3449c20 100644 --- a/adm/vulnerability_audit.go +++ b/adm/vulnerability_audit.go @@ -163,10 +163,7 @@ func (m *VulnerabilityAudit) UnmarshalJSON(data []byte) (e error) { m.LifecycleState = model.LifecycleState m.Vulnerabilities = make([]Vulnerability, len(model.Vulnerabilities)) - for i, n := range model.Vulnerabilities { - m.Vulnerabilities[i] = n - } - + copy(m.Vulnerabilities, model.Vulnerabilities) m.MaxObservedCvssV2Score = model.MaxObservedCvssV2Score m.MaxObservedCvssV3Score = model.MaxObservedCvssV3Score diff --git a/aianomalydetection/aianomalydetection_anomalydetection_client.go b/aianomalydetection/aianomalydetection_anomalydetection_client.go index 319151f27f..199316ff00 100644 --- a/aianomalydetection/aianomalydetection_anomalydetection_client.go +++ b/aianomalydetection/aianomalydetection_anomalydetection_client.go @@ -82,7 +82,7 @@ func (client *AnomalyDetectionClient) setConfigurationProvider(configProvider co 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/aianomalydetection/detect_anomalies_details.go b/aianomalydetection/detect_anomalies_details.go index a5bf66809c..a274d47c84 100644 --- a/aianomalydetection/detect_anomalies_details.go +++ b/aianomalydetection/detect_anomalies_details.go @@ -31,8 +31,8 @@ type DetectAnomaliesDetails interface { type detectanomaliesdetails struct { JsonData []byte - ModelId *string `mandatory:"true" json:"modelId"` Sensitivity *float32 `mandatory:"false" json:"sensitivity"` + ModelId *string `mandatory:"true" json:"modelId"` RequestType string `json:"requestType"` } @@ -77,16 +77,16 @@ func (m *detectanomaliesdetails) UnmarshalPolymorphicJSON(data []byte) (interfac } } -//GetModelId returns ModelId -func (m detectanomaliesdetails) GetModelId() *string { - return m.ModelId -} - -//GetSensitivity returns Sensitivity +// GetSensitivity returns Sensitivity func (m detectanomaliesdetails) GetSensitivity() *float32 { return m.Sensitivity } +// GetModelId returns ModelId +func (m detectanomaliesdetails) GetModelId() *string { + return m.ModelId +} + func (m detectanomaliesdetails) String() string { return common.PointerString(m) } diff --git a/aidocument/aidocument_aiservicedocument_client.go b/aidocument/aidocument_aiservicedocument_client.go index ed27534e57..bb9b1b25eb 100644 --- a/aidocument/aidocument_aiservicedocument_client.go +++ b/aidocument/aidocument_aiservicedocument_client.go @@ -80,7 +80,7 @@ func (client *AIServiceDocumentClient) setConfigurationProvider(configProvider c 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/aidocument/analyze_document_details.go b/aidocument/analyze_document_details.go index a14f54c4c6..d4d1144e6f 100644 --- a/aidocument/analyze_document_details.go +++ b/aidocument/analyze_document_details.go @@ -96,7 +96,6 @@ func (m *AnalyzeDocumentDetails) UnmarshalJSON(data []byte) (e error) { m.Features[i] = nil } } - nn, e = model.Document.UnmarshalPolymorphicJSON(model.Document.JsonData) if e != nil { return diff --git a/aidocument/create_model_details.go b/aidocument/create_model_details.go index 14d2b998a8..2f4d5ced5a 100644 --- a/aidocument/create_model_details.go +++ b/aidocument/create_model_details.go @@ -149,10 +149,7 @@ func (m *CreateModelDetails) UnmarshalJSON(data []byte) (e error) { } m.ComponentModels = make([]ComponentModel, len(model.ComponentModels)) - for i, n := range model.ComponentModels { - m.ComponentModels[i] = n - } - + copy(m.ComponentModels, model.ComponentModels) m.AliasName = model.AliasName m.FreeformTags = model.FreeformTags diff --git a/aidocument/field_value.go b/aidocument/field_value.go index 846e50ef54..14a22bc61b 100644 --- a/aidocument/field_value.go +++ b/aidocument/field_value.go @@ -33,10 +33,10 @@ type FieldValue interface { type fieldvalue struct { JsonData []byte + Text *string `mandatory:"false" json:"text"` Confidence *float32 `mandatory:"true" json:"confidence"` BoundingPolygon *BoundingPolygon `mandatory:"true" json:"boundingPolygon"` WordIndexes []int `mandatory:"true" json:"wordIndexes"` - Text *string `mandatory:"false" json:"text"` ValueType string `json:"valueType"` } @@ -103,26 +103,26 @@ func (m *fieldvalue) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) } } -//GetConfidence returns Confidence +// GetText returns Text +func (m fieldvalue) GetText() *string { + return m.Text +} + +// GetConfidence returns Confidence func (m fieldvalue) GetConfidence() *float32 { return m.Confidence } -//GetBoundingPolygon returns BoundingPolygon +// GetBoundingPolygon returns BoundingPolygon func (m fieldvalue) GetBoundingPolygon() *BoundingPolygon { return m.BoundingPolygon } -//GetWordIndexes returns WordIndexes +// GetWordIndexes returns WordIndexes func (m fieldvalue) GetWordIndexes() []int { return m.WordIndexes } -//GetText returns Text -func (m fieldvalue) GetText() *string { - return m.Text -} - func (m fieldvalue) String() string { return common.PointerString(m) } diff --git a/aidocument/general_processor_config.go b/aidocument/general_processor_config.go index f614070a24..ab8f7f50f9 100644 --- a/aidocument/general_processor_config.go +++ b/aidocument/general_processor_config.go @@ -97,6 +97,5 @@ func (m *GeneralProcessorConfig) UnmarshalJSON(data []byte) (e error) { m.Features[i] = nil } } - return } diff --git a/aidocument/model.go b/aidocument/model.go index 3b920d0a30..d9fcfc133f 100644 --- a/aidocument/model.go +++ b/aidocument/model.go @@ -164,10 +164,7 @@ func (m *Model) UnmarshalJSON(data []byte) (e error) { m.AliasName = model.AliasName m.Labels = make([]string, len(model.Labels)) - for i, n := range model.Labels { - m.Labels[i] = n - } - + copy(m.Labels, model.Labels) m.IsQuickMode = model.IsQuickMode m.MaxTrainingTimeInHours = model.MaxTrainingTimeInHours @@ -205,10 +202,7 @@ func (m *Model) UnmarshalJSON(data []byte) (e error) { } m.ComponentModels = make([]ComponentModel, len(model.ComponentModels)) - for i, n := range model.ComponentModels { - m.ComponentModels[i] = n - } - + copy(m.ComponentModels, model.ComponentModels) m.IsComposedModel = model.IsComposedModel m.TimeUpdated = model.TimeUpdated diff --git a/aidocument/model_metrics.go b/aidocument/model_metrics.go index 3775c94f8c..2ae603b020 100644 --- a/aidocument/model_metrics.go +++ b/aidocument/model_metrics.go @@ -67,7 +67,7 @@ func (m *modelmetrics) UnmarshalPolymorphicJSON(data []byte) (interface{}, error } } -//GetDatasetSummary returns DatasetSummary +// GetDatasetSummary returns DatasetSummary func (m modelmetrics) GetDatasetSummary() *DatasetSummary { return m.DatasetSummary } diff --git a/aidocument/model_summary.go b/aidocument/model_summary.go index 7beec7e6a7..99637d1b15 100644 --- a/aidocument/model_summary.go +++ b/aidocument/model_summary.go @@ -185,10 +185,7 @@ func (m *ModelSummary) UnmarshalJSON(data []byte) (e error) { } m.ComponentModels = make([]ComponentModel, len(model.ComponentModels)) - for i, n := range model.ComponentModels { - m.ComponentModels[i] = n - } - + copy(m.ComponentModels, model.ComponentModels) m.IsComposedModel = model.IsComposedModel m.FreeformTags = model.FreeformTags diff --git a/ailanguage/ailanguage_aiservicelanguage_client.go b/ailanguage/ailanguage_aiservicelanguage_client.go index 474db2799b..29fd30df06 100644 --- a/ailanguage/ailanguage_aiservicelanguage_client.go +++ b/ailanguage/ailanguage_aiservicelanguage_client.go @@ -82,7 +82,7 @@ func (client *AIServiceLanguageClient) setConfigurationProvider(configProvider c 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/ailanguage/batch_detect_language_pii_entities_details.go b/ailanguage/batch_detect_language_pii_entities_details.go index 97ed23f3b6..3a4cbca3c6 100644 --- a/ailanguage/batch_detect_language_pii_entities_details.go +++ b/ailanguage/batch_detect_language_pii_entities_details.go @@ -76,9 +76,6 @@ func (m *BatchDetectLanguagePiiEntitiesDetails) UnmarshalJSON(data []byte) (e er } m.Documents = make([]TextDocument, len(model.Documents)) - for i, n := range model.Documents { - m.Documents[i] = n - } - + copy(m.Documents, model.Documents) return } diff --git a/ailanguage/evaluation_result_collection.go b/ailanguage/evaluation_result_collection.go index 4ab447f1ec..85c5c18243 100644 --- a/ailanguage/evaluation_result_collection.go +++ b/ailanguage/evaluation_result_collection.go @@ -64,6 +64,5 @@ func (m *EvaluationResultCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/ailanguage/evaluation_result_summary.go b/ailanguage/evaluation_result_summary.go index 879c06cc45..ec14abf747 100644 --- a/ailanguage/evaluation_result_summary.go +++ b/ailanguage/evaluation_result_summary.go @@ -78,12 +78,12 @@ func (m *evaluationresultsummary) UnmarshalPolymorphicJSON(data []byte) (interfa } } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m evaluationresultsummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m evaluationresultsummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/ailanguage/model_details.go b/ailanguage/model_details.go index f8ef1d6cb0..207b548490 100644 --- a/ailanguage/model_details.go +++ b/ailanguage/model_details.go @@ -111,7 +111,7 @@ func (m *modeldetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error } } -//GetLanguageCode returns LanguageCode +// GetLanguageCode returns LanguageCode func (m modeldetails) GetLanguageCode() *string { return m.LanguageCode } diff --git a/aispeech/aispeech_aiservicespeech_client.go b/aispeech/aispeech_aiservicespeech_client.go index 0789a14242..d3e991ac31 100644 --- a/aispeech/aispeech_aiservicespeech_client.go +++ b/aispeech/aispeech_aiservicespeech_client.go @@ -80,7 +80,7 @@ func (client *AIServiceSpeechClient) setConfigurationProvider(configProvider com 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/aispeech/create_transcription_job_details.go b/aispeech/create_transcription_job_details.go index 096ff4b867..74bc5e7a63 100644 --- a/aispeech/create_transcription_job_details.go +++ b/aispeech/create_transcription_job_details.go @@ -95,10 +95,7 @@ func (m *CreateTranscriptionJobDetails) UnmarshalJSON(data []byte) (e error) { m.Description = model.Description m.AdditionalTranscriptionFormats = make([]CreateTranscriptionJobDetailsAdditionalTranscriptionFormatsEnum, len(model.AdditionalTranscriptionFormats)) - for i, n := range model.AdditionalTranscriptionFormats { - m.AdditionalTranscriptionFormats[i] = n - } - + copy(m.AdditionalTranscriptionFormats, model.AdditionalTranscriptionFormats) m.ModelDetails = model.ModelDetails m.Normalization = model.Normalization diff --git a/aispeech/transcription_job.go b/aispeech/transcription_job.go index f48fe1a968..1d2eedb5dc 100644 --- a/aispeech/transcription_job.go +++ b/aispeech/transcription_job.go @@ -171,10 +171,7 @@ func (m *TranscriptionJob) UnmarshalJSON(data []byte) (e error) { m.CreatedBy = model.CreatedBy m.AdditionalTranscriptionFormats = make([]TranscriptionJobAdditionalTranscriptionFormatsEnum, len(model.AdditionalTranscriptionFormats)) - for i, n := range model.AdditionalTranscriptionFormats { - m.AdditionalTranscriptionFormats[i] = n - } - + copy(m.AdditionalTranscriptionFormats, model.AdditionalTranscriptionFormats) m.LifecycleState = model.LifecycleState m.LifecycleDetails = model.LifecycleDetails diff --git a/aispeech/transcription_normalization.go b/aispeech/transcription_normalization.go index 66952c0636..9ecd3a2016 100644 --- a/aispeech/transcription_normalization.go +++ b/aispeech/transcription_normalization.go @@ -68,6 +68,5 @@ func (m *TranscriptionNormalization) UnmarshalJSON(data []byte) (e error) { m.Filters[i] = nil } } - return } diff --git a/aivision/aivision_aiservicevision_client.go b/aivision/aivision_aiservicevision_client.go index ed73ef37b2..63d20972c4 100644 --- a/aivision/aivision_aiservicevision_client.go +++ b/aivision/aivision_aiservicevision_client.go @@ -80,7 +80,7 @@ func (client *AIServiceVisionClient) setConfigurationProvider(configProvider com 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/aivision/analyze_document_details.go b/aivision/analyze_document_details.go index c75dd76ac8..656342f951 100644 --- a/aivision/analyze_document_details.go +++ b/aivision/analyze_document_details.go @@ -94,7 +94,6 @@ func (m *AnalyzeDocumentDetails) UnmarshalJSON(data []byte) (e error) { m.Features[i] = nil } } - nn, e = model.Document.UnmarshalPolymorphicJSON(model.Document.JsonData) if e != nil { return diff --git a/aivision/analyze_image_details.go b/aivision/analyze_image_details.go index 5868bc2525..0c6dcc3dc6 100644 --- a/aivision/analyze_image_details.go +++ b/aivision/analyze_image_details.go @@ -71,7 +71,6 @@ func (m *AnalyzeImageDetails) UnmarshalJSON(data []byte) (e error) { m.Features[i] = nil } } - nn, e = model.Image.UnmarshalPolymorphicJSON(model.Image.JsonData) if e != nil { return diff --git a/aivision/create_document_job_details.go b/aivision/create_document_job_details.go index 78f84823f7..1813bce260 100644 --- a/aivision/create_document_job_details.go +++ b/aivision/create_document_job_details.go @@ -113,7 +113,6 @@ func (m *CreateDocumentJobDetails) UnmarshalJSON(data []byte) (e error) { m.Features[i] = nil } } - m.OutputLocation = model.OutputLocation return diff --git a/aivision/create_image_job_details.go b/aivision/create_image_job_details.go index 721a7f0e9a..3913033ed2 100644 --- a/aivision/create_image_job_details.go +++ b/aivision/create_image_job_details.go @@ -95,7 +95,6 @@ func (m *CreateImageJobDetails) UnmarshalJSON(data []byte) (e error) { m.Features[i] = nil } } - m.OutputLocation = model.OutputLocation return diff --git a/aivision/document_job.go b/aivision/document_job.go index 016adb92b2..0762d971ef 100644 --- a/aivision/document_job.go +++ b/aivision/document_job.go @@ -158,7 +158,6 @@ func (m *DocumentJob) UnmarshalJSON(data []byte) (e error) { m.Features[i] = nil } } - m.TimeAccepted = model.TimeAccepted m.OutputLocation = model.OutputLocation diff --git a/aivision/field_value.go b/aivision/field_value.go index c4ace8b1b0..63c738a886 100644 --- a/aivision/field_value.go +++ b/aivision/field_value.go @@ -33,10 +33,10 @@ type FieldValue interface { type fieldvalue struct { JsonData []byte + Text *string `mandatory:"false" json:"text"` Confidence *float32 `mandatory:"true" json:"confidence"` BoundingPolygon *BoundingPolygon `mandatory:"true" json:"boundingPolygon"` WordIndexes []int `mandatory:"true" json:"wordIndexes"` - Text *string `mandatory:"false" json:"text"` ValueType string `json:"valueType"` } @@ -103,26 +103,26 @@ func (m *fieldvalue) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) } } -//GetConfidence returns Confidence +// GetText returns Text +func (m fieldvalue) GetText() *string { + return m.Text +} + +// GetConfidence returns Confidence func (m fieldvalue) GetConfidence() *float32 { return m.Confidence } -//GetBoundingPolygon returns BoundingPolygon +// GetBoundingPolygon returns BoundingPolygon func (m fieldvalue) GetBoundingPolygon() *BoundingPolygon { return m.BoundingPolygon } -//GetWordIndexes returns WordIndexes +// GetWordIndexes returns WordIndexes func (m fieldvalue) GetWordIndexes() []int { return m.WordIndexes } -//GetText returns Text -func (m fieldvalue) GetText() *string { - return m.Text -} - func (m fieldvalue) String() string { return common.PointerString(m) } diff --git a/aivision/image_job.go b/aivision/image_job.go index 4921472c30..ae2ee2bb43 100644 --- a/aivision/image_job.go +++ b/aivision/image_job.go @@ -140,7 +140,6 @@ func (m *ImageJob) UnmarshalJSON(data []byte) (e error) { m.Features[i] = nil } } - m.TimeAccepted = model.TimeAccepted m.OutputLocation = model.OutputLocation diff --git a/analytics/analytics_client.go b/analytics/analytics_client.go index 97d7934b36..a666cbca95 100644 --- a/analytics/analytics_client.go +++ b/analytics/analytics_client.go @@ -80,7 +80,7 @@ func (client *AnalyticsClient) setConfigurationProvider(configProvider common.Co 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/announcementsservice/announcementsservice_announcement_client.go b/announcementsservice/announcementsservice_announcement_client.go index e83a9c9613..f7be72e515 100644 --- a/announcementsservice/announcementsservice_announcement_client.go +++ b/announcementsservice/announcementsservice_announcement_client.go @@ -80,7 +80,7 @@ func (client *AnnouncementClient) setConfigurationProvider(configProvider common 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/announcementsservice/announcementsservice_announcementspreferences_client.go b/announcementsservice/announcementsservice_announcementspreferences_client.go index c208095b87..678853f053 100644 --- a/announcementsservice/announcementsservice_announcementspreferences_client.go +++ b/announcementsservice/announcementsservice_announcementspreferences_client.go @@ -80,7 +80,7 @@ func (client *AnnouncementsPreferencesClient) setConfigurationProvider(configPro 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/announcementsservice/announcementsservice_announcementsubscription_client.go b/announcementsservice/announcementsservice_announcementsubscription_client.go index 63a669d70e..3faf44e5fc 100644 --- a/announcementsservice/announcementsservice_announcementsubscription_client.go +++ b/announcementsservice/announcementsservice_announcementsubscription_client.go @@ -80,7 +80,7 @@ func (client *AnnouncementSubscriptionClient) setConfigurationProvider(configPro 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/announcementsservice/base_announcement.go b/announcementsservice/base_announcement.go index 6479a6ea0c..5d8bed61e8 100644 --- a/announcementsservice/base_announcement.go +++ b/announcementsservice/base_announcement.go @@ -85,14 +85,6 @@ type BaseAnnouncement interface { type baseannouncement struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - ReferenceTicketNumber *string `mandatory:"true" json:"referenceTicketNumber"` - Summary *string `mandatory:"true" json:"summary"` - Services []string `mandatory:"true" json:"services"` - AffectedRegions []string `mandatory:"true" json:"affectedRegions"` - AnnouncementType BaseAnnouncementAnnouncementTypeEnum `mandatory:"true" json:"announcementType"` - LifecycleState BaseAnnouncementLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - IsBanner *bool `mandatory:"true" json:"isBanner"` TimeOneTitle *string `mandatory:"false" json:"timeOneTitle"` TimeOneType BaseAnnouncementTimeOneTypeEnum `mandatory:"false" json:"timeOneType,omitempty"` TimeOneValue *common.SDKTime `mandatory:"false" json:"timeOneValue"` @@ -103,6 +95,14 @@ type baseannouncement struct { TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` EnvironmentName *string `mandatory:"false" json:"environmentName"` PlatformType BaseAnnouncementPlatformTypeEnum `mandatory:"false" json:"platformType,omitempty"` + Id *string `mandatory:"true" json:"id"` + ReferenceTicketNumber *string `mandatory:"true" json:"referenceTicketNumber"` + Summary *string `mandatory:"true" json:"summary"` + Services []string `mandatory:"true" json:"services"` + AffectedRegions []string `mandatory:"true" json:"affectedRegions"` + AnnouncementType BaseAnnouncementAnnouncementTypeEnum `mandatory:"true" json:"announcementType"` + LifecycleState BaseAnnouncementLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + IsBanner *bool `mandatory:"true" json:"isBanner"` Type string `json:"type"` } @@ -163,96 +163,96 @@ func (m *baseannouncement) UnmarshalPolymorphicJSON(data []byte) (interface{}, e } } -//GetId returns Id -func (m baseannouncement) GetId() *string { - return m.Id -} - -//GetReferenceTicketNumber returns ReferenceTicketNumber -func (m baseannouncement) GetReferenceTicketNumber() *string { - return m.ReferenceTicketNumber -} - -//GetSummary returns Summary -func (m baseannouncement) GetSummary() *string { - return m.Summary -} - -//GetServices returns Services -func (m baseannouncement) GetServices() []string { - return m.Services -} - -//GetAffectedRegions returns AffectedRegions -func (m baseannouncement) GetAffectedRegions() []string { - return m.AffectedRegions -} - -//GetAnnouncementType returns AnnouncementType -func (m baseannouncement) GetAnnouncementType() BaseAnnouncementAnnouncementTypeEnum { - return m.AnnouncementType -} - -//GetLifecycleState returns LifecycleState -func (m baseannouncement) GetLifecycleState() BaseAnnouncementLifecycleStateEnum { - return m.LifecycleState -} - -//GetIsBanner returns IsBanner -func (m baseannouncement) GetIsBanner() *bool { - return m.IsBanner -} - -//GetTimeOneTitle returns TimeOneTitle +// GetTimeOneTitle returns TimeOneTitle func (m baseannouncement) GetTimeOneTitle() *string { return m.TimeOneTitle } -//GetTimeOneType returns TimeOneType +// GetTimeOneType returns TimeOneType func (m baseannouncement) GetTimeOneType() BaseAnnouncementTimeOneTypeEnum { return m.TimeOneType } -//GetTimeOneValue returns TimeOneValue +// GetTimeOneValue returns TimeOneValue func (m baseannouncement) GetTimeOneValue() *common.SDKTime { return m.TimeOneValue } -//GetTimeTwoTitle returns TimeTwoTitle +// GetTimeTwoTitle returns TimeTwoTitle func (m baseannouncement) GetTimeTwoTitle() *string { return m.TimeTwoTitle } -//GetTimeTwoType returns TimeTwoType +// GetTimeTwoType returns TimeTwoType func (m baseannouncement) GetTimeTwoType() BaseAnnouncementTimeTwoTypeEnum { return m.TimeTwoType } -//GetTimeTwoValue returns TimeTwoValue +// GetTimeTwoValue returns TimeTwoValue func (m baseannouncement) GetTimeTwoValue() *common.SDKTime { return m.TimeTwoValue } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m baseannouncement) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m baseannouncement) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetEnvironmentName returns EnvironmentName +// GetEnvironmentName returns EnvironmentName func (m baseannouncement) GetEnvironmentName() *string { return m.EnvironmentName } -//GetPlatformType returns PlatformType +// GetPlatformType returns PlatformType func (m baseannouncement) GetPlatformType() BaseAnnouncementPlatformTypeEnum { return m.PlatformType } +// GetId returns Id +func (m baseannouncement) GetId() *string { + return m.Id +} + +// GetReferenceTicketNumber returns ReferenceTicketNumber +func (m baseannouncement) GetReferenceTicketNumber() *string { + return m.ReferenceTicketNumber +} + +// GetSummary returns Summary +func (m baseannouncement) GetSummary() *string { + return m.Summary +} + +// GetServices returns Services +func (m baseannouncement) GetServices() []string { + return m.Services +} + +// GetAffectedRegions returns AffectedRegions +func (m baseannouncement) GetAffectedRegions() []string { + return m.AffectedRegions +} + +// GetAnnouncementType returns AnnouncementType +func (m baseannouncement) GetAnnouncementType() BaseAnnouncementAnnouncementTypeEnum { + return m.AnnouncementType +} + +// GetLifecycleState returns LifecycleState +func (m baseannouncement) GetLifecycleState() BaseAnnouncementLifecycleStateEnum { + return m.LifecycleState +} + +// GetIsBanner returns IsBanner +func (m baseannouncement) GetIsBanner() *bool { + return m.IsBanner +} + func (m baseannouncement) String() string { return common.PointerString(m) } diff --git a/announcementsservice/base_announcements_preferences.go b/announcementsservice/base_announcements_preferences.go index 4c646aef6f..7d6ee5cba7 100644 --- a/announcementsservice/base_announcements_preferences.go +++ b/announcementsservice/base_announcements_preferences.go @@ -101,37 +101,37 @@ func (m *baseannouncementspreferences) UnmarshalPolymorphicJSON(data []byte) (in } } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m baseannouncementspreferences) GetCompartmentId() *string { return m.CompartmentId } -//GetId returns Id +// GetId returns Id func (m baseannouncementspreferences) GetId() *string { return m.Id } -//GetIsUnsubscribed returns IsUnsubscribed +// GetIsUnsubscribed returns IsUnsubscribed func (m baseannouncementspreferences) GetIsUnsubscribed() *bool { return m.IsUnsubscribed } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m baseannouncementspreferences) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m baseannouncementspreferences) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetPreferenceType returns PreferenceType +// GetPreferenceType returns PreferenceType func (m baseannouncementspreferences) GetPreferenceType() BaseCreateAnnouncementsPreferencesDetailsPreferenceTypeEnum { return m.PreferenceType } -//GetPreferredTimeZone returns PreferredTimeZone +// GetPreferredTimeZone returns PreferredTimeZone func (m baseannouncementspreferences) GetPreferredTimeZone() *string { return m.PreferredTimeZone } diff --git a/announcementsservice/base_create_announcements_preferences_details.go b/announcementsservice/base_create_announcements_preferences_details.go index 4ae4c5058a..621e9c2110 100644 --- a/announcementsservice/base_create_announcements_preferences_details.go +++ b/announcementsservice/base_create_announcements_preferences_details.go @@ -36,10 +36,10 @@ type BaseCreateAnnouncementsPreferencesDetails interface { type basecreateannouncementspreferencesdetails struct { JsonData []byte - PreferenceType BaseCreateAnnouncementsPreferencesDetailsPreferenceTypeEnum `mandatory:"true" json:"preferenceType"` IsUnsubscribed *bool `mandatory:"false" json:"isUnsubscribed"` CompartmentId *string `mandatory:"false" json:"compartmentId"` PreferredTimeZone *string `mandatory:"false" json:"preferredTimeZone"` + PreferenceType BaseCreateAnnouncementsPreferencesDetailsPreferenceTypeEnum `mandatory:"true" json:"preferenceType"` Type string `json:"type"` } @@ -86,26 +86,26 @@ func (m *basecreateannouncementspreferencesdetails) UnmarshalPolymorphicJSON(dat } } -//GetPreferenceType returns PreferenceType -func (m basecreateannouncementspreferencesdetails) GetPreferenceType() BaseCreateAnnouncementsPreferencesDetailsPreferenceTypeEnum { - return m.PreferenceType -} - -//GetIsUnsubscribed returns IsUnsubscribed +// GetIsUnsubscribed returns IsUnsubscribed func (m basecreateannouncementspreferencesdetails) GetIsUnsubscribed() *bool { return m.IsUnsubscribed } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m basecreateannouncementspreferencesdetails) GetCompartmentId() *string { return m.CompartmentId } -//GetPreferredTimeZone returns PreferredTimeZone +// GetPreferredTimeZone returns PreferredTimeZone func (m basecreateannouncementspreferencesdetails) GetPreferredTimeZone() *string { return m.PreferredTimeZone } +// GetPreferenceType returns PreferenceType +func (m basecreateannouncementspreferencesdetails) GetPreferenceType() BaseCreateAnnouncementsPreferencesDetailsPreferenceTypeEnum { + return m.PreferenceType +} + func (m basecreateannouncementspreferencesdetails) String() string { return common.PointerString(m) } diff --git a/apigateway/api_specification_route.go b/apigateway/api_specification_route.go index 44233e48fc..af039c3fc4 100644 --- a/apigateway/api_specification_route.go +++ b/apigateway/api_specification_route.go @@ -76,10 +76,7 @@ func (m *ApiSpecificationRoute) UnmarshalJSON(data []byte) (e error) { } var nn interface{} m.Methods = make([]ApiSpecificationRouteMethodsEnum, len(model.Methods)) - for i, n := range model.Methods { - m.Methods[i] = n - } - + copy(m.Methods, model.Methods) m.RequestPolicies = model.RequestPolicies m.ResponsePolicies = model.ResponsePolicies diff --git a/apigateway/apigateway_client.go b/apigateway/apigateway_client.go index c2ac6691f5..057de130c9 100644 --- a/apigateway/apigateway_client.go +++ b/apigateway/apigateway_client.go @@ -82,7 +82,7 @@ func (client *ApiGatewayClient) setConfigurationProvider(configProvider common.C 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/apigateway/apigateway_deployment_client.go b/apigateway/apigateway_deployment_client.go index 73ea63c937..98b3c4de2a 100644 --- a/apigateway/apigateway_deployment_client.go +++ b/apigateway/apigateway_deployment_client.go @@ -82,7 +82,7 @@ func (client *DeploymentClient) setConfigurationProvider(configProvider common.C 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/apigateway/apigateway_gateway_client.go b/apigateway/apigateway_gateway_client.go index f90ca94b55..ec6170ad26 100644 --- a/apigateway/apigateway_gateway_client.go +++ b/apigateway/apigateway_gateway_client.go @@ -82,7 +82,7 @@ func (client *GatewayClient) setConfigurationProvider(configProvider common.Conf 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/apigateway/apigateway_subscribers_client.go b/apigateway/apigateway_subscribers_client.go index 2d7c01840c..37687505da 100644 --- a/apigateway/apigateway_subscribers_client.go +++ b/apigateway/apigateway_subscribers_client.go @@ -82,7 +82,7 @@ func (client *SubscribersClient) setConfigurationProvider(configProvider common. 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/apigateway/apigateway_usageplans_client.go b/apigateway/apigateway_usageplans_client.go index 89cf6896af..9329ebf8d5 100644 --- a/apigateway/apigateway_usageplans_client.go +++ b/apigateway/apigateway_usageplans_client.go @@ -82,7 +82,7 @@ func (client *UsagePlansClient) setConfigurationProvider(configProvider common.C 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/apigateway/apigateway_workrequests_client.go b/apigateway/apigateway_workrequests_client.go index 65992a3b23..9250c0b208 100644 --- a/apigateway/apigateway_workrequests_client.go +++ b/apigateway/apigateway_workrequests_client.go @@ -82,7 +82,7 @@ func (client *WorkRequestsClient) setConfigurationProvider(configProvider common 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/apigateway/authentication_policy.go b/apigateway/authentication_policy.go index 9ce448c8a6..f819657631 100644 --- a/apigateway/authentication_policy.go +++ b/apigateway/authentication_policy.go @@ -76,7 +76,7 @@ func (m *authenticationpolicy) UnmarshalPolymorphicJSON(data []byte) (interface{ } } -//GetIsAnonymousAccessAllowed returns IsAnonymousAccessAllowed +// GetIsAnonymousAccessAllowed returns IsAnonymousAccessAllowed func (m authenticationpolicy) GetIsAnonymousAccessAllowed() *bool { return m.IsAnonymousAccessAllowed } diff --git a/apigateway/create_gateway_details.go b/apigateway/create_gateway_details.go index 68bb3cec75..880daafb44 100644 --- a/apigateway/create_gateway_details.go +++ b/apigateway/create_gateway_details.go @@ -105,10 +105,7 @@ func (m *CreateGatewayDetails) UnmarshalJSON(data []byte) (e error) { m.DisplayName = model.DisplayName m.NetworkSecurityGroupIds = make([]string, len(model.NetworkSecurityGroupIds)) - for i, n := range model.NetworkSecurityGroupIds { - m.NetworkSecurityGroupIds[i] = n - } - + copy(m.NetworkSecurityGroupIds, model.NetworkSecurityGroupIds) m.CertificateId = model.CertificateId nn, e = model.ResponseCacheDetails.UnmarshalPolymorphicJSON(model.ResponseCacheDetails.JsonData) @@ -137,7 +134,6 @@ func (m *CreateGatewayDetails) UnmarshalJSON(data []byte) (e error) { m.CaBundles[i] = nil } } - m.CompartmentId = model.CompartmentId m.EndpointType = model.EndpointType diff --git a/apigateway/custom_authentication_policy.go b/apigateway/custom_authentication_policy.go index 0d2d0282a1..3c4fd35752 100644 --- a/apigateway/custom_authentication_policy.go +++ b/apigateway/custom_authentication_policy.go @@ -106,10 +106,7 @@ func (m *CustomAuthenticationPolicy) UnmarshalJSON(data []byte) (e error) { m.Parameters = model.Parameters m.CacheKey = make([]string, len(model.CacheKey)) - for i, n := range model.CacheKey { - m.CacheKey[i] = n - } - + copy(m.CacheKey, model.CacheKey) nn, e = model.ValidationFailurePolicy.UnmarshalPolymorphicJSON(model.ValidationFailurePolicy.JsonData) if e != nil { return diff --git a/apigateway/dynamic_authentication_policy.go b/apigateway/dynamic_authentication_policy.go index 56cd1988e6..afbc5b7570 100644 --- a/apigateway/dynamic_authentication_policy.go +++ b/apigateway/dynamic_authentication_policy.go @@ -65,9 +65,6 @@ func (m *DynamicAuthenticationPolicy) UnmarshalJSON(data []byte) (e error) { } m.AuthenticationServers = make([]AuthenticationServerPolicy, len(model.AuthenticationServers)) - for i, n := range model.AuthenticationServers { - m.AuthenticationServers[i] = n - } - + copy(m.AuthenticationServers, model.AuthenticationServers) return } diff --git a/apigateway/dynamic_routing_backend.go b/apigateway/dynamic_routing_backend.go index 95b8239fee..88b0d22332 100644 --- a/apigateway/dynamic_routing_backend.go +++ b/apigateway/dynamic_routing_backend.go @@ -79,9 +79,6 @@ func (m *DynamicRoutingBackend) UnmarshalJSON(data []byte) (e error) { } m.RoutingBackends = make([]DynamicRoutingTypeRoutingBackend, len(model.RoutingBackends)) - for i, n := range model.RoutingBackends { - m.RoutingBackends[i] = n - } - + copy(m.RoutingBackends, model.RoutingBackends) return } diff --git a/apigateway/dynamic_selection_key.go b/apigateway/dynamic_selection_key.go index fd25670b93..e0843099ff 100644 --- a/apigateway/dynamic_selection_key.go +++ b/apigateway/dynamic_selection_key.go @@ -30,8 +30,8 @@ type DynamicSelectionKey interface { type dynamicselectionkey struct { JsonData []byte - Name *string `mandatory:"true" json:"name"` IsDefault *bool `mandatory:"false" json:"isDefault"` + Name *string `mandatory:"true" json:"name"` Type string `json:"type"` } @@ -76,16 +76,16 @@ func (m *dynamicselectionkey) UnmarshalPolymorphicJSON(data []byte) (interface{} } } -//GetName returns Name -func (m dynamicselectionkey) GetName() *string { - return m.Name -} - -//GetIsDefault returns IsDefault +// GetIsDefault returns IsDefault func (m dynamicselectionkey) GetIsDefault() *bool { return m.IsDefault } +// GetName returns Name +func (m dynamicselectionkey) GetName() *string { + return m.Name +} + func (m dynamicselectionkey) String() string { return common.PointerString(m) } diff --git a/apigateway/gateway.go b/apigateway/gateway.go index 1209a359b0..a077b5b2f1 100644 --- a/apigateway/gateway.go +++ b/apigateway/gateway.go @@ -141,10 +141,7 @@ func (m *Gateway) UnmarshalJSON(data []byte) (e error) { m.SubnetId = model.SubnetId m.NetworkSecurityGroupIds = make([]string, len(model.NetworkSecurityGroupIds)) - for i, n := range model.NetworkSecurityGroupIds { - m.NetworkSecurityGroupIds[i] = n - } - + copy(m.NetworkSecurityGroupIds, model.NetworkSecurityGroupIds) m.TimeCreated = model.TimeCreated m.TimeUpdated = model.TimeUpdated @@ -158,10 +155,7 @@ func (m *Gateway) UnmarshalJSON(data []byte) (e error) { m.CertificateId = model.CertificateId m.IpAddresses = make([]IpAddress, len(model.IpAddresses)) - for i, n := range model.IpAddresses { - m.IpAddresses[i] = n - } - + copy(m.IpAddresses, model.IpAddresses) nn, e = model.ResponseCacheDetails.UnmarshalPolymorphicJSON(model.ResponseCacheDetails.JsonData) if e != nil { return @@ -188,7 +182,6 @@ func (m *Gateway) UnmarshalJSON(data []byte) (e error) { m.CaBundles[i] = nil } } - m.Id = model.Id m.CompartmentId = model.CompartmentId diff --git a/apigateway/jwt_authentication_policy.go b/apigateway/jwt_authentication_policy.go index b8c6f4eef0..adaa598240 100644 --- a/apigateway/jwt_authentication_policy.go +++ b/apigateway/jwt_authentication_policy.go @@ -117,20 +117,11 @@ func (m *JwtAuthenticationPolicy) UnmarshalJSON(data []byte) (e error) { m.MaxClockSkewInSeconds = model.MaxClockSkewInSeconds m.VerifyClaims = make([]JsonWebTokenClaim, len(model.VerifyClaims)) - for i, n := range model.VerifyClaims { - m.VerifyClaims[i] = n - } - + copy(m.VerifyClaims, model.VerifyClaims) m.Issuers = make([]string, len(model.Issuers)) - for i, n := range model.Issuers { - m.Issuers[i] = n - } - + copy(m.Issuers, model.Issuers) m.Audiences = make([]string, len(model.Audiences)) - for i, n := range model.Audiences { - m.Audiences[i] = n - } - + copy(m.Audiences, model.Audiences) nn, e = model.PublicKeys.UnmarshalPolymorphicJSON(model.PublicKeys.JsonData) if e != nil { return diff --git a/apigateway/o_auth2_response_validation_failure_policy.go b/apigateway/o_auth2_response_validation_failure_policy.go index 336946db15..ebee4e44f0 100644 --- a/apigateway/o_auth2_response_validation_failure_policy.go +++ b/apigateway/o_auth2_response_validation_failure_policy.go @@ -136,10 +136,7 @@ func (m *OAuth2ResponseValidationFailurePolicy) UnmarshalJSON(data []byte) (e er } m.Scopes = make([]string, len(model.Scopes)) - for i, n := range model.Scopes { - m.Scopes[i] = n - } - + copy(m.Scopes, model.Scopes) m.ResponseType = model.ResponseType return diff --git a/apigateway/response_cache_lookup_policy.go b/apigateway/response_cache_lookup_policy.go index 4e96a9b7cc..8c0cc5b108 100644 --- a/apigateway/response_cache_lookup_policy.go +++ b/apigateway/response_cache_lookup_policy.go @@ -75,12 +75,12 @@ func (m *responsecachelookuppolicy) UnmarshalPolymorphicJSON(data []byte) (inter } } -//GetIsEnabled returns IsEnabled +// GetIsEnabled returns IsEnabled func (m responsecachelookuppolicy) GetIsEnabled() *bool { return m.IsEnabled } -//GetIsPrivateCachingEnabled returns IsPrivateCachingEnabled +// GetIsPrivateCachingEnabled returns IsPrivateCachingEnabled func (m responsecachelookuppolicy) GetIsPrivateCachingEnabled() *bool { return m.IsPrivateCachingEnabled } diff --git a/apigateway/static_public_key.go b/apigateway/static_public_key.go index 48ac0fc7b0..fb59c46aa6 100644 --- a/apigateway/static_public_key.go +++ b/apigateway/static_public_key.go @@ -72,7 +72,7 @@ func (m *staticpublickey) UnmarshalPolymorphicJSON(data []byte) (interface{}, er } } -//GetKid returns Kid +// GetKid returns Kid func (m staticpublickey) GetKid() *string { return m.Kid } diff --git a/apigateway/static_public_key_set.go b/apigateway/static_public_key_set.go index 5c82f528d4..ec4e11377e 100644 --- a/apigateway/static_public_key_set.go +++ b/apigateway/static_public_key_set.go @@ -78,6 +78,5 @@ func (m *StaticPublicKeySet) UnmarshalJSON(data []byte) (e error) { m.Keys[i] = nil } } - return } diff --git a/apigateway/token_authentication_static_keys_validation_policy.go b/apigateway/token_authentication_static_keys_validation_policy.go index 2ef88964fb..d714147f7c 100644 --- a/apigateway/token_authentication_static_keys_validation_policy.go +++ b/apigateway/token_authentication_static_keys_validation_policy.go @@ -87,6 +87,5 @@ func (m *TokenAuthenticationStaticKeysValidationPolicy) UnmarshalJSON(data []byt m.Keys[i] = nil } } - return } diff --git a/apigateway/token_authentication_validation_policy.go b/apigateway/token_authentication_validation_policy.go index 879bc5cf3f..652f820627 100644 --- a/apigateway/token_authentication_validation_policy.go +++ b/apigateway/token_authentication_validation_policy.go @@ -73,7 +73,7 @@ func (m *tokenauthenticationvalidationpolicy) UnmarshalPolymorphicJSON(data []by } } -//GetAdditionalValidationPolicy returns AdditionalValidationPolicy +// GetAdditionalValidationPolicy returns AdditionalValidationPolicy func (m tokenauthenticationvalidationpolicy) GetAdditionalValidationPolicy() *AdditionalValidationPolicy { return m.AdditionalValidationPolicy } diff --git a/apigateway/update_gateway_details.go b/apigateway/update_gateway_details.go index b7854247af..bf306ae89f 100644 --- a/apigateway/update_gateway_details.go +++ b/apigateway/update_gateway_details.go @@ -86,10 +86,7 @@ func (m *UpdateGatewayDetails) UnmarshalJSON(data []byte) (e error) { m.DisplayName = model.DisplayName m.NetworkSecurityGroupIds = make([]string, len(model.NetworkSecurityGroupIds)) - for i, n := range model.NetworkSecurityGroupIds { - m.NetworkSecurityGroupIds[i] = n - } - + copy(m.NetworkSecurityGroupIds, model.NetworkSecurityGroupIds) m.CertificateId = model.CertificateId nn, e = model.ResponseCacheDetails.UnmarshalPolymorphicJSON(model.ResponseCacheDetails.JsonData) @@ -118,6 +115,5 @@ func (m *UpdateGatewayDetails) UnmarshalJSON(data []byte) (e error) { m.CaBundles[i] = nil } } - return } diff --git a/apmconfig/apmconfig_config_client.go b/apmconfig/apmconfig_config_client.go index 5b5d1364a7..7106158c88 100644 --- a/apmconfig/apmconfig_config_client.go +++ b/apmconfig/apmconfig_config_client.go @@ -81,7 +81,7 @@ func (client *ConfigClient) setConfigurationProvider(configProvider common.Confi 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/apmconfig/config.go b/apmconfig/config.go index 607ee0d9ba..bc28ee851c 100644 --- a/apmconfig/config.go +++ b/apmconfig/config.go @@ -121,42 +121,42 @@ func (m *config) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetId returns Id +// GetId returns Id func (m config) GetId() *string { return m.Id } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m config) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m config) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetCreatedBy returns CreatedBy +// GetCreatedBy returns CreatedBy func (m config) GetCreatedBy() *string { return m.CreatedBy } -//GetUpdatedBy returns UpdatedBy +// GetUpdatedBy returns UpdatedBy func (m config) GetUpdatedBy() *string { return m.UpdatedBy } -//GetEtag returns Etag +// GetEtag returns Etag func (m config) GetEtag() *string { return m.Etag } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m config) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m config) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/apmconfig/config_collection.go b/apmconfig/config_collection.go index 6b87cbeace..7e64a180b0 100644 --- a/apmconfig/config_collection.go +++ b/apmconfig/config_collection.go @@ -61,6 +61,5 @@ func (m *ConfigCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/apmconfig/config_summary.go b/apmconfig/config_summary.go index c4943d58b8..0f1a188c24 100644 --- a/apmconfig/config_summary.go +++ b/apmconfig/config_summary.go @@ -120,42 +120,42 @@ func (m *configsummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, erro } } -//GetId returns Id +// GetId returns Id func (m configsummary) GetId() *string { return m.Id } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m configsummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m configsummary) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetCreatedBy returns CreatedBy +// GetCreatedBy returns CreatedBy func (m configsummary) GetCreatedBy() *string { return m.CreatedBy } -//GetUpdatedBy returns UpdatedBy +// GetUpdatedBy returns UpdatedBy func (m configsummary) GetUpdatedBy() *string { return m.UpdatedBy } -//GetEtag returns Etag +// GetEtag returns Etag func (m configsummary) GetEtag() *string { return m.Etag } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m configsummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m configsummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/apmconfig/create_config_details.go b/apmconfig/create_config_details.go index fcccbc0e33..8cf552436c 100644 --- a/apmconfig/create_config_details.go +++ b/apmconfig/create_config_details.go @@ -86,12 +86,12 @@ func (m *createconfigdetails) UnmarshalPolymorphicJSON(data []byte) (interface{} } } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createconfigdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createconfigdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/apmconfig/update_config_details.go b/apmconfig/update_config_details.go index 0f5fab7673..fd04ba3bb7 100644 --- a/apmconfig/update_config_details.go +++ b/apmconfig/update_config_details.go @@ -85,12 +85,12 @@ func (m *updateconfigdetails) UnmarshalPolymorphicJSON(data []byte) (interface{} } } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updateconfigdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updateconfigdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/apmcontrolplane/apmcontrolplane_apmdomain_client.go b/apmcontrolplane/apmcontrolplane_apmdomain_client.go index 9c379245a2..df5c585ea2 100644 --- a/apmcontrolplane/apmcontrolplane_apmdomain_client.go +++ b/apmcontrolplane/apmcontrolplane_apmdomain_client.go @@ -81,7 +81,7 @@ func (client *ApmDomainClient) setConfigurationProvider(configProvider common.Co 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/apmsynthetics/apmsynthetics_apmsynthetic_client.go b/apmsynthetics/apmsynthetics_apmsynthetic_client.go index e3b51f56d3..de41ce0583 100644 --- a/apmsynthetics/apmsynthetics_apmsynthetic_client.go +++ b/apmsynthetics/apmsynthetics_apmsynthetic_client.go @@ -80,7 +80,7 @@ func (client *ApmSyntheticClient) setConfigurationProvider(configProvider common 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/apmsynthetics/browser_monitor_configuration.go b/apmsynthetics/browser_monitor_configuration.go index aa26513279..720ae9b762 100644 --- a/apmsynthetics/browser_monitor_configuration.go +++ b/apmsynthetics/browser_monitor_configuration.go @@ -27,7 +27,7 @@ type BrowserMonitorConfiguration struct { // If certificate validation is enabled, then the call will fail in case of certification errors. IsCertificateValidationEnabled *bool `mandatory:"false" json:"isCertificateValidationEnabled"` - // If disabled then auto snapshots are not collected. + // If disabled, auto snapshots are not collected. IsDefaultSnapshotEnabled *bool `mandatory:"false" json:"isDefaultSnapshotEnabled"` // Verifies all the search strings present in the response. diff --git a/apmsynthetics/client_certificate.go b/apmsynthetics/client_certificate.go index 9d75d1df78..663bb51392 100644 --- a/apmsynthetics/client_certificate.go +++ b/apmsynthetics/client_certificate.go @@ -15,7 +15,7 @@ import ( "strings" ) -// ClientCertificate Client certificate in pem format. +// ClientCertificate Client certificate in PEM format. type ClientCertificate struct { // Name of the certificate file. The name should not contain any confidential information. diff --git a/apmsynthetics/create_monitor_details.go b/apmsynthetics/create_monitor_details.go index 90c97146d6..b62f5bf7c3 100644 --- a/apmsynthetics/create_monitor_details.go +++ b/apmsynthetics/create_monitor_details.go @@ -53,6 +53,7 @@ type CreateMonitorDetails struct { // For BROWSER and REST monitor types, target is mandatory. // If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. // If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. + // For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 Target *string `mandatory:"false" json:"target"` // List of script parameters in the monitor. @@ -148,10 +149,7 @@ func (m *CreateMonitorDetails) UnmarshalJSON(data []byte) (e error) { m.Target = model.Target m.ScriptParameters = make([]MonitorScriptParameter, len(model.ScriptParameters)) - for i, n := range model.ScriptParameters { - m.ScriptParameters[i] = n - } - + copy(m.ScriptParameters, model.ScriptParameters) nn, e = model.Configuration.UnmarshalPolymorphicJSON(model.Configuration.JsonData) if e != nil { return @@ -181,10 +179,7 @@ func (m *CreateMonitorDetails) UnmarshalJSON(data []byte) (e error) { m.MonitorType = model.MonitorType m.VantagePoints = make([]string, len(model.VantagePoints)) - for i, n := range model.VantagePoints { - m.VantagePoints[i] = n - } - + copy(m.VantagePoints, model.VantagePoints) m.RepeatIntervalInSeconds = model.RepeatIntervalInSeconds return diff --git a/apmsynthetics/dvp_stack_details.go b/apmsynthetics/dvp_stack_details.go index 4ce6b07cde..d37c348422 100644 --- a/apmsynthetics/dvp_stack_details.go +++ b/apmsynthetics/dvp_stack_details.go @@ -65,7 +65,7 @@ func (m *dvpstackdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, er } } -//GetDvpVersion returns DvpVersion +// GetDvpVersion returns DvpVersion func (m dvpstackdetails) GetDvpVersion() *string { return m.DvpVersion } diff --git a/apmsynthetics/link.go b/apmsynthetics/link.go index 95b3dae1f5..63afa3a527 100644 --- a/apmsynthetics/link.go +++ b/apmsynthetics/link.go @@ -42,7 +42,7 @@ type Link struct { // Maximum delay in milliseconds. MaxDelayInMilliseconds *float64 `mandatory:"false" json:"maxDelayInMilliseconds"` - // List of all path ids of which this link is part of. + // List of all path IDs of which this link is part of. Paths []string `mandatory:"false" json:"paths"` } diff --git a/apmsynthetics/monitor.go b/apmsynthetics/monitor.go index bbafc6ef90..3f8cbd5cc0 100644 --- a/apmsynthetics/monitor.go +++ b/apmsynthetics/monitor.go @@ -70,6 +70,7 @@ type Monitor struct { // For BROWSER and REST monitor types, target is mandatory. // If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. // If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. + // For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 Target *string `mandatory:"false" json:"target"` // List of script parameters. Example: `[{"monitorScriptParameter": {"paramName": "userid", "paramValue":"testuser"}, "isSecret": false, "isOverwritten": false}]` @@ -161,10 +162,7 @@ func (m *Monitor) UnmarshalJSON(data []byte) (e error) { m.Target = model.Target m.ScriptParameters = make([]MonitorScriptParameterInfo, len(model.ScriptParameters)) - for i, n := range model.ScriptParameters { - m.ScriptParameters[i] = n - } - + copy(m.ScriptParameters, model.ScriptParameters) nn, e = model.Configuration.UnmarshalPolymorphicJSON(model.Configuration.JsonData) if e != nil { return @@ -194,10 +192,7 @@ func (m *Monitor) UnmarshalJSON(data []byte) (e error) { m.MonitorType = model.MonitorType m.VantagePoints = make([]VantagePointInfo, len(model.VantagePoints)) - for i, n := range model.VantagePoints { - m.VantagePoints[i] = n - } - + copy(m.VantagePoints, model.VantagePoints) m.VantagePointCount = model.VantagePointCount m.ScriptId = model.ScriptId diff --git a/apmsynthetics/monitor_configuration.go b/apmsynthetics/monitor_configuration.go index c86b8053cc..fe0906a015 100644 --- a/apmsynthetics/monitor_configuration.go +++ b/apmsynthetics/monitor_configuration.go @@ -75,18 +75,22 @@ func (m *monitorconfiguration) UnmarshalPolymorphicJSON(data []byte) (interface{ mm := BrowserMonitorConfiguration{} err = json.Unmarshal(data, &mm) return mm, err + case "NETWORK_CONFIG": + mm := NetworkMonitorConfiguration{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for MonitorConfiguration: %s.", m.ConfigType) return *m, nil } } -//GetIsFailureRetried returns IsFailureRetried +// GetIsFailureRetried returns IsFailureRetried func (m monitorconfiguration) GetIsFailureRetried() *bool { return m.IsFailureRetried } -//GetDnsConfiguration returns DnsConfiguration +// GetDnsConfiguration returns DnsConfiguration func (m monitorconfiguration) GetDnsConfiguration() *DnsConfiguration { return m.DnsConfiguration } @@ -116,6 +120,7 @@ const ( MonitorConfigurationConfigTypeScriptedBrowserConfig MonitorConfigurationConfigTypeEnum = "SCRIPTED_BROWSER_CONFIG" MonitorConfigurationConfigTypeRestConfig MonitorConfigurationConfigTypeEnum = "REST_CONFIG" MonitorConfigurationConfigTypeScriptedRestConfig MonitorConfigurationConfigTypeEnum = "SCRIPTED_REST_CONFIG" + MonitorConfigurationConfigTypeNetworkConfig MonitorConfigurationConfigTypeEnum = "NETWORK_CONFIG" ) var mappingMonitorConfigurationConfigTypeEnum = map[string]MonitorConfigurationConfigTypeEnum{ @@ -123,6 +128,7 @@ var mappingMonitorConfigurationConfigTypeEnum = map[string]MonitorConfigurationC "SCRIPTED_BROWSER_CONFIG": MonitorConfigurationConfigTypeScriptedBrowserConfig, "REST_CONFIG": MonitorConfigurationConfigTypeRestConfig, "SCRIPTED_REST_CONFIG": MonitorConfigurationConfigTypeScriptedRestConfig, + "NETWORK_CONFIG": MonitorConfigurationConfigTypeNetworkConfig, } var mappingMonitorConfigurationConfigTypeEnumLowerCase = map[string]MonitorConfigurationConfigTypeEnum{ @@ -130,6 +136,7 @@ var mappingMonitorConfigurationConfigTypeEnumLowerCase = map[string]MonitorConfi "scripted_browser_config": MonitorConfigurationConfigTypeScriptedBrowserConfig, "rest_config": MonitorConfigurationConfigTypeRestConfig, "scripted_rest_config": MonitorConfigurationConfigTypeScriptedRestConfig, + "network_config": MonitorConfigurationConfigTypeNetworkConfig, } // GetMonitorConfigurationConfigTypeEnumValues Enumerates the set of values for MonitorConfigurationConfigTypeEnum @@ -148,6 +155,7 @@ func GetMonitorConfigurationConfigTypeEnumStringValues() []string { "SCRIPTED_BROWSER_CONFIG", "REST_CONFIG", "SCRIPTED_REST_CONFIG", + "NETWORK_CONFIG", } } diff --git a/apmsynthetics/monitor_summary.go b/apmsynthetics/monitor_summary.go index eb970e33a1..cf5d0f537e 100644 --- a/apmsynthetics/monitor_summary.go +++ b/apmsynthetics/monitor_summary.go @@ -69,6 +69,7 @@ type MonitorSummary struct { // For BROWSER and REST monitor types, target is mandatory. // If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. // If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. + // For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 Target *string `mandatory:"false" json:"target"` MaintenanceWindowSchedule *MaintenanceWindowSchedule `mandatory:"false" json:"maintenanceWindowSchedule"` diff --git a/apmsynthetics/monitor_types.go b/apmsynthetics/monitor_types.go index 189092efa4..dcf9416739 100644 --- a/apmsynthetics/monitor_types.go +++ b/apmsynthetics/monitor_types.go @@ -22,6 +22,7 @@ const ( MonitorTypesBrowser MonitorTypesEnum = "BROWSER" MonitorTypesScriptedRest MonitorTypesEnum = "SCRIPTED_REST" MonitorTypesRest MonitorTypesEnum = "REST" + MonitorTypesNetwork MonitorTypesEnum = "NETWORK" ) var mappingMonitorTypesEnum = map[string]MonitorTypesEnum{ @@ -29,6 +30,7 @@ var mappingMonitorTypesEnum = map[string]MonitorTypesEnum{ "BROWSER": MonitorTypesBrowser, "SCRIPTED_REST": MonitorTypesScriptedRest, "REST": MonitorTypesRest, + "NETWORK": MonitorTypesNetwork, } var mappingMonitorTypesEnumLowerCase = map[string]MonitorTypesEnum{ @@ -36,6 +38,7 @@ var mappingMonitorTypesEnumLowerCase = map[string]MonitorTypesEnum{ "browser": MonitorTypesBrowser, "scripted_rest": MonitorTypesScriptedRest, "rest": MonitorTypesRest, + "network": MonitorTypesNetwork, } // GetMonitorTypesEnumValues Enumerates the set of values for MonitorTypesEnum @@ -54,6 +57,7 @@ func GetMonitorTypesEnumStringValues() []string { "BROWSER", "SCRIPTED_REST", "REST", + "NETWORK", } } diff --git a/apmsynthetics/network_monitor_configuration.go b/apmsynthetics/network_monitor_configuration.go new file mode 100644 index 0000000000..dda76445f1 --- /dev/null +++ b/apmsynthetics/network_monitor_configuration.go @@ -0,0 +1,67 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NetworkMonitorConfiguration Request configuration details for the NETWORK monitor type. +type NetworkMonitorConfiguration struct { + NetworkConfiguration *NetworkConfiguration `mandatory:"true" json:"networkConfiguration"` + + // If isFailureRetried is enabled, then a failed call will be retried. + IsFailureRetried *bool `mandatory:"false" json:"isFailureRetried"` + + DnsConfiguration *DnsConfiguration `mandatory:"false" json:"dnsConfiguration"` +} + +//GetIsFailureRetried returns IsFailureRetried +func (m NetworkMonitorConfiguration) GetIsFailureRetried() *bool { + return m.IsFailureRetried +} + +//GetDnsConfiguration returns DnsConfiguration +func (m NetworkMonitorConfiguration) GetDnsConfiguration() *DnsConfiguration { + return m.DnsConfiguration +} + +func (m NetworkMonitorConfiguration) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NetworkMonitorConfiguration) 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 NetworkMonitorConfiguration) MarshalJSON() (buff []byte, e error) { + type MarshalTypeNetworkMonitorConfiguration NetworkMonitorConfiguration + s := struct { + DiscriminatorParam string `json:"configType"` + MarshalTypeNetworkMonitorConfiguration + }{ + "NETWORK_CONFIG", + (MarshalTypeNetworkMonitorConfiguration)(m), + } + + return json.Marshal(&s) +} diff --git a/apmsynthetics/private_key.go b/apmsynthetics/private_key.go index d855b083d5..e7ebdab7af 100644 --- a/apmsynthetics/private_key.go +++ b/apmsynthetics/private_key.go @@ -15,7 +15,7 @@ import ( "strings" ) -// PrivateKey The private key associated with the client certificate in pem format. +// PrivateKey The private key associated with the client certificate in PEM format. type PrivateKey struct { // Name of the private key file. diff --git a/apmsynthetics/scripted_browser_monitor_configuration.go b/apmsynthetics/scripted_browser_monitor_configuration.go index 8141557a7d..8e2e2b58d4 100644 --- a/apmsynthetics/scripted_browser_monitor_configuration.go +++ b/apmsynthetics/scripted_browser_monitor_configuration.go @@ -27,7 +27,7 @@ type ScriptedBrowserMonitorConfiguration struct { // If certificate validation is enabled, then the call will fail in case of certification errors. IsCertificateValidationEnabled *bool `mandatory:"false" json:"isCertificateValidationEnabled"` - // If disabled then auto snapshots are not collected. + // If disabled, auto snapshots are not collected. IsDefaultSnapshotEnabled *bool `mandatory:"false" json:"isDefaultSnapshotEnabled"` NetworkConfiguration *NetworkConfiguration `mandatory:"false" json:"networkConfiguration"` diff --git a/apmsynthetics/update_monitor_details.go b/apmsynthetics/update_monitor_details.go index 0d691d215f..aa657d69a3 100644 --- a/apmsynthetics/update_monitor_details.go +++ b/apmsynthetics/update_monitor_details.go @@ -50,6 +50,7 @@ type UpdateMonitorDetails struct { // For BROWSER and REST monitor types, target is mandatory. // If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. // If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. + // For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80 Target *string `mandatory:"false" json:"target"` // List of script parameters in the monitor. @@ -133,10 +134,7 @@ func (m *UpdateMonitorDetails) UnmarshalJSON(data []byte) (e error) { m.DisplayName = model.DisplayName m.VantagePoints = make([]string, len(model.VantagePoints)) - for i, n := range model.VantagePoints { - m.VantagePoints[i] = n - } - + copy(m.VantagePoints, model.VantagePoints) m.ScriptId = model.ScriptId m.Status = model.Status @@ -150,10 +148,7 @@ func (m *UpdateMonitorDetails) UnmarshalJSON(data []byte) (e error) { m.Target = model.Target m.ScriptParameters = make([]MonitorScriptParameter, len(model.ScriptParameters)) - for i, n := range model.ScriptParameters { - m.ScriptParameters[i] = n - } - + copy(m.ScriptParameters, model.ScriptParameters) nn, e = model.Configuration.UnmarshalPolymorphicJSON(model.Configuration.JsonData) if e != nil { return diff --git a/apmtraces/apmtraces_query_client.go b/apmtraces/apmtraces_query_client.go index 3947415e5c..2449e96135 100644 --- a/apmtraces/apmtraces_query_client.go +++ b/apmtraces/apmtraces_query_client.go @@ -80,7 +80,7 @@ func (client *QueryClient) setConfigurationProvider(configProvider common.Config 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/apmtraces/apmtraces_trace_client.go b/apmtraces/apmtraces_trace_client.go index bfa432b3bf..229b50cdfc 100644 --- a/apmtraces/apmtraces_trace_client.go +++ b/apmtraces/apmtraces_trace_client.go @@ -80,7 +80,7 @@ func (client *TraceClient) setConfigurationProvider(configProvider common.Config 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/applicationmigration/applicationmigration_client.go b/applicationmigration/applicationmigration_client.go index 71c356c609..5714b4d7ff 100644 --- a/applicationmigration/applicationmigration_client.go +++ b/applicationmigration/applicationmigration_client.go @@ -83,7 +83,7 @@ func (client *ApplicationMigrationClient) setConfigurationProvider(configProvide 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/appmgmtcontrol/appmgmtcontrol_client.go b/appmgmtcontrol/appmgmtcontrol_client.go index bb75b93eb8..b2773760eb 100644 --- a/appmgmtcontrol/appmgmtcontrol_client.go +++ b/appmgmtcontrol/appmgmtcontrol_client.go @@ -80,7 +80,7 @@ func (client *AppmgmtControlClient) setConfigurationProvider(configProvider comm 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/artifacts/artifacts_client.go b/artifacts/artifacts_client.go index 6b46d6849e..9783847140 100644 --- a/artifacts/artifacts_client.go +++ b/artifacts/artifacts_client.go @@ -81,7 +81,7 @@ func (client *ArtifactsClient) setConfigurationProvider(configProvider common.Co 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/artifacts/create_repository_details.go b/artifacts/create_repository_details.go index 1eb1ddb7f9..da04b77ddc 100644 --- a/artifacts/create_repository_details.go +++ b/artifacts/create_repository_details.go @@ -45,12 +45,12 @@ type CreateRepositoryDetails interface { type createrepositorydetails struct { JsonData []byte - CompartmentId *string `mandatory:"true" json:"compartmentId"` - IsImmutable *bool `mandatory:"true" json:"isImmutable"` DisplayName *string `mandatory:"false" json:"displayName"` Description *string `mandatory:"false" json:"description"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + IsImmutable *bool `mandatory:"true" json:"isImmutable"` RepositoryType string `json:"repositoryType"` } @@ -95,36 +95,36 @@ func (m *createrepositorydetails) UnmarshalPolymorphicJSON(data []byte) (interfa } } -//GetCompartmentId returns CompartmentId -func (m createrepositorydetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetIsImmutable returns IsImmutable -func (m createrepositorydetails) GetIsImmutable() *bool { - return m.IsImmutable -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createrepositorydetails) GetDisplayName() *string { return m.DisplayName } -//GetDescription returns Description +// GetDescription returns Description func (m createrepositorydetails) GetDescription() *string { return m.Description } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createrepositorydetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createrepositorydetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetCompartmentId returns CompartmentId +func (m createrepositorydetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetIsImmutable returns IsImmutable +func (m createrepositorydetails) GetIsImmutable() *bool { + return m.IsImmutable +} + func (m createrepositorydetails) String() string { return common.PointerString(m) } diff --git a/artifacts/repository.go b/artifacts/repository.go index cf2e228ad8..7d45141c0e 100644 --- a/artifacts/repository.go +++ b/artifacts/repository.go @@ -111,47 +111,47 @@ func (m *repository) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) } } -//GetId returns Id +// GetId returns Id func (m repository) GetId() *string { return m.Id } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m repository) GetDisplayName() *string { return m.DisplayName } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m repository) GetCompartmentId() *string { return m.CompartmentId } -//GetDescription returns Description +// GetDescription returns Description func (m repository) GetDescription() *string { return m.Description } -//GetIsImmutable returns IsImmutable +// GetIsImmutable returns IsImmutable func (m repository) GetIsImmutable() *bool { return m.IsImmutable } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m repository) GetLifecycleState() RepositoryLifecycleStateEnum { return m.LifecycleState } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m repository) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m repository) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m repository) GetTimeCreated() *common.SDKTime { return m.TimeCreated } diff --git a/artifacts/repository_collection.go b/artifacts/repository_collection.go index aeba36abe7..67e0d914c3 100644 --- a/artifacts/repository_collection.go +++ b/artifacts/repository_collection.go @@ -63,6 +63,5 @@ func (m *RepositoryCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/artifacts/repository_summary.go b/artifacts/repository_summary.go index 605142843f..2a402434e2 100644 --- a/artifacts/repository_summary.go +++ b/artifacts/repository_summary.go @@ -55,6 +55,7 @@ type RepositorySummary interface { type repositorysummary struct { JsonData []byte + Description *string `mandatory:"false" json:"description"` Id *string `mandatory:"true" json:"id"` DisplayName *string `mandatory:"true" json:"displayName"` CompartmentId *string `mandatory:"true" json:"compartmentId"` @@ -63,7 +64,6 @@ type repositorysummary struct { FreeformTags map[string]string `mandatory:"true" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - Description *string `mandatory:"false" json:"description"` RepositoryType string `json:"repositoryType"` } @@ -111,51 +111,51 @@ func (m *repositorysummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetId returns Id +// GetDescription returns Description +func (m repositorysummary) GetDescription() *string { + return m.Description +} + +// GetId returns Id func (m repositorysummary) GetId() *string { return m.Id } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m repositorysummary) GetDisplayName() *string { return m.DisplayName } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m repositorysummary) GetCompartmentId() *string { return m.CompartmentId } -//GetIsImmutable returns IsImmutable +// GetIsImmutable returns IsImmutable func (m repositorysummary) GetIsImmutable() *bool { return m.IsImmutable } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m repositorysummary) GetLifecycleState() RepositoryLifecycleStateEnum { return m.LifecycleState } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m repositorysummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m repositorysummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m repositorysummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetDescription returns Description -func (m repositorysummary) GetDescription() *string { - return m.Description -} - func (m repositorysummary) String() string { return common.PointerString(m) } diff --git a/artifacts/update_repository_details.go b/artifacts/update_repository_details.go index 6856dacda4..9a9ec41038 100644 --- a/artifacts/update_repository_details.go +++ b/artifacts/update_repository_details.go @@ -85,22 +85,22 @@ func (m *updaterepositorydetails) UnmarshalPolymorphicJSON(data []byte) (interfa } } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m updaterepositorydetails) GetDisplayName() *string { return m.DisplayName } -//GetDescription returns Description +// GetDescription returns Description func (m updaterepositorydetails) GetDescription() *string { return m.Description } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updaterepositorydetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updaterepositorydetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/audit/audit_client.go b/audit/audit_client.go index 768d126dff..6194bf4f92 100644 --- a/audit/audit_client.go +++ b/audit/audit_client.go @@ -82,7 +82,7 @@ func (client *AuditClient) setConfigurationProvider(configProvider common.Config 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/autoscaling/auto_scaling_configuration.go b/autoscaling/auto_scaling_configuration.go index 5b69f7c530..1eeac5c9ec 100644 --- a/autoscaling/auto_scaling_configuration.go +++ b/autoscaling/auto_scaling_configuration.go @@ -147,7 +147,6 @@ func (m *AutoScalingConfiguration) UnmarshalJSON(data []byte) (e error) { m.Policies[i] = nil } } - m.TimeCreated = model.TimeCreated return diff --git a/autoscaling/auto_scaling_policy.go b/autoscaling/auto_scaling_policy.go index bf31c2b908..1cd98ee618 100644 --- a/autoscaling/auto_scaling_policy.go +++ b/autoscaling/auto_scaling_policy.go @@ -48,11 +48,11 @@ type AutoScalingPolicy interface { type autoscalingpolicy struct { JsonData []byte - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` Capacity *Capacity `mandatory:"false" json:"capacity"` Id *string `mandatory:"false" json:"id"` DisplayName *string `mandatory:"false" json:"displayName"` IsEnabled *bool `mandatory:"false" json:"isEnabled"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` PolicyType string `json:"policyType"` } @@ -100,31 +100,31 @@ func (m *autoscalingpolicy) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetTimeCreated returns TimeCreated -func (m autoscalingpolicy) GetTimeCreated() *common.SDKTime { - return m.TimeCreated -} - -//GetCapacity returns Capacity +// GetCapacity returns Capacity func (m autoscalingpolicy) GetCapacity() *Capacity { return m.Capacity } -//GetId returns Id +// GetId returns Id func (m autoscalingpolicy) GetId() *string { return m.Id } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m autoscalingpolicy) GetDisplayName() *string { return m.DisplayName } -//GetIsEnabled returns IsEnabled +// GetIsEnabled returns IsEnabled func (m autoscalingpolicy) GetIsEnabled() *bool { return m.IsEnabled } +// GetTimeCreated returns TimeCreated +func (m autoscalingpolicy) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + func (m autoscalingpolicy) String() string { return common.PointerString(m) } diff --git a/autoscaling/autoscaling_client.go b/autoscaling/autoscaling_client.go index bee281280a..0101d632a1 100644 --- a/autoscaling/autoscaling_client.go +++ b/autoscaling/autoscaling_client.go @@ -84,7 +84,7 @@ func (client *AutoScalingClient) setConfigurationProvider(configProvider common. 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/autoscaling/create_auto_scaling_configuration_details.go b/autoscaling/create_auto_scaling_configuration_details.go index 6a08d0ca7e..d985c8606c 100644 --- a/autoscaling/create_auto_scaling_configuration_details.go +++ b/autoscaling/create_auto_scaling_configuration_details.go @@ -111,7 +111,6 @@ func (m *CreateAutoScalingConfigurationDetails) UnmarshalJSON(data []byte) (e er m.Policies[i] = nil } } - nn, e = model.Resource.UnmarshalPolymorphicJSON(model.Resource.JsonData) if e != nil { return diff --git a/autoscaling/create_auto_scaling_policy_details.go b/autoscaling/create_auto_scaling_policy_details.go index 06e8222cf7..bdb9bc6244 100644 --- a/autoscaling/create_auto_scaling_policy_details.go +++ b/autoscaling/create_auto_scaling_policy_details.go @@ -88,17 +88,17 @@ func (m *createautoscalingpolicydetails) UnmarshalPolymorphicJSON(data []byte) ( } } -//GetCapacity returns Capacity +// GetCapacity returns Capacity func (m createautoscalingpolicydetails) GetCapacity() *Capacity { return m.Capacity } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createautoscalingpolicydetails) GetDisplayName() *string { return m.DisplayName } -//GetIsEnabled returns IsEnabled +// GetIsEnabled returns IsEnabled func (m createautoscalingpolicydetails) GetIsEnabled() *bool { return m.IsEnabled } diff --git a/autoscaling/execution_schedule.go b/autoscaling/execution_schedule.go index 228e333781..d265dffde6 100644 --- a/autoscaling/execution_schedule.go +++ b/autoscaling/execution_schedule.go @@ -69,7 +69,7 @@ func (m *executionschedule) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetTimezone returns Timezone +// GetTimezone returns Timezone func (m executionschedule) GetTimezone() ExecutionScheduleTimezoneEnum { return m.Timezone } diff --git a/autoscaling/resource.go b/autoscaling/resource.go index caae60f17b..8854753d14 100644 --- a/autoscaling/resource.go +++ b/autoscaling/resource.go @@ -70,7 +70,7 @@ func (m *resource) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetId returns Id +// GetId returns Id func (m resource) GetId() *string { return m.Id } diff --git a/autoscaling/update_auto_scaling_policy_details.go b/autoscaling/update_auto_scaling_policy_details.go index 3295c5a196..b527160fc2 100644 --- a/autoscaling/update_auto_scaling_policy_details.go +++ b/autoscaling/update_auto_scaling_policy_details.go @@ -83,17 +83,17 @@ func (m *updateautoscalingpolicydetails) UnmarshalPolymorphicJSON(data []byte) ( } } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m updateautoscalingpolicydetails) GetDisplayName() *string { return m.DisplayName } -//GetCapacity returns Capacity +// GetCapacity returns Capacity func (m updateautoscalingpolicydetails) GetCapacity() *Capacity { return m.Capacity } -//GetIsEnabled returns IsEnabled +// GetIsEnabled returns IsEnabled func (m updateautoscalingpolicydetails) GetIsEnabled() *bool { return m.IsEnabled } diff --git a/bastion/bastion_client.go b/bastion/bastion_client.go index 0a1c1ad307..8550ed85e8 100644 --- a/bastion/bastion_client.go +++ b/bastion/bastion_client.go @@ -80,7 +80,7 @@ func (client *BastionClient) setConfigurationProvider(configProvider common.Conf 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/bds/add_schedule_based_horizontal_scaling_policy_details.go b/bds/add_schedule_based_horizontal_scaling_policy_details.go index c4351d1198..0e9f4502da 100644 --- a/bds/add_schedule_based_horizontal_scaling_policy_details.go +++ b/bds/add_schedule_based_horizontal_scaling_policy_details.go @@ -83,6 +83,5 @@ func (m *AddScheduleBasedHorizontalScalingPolicyDetails) UnmarshalJSON(data []by m.ScheduleDetails[i] = nil } } - return } diff --git a/bds/add_schedule_based_vertical_scaling_policy_details.go b/bds/add_schedule_based_vertical_scaling_policy_details.go index 59e4976909..630e42a9a6 100644 --- a/bds/add_schedule_based_vertical_scaling_policy_details.go +++ b/bds/add_schedule_based_vertical_scaling_policy_details.go @@ -83,6 +83,5 @@ func (m *AddScheduleBasedVerticalScalingPolicyDetails) UnmarshalJSON(data []byte m.ScheduleDetails[i] = nil } } - return } diff --git a/bds/auto_scale_policy_details.go b/bds/auto_scale_policy_details.go index e40cfc869a..851a8801f0 100644 --- a/bds/auto_scale_policy_details.go +++ b/bds/auto_scale_policy_details.go @@ -87,12 +87,12 @@ func (m *autoscalepolicydetails) UnmarshalPolymorphicJSON(data []byte) (interfac } } -//GetTriggerType returns TriggerType +// GetTriggerType returns TriggerType func (m autoscalepolicydetails) GetTriggerType() AutoScalePolicyDetailsTriggerTypeEnum { return m.TriggerType } -//GetActionType returns ActionType +// GetActionType returns ActionType func (m autoscalepolicydetails) GetActionType() AutoScalePolicyDetailsActionTypeEnum { return m.ActionType } diff --git a/bds/bds_client.go b/bds/bds_client.go index 06fdc3883f..13b5ee068f 100644 --- a/bds/bds_client.go +++ b/bds/bds_client.go @@ -80,7 +80,7 @@ func (client *BdsClient) setConfigurationProvider(configProvider common.Configur 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/bds/schedule_based_horizontal_scaling_policy_details.go b/bds/schedule_based_horizontal_scaling_policy_details.go index 30b8b034eb..0291e9e1ce 100644 --- a/bds/schedule_based_horizontal_scaling_policy_details.go +++ b/bds/schedule_based_horizontal_scaling_policy_details.go @@ -107,7 +107,6 @@ func (m *ScheduleBasedHorizontalScalingPolicyDetails) UnmarshalJSON(data []byte) m.ScheduleDetails[i] = nil } } - m.TriggerType = model.TriggerType m.ActionType = model.ActionType diff --git a/bds/schedule_based_vertical_scaling_policy_details.go b/bds/schedule_based_vertical_scaling_policy_details.go index 476c96825d..86eaef1495 100644 --- a/bds/schedule_based_vertical_scaling_policy_details.go +++ b/bds/schedule_based_vertical_scaling_policy_details.go @@ -107,7 +107,6 @@ func (m *ScheduleBasedVerticalScalingPolicyDetails) UnmarshalJSON(data []byte) ( m.ScheduleDetails[i] = nil } } - m.TriggerType = model.TriggerType m.ActionType = model.ActionType diff --git a/bds/update_schedule_based_horizontal_scaling_policy_details.go b/bds/update_schedule_based_horizontal_scaling_policy_details.go index e628783733..bbdfe0db67 100644 --- a/bds/update_schedule_based_horizontal_scaling_policy_details.go +++ b/bds/update_schedule_based_horizontal_scaling_policy_details.go @@ -83,6 +83,5 @@ func (m *UpdateScheduleBasedHorizontalScalingPolicyDetails) UnmarshalJSON(data [ m.ScheduleDetails[i] = nil } } - return } diff --git a/bds/update_schedule_based_vertical_scaling_policy_details.go b/bds/update_schedule_based_vertical_scaling_policy_details.go index e7b53f4a25..bc0004f6b8 100644 --- a/bds/update_schedule_based_vertical_scaling_policy_details.go +++ b/bds/update_schedule_based_vertical_scaling_policy_details.go @@ -83,6 +83,5 @@ func (m *UpdateScheduleBasedVerticalScalingPolicyDetails) UnmarshalJSON(data []b m.ScheduleDetails[i] = nil } } - return } diff --git a/blockchain/blockchain_blockchainplatform_client.go b/blockchain/blockchain_blockchainplatform_client.go index 698fdbab77..4544fda1db 100644 --- a/blockchain/blockchain_blockchainplatform_client.go +++ b/blockchain/blockchain_blockchainplatform_client.go @@ -80,7 +80,7 @@ func (client *BlockchainPlatformClient) setConfigurationProvider(configProvider 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/budget/budget_client.go b/budget/budget_client.go index 95af1b3e85..646f8035b7 100644 --- a/budget/budget_client.go +++ b/budget/budget_client.go @@ -80,7 +80,7 @@ func (client *BudgetClient) setConfigurationProvider(configProvider common.Confi 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/certificates/certificate_bundle.go b/certificates/certificate_bundle.go index 72b07efa22..71ece2ee93 100644 --- a/certificates/certificate_bundle.go +++ b/certificates/certificate_bundle.go @@ -55,6 +55,10 @@ type CertificateBundle interface { type certificatebundle struct { JsonData []byte + CertificatePem *string `mandatory:"false" json:"certificatePem"` + CertChainPem *string `mandatory:"false" json:"certChainPem"` + VersionName *string `mandatory:"false" json:"versionName"` + RevocationStatus *RevocationStatus `mandatory:"false" json:"revocationStatus"` CertificateId *string `mandatory:"true" json:"certificateId"` CertificateName *string `mandatory:"true" json:"certificateName"` VersionNumber *int64 `mandatory:"true" json:"versionNumber"` @@ -62,10 +66,6 @@ type certificatebundle struct { TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` Validity *Validity `mandatory:"true" json:"validity"` Stages []VersionStageEnum `mandatory:"true" json:"stages"` - CertificatePem *string `mandatory:"false" json:"certificatePem"` - CertChainPem *string `mandatory:"false" json:"certChainPem"` - VersionName *string `mandatory:"false" json:"versionName"` - RevocationStatus *RevocationStatus `mandatory:"false" json:"revocationStatus"` CertificateBundleType string `json:"certificateBundleType"` } @@ -119,61 +119,61 @@ func (m *certificatebundle) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetCertificateId returns CertificateId +// GetCertificatePem returns CertificatePem +func (m certificatebundle) GetCertificatePem() *string { + return m.CertificatePem +} + +// GetCertChainPem returns CertChainPem +func (m certificatebundle) GetCertChainPem() *string { + return m.CertChainPem +} + +// GetVersionName returns VersionName +func (m certificatebundle) GetVersionName() *string { + return m.VersionName +} + +// GetRevocationStatus returns RevocationStatus +func (m certificatebundle) GetRevocationStatus() *RevocationStatus { + return m.RevocationStatus +} + +// GetCertificateId returns CertificateId func (m certificatebundle) GetCertificateId() *string { return m.CertificateId } -//GetCertificateName returns CertificateName +// GetCertificateName returns CertificateName func (m certificatebundle) GetCertificateName() *string { return m.CertificateName } -//GetVersionNumber returns VersionNumber +// GetVersionNumber returns VersionNumber func (m certificatebundle) GetVersionNumber() *int64 { return m.VersionNumber } -//GetSerialNumber returns SerialNumber +// GetSerialNumber returns SerialNumber func (m certificatebundle) GetSerialNumber() *string { return m.SerialNumber } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m certificatebundle) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetValidity returns Validity +// GetValidity returns Validity func (m certificatebundle) GetValidity() *Validity { return m.Validity } -//GetStages returns Stages +// GetStages returns Stages func (m certificatebundle) GetStages() []VersionStageEnum { return m.Stages } -//GetCertificatePem returns CertificatePem -func (m certificatebundle) GetCertificatePem() *string { - return m.CertificatePem -} - -//GetCertChainPem returns CertChainPem -func (m certificatebundle) GetCertChainPem() *string { - return m.CertChainPem -} - -//GetVersionName returns VersionName -func (m certificatebundle) GetVersionName() *string { - return m.VersionName -} - -//GetRevocationStatus returns RevocationStatus -func (m certificatebundle) GetRevocationStatus() *RevocationStatus { - return m.RevocationStatus -} - func (m certificatebundle) String() string { return common.PointerString(m) } diff --git a/certificates/certificates_client.go b/certificates/certificates_client.go index fa14263103..26af889cea 100644 --- a/certificates/certificates_client.go +++ b/certificates/certificates_client.go @@ -80,7 +80,7 @@ func (client *CertificatesClient) setConfigurationProvider(configProvider common 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/certificatesmanagement/certificate.go b/certificatesmanagement/certificate.go index 46d68fd512..3a0dd50968 100644 --- a/certificatesmanagement/certificate.go +++ b/certificatesmanagement/certificate.go @@ -156,7 +156,6 @@ func (m *Certificate) UnmarshalJSON(data []byte) (e error) { m.CertificateRules[i] = nil } } - m.TimeOfDeletion = model.TimeOfDeletion m.LifecycleDetails = model.LifecycleDetails diff --git a/certificatesmanagement/certificate_authority.go b/certificatesmanagement/certificate_authority.go index fbe54e2db1..6784445f2e 100644 --- a/certificatesmanagement/certificate_authority.go +++ b/certificatesmanagement/certificate_authority.go @@ -150,7 +150,6 @@ func (m *CertificateAuthority) UnmarshalJSON(data []byte) (e error) { m.CertificateAuthorityRules[i] = nil } } - m.CurrentVersion = model.CurrentVersion m.CertificateRevocationListDetails = model.CertificateRevocationListDetails diff --git a/certificatesmanagement/certificate_authority_summary.go b/certificatesmanagement/certificate_authority_summary.go index 365e7c8b83..ea0dbebabf 100644 --- a/certificatesmanagement/certificate_authority_summary.go +++ b/certificatesmanagement/certificate_authority_summary.go @@ -141,7 +141,6 @@ func (m *CertificateAuthoritySummary) UnmarshalJSON(data []byte) (e error) { m.CertificateAuthorityRules[i] = nil } } - m.CurrentVersionSummary = model.CurrentVersionSummary m.Subject = model.Subject diff --git a/certificatesmanagement/certificate_summary.go b/certificatesmanagement/certificate_summary.go index 34c2de6d33..a0456fa1a4 100644 --- a/certificatesmanagement/certificate_summary.go +++ b/certificatesmanagement/certificate_summary.go @@ -151,7 +151,6 @@ func (m *CertificateSummary) UnmarshalJSON(data []byte) (e error) { m.CertificateRules[i] = nil } } - m.CurrentVersionSummary = model.CurrentVersionSummary m.Subject = model.Subject diff --git a/certificatesmanagement/certificatesmanagement_client.go b/certificatesmanagement/certificatesmanagement_client.go index 85e4b98a02..a93107ce22 100644 --- a/certificatesmanagement/certificatesmanagement_client.go +++ b/certificatesmanagement/certificatesmanagement_client.go @@ -80,7 +80,7 @@ func (client *CertificatesManagementClient) setConfigurationProvider(configProvi 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/certificatesmanagement/create_certificate_authority_config_details.go b/certificatesmanagement/create_certificate_authority_config_details.go index cbfbb7e6e4..923cc52b40 100644 --- a/certificatesmanagement/create_certificate_authority_config_details.go +++ b/certificatesmanagement/create_certificate_authority_config_details.go @@ -69,7 +69,7 @@ func (m *createcertificateauthorityconfigdetails) UnmarshalPolymorphicJSON(data } } -//GetVersionName returns VersionName +// GetVersionName returns VersionName func (m createcertificateauthorityconfigdetails) GetVersionName() *string { return m.VersionName } diff --git a/certificatesmanagement/create_certificate_authority_details.go b/certificatesmanagement/create_certificate_authority_details.go index f56cc3fd43..3c9cfe489e 100644 --- a/certificatesmanagement/create_certificate_authority_details.go +++ b/certificatesmanagement/create_certificate_authority_details.go @@ -96,7 +96,6 @@ func (m *CreateCertificateAuthorityDetails) UnmarshalJSON(data []byte) (e error) m.CertificateAuthorityRules[i] = nil } } - m.CertificateRevocationListDetails = model.CertificateRevocationListDetails m.FreeformTags = model.FreeformTags diff --git a/certificatesmanagement/create_certificate_config_details.go b/certificatesmanagement/create_certificate_config_details.go index f6f69c3b44..290d0298a8 100644 --- a/certificatesmanagement/create_certificate_config_details.go +++ b/certificatesmanagement/create_certificate_config_details.go @@ -73,7 +73,7 @@ func (m *createcertificateconfigdetails) UnmarshalPolymorphicJSON(data []byte) ( } } -//GetVersionName returns VersionName +// GetVersionName returns VersionName func (m createcertificateconfigdetails) GetVersionName() *string { return m.VersionName } diff --git a/certificatesmanagement/create_certificate_details.go b/certificatesmanagement/create_certificate_details.go index 83410c69a9..6e3d598e78 100644 --- a/certificatesmanagement/create_certificate_details.go +++ b/certificatesmanagement/create_certificate_details.go @@ -91,7 +91,6 @@ func (m *CreateCertificateDetails) UnmarshalJSON(data []byte) (e error) { m.CertificateRules[i] = nil } } - m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/certificatesmanagement/update_certificate_authority_config_details.go b/certificatesmanagement/update_certificate_authority_config_details.go index 3f500cd5a3..72010ac393 100644 --- a/certificatesmanagement/update_certificate_authority_config_details.go +++ b/certificatesmanagement/update_certificate_authority_config_details.go @@ -76,12 +76,12 @@ func (m *updatecertificateauthorityconfigdetails) UnmarshalPolymorphicJSON(data } } -//GetVersionName returns VersionName +// GetVersionName returns VersionName func (m updatecertificateauthorityconfigdetails) GetVersionName() *string { return m.VersionName } -//GetStage returns Stage +// GetStage returns Stage func (m updatecertificateauthorityconfigdetails) GetStage() UpdateCertificateAuthorityConfigDetailsStageEnum { return m.Stage } diff --git a/certificatesmanagement/update_certificate_authority_details.go b/certificatesmanagement/update_certificate_authority_details.go index 303d2fc1b0..b6a4f377c9 100644 --- a/certificatesmanagement/update_certificate_authority_details.go +++ b/certificatesmanagement/update_certificate_authority_details.go @@ -106,6 +106,5 @@ func (m *UpdateCertificateAuthorityDetails) UnmarshalJSON(data []byte) (e error) m.CertificateAuthorityRules[i] = nil } } - return } diff --git a/certificatesmanagement/update_certificate_config_details.go b/certificatesmanagement/update_certificate_config_details.go index 16fb94a273..d917fd41d3 100644 --- a/certificatesmanagement/update_certificate_config_details.go +++ b/certificatesmanagement/update_certificate_config_details.go @@ -80,12 +80,12 @@ func (m *updatecertificateconfigdetails) UnmarshalPolymorphicJSON(data []byte) ( } } -//GetVersionName returns VersionName +// GetVersionName returns VersionName func (m updatecertificateconfigdetails) GetVersionName() *string { return m.VersionName } -//GetStage returns Stage +// GetStage returns Stage func (m updatecertificateconfigdetails) GetStage() UpdateCertificateConfigDetailsStageEnum { return m.Stage } diff --git a/certificatesmanagement/update_certificate_details.go b/certificatesmanagement/update_certificate_details.go index d8e7c50715..811aac3f6d 100644 --- a/certificatesmanagement/update_certificate_details.go +++ b/certificatesmanagement/update_certificate_details.go @@ -103,6 +103,5 @@ func (m *UpdateCertificateDetails) UnmarshalJSON(data []byte) (e error) { m.CertificateRules[i] = nil } } - return } diff --git a/cims/cims_incident_client.go b/cims/cims_incident_client.go index abc65c9c56..356141faaf 100644 --- a/cims/cims_incident_client.go +++ b/cims/cims_incident_client.go @@ -80,7 +80,7 @@ func (client *IncidentClient) setConfigurationProvider(configProvider common.Con 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/cims/cims_user_client.go b/cims/cims_user_client.go index c787f388ce..dbf122897b 100644 --- a/cims/cims_user_client.go +++ b/cims/cims_user_client.go @@ -80,7 +80,7 @@ func (client *UserClient) setConfigurationProvider(configProvider common.Configu 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/cims/create_item_details.go b/cims/create_item_details.go index 8cc9558d7d..d53fd063ba 100644 --- a/cims/create_item_details.go +++ b/cims/create_item_details.go @@ -81,22 +81,22 @@ func (m *createitemdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetCategory returns Category +// GetCategory returns Category func (m createitemdetails) GetCategory() *CreateCategoryDetails { return m.Category } -//GetSubCategory returns SubCategory +// GetSubCategory returns SubCategory func (m createitemdetails) GetSubCategory() *CreateSubCategoryDetails { return m.SubCategory } -//GetIssueType returns IssueType +// GetIssueType returns IssueType func (m createitemdetails) GetIssueType() *CreateIssueTypeDetails { return m.IssueType } -//GetName returns Name +// GetName returns Name func (m createitemdetails) GetName() *string { return m.Name } diff --git a/cims/item.go b/cims/item.go index 8ff7716880..3b3f687e93 100644 --- a/cims/item.go +++ b/cims/item.go @@ -34,11 +34,11 @@ type Item interface { type item struct { JsonData []byte - ItemKey *string `mandatory:"true" json:"itemKey"` Name *string `mandatory:"false" json:"name"` Category *Category `mandatory:"false" json:"category"` SubCategory *SubCategory `mandatory:"false" json:"subCategory"` IssueType *IssueType `mandatory:"false" json:"issueType"` + ItemKey *string `mandatory:"true" json:"itemKey"` Type string `json:"type"` } @@ -90,31 +90,31 @@ func (m *item) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetItemKey returns ItemKey -func (m item) GetItemKey() *string { - return m.ItemKey -} - -//GetName returns Name +// GetName returns Name func (m item) GetName() *string { return m.Name } -//GetCategory returns Category +// GetCategory returns Category func (m item) GetCategory() *Category { return m.Category } -//GetSubCategory returns SubCategory +// GetSubCategory returns SubCategory func (m item) GetSubCategory() *SubCategory { return m.SubCategory } -//GetIssueType returns IssueType +// GetIssueType returns IssueType func (m item) GetIssueType() *IssueType { return m.IssueType } +// GetItemKey returns ItemKey +func (m item) GetItemKey() *string { + return m.ItemKey +} + func (m item) String() string { return common.PointerString(m) } diff --git a/cloudbridge/asset.go b/cloudbridge/asset.go index 156f319c1e..8ae6bded74 100644 --- a/cloudbridge/asset.go +++ b/cloudbridge/asset.go @@ -67,6 +67,11 @@ type Asset interface { type asset struct { JsonData []byte + DisplayName *string `mandatory:"false" json:"displayName"` + AssetSourceIds []string `mandatory:"false" json:"assetSourceIds"` + 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"` InventoryId *string `mandatory:"true" json:"inventoryId"` Id *string `mandatory:"true" json:"id"` CompartmentId *string `mandatory:"true" json:"compartmentId"` @@ -75,11 +80,6 @@ type asset struct { TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` LifecycleState AssetLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - DisplayName *string `mandatory:"false" json:"displayName"` - AssetSourceIds []string `mandatory:"false" json:"assetSourceIds"` - 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"` AssetType string `json:"assetType"` } @@ -135,71 +135,71 @@ func (m *asset) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetInventoryId returns InventoryId +// GetDisplayName returns DisplayName +func (m asset) GetDisplayName() *string { + return m.DisplayName +} + +// GetAssetSourceIds returns AssetSourceIds +func (m asset) GetAssetSourceIds() []string { + return m.AssetSourceIds +} + +// GetFreeformTags returns FreeformTags +func (m asset) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m asset) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m asset) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetInventoryId returns InventoryId func (m asset) GetInventoryId() *string { return m.InventoryId } -//GetId returns Id +// GetId returns Id func (m asset) GetId() *string { return m.Id } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m asset) GetCompartmentId() *string { return m.CompartmentId } -//GetSourceKey returns SourceKey +// GetSourceKey returns SourceKey func (m asset) GetSourceKey() *string { return m.SourceKey } -//GetExternalAssetKey returns ExternalAssetKey +// GetExternalAssetKey returns ExternalAssetKey func (m asset) GetExternalAssetKey() *string { return m.ExternalAssetKey } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m asset) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m asset) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m asset) GetLifecycleState() AssetLifecycleStateEnum { return m.LifecycleState } -//GetDisplayName returns DisplayName -func (m asset) GetDisplayName() *string { - return m.DisplayName -} - -//GetAssetSourceIds returns AssetSourceIds -func (m asset) GetAssetSourceIds() []string { - return m.AssetSourceIds -} - -//GetFreeformTags returns FreeformTags -func (m asset) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m asset) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - -//GetSystemTags returns SystemTags -func (m asset) GetSystemTags() map[string]map[string]interface{} { - return m.SystemTags -} - func (m asset) String() string { return common.PointerString(m) } diff --git a/cloudbridge/asset_source.go b/cloudbridge/asset_source.go index 21bd209fc1..1bfd6db0cc 100644 --- a/cloudbridge/asset_source.go +++ b/cloudbridge/asset_source.go @@ -71,6 +71,10 @@ type AssetSource interface { type assetsource struct { JsonData []byte + DiscoveryScheduleId *string `mandatory:"false" json:"discoveryScheduleId"` + 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"` Id *string `mandatory:"true" json:"id"` CompartmentId *string `mandatory:"true" json:"compartmentId"` DisplayName *string `mandatory:"true" json:"displayName"` @@ -81,10 +85,6 @@ type assetsource struct { LifecycleDetails *string `mandatory:"true" json:"lifecycleDetails"` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` - DiscoveryScheduleId *string `mandatory:"false" json:"discoveryScheduleId"` - 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"` Type string `json:"type"` } @@ -137,76 +137,76 @@ func (m *assetsource) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) } } -//GetId returns Id +// GetDiscoveryScheduleId returns DiscoveryScheduleId +func (m assetsource) GetDiscoveryScheduleId() *string { + return m.DiscoveryScheduleId +} + +// GetFreeformTags returns FreeformTags +func (m assetsource) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m assetsource) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m assetsource) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetId returns Id func (m assetsource) GetId() *string { return m.Id } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m assetsource) GetCompartmentId() *string { return m.CompartmentId } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m assetsource) GetDisplayName() *string { return m.DisplayName } -//GetEnvironmentId returns EnvironmentId +// GetEnvironmentId returns EnvironmentId func (m assetsource) GetEnvironmentId() *string { return m.EnvironmentId } -//GetInventoryId returns InventoryId +// GetInventoryId returns InventoryId func (m assetsource) GetInventoryId() *string { return m.InventoryId } -//GetAssetsCompartmentId returns AssetsCompartmentId +// GetAssetsCompartmentId returns AssetsCompartmentId func (m assetsource) GetAssetsCompartmentId() *string { return m.AssetsCompartmentId } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m assetsource) GetLifecycleState() AssetSourceLifecycleStateEnum { return m.LifecycleState } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m assetsource) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m assetsource) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m assetsource) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetDiscoveryScheduleId returns DiscoveryScheduleId -func (m assetsource) GetDiscoveryScheduleId() *string { - return m.DiscoveryScheduleId -} - -//GetFreeformTags returns FreeformTags -func (m assetsource) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m assetsource) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - -//GetSystemTags returns SystemTags -func (m assetsource) GetSystemTags() map[string]map[string]interface{} { - return m.SystemTags -} - func (m assetsource) String() string { return common.PointerString(m) } diff --git a/cloudbridge/asset_source_collection.go b/cloudbridge/asset_source_collection.go index 3bed45d5e1..037ebc1c50 100644 --- a/cloudbridge/asset_source_collection.go +++ b/cloudbridge/asset_source_collection.go @@ -62,6 +62,5 @@ func (m *AssetSourceCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/cloudbridge/asset_source_summary.go b/cloudbridge/asset_source_summary.go index 8fa4d3b52b..04e3c98b46 100644 --- a/cloudbridge/asset_source_summary.go +++ b/cloudbridge/asset_source_summary.go @@ -68,6 +68,11 @@ type AssetSourceSummary interface { type assetsourcesummary struct { JsonData []byte + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + 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"` Id *string `mandatory:"true" json:"id"` CompartmentId *string `mandatory:"true" json:"compartmentId"` EnvironmentId *string `mandatory:"true" json:"environmentId"` @@ -76,11 +81,6 @@ type assetsourcesummary struct { LifecycleDetails *string `mandatory:"true" json:"lifecycleDetails"` InventoryId *string `mandatory:"true" json:"inventoryId"` AssetsCompartmentId *string `mandatory:"true" json:"assetsCompartmentId"` - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - 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"` Type string `json:"type"` } @@ -132,71 +132,71 @@ func (m *assetsourcesummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetId returns Id +// GetTimeCreated returns TimeCreated +func (m assetsourcesummary) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m assetsourcesummary) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetFreeformTags returns FreeformTags +func (m assetsourcesummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m assetsourcesummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m assetsourcesummary) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetId returns Id func (m assetsourcesummary) GetId() *string { return m.Id } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m assetsourcesummary) GetCompartmentId() *string { return m.CompartmentId } -//GetEnvironmentId returns EnvironmentId +// GetEnvironmentId returns EnvironmentId func (m assetsourcesummary) GetEnvironmentId() *string { return m.EnvironmentId } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m assetsourcesummary) GetDisplayName() *string { return m.DisplayName } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m assetsourcesummary) GetLifecycleState() AssetSourceLifecycleStateEnum { return m.LifecycleState } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m assetsourcesummary) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetInventoryId returns InventoryId +// GetInventoryId returns InventoryId func (m assetsourcesummary) GetInventoryId() *string { return m.InventoryId } -//GetAssetsCompartmentId returns AssetsCompartmentId +// GetAssetsCompartmentId returns AssetsCompartmentId func (m assetsourcesummary) GetAssetsCompartmentId() *string { return m.AssetsCompartmentId } -//GetTimeCreated returns TimeCreated -func (m assetsourcesummary) GetTimeCreated() *common.SDKTime { - return m.TimeCreated -} - -//GetTimeUpdated returns TimeUpdated -func (m assetsourcesummary) GetTimeUpdated() *common.SDKTime { - return m.TimeUpdated -} - -//GetFreeformTags returns FreeformTags -func (m assetsourcesummary) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m assetsourcesummary) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - -//GetSystemTags returns SystemTags -func (m assetsourcesummary) GetSystemTags() map[string]map[string]interface{} { - return m.SystemTags -} - func (m assetsourcesummary) String() string { return common.PointerString(m) } diff --git a/cloudbridge/cloudbridge_common_client.go b/cloudbridge/cloudbridge_common_client.go index 05b9e86d08..abba3a7b0f 100644 --- a/cloudbridge/cloudbridge_common_client.go +++ b/cloudbridge/cloudbridge_common_client.go @@ -80,7 +80,7 @@ func (client *CommonClient) setConfigurationProvider(configProvider common.Confi 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/cloudbridge/cloudbridge_discovery_client.go b/cloudbridge/cloudbridge_discovery_client.go index 483d8830cd..1ca90f42e4 100644 --- a/cloudbridge/cloudbridge_discovery_client.go +++ b/cloudbridge/cloudbridge_discovery_client.go @@ -80,7 +80,7 @@ func (client *DiscoveryClient) setConfigurationProvider(configProvider common.Co 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/cloudbridge/cloudbridge_inventory_client.go b/cloudbridge/cloudbridge_inventory_client.go index 17f55a9e44..ec8ffdb2c8 100644 --- a/cloudbridge/cloudbridge_inventory_client.go +++ b/cloudbridge/cloudbridge_inventory_client.go @@ -80,7 +80,7 @@ func (client *InventoryClient) setConfigurationProvider(configProvider common.Co 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/cloudbridge/cloudbridge_ocbagentsvc_client.go b/cloudbridge/cloudbridge_ocbagentsvc_client.go index 92d8365952..9d3d9ed88e 100644 --- a/cloudbridge/cloudbridge_ocbagentsvc_client.go +++ b/cloudbridge/cloudbridge_ocbagentsvc_client.go @@ -80,7 +80,7 @@ func (client *OcbAgentSvcClient) setConfigurationProvider(configProvider common. 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/cloudbridge/create_asset_details.go b/cloudbridge/create_asset_details.go index 7d38e9bb63..7f6bb1dfae 100644 --- a/cloudbridge/create_asset_details.go +++ b/cloudbridge/create_asset_details.go @@ -50,14 +50,14 @@ type CreateAssetDetails interface { type createassetdetails struct { JsonData []byte - InventoryId *string `mandatory:"true" json:"inventoryId"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` - SourceKey *string `mandatory:"true" json:"sourceKey"` - ExternalAssetKey *string `mandatory:"true" json:"externalAssetKey"` DisplayName *string `mandatory:"false" json:"displayName"` AssetSourceIds []string `mandatory:"false" json:"assetSourceIds"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + InventoryId *string `mandatory:"true" json:"inventoryId"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + SourceKey *string `mandatory:"true" json:"sourceKey"` + ExternalAssetKey *string `mandatory:"true" json:"externalAssetKey"` AssetType string `json:"assetType"` } @@ -104,46 +104,46 @@ func (m *createassetdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetInventoryId returns InventoryId -func (m createassetdetails) GetInventoryId() *string { - return m.InventoryId -} - -//GetCompartmentId returns CompartmentId -func (m createassetdetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetSourceKey returns SourceKey -func (m createassetdetails) GetSourceKey() *string { - return m.SourceKey -} - -//GetExternalAssetKey returns ExternalAssetKey -func (m createassetdetails) GetExternalAssetKey() *string { - return m.ExternalAssetKey -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createassetdetails) GetDisplayName() *string { return m.DisplayName } -//GetAssetSourceIds returns AssetSourceIds +// GetAssetSourceIds returns AssetSourceIds func (m createassetdetails) GetAssetSourceIds() []string { return m.AssetSourceIds } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createassetdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createassetdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetInventoryId returns InventoryId +func (m createassetdetails) GetInventoryId() *string { + return m.InventoryId +} + +// GetCompartmentId returns CompartmentId +func (m createassetdetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetSourceKey returns SourceKey +func (m createassetdetails) GetSourceKey() *string { + return m.SourceKey +} + +// GetExternalAssetKey returns ExternalAssetKey +func (m createassetdetails) GetExternalAssetKey() *string { + return m.ExternalAssetKey +} + func (m createassetdetails) String() string { return common.PointerString(m) } diff --git a/cloudbridge/create_asset_source_details.go b/cloudbridge/create_asset_source_details.go index 59e7b7d588..7757de26ba 100644 --- a/cloudbridge/create_asset_source_details.go +++ b/cloudbridge/create_asset_source_details.go @@ -57,15 +57,15 @@ type CreateAssetSourceDetails interface { type createassetsourcedetails struct { JsonData []byte - CompartmentId *string `mandatory:"true" json:"compartmentId"` - EnvironmentId *string `mandatory:"true" json:"environmentId"` - InventoryId *string `mandatory:"true" json:"inventoryId"` - AssetsCompartmentId *string `mandatory:"true" json:"assetsCompartmentId"` DisplayName *string `mandatory:"false" json:"displayName"` DiscoveryScheduleId *string `mandatory:"false" json:"discoveryScheduleId"` 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"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + EnvironmentId *string `mandatory:"true" json:"environmentId"` + InventoryId *string `mandatory:"true" json:"inventoryId"` + AssetsCompartmentId *string `mandatory:"true" json:"assetsCompartmentId"` Type string `json:"type"` } @@ -113,51 +113,51 @@ func (m *createassetsourcedetails) UnmarshalPolymorphicJSON(data []byte) (interf } } -//GetCompartmentId returns CompartmentId -func (m createassetsourcedetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetEnvironmentId returns EnvironmentId -func (m createassetsourcedetails) GetEnvironmentId() *string { - return m.EnvironmentId -} - -//GetInventoryId returns InventoryId -func (m createassetsourcedetails) GetInventoryId() *string { - return m.InventoryId -} - -//GetAssetsCompartmentId returns AssetsCompartmentId -func (m createassetsourcedetails) GetAssetsCompartmentId() *string { - return m.AssetsCompartmentId -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createassetsourcedetails) GetDisplayName() *string { return m.DisplayName } -//GetDiscoveryScheduleId returns DiscoveryScheduleId +// GetDiscoveryScheduleId returns DiscoveryScheduleId func (m createassetsourcedetails) GetDiscoveryScheduleId() *string { return m.DiscoveryScheduleId } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createassetsourcedetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createassetsourcedetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m createassetsourcedetails) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetCompartmentId returns CompartmentId +func (m createassetsourcedetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetEnvironmentId returns EnvironmentId +func (m createassetsourcedetails) GetEnvironmentId() *string { + return m.EnvironmentId +} + +// GetInventoryId returns InventoryId +func (m createassetsourcedetails) GetInventoryId() *string { + return m.InventoryId +} + +// GetAssetsCompartmentId returns AssetsCompartmentId +func (m createassetsourcedetails) GetAssetsCompartmentId() *string { + return m.AssetsCompartmentId +} + func (m createassetsourcedetails) String() string { return common.PointerString(m) } diff --git a/cloudbridge/import_inventory_details.go b/cloudbridge/import_inventory_details.go index 3a65def405..072b970e3b 100644 --- a/cloudbridge/import_inventory_details.go +++ b/cloudbridge/import_inventory_details.go @@ -35,9 +35,9 @@ type ImportInventoryDetails interface { type importinventorydetails struct { JsonData []byte - CompartmentId *string `mandatory:"true" json:"compartmentId"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` ResourceType string `json:"resourceType"` } @@ -79,21 +79,21 @@ func (m *importinventorydetails) UnmarshalPolymorphicJSON(data []byte) (interfac } } -//GetCompartmentId returns CompartmentId -func (m importinventorydetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m importinventorydetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m importinventorydetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetCompartmentId returns CompartmentId +func (m importinventorydetails) GetCompartmentId() *string { + return m.CompartmentId +} + func (m importinventorydetails) String() string { return common.PointerString(m) } diff --git a/cloudbridge/update_asset_details.go b/cloudbridge/update_asset_details.go index 1166f5d6a3..c81578a6a2 100644 --- a/cloudbridge/update_asset_details.go +++ b/cloudbridge/update_asset_details.go @@ -88,22 +88,22 @@ func (m *updateassetdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m updateassetdetails) GetDisplayName() *string { return m.DisplayName } -//GetAssetSourceIds returns AssetSourceIds +// GetAssetSourceIds returns AssetSourceIds func (m updateassetdetails) GetAssetSourceIds() []string { return m.AssetSourceIds } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updateassetdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updateassetdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/cloudbridge/update_asset_source_details.go b/cloudbridge/update_asset_source_details.go index 0a02be76d1..cd174b59c7 100644 --- a/cloudbridge/update_asset_source_details.go +++ b/cloudbridge/update_asset_source_details.go @@ -92,27 +92,27 @@ func (m *updateassetsourcedetails) UnmarshalPolymorphicJSON(data []byte) (interf } } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m updateassetsourcedetails) GetDisplayName() *string { return m.DisplayName } -//GetAssetsCompartmentId returns AssetsCompartmentId +// GetAssetsCompartmentId returns AssetsCompartmentId func (m updateassetsourcedetails) GetAssetsCompartmentId() *string { return m.AssetsCompartmentId } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updateassetsourcedetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updateassetsourcedetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m updateassetsourcedetails) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } diff --git a/cloudguard/cloudguard_client.go b/cloudguard/cloudguard_client.go index fee5cb5850..9f5c2da75d 100644 --- a/cloudguard/cloudguard_client.go +++ b/cloudguard/cloudguard_client.go @@ -81,7 +81,7 @@ func (client *CloudGuardClient) setConfigurationProvider(configProvider common.C 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/cloudguard/create_data_mask_rule_details.go b/cloudguard/create_data_mask_rule_details.go index 4d7329f368..668a236dab 100644 --- a/cloudguard/create_data_mask_rule_details.go +++ b/cloudguard/create_data_mask_rule_details.go @@ -129,9 +129,6 @@ func (m *CreateDataMaskRuleDetails) UnmarshalJSON(data []byte) (e error) { } m.DataMaskCategories = make([]DataMaskCategoryEnum, len(model.DataMaskCategories)) - for i, n := range model.DataMaskCategories { - m.DataMaskCategories[i] = n - } - + copy(m.DataMaskCategories, model.DataMaskCategories) return } diff --git a/cloudguard/create_detector_rule_details.go b/cloudguard/create_detector_rule_details.go index 4b84ef7d10..3d02c0dfe0 100644 --- a/cloudguard/create_detector_rule_details.go +++ b/cloudguard/create_detector_rule_details.go @@ -102,10 +102,7 @@ func (m *CreateDetectorRuleDetails) UnmarshalJSON(data []byte) (e error) { m.RiskLevel = model.RiskLevel m.Configurations = make([]DetectorConfiguration, len(model.Configurations)) - for i, n := range model.Configurations { - m.Configurations[i] = n - } - + copy(m.Configurations, model.Configurations) nn, e = model.Condition.UnmarshalPolymorphicJSON(model.Condition.JsonData) if e != nil { return @@ -117,19 +114,13 @@ func (m *CreateDetectorRuleDetails) UnmarshalJSON(data []byte) (e error) { } m.Labels = make([]string, len(model.Labels)) - for i, n := range model.Labels { - m.Labels[i] = n - } - + copy(m.Labels, model.Labels) m.Recommendation = model.Recommendation m.DataSourceId = model.DataSourceId m.EntitiesMappings = make([]EntitiesMapping, len(model.EntitiesMappings)) - for i, n := range model.EntitiesMappings { - m.EntitiesMappings[i] = n - } - + copy(m.EntitiesMappings, model.EntitiesMappings) m.Name = model.Name return diff --git a/cloudguard/data_mask_rule.go b/cloudguard/data_mask_rule.go index 7b9684ae16..e78a635055 100644 --- a/cloudguard/data_mask_rule.go +++ b/cloudguard/data_mask_rule.go @@ -129,10 +129,7 @@ func (m *DataMaskRule) UnmarshalJSON(data []byte) (e error) { m.Description = model.Description m.DataMaskCategories = make([]DataMaskCategoryEnum, len(model.DataMaskCategories)) - for i, n := range model.DataMaskCategories { - m.DataMaskCategories[i] = n - } - + copy(m.DataMaskCategories, model.DataMaskCategories) m.TimeCreated = model.TimeCreated m.TimeUpdated = model.TimeUpdated diff --git a/cloudguard/data_mask_rule_summary.go b/cloudguard/data_mask_rule_summary.go index fb08f27ea4..15f9a4fdde 100644 --- a/cloudguard/data_mask_rule_summary.go +++ b/cloudguard/data_mask_rule_summary.go @@ -129,10 +129,7 @@ func (m *DataMaskRuleSummary) UnmarshalJSON(data []byte) (e error) { m.Description = model.Description m.DataMaskCategories = make([]DataMaskCategoryEnum, len(model.DataMaskCategories)) - for i, n := range model.DataMaskCategories { - m.DataMaskCategories[i] = n - } - + copy(m.DataMaskCategories, model.DataMaskCategories) m.TimeCreated = model.TimeCreated m.TimeUpdated = model.TimeUpdated diff --git a/cloudguard/data_source.go b/cloudguard/data_source.go index 09da6efeab..fb8e274bca 100644 --- a/cloudguard/data_source.go +++ b/cloudguard/data_source.go @@ -134,15 +134,9 @@ func (m *DataSource) UnmarshalJSON(data []byte) (e error) { m.Status = model.Status m.DataSourceDetectorMappingInfo = make([]DataSourceMappingInfo, len(model.DataSourceDetectorMappingInfo)) - for i, n := range model.DataSourceDetectorMappingInfo { - m.DataSourceDetectorMappingInfo[i] = n - } - + copy(m.DataSourceDetectorMappingInfo, model.DataSourceDetectorMappingInfo) m.RegionStatusDetail = make([]RegionStatusDetail, len(model.RegionStatusDetail)) - for i, n := range model.RegionStatusDetail { - m.RegionStatusDetail[i] = n - } - + copy(m.RegionStatusDetail, model.RegionStatusDetail) m.LifecycleState = model.LifecycleState m.FreeformTags = model.FreeformTags diff --git a/cloudguard/detector_details.go b/cloudguard/detector_details.go index 75796ac359..4170914a20 100644 --- a/cloudguard/detector_details.go +++ b/cloudguard/detector_details.go @@ -88,10 +88,7 @@ func (m *DetectorDetails) UnmarshalJSON(data []byte) (e error) { m.RiskLevel = model.RiskLevel m.Configurations = make([]DetectorConfiguration, len(model.Configurations)) - for i, n := range model.Configurations { - m.Configurations[i] = n - } - + copy(m.Configurations, model.Configurations) nn, e = model.Condition.UnmarshalPolymorphicJSON(model.Condition.JsonData) if e != nil { return @@ -103,24 +100,15 @@ func (m *DetectorDetails) UnmarshalJSON(data []byte) (e error) { } m.Labels = make([]string, len(model.Labels)) - for i, n := range model.Labels { - m.Labels[i] = n - } - + copy(m.Labels, model.Labels) m.IsConfigurationAllowed = model.IsConfigurationAllowed m.ProblemThreshold = model.ProblemThreshold m.TargetTypes = make([]string, len(model.TargetTypes)) - for i, n := range model.TargetTypes { - m.TargetTypes[i] = n - } - + copy(m.TargetTypes, model.TargetTypes) m.SightingTypes = make([]SightingType, len(model.SightingTypes)) - for i, n := range model.SightingTypes { - m.SightingTypes[i] = n - } - + copy(m.SightingTypes, model.SightingTypes) m.IsEnabled = model.IsEnabled return diff --git a/cloudguard/logging_query_data_source_details.go b/cloudguard/logging_query_data_source_details.go index 9be6ee6547..e2d9b28558 100644 --- a/cloudguard/logging_query_data_source_details.go +++ b/cloudguard/logging_query_data_source_details.go @@ -102,10 +102,7 @@ func (m *LoggingQueryDataSourceDetails) UnmarshalJSON(data []byte) (e error) { } var nn interface{} m.Regions = make([]string, len(model.Regions)) - for i, n := range model.Regions { - m.Regions[i] = n - } - + copy(m.Regions, model.Regions) m.Query = model.Query m.IntervalInMinutes = model.IntervalInMinutes diff --git a/cloudguard/responder_rule_details.go b/cloudguard/responder_rule_details.go index ed4d47b101..f14d09a79e 100644 --- a/cloudguard/responder_rule_details.go +++ b/cloudguard/responder_rule_details.go @@ -76,10 +76,7 @@ func (m *ResponderRuleDetails) UnmarshalJSON(data []byte) (e error) { } m.Configurations = make([]ResponderConfiguration, len(model.Configurations)) - for i, n := range model.Configurations { - m.Configurations[i] = n - } - + copy(m.Configurations, model.Configurations) m.Mode = model.Mode m.IsEnabled = model.IsEnabled diff --git a/cloudguard/responder_rule_execution_details.go b/cloudguard/responder_rule_execution_details.go index f46ec66987..3a01b7454a 100644 --- a/cloudguard/responder_rule_execution_details.go +++ b/cloudguard/responder_rule_execution_details.go @@ -64,9 +64,6 @@ func (m *ResponderRuleExecutionDetails) UnmarshalJSON(data []byte) (e error) { } m.Configurations = make([]ResponderConfiguration, len(model.Configurations)) - for i, n := range model.Configurations { - m.Configurations[i] = n - } - + copy(m.Configurations, model.Configurations) return } diff --git a/cloudguard/target.go b/cloudguard/target.go index ade1d2f84a..96363f674e 100644 --- a/cloudguard/target.go +++ b/cloudguard/target.go @@ -135,15 +135,9 @@ func (m *Target) UnmarshalJSON(data []byte) (e error) { m.Description = model.Description m.TargetDetectorRecipes = make([]TargetDetectorRecipe, len(model.TargetDetectorRecipes)) - for i, n := range model.TargetDetectorRecipes { - m.TargetDetectorRecipes[i] = n - } - + copy(m.TargetDetectorRecipes, model.TargetDetectorRecipes) m.TargetResponderRecipes = make([]TargetResponderRecipe, len(model.TargetResponderRecipes)) - for i, n := range model.TargetResponderRecipes { - m.TargetResponderRecipes[i] = n - } - + copy(m.TargetResponderRecipes, model.TargetResponderRecipes) nn, e = model.TargetDetails.UnmarshalPolymorphicJSON(model.TargetDetails.JsonData) if e != nil { return @@ -155,10 +149,7 @@ func (m *Target) UnmarshalJSON(data []byte) (e error) { } m.InheritedByCompartments = make([]string, len(model.InheritedByCompartments)) - for i, n := range model.InheritedByCompartments { - m.InheritedByCompartments[i] = n - } - + copy(m.InheritedByCompartments, model.InheritedByCompartments) m.TimeCreated = model.TimeCreated m.TimeUpdated = model.TimeUpdated diff --git a/cloudguard/update_data_mask_rule_details.go b/cloudguard/update_data_mask_rule_details.go index 9bf4f24bb0..343545b880 100644 --- a/cloudguard/update_data_mask_rule_details.go +++ b/cloudguard/update_data_mask_rule_details.go @@ -108,10 +108,7 @@ func (m *UpdateDataMaskRuleDetails) UnmarshalJSON(data []byte) (e error) { } m.DataMaskCategories = make([]DataMaskCategoryEnum, len(model.DataMaskCategories)) - for i, n := range model.DataMaskCategories { - m.DataMaskCategories[i] = n - } - + copy(m.DataMaskCategories, model.DataMaskCategories) m.DataMaskRuleStatus = model.DataMaskRuleStatus m.FreeformTags = model.FreeformTags diff --git a/cloudguard/update_detector_rule_details.go b/cloudguard/update_detector_rule_details.go index 207694f8b0..dacefd95f3 100644 --- a/cloudguard/update_detector_rule_details.go +++ b/cloudguard/update_detector_rule_details.go @@ -88,10 +88,7 @@ func (m *UpdateDetectorRuleDetails) UnmarshalJSON(data []byte) (e error) { m.RiskLevel = model.RiskLevel m.Configurations = make([]DetectorConfiguration, len(model.Configurations)) - for i, n := range model.Configurations { - m.Configurations[i] = n - } - + copy(m.Configurations, model.Configurations) nn, e = model.Condition.UnmarshalPolymorphicJSON(model.Condition.JsonData) if e != nil { return @@ -103,10 +100,7 @@ func (m *UpdateDetectorRuleDetails) UnmarshalJSON(data []byte) (e error) { } m.Labels = make([]string, len(model.Labels)) - for i, n := range model.Labels { - m.Labels[i] = n - } - + copy(m.Labels, model.Labels) m.Description = model.Description m.Recommendation = model.Recommendation @@ -114,10 +108,7 @@ func (m *UpdateDetectorRuleDetails) UnmarshalJSON(data []byte) (e error) { m.DataSourceId = model.DataSourceId m.EntitiesMappings = make([]EntitiesMapping, len(model.EntitiesMappings)) - for i, n := range model.EntitiesMappings { - m.EntitiesMappings[i] = n - } - + copy(m.EntitiesMappings, model.EntitiesMappings) m.IsEnabled = model.IsEnabled return diff --git a/cloudguard/update_target_responder_rule_details.go b/cloudguard/update_target_responder_rule_details.go index 4839500d5d..8cfcb493ba 100644 --- a/cloudguard/update_target_responder_rule_details.go +++ b/cloudguard/update_target_responder_rule_details.go @@ -71,10 +71,7 @@ func (m *UpdateTargetResponderRuleDetails) UnmarshalJSON(data []byte) (e error) } m.Configurations = make([]ResponderConfiguration, len(model.Configurations)) - for i, n := range model.Configurations { - m.Configurations[i] = n - } - + copy(m.Configurations, model.Configurations) m.Mode = model.Mode return diff --git a/cloudmigrations/asset_source.go b/cloudmigrations/asset_source.go index 45e0f738c6..1805fafad3 100644 --- a/cloudmigrations/asset_source.go +++ b/cloudmigrations/asset_source.go @@ -68,6 +68,10 @@ type AssetSource interface { type assetsource struct { JsonData []byte + DiscoveryScheduleId *string `mandatory:"false" json:"discoveryScheduleId"` + 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"` Id *string `mandatory:"true" json:"id"` CompartmentId *string `mandatory:"true" json:"compartmentId"` DisplayName *string `mandatory:"true" json:"displayName"` @@ -78,10 +82,6 @@ type assetsource struct { LifecycleDetails *string `mandatory:"true" json:"lifecycleDetails"` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` - DiscoveryScheduleId *string `mandatory:"false" json:"discoveryScheduleId"` - 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"` Type string `json:"type"` } @@ -134,76 +134,76 @@ func (m *assetsource) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) } } -//GetId returns Id +// GetDiscoveryScheduleId returns DiscoveryScheduleId +func (m assetsource) GetDiscoveryScheduleId() *string { + return m.DiscoveryScheduleId +} + +// GetFreeformTags returns FreeformTags +func (m assetsource) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m assetsource) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m assetsource) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetId returns Id func (m assetsource) GetId() *string { return m.Id } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m assetsource) GetCompartmentId() *string { return m.CompartmentId } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m assetsource) GetDisplayName() *string { return m.DisplayName } -//GetEnvironmentId returns EnvironmentId +// GetEnvironmentId returns EnvironmentId func (m assetsource) GetEnvironmentId() *string { return m.EnvironmentId } -//GetInventoryId returns InventoryId +// GetInventoryId returns InventoryId func (m assetsource) GetInventoryId() *string { return m.InventoryId } -//GetAssetsCompartmentId returns AssetsCompartmentId +// GetAssetsCompartmentId returns AssetsCompartmentId func (m assetsource) GetAssetsCompartmentId() *string { return m.AssetsCompartmentId } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m assetsource) GetLifecycleState() AssetSourceLifecycleStateEnum { return m.LifecycleState } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m assetsource) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m assetsource) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m assetsource) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetDiscoveryScheduleId returns DiscoveryScheduleId -func (m assetsource) GetDiscoveryScheduleId() *string { - return m.DiscoveryScheduleId -} - -//GetFreeformTags returns FreeformTags -func (m assetsource) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m assetsource) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - -//GetSystemTags returns SystemTags -func (m assetsource) GetSystemTags() map[string]map[string]interface{} { - return m.SystemTags -} - func (m assetsource) String() string { return common.PointerString(m) } diff --git a/cloudmigrations/asset_source_collection.go b/cloudmigrations/asset_source_collection.go index 9a8a7c4e64..0651139f42 100644 --- a/cloudmigrations/asset_source_collection.go +++ b/cloudmigrations/asset_source_collection.go @@ -62,6 +62,5 @@ func (m *AssetSourceCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/cloudmigrations/asset_source_summary.go b/cloudmigrations/asset_source_summary.go index bf3f66d9b0..3388d78ecb 100644 --- a/cloudmigrations/asset_source_summary.go +++ b/cloudmigrations/asset_source_summary.go @@ -65,6 +65,11 @@ type AssetSourceSummary interface { type assetsourcesummary struct { JsonData []byte + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + 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"` Id *string `mandatory:"true" json:"id"` CompartmentId *string `mandatory:"true" json:"compartmentId"` EnvironmentId *string `mandatory:"true" json:"environmentId"` @@ -73,11 +78,6 @@ type assetsourcesummary struct { LifecycleDetails *string `mandatory:"true" json:"lifecycleDetails"` InventoryId *string `mandatory:"true" json:"inventoryId"` AssetsCompartmentId *string `mandatory:"true" json:"assetsCompartmentId"` - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - 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"` Type string `json:"type"` } @@ -129,71 +129,71 @@ func (m *assetsourcesummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetId returns Id +// GetTimeCreated returns TimeCreated +func (m assetsourcesummary) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m assetsourcesummary) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetFreeformTags returns FreeformTags +func (m assetsourcesummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m assetsourcesummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m assetsourcesummary) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetId returns Id func (m assetsourcesummary) GetId() *string { return m.Id } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m assetsourcesummary) GetCompartmentId() *string { return m.CompartmentId } -//GetEnvironmentId returns EnvironmentId +// GetEnvironmentId returns EnvironmentId func (m assetsourcesummary) GetEnvironmentId() *string { return m.EnvironmentId } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m assetsourcesummary) GetDisplayName() *string { return m.DisplayName } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m assetsourcesummary) GetLifecycleState() AssetSourceLifecycleStateEnum { return m.LifecycleState } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m assetsourcesummary) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetInventoryId returns InventoryId +// GetInventoryId returns InventoryId func (m assetsourcesummary) GetInventoryId() *string { return m.InventoryId } -//GetAssetsCompartmentId returns AssetsCompartmentId +// GetAssetsCompartmentId returns AssetsCompartmentId func (m assetsourcesummary) GetAssetsCompartmentId() *string { return m.AssetsCompartmentId } -//GetTimeCreated returns TimeCreated -func (m assetsourcesummary) GetTimeCreated() *common.SDKTime { - return m.TimeCreated -} - -//GetTimeUpdated returns TimeUpdated -func (m assetsourcesummary) GetTimeUpdated() *common.SDKTime { - return m.TimeUpdated -} - -//GetFreeformTags returns FreeformTags -func (m assetsourcesummary) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m assetsourcesummary) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - -//GetSystemTags returns SystemTags -func (m assetsourcesummary) GetSystemTags() map[string]map[string]interface{} { - return m.SystemTags -} - func (m assetsourcesummary) String() string { return common.PointerString(m) } diff --git a/cloudmigrations/cloudmigrations_migration_client.go b/cloudmigrations/cloudmigrations_migration_client.go index f331f9af8d..f36972741f 100644 --- a/cloudmigrations/cloudmigrations_migration_client.go +++ b/cloudmigrations/cloudmigrations_migration_client.go @@ -80,7 +80,7 @@ func (client *MigrationClient) setConfigurationProvider(configProvider common.Co 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/cloudmigrations/create_asset_source_details.go b/cloudmigrations/create_asset_source_details.go index a543e5b8c5..559129a32a 100644 --- a/cloudmigrations/create_asset_source_details.go +++ b/cloudmigrations/create_asset_source_details.go @@ -54,15 +54,15 @@ type CreateAssetSourceDetails interface { type createassetsourcedetails struct { JsonData []byte - CompartmentId *string `mandatory:"true" json:"compartmentId"` - EnvironmentId *string `mandatory:"true" json:"environmentId"` - InventoryId *string `mandatory:"true" json:"inventoryId"` - AssetsCompartmentId *string `mandatory:"true" json:"assetsCompartmentId"` DisplayName *string `mandatory:"false" json:"displayName"` DiscoveryScheduleId *string `mandatory:"false" json:"discoveryScheduleId"` 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"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + EnvironmentId *string `mandatory:"true" json:"environmentId"` + InventoryId *string `mandatory:"true" json:"inventoryId"` + AssetsCompartmentId *string `mandatory:"true" json:"assetsCompartmentId"` Type string `json:"type"` } @@ -110,51 +110,51 @@ func (m *createassetsourcedetails) UnmarshalPolymorphicJSON(data []byte) (interf } } -//GetCompartmentId returns CompartmentId -func (m createassetsourcedetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetEnvironmentId returns EnvironmentId -func (m createassetsourcedetails) GetEnvironmentId() *string { - return m.EnvironmentId -} - -//GetInventoryId returns InventoryId -func (m createassetsourcedetails) GetInventoryId() *string { - return m.InventoryId -} - -//GetAssetsCompartmentId returns AssetsCompartmentId -func (m createassetsourcedetails) GetAssetsCompartmentId() *string { - return m.AssetsCompartmentId -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createassetsourcedetails) GetDisplayName() *string { return m.DisplayName } -//GetDiscoveryScheduleId returns DiscoveryScheduleId +// GetDiscoveryScheduleId returns DiscoveryScheduleId func (m createassetsourcedetails) GetDiscoveryScheduleId() *string { return m.DiscoveryScheduleId } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createassetsourcedetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createassetsourcedetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m createassetsourcedetails) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetCompartmentId returns CompartmentId +func (m createassetsourcedetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetEnvironmentId returns EnvironmentId +func (m createassetsourcedetails) GetEnvironmentId() *string { + return m.EnvironmentId +} + +// GetInventoryId returns InventoryId +func (m createassetsourcedetails) GetInventoryId() *string { + return m.InventoryId +} + +// GetAssetsCompartmentId returns AssetsCompartmentId +func (m createassetsourcedetails) GetAssetsCompartmentId() *string { + return m.AssetsCompartmentId +} + func (m createassetsourcedetails) String() string { return common.PointerString(m) } diff --git a/cloudmigrations/create_migration_plan_details.go b/cloudmigrations/create_migration_plan_details.go index 311f531280..7f86a94200 100644 --- a/cloudmigrations/create_migration_plan_details.go +++ b/cloudmigrations/create_migration_plan_details.go @@ -94,7 +94,6 @@ func (m *CreateMigrationPlanDetails) UnmarshalJSON(data []byte) (e error) { m.Strategies[i] = nil } } - m.TargetEnvironments = make([]TargetEnvironment, len(model.TargetEnvironments)) for i, n := range model.TargetEnvironments { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -107,7 +106,6 @@ func (m *CreateMigrationPlanDetails) UnmarshalJSON(data []byte) (e error) { m.TargetEnvironments[i] = nil } } - m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/cloudmigrations/create_target_asset_details.go b/cloudmigrations/create_target_asset_details.go index 9470a53269..56b4e4735d 100644 --- a/cloudmigrations/create_target_asset_details.go +++ b/cloudmigrations/create_target_asset_details.go @@ -70,12 +70,12 @@ func (m *createtargetassetdetails) UnmarshalPolymorphicJSON(data []byte) (interf } } -//GetMigrationPlanId returns MigrationPlanId +// GetMigrationPlanId returns MigrationPlanId func (m createtargetassetdetails) GetMigrationPlanId() *string { return m.MigrationPlanId } -//GetIsExcludedFromExecution returns IsExcludedFromExecution +// GetIsExcludedFromExecution returns IsExcludedFromExecution func (m createtargetassetdetails) GetIsExcludedFromExecution() *bool { return m.IsExcludedFromExecution } diff --git a/cloudmigrations/migration_plan.go b/cloudmigrations/migration_plan.go index 4ccef393ca..8f2da96203 100644 --- a/cloudmigrations/migration_plan.go +++ b/cloudmigrations/migration_plan.go @@ -159,7 +159,6 @@ func (m *MigrationPlan) UnmarshalJSON(data []byte) (e error) { m.Strategies[i] = nil } } - m.CalculatedLimits = model.CalculatedLimits m.TargetEnvironments = make([]TargetEnvironment, len(model.TargetEnvironments)) @@ -174,7 +173,6 @@ func (m *MigrationPlan) UnmarshalJSON(data []byte) (e error) { m.TargetEnvironments[i] = nil } } - return } diff --git a/cloudmigrations/migration_plan_summary.go b/cloudmigrations/migration_plan_summary.go index 60194a621e..76469afb5a 100644 --- a/cloudmigrations/migration_plan_summary.go +++ b/cloudmigrations/migration_plan_summary.go @@ -159,7 +159,6 @@ func (m *MigrationPlanSummary) UnmarshalJSON(data []byte) (e error) { m.Strategies[i] = nil } } - m.CalculatedLimits = model.CalculatedLimits m.TargetEnvironments = make([]TargetEnvironment, len(model.TargetEnvironments)) @@ -174,6 +173,5 @@ func (m *MigrationPlanSummary) UnmarshalJSON(data []byte) (e error) { m.TargetEnvironments[i] = nil } } - return } diff --git a/cloudmigrations/resource_assessment_strategy.go b/cloudmigrations/resource_assessment_strategy.go index a3c8c93680..7041177b60 100644 --- a/cloudmigrations/resource_assessment_strategy.go +++ b/cloudmigrations/resource_assessment_strategy.go @@ -77,7 +77,7 @@ func (m *resourceassessmentstrategy) UnmarshalPolymorphicJSON(data []byte) (inte } } -//GetResourceType returns ResourceType +// GetResourceType returns ResourceType func (m resourceassessmentstrategy) GetResourceType() ResourceAssessmentStrategyResourceTypeEnum { return m.ResourceType } diff --git a/cloudmigrations/target_asset.go b/cloudmigrations/target_asset.go index 1a02f8b777..896c08a032 100644 --- a/cloudmigrations/target_asset.go +++ b/cloudmigrations/target_asset.go @@ -62,6 +62,12 @@ type TargetAsset interface { type targetasset struct { JsonData []byte + DisplayName *string `mandatory:"false" json:"displayName"` + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + CompartmentId *string `mandatory:"false" json:"compartmentId"` + CreatedResourceId *string `mandatory:"false" json:"createdResourceId"` + CompatibilityMessages []CompatibilityMessage `mandatory:"false" json:"compatibilityMessages"` + MigrationAsset *MigrationAsset `mandatory:"false" json:"migrationAsset"` Id *string `mandatory:"true" json:"id"` LifecycleState TargetAssetLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` MigrationPlanId *string `mandatory:"true" json:"migrationPlanId"` @@ -70,12 +76,6 @@ type targetasset struct { TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` TimeAssessed *common.SDKTime `mandatory:"true" json:"timeAssessed"` - DisplayName *string `mandatory:"false" json:"displayName"` - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - CompartmentId *string `mandatory:"false" json:"compartmentId"` - CreatedResourceId *string `mandatory:"false" json:"createdResourceId"` - CompatibilityMessages []CompatibilityMessage `mandatory:"false" json:"compatibilityMessages"` - MigrationAsset *MigrationAsset `mandatory:"false" json:"migrationAsset"` Type string `json:"type"` } @@ -128,76 +128,76 @@ func (m *targetasset) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) } } -//GetId returns Id +// GetDisplayName returns DisplayName +func (m targetasset) GetDisplayName() *string { + return m.DisplayName +} + +// GetLifecycleDetails returns LifecycleDetails +func (m targetasset) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetCompartmentId returns CompartmentId +func (m targetasset) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetCreatedResourceId returns CreatedResourceId +func (m targetasset) GetCreatedResourceId() *string { + return m.CreatedResourceId +} + +// GetCompatibilityMessages returns CompatibilityMessages +func (m targetasset) GetCompatibilityMessages() []CompatibilityMessage { + return m.CompatibilityMessages +} + +// GetMigrationAsset returns MigrationAsset +func (m targetasset) GetMigrationAsset() *MigrationAsset { + return m.MigrationAsset +} + +// GetId returns Id func (m targetasset) GetId() *string { return m.Id } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m targetasset) GetLifecycleState() TargetAssetLifecycleStateEnum { return m.LifecycleState } -//GetMigrationPlanId returns MigrationPlanId +// GetMigrationPlanId returns MigrationPlanId func (m targetasset) GetMigrationPlanId() *string { return m.MigrationPlanId } -//GetIsExcludedFromExecution returns IsExcludedFromExecution +// GetIsExcludedFromExecution returns IsExcludedFromExecution func (m targetasset) GetIsExcludedFromExecution() *bool { return m.IsExcludedFromExecution } -//GetEstimatedCost returns EstimatedCost +// GetEstimatedCost returns EstimatedCost func (m targetasset) GetEstimatedCost() *CostEstimation { return m.EstimatedCost } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m targetasset) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m targetasset) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetTimeAssessed returns TimeAssessed +// GetTimeAssessed returns TimeAssessed func (m targetasset) GetTimeAssessed() *common.SDKTime { return m.TimeAssessed } -//GetDisplayName returns DisplayName -func (m targetasset) GetDisplayName() *string { - return m.DisplayName -} - -//GetLifecycleDetails returns LifecycleDetails -func (m targetasset) GetLifecycleDetails() *string { - return m.LifecycleDetails -} - -//GetCompartmentId returns CompartmentId -func (m targetasset) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetCreatedResourceId returns CreatedResourceId -func (m targetasset) GetCreatedResourceId() *string { - return m.CreatedResourceId -} - -//GetCompatibilityMessages returns CompatibilityMessages -func (m targetasset) GetCompatibilityMessages() []CompatibilityMessage { - return m.CompatibilityMessages -} - -//GetMigrationAsset returns MigrationAsset -func (m targetasset) GetMigrationAsset() *MigrationAsset { - return m.MigrationAsset -} - func (m targetasset) String() string { return common.PointerString(m) } diff --git a/cloudmigrations/target_asset_collection.go b/cloudmigrations/target_asset_collection.go index 028d464e90..af7e93872f 100644 --- a/cloudmigrations/target_asset_collection.go +++ b/cloudmigrations/target_asset_collection.go @@ -62,6 +62,5 @@ func (m *TargetAssetCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/cloudmigrations/target_asset_summary.go b/cloudmigrations/target_asset_summary.go index 121abae919..fb1882a9d5 100644 --- a/cloudmigrations/target_asset_summary.go +++ b/cloudmigrations/target_asset_summary.go @@ -62,6 +62,12 @@ type TargetAssetSummary interface { type targetassetsummary struct { JsonData []byte + DisplayName *string `mandatory:"false" json:"displayName"` + CompartmentId *string `mandatory:"false" json:"compartmentId"` + CreatedResourceId *string `mandatory:"false" json:"createdResourceId"` + CompatibilityMessages []CompatibilityMessage `mandatory:"false" json:"compatibilityMessages"` + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + MigrationAsset *MigrationAssetSummary `mandatory:"false" json:"migrationAsset"` Id *string `mandatory:"true" json:"id"` LifecycleState TargetAssetLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` MigrationPlanId *string `mandatory:"true" json:"migrationPlanId"` @@ -70,12 +76,6 @@ type targetassetsummary struct { TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` TimeAssessed *common.SDKTime `mandatory:"true" json:"timeAssessed"` - DisplayName *string `mandatory:"false" json:"displayName"` - CompartmentId *string `mandatory:"false" json:"compartmentId"` - CreatedResourceId *string `mandatory:"false" json:"createdResourceId"` - CompatibilityMessages []CompatibilityMessage `mandatory:"false" json:"compatibilityMessages"` - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - MigrationAsset *MigrationAssetSummary `mandatory:"false" json:"migrationAsset"` Type string `json:"type"` } @@ -128,76 +128,76 @@ func (m *targetassetsummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetId returns Id +// GetDisplayName returns DisplayName +func (m targetassetsummary) GetDisplayName() *string { + return m.DisplayName +} + +// GetCompartmentId returns CompartmentId +func (m targetassetsummary) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetCreatedResourceId returns CreatedResourceId +func (m targetassetsummary) GetCreatedResourceId() *string { + return m.CreatedResourceId +} + +// GetCompatibilityMessages returns CompatibilityMessages +func (m targetassetsummary) GetCompatibilityMessages() []CompatibilityMessage { + return m.CompatibilityMessages +} + +// GetLifecycleDetails returns LifecycleDetails +func (m targetassetsummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetMigrationAsset returns MigrationAsset +func (m targetassetsummary) GetMigrationAsset() *MigrationAssetSummary { + return m.MigrationAsset +} + +// GetId returns Id func (m targetassetsummary) GetId() *string { return m.Id } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m targetassetsummary) GetLifecycleState() TargetAssetLifecycleStateEnum { return m.LifecycleState } -//GetMigrationPlanId returns MigrationPlanId +// GetMigrationPlanId returns MigrationPlanId func (m targetassetsummary) GetMigrationPlanId() *string { return m.MigrationPlanId } -//GetIsExcludedFromExecution returns IsExcludedFromExecution +// GetIsExcludedFromExecution returns IsExcludedFromExecution func (m targetassetsummary) GetIsExcludedFromExecution() *bool { return m.IsExcludedFromExecution } -//GetEstimatedCost returns EstimatedCost +// GetEstimatedCost returns EstimatedCost func (m targetassetsummary) GetEstimatedCost() *CostEstimation { return m.EstimatedCost } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m targetassetsummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m targetassetsummary) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetTimeAssessed returns TimeAssessed +// GetTimeAssessed returns TimeAssessed func (m targetassetsummary) GetTimeAssessed() *common.SDKTime { return m.TimeAssessed } -//GetDisplayName returns DisplayName -func (m targetassetsummary) GetDisplayName() *string { - return m.DisplayName -} - -//GetCompartmentId returns CompartmentId -func (m targetassetsummary) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetCreatedResourceId returns CreatedResourceId -func (m targetassetsummary) GetCreatedResourceId() *string { - return m.CreatedResourceId -} - -//GetCompatibilityMessages returns CompatibilityMessages -func (m targetassetsummary) GetCompatibilityMessages() []CompatibilityMessage { - return m.CompatibilityMessages -} - -//GetLifecycleDetails returns LifecycleDetails -func (m targetassetsummary) GetLifecycleDetails() *string { - return m.LifecycleDetails -} - -//GetMigrationAsset returns MigrationAsset -func (m targetassetsummary) GetMigrationAsset() *MigrationAssetSummary { - return m.MigrationAsset -} - func (m targetassetsummary) String() string { return common.PointerString(m) } diff --git a/cloudmigrations/target_environment.go b/cloudmigrations/target_environment.go index 2850cf9b5d..b15ab5ec60 100644 --- a/cloudmigrations/target_environment.go +++ b/cloudmigrations/target_environment.go @@ -65,7 +65,7 @@ func (m *targetenvironment) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetTargetCompartmentId returns TargetCompartmentId +// GetTargetCompartmentId returns TargetCompartmentId func (m targetenvironment) GetTargetCompartmentId() *string { return m.TargetCompartmentId } diff --git a/cloudmigrations/update_asset_source_details.go b/cloudmigrations/update_asset_source_details.go index efc7f82786..c56d0b2489 100644 --- a/cloudmigrations/update_asset_source_details.go +++ b/cloudmigrations/update_asset_source_details.go @@ -89,27 +89,27 @@ func (m *updateassetsourcedetails) UnmarshalPolymorphicJSON(data []byte) (interf } } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m updateassetsourcedetails) GetDisplayName() *string { return m.DisplayName } -//GetAssetsCompartmentId returns AssetsCompartmentId +// GetAssetsCompartmentId returns AssetsCompartmentId func (m updateassetsourcedetails) GetAssetsCompartmentId() *string { return m.AssetsCompartmentId } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updateassetsourcedetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updateassetsourcedetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m updateassetsourcedetails) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } diff --git a/cloudmigrations/update_migration_plan_details.go b/cloudmigrations/update_migration_plan_details.go index 9721b6e3b9..704318eaa5 100644 --- a/cloudmigrations/update_migration_plan_details.go +++ b/cloudmigrations/update_migration_plan_details.go @@ -82,7 +82,6 @@ func (m *UpdateMigrationPlanDetails) UnmarshalJSON(data []byte) (e error) { m.Strategies[i] = nil } } - m.TargetEnvironments = make([]TargetEnvironment, len(model.TargetEnvironments)) for i, n := range model.TargetEnvironments { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -95,7 +94,6 @@ func (m *UpdateMigrationPlanDetails) UnmarshalJSON(data []byte) (e error) { m.TargetEnvironments[i] = nil } } - m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/cloudmigrations/update_target_asset_details.go b/cloudmigrations/update_target_asset_details.go index f26a16d941..e839bd3c0c 100644 --- a/cloudmigrations/update_target_asset_details.go +++ b/cloudmigrations/update_target_asset_details.go @@ -65,7 +65,7 @@ func (m *updatetargetassetdetails) UnmarshalPolymorphicJSON(data []byte) (interf } } -//GetIsExcludedFromExecution returns IsExcludedFromExecution +// GetIsExcludedFromExecution returns IsExcludedFromExecution func (m updatetargetassetdetails) GetIsExcludedFromExecution() *bool { return m.IsExcludedFromExecution } diff --git a/common/auth/federation_client_oke_workload_identity.go b/common/auth/federation_client_oke_workload_identity.go index c886d3f7e7..6cd55860cf 100644 --- a/common/auth/federation_client_oke_workload_identity.go +++ b/common/auth/federation_client_oke_workload_identity.go @@ -11,12 +11,13 @@ import ( "encoding/base64" "encoding/json" "fmt" - "github.com/oracle/oci-go-sdk/v65/common" - "github.com/oracle/oci-go-sdk/v65/common/utils" "io" "net/http" "sync" "time" + + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/common/utils" ) const ( @@ -146,7 +147,7 @@ func (c *x509FederationClientForOkeWorkloadIdentity) getSecurityToken() (securit } token := parsedBody.Token - if &token == nil || len(token) == 0 { + if len(token) == 0 { return nil, fmt.Errorf("invalid (empty) token received from Proxymux") } if len(token) < 3 { diff --git a/common/auth/instance_principal_key_provider.go b/common/auth/instance_principal_key_provider.go index d4a4f97a96..fc871211ab 100644 --- a/common/auth/instance_principal_key_provider.go +++ b/common/auth/instance_principal_key_provider.go @@ -8,6 +8,7 @@ import ( "crypto/rsa" "fmt" "net/http" + "os" "strings" "time" @@ -15,7 +16,8 @@ import ( ) const ( - metadataBaseURL = `http://169.254.169.254/opc/v2` + defaultMetadataBaseURL = `http://169.254.169.254/opc/v2` + metadataBaseURLEnvVar = `OCI_METADATA_BASE_URL` metadataFallbackURL = `http://169.254.169.254/opc/v1` regionPath = `/instance/region` leafCertificatePath = `/identity/cert.pem` @@ -59,7 +61,7 @@ func (ipe instancePrincipalError) Error() string { // KeyID that is not expired at the moment, the PrivateRSAKey that the client acquires at a next moment could be // invalid because the KeyID could be already expired. func newInstancePrincipalKeyProvider(modifier func(common.HTTPRequestDispatcher) (common.HTTPRequestDispatcher, error)) (provider *instancePrincipalKeyProvider, err error) { - updateX509CertRetrieverURLParas(metadataBaseURL) + updateX509CertRetrieverURLParas(getMetadataBaseURL()) clientModifier := newDispatcherModifier(modifier) client, err := clientModifier.Modify(&http.Client{}) @@ -111,8 +113,8 @@ func getRegionForFederationClient(dispatcher common.HTTPRequestDispatcher, url s return common.StringToRegion(body.String()), nil } common.Logf("Error in getting region from url: %s, Status code: %v, Error: %s", url, statusCode, err.Error()) - if statusCode == 404 && strings.Compare(url, metadataBaseURL+regionPath) == 0 { - common.Logf("Falling back to http://169.254.169.254/opc/v1 to try again...") + if statusCode == 404 && strings.Compare(url, getMetadataBaseURL()+regionPath) == 0 { + common.Logf("Falling back to http://169.254.169.254/opc/v1 to try again...\n") updateX509CertRetrieverURLParas(metadataFallbackURL) url = regionURL } @@ -157,3 +159,12 @@ func (p *instancePrincipalKeyProvider) TenancyOCID() (string, error) { func (p *instancePrincipalKeyProvider) Refreshable() bool { return true } + +// Gets the Meta Data Base url from the Environment variable SNTL_METADATA_BASE_URL +// If it is not present, returns default value instead +func getMetadataBaseURL() string { + if baseURL := os.Getenv(metadataBaseURLEnvVar); baseURL != "" { + return baseURL + } + return defaultMetadataBaseURL +} diff --git a/common/auth/instance_principal_key_provider_test.go b/common/auth/instance_principal_key_provider_test.go index 4e8ff2eb65..c11fc73337 100644 --- a/common/auth/instance_principal_key_provider_test.go +++ b/common/auth/instance_principal_key_provider_test.go @@ -17,7 +17,45 @@ import ( "github.com/stretchr/testify/mock" ) +const ( + MetaDataBaseURLEnvVarName = `OCI_METADATA_BASE_URL` +) + func TestInstancePrincipalKeyProvider_getRegionForFederationClient(t *testing.T) { + t.Setenv(MetaDataBaseURLEnvVarName, defaultMetadataBaseURL) + regionServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + fmt.Fprint(w, "phx") + })) + defer regionServer.Close() + + actualRegion, err := getRegionForFederationClient(&http.Client{}, regionServer.URL) + + assert.NoError(t, err) + assert.Equal(t, common.RegionPHX, actualRegion) +} + +// Test the Federation Client still works when the metadataBaseURL environment +// variable is unset, and thus the default is used. +func TestInstancePrincipalKeyProvider_getRegionForFederationClienURLUnset(t *testing.T) { + // t.Setenv temporarily sets the value of the environment variable for the duration of the test + t.Setenv(MetaDataBaseURLEnvVarName, "") + + regionServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + fmt.Fprint(w, "phx") + })) + defer regionServer.Close() + + actualRegion, err := getRegionForFederationClient(&http.Client{}, regionServer.URL) + + assert.NoError(t, err) + assert.Equal(t, common.RegionPHX, actualRegion) +} + +// Test that the federation client still works when the metadataBaseURL is set to +// the fallback url. +func TestInstancePrincipalKeyProvider_getRegionForFederationClienURLSetToFallBack(t *testing.T) { + t.Setenv(MetaDataBaseURLEnvVarName, metadataFallbackURL) + regionServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, "phx") })) @@ -30,6 +68,7 @@ func TestInstancePrincipalKeyProvider_getRegionForFederationClient(t *testing.T) } func TestInstancePrincipalKeyProvider_getRegionForFederationClientNotFound(t *testing.T) { + t.Setenv(MetaDataBaseURLEnvVarName, defaultMetadataBaseURL) regionServer := httptest.NewServer(http.NotFoundHandler()) defer regionServer.Close() @@ -39,6 +78,7 @@ func TestInstancePrincipalKeyProvider_getRegionForFederationClientNotFound(t *te } func TestInstancePrincipalKeyProvider_getRegionForFederationClientTimeout(t *testing.T) { + t.Setenv(MetaDataBaseURLEnvVarName, defaultMetadataBaseURL) HandlerFunc := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { time.Sleep(100 * time.Millisecond) }) @@ -53,6 +93,7 @@ func TestInstancePrincipalKeyProvider_getRegionForFederationClientTimeout(t *tes } func TestInstancePrincipalKeyProvider_getRegionForFederationClientNotFoundRetrySuccess(t *testing.T) { + t.Setenv(MetaDataBaseURLEnvVarName, defaultMetadataBaseURL) responses := []func(w http.ResponseWriter, r *http.Request){ func(w http.ResponseWriter, r *http.Request) { http.Error(w, "Bad request ", 404) @@ -81,6 +122,7 @@ func TestInstancePrincipalKeyProvider_getRegionForFederationClientNotFoundRetryS } func TestInstancePrincipalKeyProvider_getRegionForFederationClientNotFoundRetryFailure(t *testing.T) { + t.Setenv(MetaDataBaseURLEnvVarName, defaultMetadataBaseURL) responses := []func(w http.ResponseWriter, r *http.Request){ func(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "First response") @@ -107,6 +149,7 @@ func TestInstancePrincipalKeyProvider_getRegionForFederationClientNotFoundRetryF } func TestInstancePrincipalKeyProvider_getRegionForFederationClientRetrySuccess(t *testing.T) { + t.Setenv(MetaDataBaseURLEnvVarName, defaultMetadataBaseURL) statusCodeList := []int{400, 401, 403, 405, 408, 409, 412, 413, 422, 429, 431, 500, 501, 503} for _, statusCode := range statusCodeList { responses := []func(w http.ResponseWriter, r *http.Request){ @@ -139,6 +182,7 @@ func TestInstancePrincipalKeyProvider_getRegionForFederationClientRetrySuccess(t } func TestInstancePrincipalKeyProvider_getRegionForFederationClientRetryFailure(t *testing.T) { + t.Setenv(MetaDataBaseURLEnvVarName, defaultMetadataBaseURL) statusCodeList := []int{400, 401, 403, 405, 408, 409, 412, 413, 422, 429, 431, 500, 501, 503} responses := []func(w http.ResponseWriter, r *http.Request){ func(w http.ResponseWriter, r *http.Request) { @@ -167,6 +211,7 @@ func TestInstancePrincipalKeyProvider_getRegionForFederationClientRetryFailure(t } func TestInstancePrincipalKeyProvider_getRegionForFederationClientInternalServerError(t *testing.T) { + t.Setenv(MetaDataBaseURLEnvVarName, defaultMetadataBaseURL) regionServer := httptest.NewServer(http.HandlerFunc(internalServerError)) defer regionServer.Close() diff --git a/common/auth/resouce_principal_delegation_token_provider.go b/common/auth/resouce_principal_delegation_token_provider.go new file mode 100644 index 0000000000..ee993ca352 --- /dev/null +++ b/common/auth/resouce_principal_delegation_token_provider.go @@ -0,0 +1,90 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package auth + +import ( + "crypto/rsa" + "fmt" + + "github.com/oracle/oci-go-sdk/v65/common" +) + +type resourcePrincipalDelegationTokenConfigurationProvider struct { + resourcePrincipalKeyProvider ConfigurationProviderWithClaimAccess + delegationToken string + region *common.Region +} + +func (r resourcePrincipalDelegationTokenConfigurationProvider) PrivateRSAKey() (*rsa.PrivateKey, error) { + return r.resourcePrincipalKeyProvider.PrivateRSAKey() +} + +func (r resourcePrincipalDelegationTokenConfigurationProvider) KeyID() (string, error) { + return r.resourcePrincipalKeyProvider.KeyID() +} + +func (r resourcePrincipalDelegationTokenConfigurationProvider) TenancyOCID() (string, error) { + return r.resourcePrincipalKeyProvider.TenancyOCID() +} + +func (r resourcePrincipalDelegationTokenConfigurationProvider) UserOCID() (string, error) { + return "", nil +} + +func (r resourcePrincipalDelegationTokenConfigurationProvider) KeyFingerprint() (string, error) { + return "", nil +} + +func (r resourcePrincipalDelegationTokenConfigurationProvider) Region() (string, error) { + if r.region == nil { + common.Debugf("Region in resource principal delegation token configuration provider is nil. Returning configuration provider region: %s", r.region) + return r.resourcePrincipalKeyProvider.Region() + } + return string(*r.region), nil +} + +func (r resourcePrincipalDelegationTokenConfigurationProvider) AuthType() (common.AuthConfig, error) { + token := r.delegationToken + return common.AuthConfig{AuthType: common.ResourcePrincipalDelegationToken, OboToken: &token}, nil +} + +func (r resourcePrincipalDelegationTokenConfigurationProvider) GetClaim(key string) (interface{}, error) { + return r.resourcePrincipalKeyProvider.GetClaim(key) +} + +type resourcePrincipalDelegationTokenError struct { + err error +} + +func (rpe resourcePrincipalDelegationTokenError) Error() string { + return fmt.Sprintf("%s\nResource principals delegation token authentication can only be used on specific OCI services. Please confirm this code is running on the correct environment", rpe.err.Error()) +} + +// ResourcePrincipalDelegationTokenConfigurationProvider returns a configuration for obo token resource principals +func ResourcePrincipalDelegationTokenConfigurationProvider(delegationToken *string) (ConfigurationProviderWithClaimAccess, error) { + if delegationToken == nil || len(*delegationToken) == 0 { + return nil, resourcePrincipalDelegationTokenError{err: fmt.Errorf("failed to create a delagationTokenConfigurationProvider: token is a mandatory input parameter")} + } + return newResourcePrincipalDelegationTokenConfigurationProvider(delegationToken, "", nil) +} + +// ResourcePrincipalDelegationTokenConfigurationProviderForRegion returns a configuration for obo token resource principals with a given region +func ResourcePrincipalDelegationTokenConfigurationProviderForRegion(delegationToken *string, region common.Region) (ConfigurationProviderWithClaimAccess, error) { + if delegationToken == nil || len(*delegationToken) == 0 { + return nil, resourcePrincipalDelegationTokenError{err: fmt.Errorf("failed to create a delagationTokenConfigurationProvider: token is a mandatory input parameter")} + } + return newResourcePrincipalDelegationTokenConfigurationProvider(delegationToken, region, nil) +} + +func newResourcePrincipalDelegationTokenConfigurationProvider(delegationToken *string, region common.Region, modifier func(common.HTTPRequestDispatcher) (common.HTTPRequestDispatcher, error)) (ConfigurationProviderWithClaimAccess, error) { + + keyProvider, err := ResourcePrincipalConfigurationProvider() + if err != nil { + return nil, resourcePrincipalDelegationTokenError{err: fmt.Errorf("failed to create a new key provider for resource principal: %s", err.Error())} + } + if len(region) > 0 { + return resourcePrincipalDelegationTokenConfigurationProvider{keyProvider, *delegationToken, ®ion}, err + } + return resourcePrincipalDelegationTokenConfigurationProvider{keyProvider, *delegationToken, nil}, err +} diff --git a/common/auth/resouce_principal_delegation_token_provider_test.go b/common/auth/resouce_principal_delegation_token_provider_test.go new file mode 100644 index 0000000000..8cfc9c4783 --- /dev/null +++ b/common/auth/resouce_principal_delegation_token_provider_test.go @@ -0,0 +1,31 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package auth + +import ( + "testing" + + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/stretchr/testify/assert" +) + +func TestResourcePrincipalDelegationTokenConfigurationProvider_ErrorInput(t *testing.T) { + delegationToken := "" + region := common.StringToRegion("us-ashburn-1") + configurationProvider, err := ResourcePrincipalDelegationTokenConfigurationProvider(&delegationToken) + assert.Nil(t, configurationProvider) + assert.NotNil(t, err) + + configurationProvider, err = ResourcePrincipalDelegationTokenConfigurationProvider(nil) + assert.Nil(t, configurationProvider) + assert.NotNil(t, err) + + configurationProviderForRegion, err := ResourcePrincipalDelegationTokenConfigurationProviderForRegion(&delegationToken, region) + assert.Nil(t, configurationProviderForRegion) + assert.NotNil(t, err) + + configurationProviderForRegionNotFound, err := ResourcePrincipalDelegationTokenConfigurationProviderForRegion(&delegationToken, "") + assert.Nil(t, configurationProviderForRegionNotFound) + assert.NotNil(t, err) +} diff --git a/common/auth/resource_principals_v1_test.go b/common/auth/resource_principals_v1_test.go index ea6ce6311c..89c8c0c8ce 100644 --- a/common/auth/resource_principals_v1_test.go +++ b/common/auth/resource_principals_v1_test.go @@ -114,7 +114,9 @@ func TestNewServicePrincipalConfigurationProvider(t *testing.T) { //an interceptor is call back made just before signing and it can //be used to apply arbitrary transformations to the request interceptor := func(request *http.Request) error { - request.URL.Query().Set("param1", "value1") + q := request.URL.Query() + q.Set("param1", "value1") + request.URL.RawQuery = q.Encode() return nil } diff --git a/common/circuit_breaker.go b/common/circuit_breaker.go index 85633f4a93..46b68b3a46 100644 --- a/common/circuit_breaker.go +++ b/common/circuit_breaker.go @@ -62,7 +62,7 @@ type CircuitBreakerSetting struct { numberOfRecordedHistoryResponse int } -// Convert CircuitBreakerSetting to human-readable string representation +// String Converts CircuitBreakerSetting to human-readable string representation func (cbst CircuitBreakerSetting) String() string { return fmt.Sprintf("{name=%v, isEnabled=%v, closeStateWindow=%v, openStateWindow=%v, failureRateThreshold=%v, minimumRequests=%v, successStatCodeMap=%v, successStatErrCodeMap=%v, serviceName=%v, historyCount=%v}", cbst.name, cbst.isEnabled, cbst.closeStateWindow, cbst.openStateWindow, cbst.failureRateThreshold, cbst.minimumRequests, cbst.successStatCodeMap, cbst.successStatErrCodeMap, cbst.serviceName, cbst.numberOfRecordedHistoryResponse) @@ -77,7 +77,7 @@ type ResponseHistory struct { statusCode int } -// Convert ResponseHistory to human-readable string representation +// String Converts ResponseHistory to human-readable string representation func (rh ResponseHistory) String() string { return fmt.Sprintf("Opc-Req-id - %v\nErrorCode - %v - %v\nErrorMessage - %v\n\n", rh.opcReqID, rh.statusCode, rh.errorCode, rh.errorMessage) } diff --git a/common/client.go b/common/client.go index ff02e129d1..c474c102aa 100644 --- a/common/client.go +++ b/common/client.go @@ -494,10 +494,7 @@ func logResponse(response *http.Response, fn func(format string, v ...interface{ } func checkBodyLengthExceedLimit(contentLength int64) bool { - if contentLength > maxBodyLenForDebug { - return true - } - return false + return contentLength > maxBodyLenForDebug } // OCIRequest is any request made to an OCI service. diff --git a/common/client_test.go b/common/client_test.go index 7be86e6d50..ec01861fad 100644 --- a/common/client_test.go +++ b/common/client_test.go @@ -722,13 +722,13 @@ func TestSeek(t *testing.T) { defer file.Close() offset := int64(0) ocirsc := NewOCIReadSeekCloser(file) - curPos, e := ocirsc.Seek(offset, io.SeekCurrent) + curPos, _ := ocirsc.Seek(offset, io.SeekCurrent) if info, err := file.Stat(); err == nil { length := info.Size() assert.Equal(t, curPos, length) } offset = int64(2) - curPos, e = ocirsc.Seek(offset, io.SeekStart) + curPos, e := ocirsc.Seek(offset, io.SeekStart) assert.Nil(t, e) assert.Equal(t, curPos, offset) diff --git a/common/common.go b/common/common.go index 95544c6eb8..1a247ae972 100644 --- a/common/common.go +++ b/common/common.go @@ -137,7 +137,7 @@ func (region Region) EndpointForTemplateDottedRegion(service string, serviceEndp return endpoint, fmt.Errorf("Endpoint service name not present in endpoint template") } } else { - return endpoint, fmt.Errorf("Invalid serviceEndpointTemplates. ServiceEndpointTemplate should start with https://") + return endpoint, fmt.Errorf("invalid serviceEndpointTemplates. ServiceEndpointTemplate should start with https://") } return endpoint, nil } @@ -207,7 +207,7 @@ func StringToRegion(stringRegion string) (r Region) { // canStringBeRegion test if the string can be a region, if it can, returns the string as is, otherwise it // returns an error -var blankRegex = regexp.MustCompile("\\s") +var blankRegex = regexp.MustCompile(`\s`) func canStringBeRegion(stringRegion string) (region string, err error) { if blankRegex.MatchString(stringRegion) || stringRegion == "" { @@ -240,7 +240,7 @@ func EnableInstanceMetadataServiceLookup() { // Once successfully find the expected region(region name or short code), return true, region name will be stored in // the input pointer. func setRegionMetadataFromEnvVar(region *string) bool { - if readEnvVar == false { + if !readEnvVar { Debugf("metadata region env variable had already been checked, no need to check again.") return false //no need to check it again. } @@ -285,7 +285,7 @@ func setRegionMetadataFromCfgFile(region *string) bool { // Once successfully find the expected region(region name or short code), return true, region name will be stored in // the input pointer. func setRegionMetadataFromRegionCfgFile(region *string) bool { - if readCfgFile == false { + if !readCfgFile { Debugf("metadata region config file had already been checked, no need to check again.") return false //no need to check it again. } @@ -473,7 +473,7 @@ func setRegionFromInstanceMetadataService(region *string) bool { // "regionIdentifier" : "ca-montreal-1" // } // Mark visitIMDS Flag as false since it has already been visited. - if visitIMDS == false { + if !visitIMDS { Debugf("check from IMDS is disabled or IMDS had already been successfully visited, no need to check again.") return false } @@ -509,7 +509,7 @@ func setRegionFromInstanceMetadataService(region *string) bool { // getRegionInfoFromInstanceMetadataServiceProd calls instance metadata service and get the region information func getRegionInfoFromInstanceMetadataServiceProd() ([]byte, error) { - request, err := http.NewRequest(http.MethodGet, instanceMetadataRegionInfoURLV2, nil) + request, _ := http.NewRequest(http.MethodGet, instanceMetadataRegionInfoURLV2, nil) request.Header.Add("Authorization", "Bearer Oracle") client := &http.Client{ @@ -517,7 +517,7 @@ func getRegionInfoFromInstanceMetadataServiceProd() ([]byte, error) { } resp, err := client.Do(request) if err != nil { - return nil, fmt.Errorf("Failed to call instance metadata service. Error: %v", err) + return nil, fmt.Errorf("failed to call instance metadata service. Error: %v", err) } statusCode := resp.StatusCode @@ -526,7 +526,7 @@ func getRegionInfoFromInstanceMetadataServiceProd() ([]byte, error) { content, err := ioutil.ReadAll(resp.Body) if err != nil { - return nil, fmt.Errorf("Failed to get region information from response body. Error: %v", err) + return nil, fmt.Errorf("failed to get region information from response body. Error: %v", err) } if statusCode != http.StatusOK { diff --git a/common/common_test.go b/common/common_test.go index b9406eea84..d8851f48d6 100644 --- a/common/common_test.go +++ b/common/common_test.go @@ -267,7 +267,7 @@ func TestEndpointWithServiceName(t *testing.T) { //dot in region without service name and without endpoint template service = "analytics" region = StringToRegion("broom6.us.oracle.com") - endpoint, err = region.EndpointForTemplateDottedRegion(service, "", "") + _, err = region.EndpointForTemplateDottedRegion(service, "", "") assert.Error(t, err) } diff --git a/common/configuration.go b/common/configuration.go index 4cd1d7edd1..1748ecff01 100644 --- a/common/configuration.go +++ b/common/configuration.go @@ -21,10 +21,12 @@ type AuthenticationType string const ( // UserPrincipal is default auth type UserPrincipal AuthenticationType = "user_principal" - // InstancePrincipal is used for instance principle auth type + // InstancePrincipal is used for instance principal auth type InstancePrincipal AuthenticationType = "instance_principal" - // InstancePrincipalDelegationToken is used for instance principle delegation token auth type + // InstancePrincipalDelegationToken is used for instance principal delegation token auth type InstancePrincipalDelegationToken AuthenticationType = "instance_principle_delegation_token" + // ResourcePrincipalDelegationToken is used for resource principal delegation token auth type + ResourcePrincipalDelegationToken AuthenticationType = "resource_principle_delegation_token" // UnknownAuthenticationType is used for none meaningful auth type UnknownAuthenticationType AuthenticationType = "unknown_auth_type" ) @@ -343,7 +345,7 @@ func parseConfigFile(data []byte, profile string) (info *configFileInfo, err err //Look for profile for i, line := range splitContent { - if match := profileRegex.FindStringSubmatch(line); match != nil && len(match) > 1 && match[1] == profile { + if match := profileRegex.FindStringSubmatch(line); len(match) > 1 && match[1] == profile { start := i + 1 return parseConfigAtLine(start, splitContent) } @@ -589,7 +591,7 @@ func (p fileConfigurationProvider) AuthType() (AuthConfig, error) { err = fmt.Errorf("can not read tenancy configuration due to: %s", err.Error()) return AuthConfig{UnknownAuthenticationType, true, nil}, err } - val, err := presentOrError(info.AuthenticationType, hasAuthenticationType, info.PresentConfiguration, "authentication_type") + val, _ := presentOrError(info.AuthenticationType, hasAuthenticationType, info.PresentConfiguration, "authentication_type") if val == "instance_principal" { if filePath, err := presentOrError(info.DelegationTokenFilePath, hasDelegationTokenFile, info.PresentConfiguration, "delegationTokenFilePath"); err == nil { @@ -615,7 +617,7 @@ func getTokenContent(filePath string) (string, error) { err = fileConfigurationProviderError{err: fmt.Errorf("can not read token content from configuration file due to: %s", err.Error())} return "", err } - return fmt.Sprintf("%s", tokenFileContent), nil + return string(tokenFileContent), nil } // A configuration provider that look for information in multiple configuration providers diff --git a/common/configuration_test.go b/common/configuration_test.go index 4167ae24c7..3bde22a1ae 100644 --- a/common/configuration_test.go +++ b/common/configuration_test.go @@ -567,7 +567,7 @@ region=someregion ` tmpKeyLocation := filepath.Join(getHomeFolder(), "testKeyForConcurrentRead") - e := ioutil.WriteFile(tmpKeyLocation, []byte(testEncryptedPrivateKeyConf), 777) + e := ioutil.WriteFile(tmpKeyLocation, []byte(testEncryptedPrivateKeyConf), 0777) if e != nil { assert.FailNow(t, e.Error()) } @@ -872,7 +872,7 @@ compartment = somecompartment os.Unsetenv("OCI_REGION") provider, err = ConfigurationProviderFromFile(tmpConfFile, testKeyPassphrase) assert.NoError(t, err) - ok, err = IsConfigurationProviderValid(provider) + _, err = IsConfigurationProviderValid(provider) assert.Error(t, err) } @@ -887,7 +887,7 @@ region=someregion ` tmpKeyLocation := filepath.Join(getHomeFolder(), "testKey") - e := ioutil.WriteFile(tmpKeyLocation, []byte(testEncryptedPrivateKeyConf), 777) + e := ioutil.WriteFile(tmpKeyLocation, []byte(testEncryptedPrivateKeyConf), 0777) if e != nil { assert.FailNow(t, e.Error()) } diff --git a/common/errors.go b/common/errors.go index 75b59ff3f1..24dfc4f4cd 100644 --- a/common/errors.go +++ b/common/errors.go @@ -255,7 +255,7 @@ type NonSeekableRequestRetryFailure struct { func (ne NonSeekableRequestRetryFailure) Error() string { if ne.err == nil { - return fmt.Sprintf("Unable to perform Retry on this request body type, which did not implement seek() interface") + return "Unable to perform Retry on this request body type, which did not implement seek() interface" } return fmt.Sprintf("%s. Unable to perform Retry on this request body type, which did not implement seek() interface", ne.err.Error()) } @@ -287,7 +287,7 @@ func IsCircuitBreakerError(err error) bool { func getCircuitBreakerError(request *http.Request, err error, cbr *OciCircuitBreaker) error { cbErr := fmt.Errorf("%s, so this request was not sent to the %s service.\n\n The circuit breaker was opened because the %s service failed too many times recently. "+ "Because the circuit breaker has been opened, requests within a %.2f second window of when the circuit breaker opened will not be sent to the %s service.\n\n"+ - "URL which circuit breaker prevented request to - %s \n Circuit Breaker Info \n Name - %s \n State - %s \n\n Errors from %s service which opened the circuit breaker:\n\n%s \n", + "URL which circuit breaker prevented request to - %s \n Circuit Breaker Info \n Name - %s \n State - %s \n\n Errors from %s service which opened the circuit breaker:\n\n%s", err, cbr.Cbst.serviceName, cbr.Cbst.serviceName, cbr.Cbst.openStateWindow.Seconds(), cbr.Cbst.serviceName, request.URL.Host+request.URL.Path, cbr.Cbst.name, cbr.Cb.State().String(), cbr.Cbst.serviceName, cbr.GetHistory()) return cbErr } diff --git a/common/helpers.go b/common/helpers.go index d120065de9..7732c1c1d0 100644 --- a/common/helpers.go +++ b/common/helpers.go @@ -149,7 +149,7 @@ func tryParsing(data []byte, layouts ...string) (tm time.Time, err error) { return } } - err = fmt.Errorf("Could not parse time: %s with formats: %s", datestring, layouts[:]) + err = fmt.Errorf("could not parse time: %s with formats: %s", datestring, layouts[:]) return } diff --git a/common/helpers_test.go b/common/helpers_test.go index f19f39370c..de8ee0d2fb 100644 --- a/common/helpers_test.go +++ b/common/helpers_test.go @@ -5,7 +5,6 @@ package common import ( "encoding/json" - "fmt" "reflect" "testing" "time" @@ -73,7 +72,7 @@ func TestStructToString_Nested(t *testing.T) { s.Nested.Thestring = "somestring" s.Nested.NestedInt = Int(2) - str := fmt.Sprintf("%s", s) + str := s.String() assert.Contains(t, str, "1") assert.Contains(t, str, "somestring") assert.Contains(t, str, "") @@ -165,7 +164,7 @@ func TestFormattedTimeUnMarshaling(t *testing.T) { func TestSDKDateToAndFromString(t *testing.T) { _, err := NewSDKDateFromString("InvalidFormat") s, _ := NewSDKDateFromString("2018-09-13") - str := fmt.Sprintf("%s", s) + str := s.String() assert.Equal(t, "2018-09-13", str) assert.IsType(t, &time.ParseError{}, err) diff --git a/common/http.go b/common/http.go index f2d01ac929..80d75c4d65 100644 --- a/common/http.go +++ b/common/http.go @@ -320,9 +320,8 @@ func checkBinaryBodyLength(request *http.Request) (contentLen int64, err error) } func getNormalBinaryBodyLength(request *http.Request) (contentLen int64, err error) { - dumpRequestBody := ioutil.NopCloser(bytes.NewBuffer(nil)) + var dumpRequestBody io.ReadCloser if dumpRequestBody, request.Body, err = drainBody(request.Body); err != nil { - dumpRequestBody = ioutil.NopCloser(bytes.NewBuffer(nil)) return contentLen, err } contentBody, err := ioutil.ReadAll(dumpRequestBody) @@ -972,7 +971,7 @@ func addFromHeaderCollection(response *http.Response, value *reflect.Value, fiel Debugln("Unmarshaling from header-collection to field:", field.Name) var headerPrefix string if headerPrefix = field.Tag.Get("prefix"); headerPrefix == "" { - return fmt.Errorf("Unmarshaling response to a header-collection requires the 'prefix' tag for field: %s", field.Name) + return fmt.Errorf("unmarshaling response to a header-collection requires the 'prefix' tag for field: %s", field.Name) } mapCollection := make(map[string]string) diff --git a/common/http_signer.go b/common/http_signer.go index 225845785a..b8a2c4c5eb 100644 --- a/common/http_signer.go +++ b/common/http_signer.go @@ -197,7 +197,7 @@ func GetBodyHash(request *http.Request) (hashString string, err error) { } var data []byte - bReader := request.Body + var bReader io.Reader bReader, request.Body, err = drainBody(request.Body) if err != nil { return "", fmt.Errorf("can not read body of request while calculating body hash: %s", err.Error()) diff --git a/common/retry.go b/common/retry.go index 782b12ef90..12ef50b80b 100644 --- a/common/retry.go +++ b/common/retry.go @@ -184,7 +184,7 @@ var GlobalRetry *RetryPolicy = nil // RetryPolicyOption is the type of the options for NewRetryPolicy. type RetryPolicyOption func(rp *RetryPolicy) -// Convert retry policy to human-readable string representation +// String Converts retry policy to human-readable string representation func (rp RetryPolicy) String() string { return fmt.Sprintf("{MaximumNumberAttempts=%v, MinSleepBetween=%v, MaxSleepBetween=%v, ExponentialBackoffBase=%v, NonEventuallyConsistentPolicy=%v}", rp.MaximumNumberAttempts, rp.MinSleepBetween, rp.MaxSleepBetween, rp.ExponentialBackoffBase, rp.NonEventuallyConsistentPolicy) @@ -753,7 +753,7 @@ func determinePolicyToUse(policy RetryPolicy) (RetryPolicy, *time.Time, float64) var useDefaultTimingInstead = true var endOfWindowTime = (*time.Time)(nil) var backoffScalingFactor = 1.0 - var policyToUse RetryPolicy = policy + var policyToUse = policy eowt := EcContext.GetEndOfWindow() if eowt != nil { @@ -774,17 +774,17 @@ func determinePolicyToUse(policy RetryPolicy) (RetryPolicy, *time.Time, float64) Debugln(fmt.Sprintf("Use eventually consistent timing, durationToEndOfWindow = %v, maximumCumulativeBackoffWithoutJitter = %v, backoffScalingFactor = %.2f", durationToEndOfWindow, maximumCumulativeBackoffWithoutJitter, backoffScalingFactor)) } else { - Debugln(fmt.Sprintf("Use default timing, end of EC window is sooner than default retries")) + Debugln("Use default timing, end of EC window is sooner than default retries") } } else { useDefaultTimingInstead = false policyToUse = *policy.NonEventuallyConsistentPolicy - Debugln(fmt.Sprintf("Use default timing and strategy, end of EC window is in the past")) + Debugln("Use default timing and strategy, end of EC window is in the past") } } else { useDefaultTimingInstead = false policyToUse = *policy.NonEventuallyConsistentPolicy - Debugln(fmt.Sprintf("Use default timing and strategy, no EC window set")) + Debugln("Use default timing and strategy, no EC window set") } if useDefaultTimingInstead { diff --git a/common/retry_test.go b/common/retry_test.go index 6b7af106c1..b55164d428 100644 --- a/common/retry_test.go +++ b/common/retry_test.go @@ -388,7 +388,7 @@ func TestGetEndTimeOfEventuallyConsistentWindow(t *testing.T) { value2 := EcContext.GetEndOfWindow() assert.Equal(t, value1, value2) - eowt = EcContext.UpdateEndOfWindow(eventuallyConsistentWindowSize) + _ = EcContext.UpdateEndOfWindow(eventuallyConsistentWindowSize) value3 := EcContext.GetEndOfWindow() time.Sleep(1 * time.Second) diff --git a/common/utils/opc_request_id.go b/common/utils/opc_request_id.go index 55615503a0..d82f0bf5e7 100644 --- a/common/utils/opc_request_id.go +++ b/common/utils/opc_request_id.go @@ -6,8 +6,7 @@ import ( "fmt" ) -// GenerateOpcRequestId -// Reference: https://confluence.oci.oraclecorp.com/display/DEX/Request+IDs +// GenerateOpcRequestID - Reference: https://confluence.oci.oraclecorp.com/display/DEX/Request+IDs // Maximum segment length: 32 characters // Allowed segment contents: regular expression pattern /^[a-zA-Z0-9]{0,32}$/ func GenerateOpcRequestID() string { diff --git a/common/version.go b/common/version.go index 434b65d097..7d5ac555de 100644 --- a/common/version.go +++ b/common/version.go @@ -12,8 +12,8 @@ import ( const ( major = "65" - minor = "47" - patch = "2" + minor = "48" + patch = "0" tag = "" ) diff --git a/computecloudatcustomer/computecloudatcustomer_client.go b/computecloudatcustomer/computecloudatcustomer_client.go index d3357fcd52..d41bfddfb9 100644 --- a/computecloudatcustomer/computecloudatcustomer_client.go +++ b/computecloudatcustomer/computecloudatcustomer_client.go @@ -82,7 +82,7 @@ func (client *ComputeCloudAtCustomerClient) setConfigurationProvider(configProvi 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/computeinstanceagent/computeinstanceagent_client.go b/computeinstanceagent/computeinstanceagent_client.go index d2ae83ef72..9a7fda5b1f 100644 --- a/computeinstanceagent/computeinstanceagent_client.go +++ b/computeinstanceagent/computeinstanceagent_client.go @@ -81,7 +81,7 @@ func (client *ComputeInstanceAgentClient) setConfigurationProvider(configProvide 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/computeinstanceagent/computeinstanceagent_plugin_client.go b/computeinstanceagent/computeinstanceagent_plugin_client.go index 4fd9addecf..080651b43e 100644 --- a/computeinstanceagent/computeinstanceagent_plugin_client.go +++ b/computeinstanceagent/computeinstanceagent_plugin_client.go @@ -81,7 +81,7 @@ func (client *PluginClient) setConfigurationProvider(configProvider common.Confi 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/computeinstanceagent/computeinstanceagent_pluginconfig_client.go b/computeinstanceagent/computeinstanceagent_pluginconfig_client.go index 8602a9482a..a9d5969667 100644 --- a/computeinstanceagent/computeinstanceagent_pluginconfig_client.go +++ b/computeinstanceagent/computeinstanceagent_pluginconfig_client.go @@ -81,7 +81,7 @@ func (client *PluginconfigClient) setConfigurationProvider(configProvider common 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/computeinstanceagent/instance_agent_command_execution_output_content.go b/computeinstanceagent/instance_agent_command_execution_output_content.go index abb61d6109..33c39d2e1c 100644 --- a/computeinstanceagent/instance_agent_command_execution_output_content.go +++ b/computeinstanceagent/instance_agent_command_execution_output_content.go @@ -29,8 +29,8 @@ type InstanceAgentCommandExecutionOutputContent interface { type instanceagentcommandexecutionoutputcontent struct { JsonData []byte - ExitCode *int `mandatory:"true" json:"exitCode"` Message *string `mandatory:"false" json:"message"` + ExitCode *int `mandatory:"true" json:"exitCode"` OutputType string `json:"outputType"` } @@ -79,16 +79,16 @@ func (m *instanceagentcommandexecutionoutputcontent) UnmarshalPolymorphicJSON(da } } -//GetExitCode returns ExitCode -func (m instanceagentcommandexecutionoutputcontent) GetExitCode() *int { - return m.ExitCode -} - -//GetMessage returns Message +// GetMessage returns Message func (m instanceagentcommandexecutionoutputcontent) GetMessage() *string { return m.Message } +// GetExitCode returns ExitCode +func (m instanceagentcommandexecutionoutputcontent) GetExitCode() *int { + return m.ExitCode +} + func (m instanceagentcommandexecutionoutputcontent) String() string { return common.PointerString(m) } diff --git a/containerengine/cluster.go b/containerengine/cluster.go index fd88409158..eb251348ce 100644 --- a/containerengine/cluster.go +++ b/containerengine/cluster.go @@ -166,10 +166,7 @@ func (m *Cluster) UnmarshalJSON(data []byte) (e error) { m.Endpoints = model.Endpoints m.AvailableKubernetesUpgrades = make([]string, len(model.AvailableKubernetesUpgrades)) - for i, n := range model.AvailableKubernetesUpgrades { - m.AvailableKubernetesUpgrades[i] = n - } - + copy(m.AvailableKubernetesUpgrades, model.AvailableKubernetesUpgrades) m.ImagePolicyConfig = model.ImagePolicyConfig m.ClusterPodNetworkOptions = make([]ClusterPodNetworkOptionDetails, len(model.ClusterPodNetworkOptions)) @@ -184,7 +181,6 @@ func (m *Cluster) UnmarshalJSON(data []byte) (e error) { m.ClusterPodNetworkOptions[i] = nil } } - m.Type = model.Type return diff --git a/containerengine/cluster_options.go b/containerengine/cluster_options.go index 76243acf7d..6ed2597b38 100644 --- a/containerengine/cluster_options.go +++ b/containerengine/cluster_options.go @@ -57,10 +57,7 @@ func (m *ClusterOptions) UnmarshalJSON(data []byte) (e error) { } var nn interface{} m.KubernetesVersions = make([]string, len(model.KubernetesVersions)) - for i, n := range model.KubernetesVersions { - m.KubernetesVersions[i] = n - } - + copy(m.KubernetesVersions, model.KubernetesVersions) m.ClusterPodNetworkOptions = make([]ClusterPodNetworkOptionDetails, len(model.ClusterPodNetworkOptions)) for i, n := range model.ClusterPodNetworkOptions { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -73,6 +70,5 @@ func (m *ClusterOptions) UnmarshalJSON(data []byte) (e error) { m.ClusterPodNetworkOptions[i] = nil } } - return } diff --git a/containerengine/cluster_summary.go b/containerengine/cluster_summary.go index 3a1e9e4672..37f5337ba0 100644 --- a/containerengine/cluster_summary.go +++ b/containerengine/cluster_summary.go @@ -160,10 +160,7 @@ func (m *ClusterSummary) UnmarshalJSON(data []byte) (e error) { m.Endpoints = model.Endpoints m.AvailableKubernetesUpgrades = make([]string, len(model.AvailableKubernetesUpgrades)) - for i, n := range model.AvailableKubernetesUpgrades { - m.AvailableKubernetesUpgrades[i] = n - } - + copy(m.AvailableKubernetesUpgrades, model.AvailableKubernetesUpgrades) m.ImagePolicyConfig = model.ImagePolicyConfig m.ClusterPodNetworkOptions = make([]ClusterPodNetworkOptionDetails, len(model.ClusterPodNetworkOptions)) @@ -178,7 +175,6 @@ func (m *ClusterSummary) UnmarshalJSON(data []byte) (e error) { m.ClusterPodNetworkOptions[i] = nil } } - m.Type = model.Type return diff --git a/containerengine/containerengine_client.go b/containerengine/containerengine_client.go index 43f9dfc7c6..93206a888d 100644 --- a/containerengine/containerengine_client.go +++ b/containerengine/containerengine_client.go @@ -82,7 +82,7 @@ func (client *ContainerEngineClient) setConfigurationProvider(configProvider com 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/containerengine/create_cluster_details.go b/containerengine/create_cluster_details.go index b2fd3a8daa..e7a978615d 100644 --- a/containerengine/create_cluster_details.go +++ b/containerengine/create_cluster_details.go @@ -130,7 +130,6 @@ func (m *CreateClusterDetails) UnmarshalJSON(data []byte) (e error) { m.ClusterPodNetworkOptions[i] = nil } } - m.Type = model.Type m.Name = model.Name diff --git a/containerengine/create_node_pool_details.go b/containerengine/create_node_pool_details.go index ab2d638597..1e4bf92ef7 100644 --- a/containerengine/create_node_pool_details.go +++ b/containerengine/create_node_pool_details.go @@ -147,19 +147,13 @@ func (m *CreateNodePoolDetails) UnmarshalJSON(data []byte) (e error) { m.NodeShapeConfig = model.NodeShapeConfig m.InitialNodeLabels = make([]KeyValue, len(model.InitialNodeLabels)) - for i, n := range model.InitialNodeLabels { - m.InitialNodeLabels[i] = n - } - + copy(m.InitialNodeLabels, model.InitialNodeLabels) m.SshPublicKey = model.SshPublicKey m.QuantityPerSubnet = model.QuantityPerSubnet m.SubnetIds = make([]string, len(model.SubnetIds)) - for i, n := range model.SubnetIds { - m.SubnetIds[i] = n - } - + copy(m.SubnetIds, model.SubnetIds) m.NodeConfigDetails = model.NodeConfigDetails m.FreeformTags = model.FreeformTags diff --git a/containerengine/create_node_pool_node_config_details.go b/containerengine/create_node_pool_node_config_details.go index c11bb32605..2f55e95053 100644 --- a/containerengine/create_node_pool_node_config_details.go +++ b/containerengine/create_node_pool_node_config_details.go @@ -89,10 +89,7 @@ func (m *CreateNodePoolNodeConfigDetails) UnmarshalJSON(data []byte) (e error) { } var nn interface{} m.NsgIds = make([]string, len(model.NsgIds)) - for i, n := range model.NsgIds { - m.NsgIds[i] = n - } - + copy(m.NsgIds, model.NsgIds) m.KmsKeyId = model.KmsKeyId m.IsPvEncryptionInTransitEnabled = model.IsPvEncryptionInTransitEnabled @@ -114,9 +111,6 @@ func (m *CreateNodePoolNodeConfigDetails) UnmarshalJSON(data []byte) (e error) { m.Size = model.Size m.PlacementConfigs = make([]NodePoolPlacementConfigDetails, len(model.PlacementConfigs)) - for i, n := range model.PlacementConfigs { - m.PlacementConfigs[i] = n - } - + copy(m.PlacementConfigs, model.PlacementConfigs) return } diff --git a/containerengine/node_pool.go b/containerengine/node_pool.go index 5d4c30e6e6..71b46672cd 100644 --- a/containerengine/node_pool.go +++ b/containerengine/node_pool.go @@ -199,24 +199,15 @@ func (m *NodePool) UnmarshalJSON(data []byte) (e error) { m.NodeShape = model.NodeShape m.InitialNodeLabels = make([]KeyValue, len(model.InitialNodeLabels)) - for i, n := range model.InitialNodeLabels { - m.InitialNodeLabels[i] = n - } - + copy(m.InitialNodeLabels, model.InitialNodeLabels) m.SshPublicKey = model.SshPublicKey m.QuantityPerSubnet = model.QuantityPerSubnet m.SubnetIds = make([]string, len(model.SubnetIds)) - for i, n := range model.SubnetIds { - m.SubnetIds[i] = n - } - + copy(m.SubnetIds, model.SubnetIds) m.Nodes = make([]Node, len(model.Nodes)) - for i, n := range model.Nodes { - m.Nodes[i] = n - } - + copy(m.Nodes, model.Nodes) m.NodeConfigDetails = model.NodeConfigDetails m.FreeformTags = model.FreeformTags diff --git a/containerengine/node_pool_node_config_details.go b/containerengine/node_pool_node_config_details.go index 15acc38fa8..4c3ecca164 100644 --- a/containerengine/node_pool_node_config_details.go +++ b/containerengine/node_pool_node_config_details.go @@ -91,10 +91,7 @@ func (m *NodePoolNodeConfigDetails) UnmarshalJSON(data []byte) (e error) { m.Size = model.Size m.NsgIds = make([]string, len(model.NsgIds)) - for i, n := range model.NsgIds { - m.NsgIds[i] = n - } - + copy(m.NsgIds, model.NsgIds) m.KmsKeyId = model.KmsKeyId m.IsPvEncryptionInTransitEnabled = model.IsPvEncryptionInTransitEnabled @@ -104,10 +101,7 @@ func (m *NodePoolNodeConfigDetails) UnmarshalJSON(data []byte) (e error) { m.DefinedTags = model.DefinedTags m.PlacementConfigs = make([]NodePoolPlacementConfigDetails, len(model.PlacementConfigs)) - for i, n := range model.PlacementConfigs { - m.PlacementConfigs[i] = n - } - + copy(m.PlacementConfigs, model.PlacementConfigs) nn, e = model.NodePoolPodNetworkOptionDetails.UnmarshalPolymorphicJSON(model.NodePoolPodNetworkOptionDetails.JsonData) if e != nil { return diff --git a/containerengine/node_pool_options.go b/containerengine/node_pool_options.go index 4f8d6224c6..efbb1258fb 100644 --- a/containerengine/node_pool_options.go +++ b/containerengine/node_pool_options.go @@ -67,20 +67,11 @@ func (m *NodePoolOptions) UnmarshalJSON(data []byte) (e error) { } var nn interface{} m.KubernetesVersions = make([]string, len(model.KubernetesVersions)) - for i, n := range model.KubernetesVersions { - m.KubernetesVersions[i] = n - } - + copy(m.KubernetesVersions, model.KubernetesVersions) m.Shapes = make([]string, len(model.Shapes)) - for i, n := range model.Shapes { - m.Shapes[i] = n - } - + copy(m.Shapes, model.Shapes) m.Images = make([]string, len(model.Images)) - for i, n := range model.Images { - m.Images[i] = n - } - + copy(m.Images, model.Images) m.Sources = make([]NodeSourceOption, len(model.Sources)) for i, n := range model.Sources { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -93,6 +84,5 @@ func (m *NodePoolOptions) UnmarshalJSON(data []byte) (e error) { m.Sources[i] = nil } } - return } diff --git a/containerengine/node_pool_summary.go b/containerengine/node_pool_summary.go index 9719769a47..fae97a6bde 100644 --- a/containerengine/node_pool_summary.go +++ b/containerengine/node_pool_summary.go @@ -189,19 +189,13 @@ func (m *NodePoolSummary) UnmarshalJSON(data []byte) (e error) { m.NodeShape = model.NodeShape m.InitialNodeLabels = make([]KeyValue, len(model.InitialNodeLabels)) - for i, n := range model.InitialNodeLabels { - m.InitialNodeLabels[i] = n - } - + copy(m.InitialNodeLabels, model.InitialNodeLabels) m.SshPublicKey = model.SshPublicKey m.QuantityPerSubnet = model.QuantityPerSubnet m.SubnetIds = make([]string, len(model.SubnetIds)) - for i, n := range model.SubnetIds { - m.SubnetIds[i] = n - } - + copy(m.SubnetIds, model.SubnetIds) m.NodeConfigDetails = model.NodeConfigDetails m.FreeformTags = model.FreeformTags diff --git a/containerengine/node_source_option.go b/containerengine/node_source_option.go index 31b39820e5..7633cf2219 100644 --- a/containerengine/node_source_option.go +++ b/containerengine/node_source_option.go @@ -67,7 +67,7 @@ func (m *nodesourceoption) UnmarshalPolymorphicJSON(data []byte) (interface{}, e } } -//GetSourceName returns SourceName +// GetSourceName returns SourceName func (m nodesourceoption) GetSourceName() *string { return m.SourceName } diff --git a/containerengine/update_node_pool_details.go b/containerengine/update_node_pool_details.go index b790e5ad5a..34d3d2f95d 100644 --- a/containerengine/update_node_pool_details.go +++ b/containerengine/update_node_pool_details.go @@ -124,17 +124,11 @@ func (m *UpdateNodePoolDetails) UnmarshalJSON(data []byte) (e error) { m.KubernetesVersion = model.KubernetesVersion m.InitialNodeLabels = make([]KeyValue, len(model.InitialNodeLabels)) - for i, n := range model.InitialNodeLabels { - m.InitialNodeLabels[i] = n - } - + copy(m.InitialNodeLabels, model.InitialNodeLabels) m.QuantityPerSubnet = model.QuantityPerSubnet m.SubnetIds = make([]string, len(model.SubnetIds)) - for i, n := range model.SubnetIds { - m.SubnetIds[i] = n - } - + copy(m.SubnetIds, model.SubnetIds) m.NodeConfigDetails = model.NodeConfigDetails m.NodeMetadata = model.NodeMetadata diff --git a/containerengine/update_node_pool_node_config_details.go b/containerengine/update_node_pool_node_config_details.go index b77a9d7170..55a970130b 100644 --- a/containerengine/update_node_pool_node_config_details.go +++ b/containerengine/update_node_pool_node_config_details.go @@ -91,10 +91,7 @@ func (m *UpdateNodePoolNodeConfigDetails) UnmarshalJSON(data []byte) (e error) { m.Size = model.Size m.NsgIds = make([]string, len(model.NsgIds)) - for i, n := range model.NsgIds { - m.NsgIds[i] = n - } - + copy(m.NsgIds, model.NsgIds) m.KmsKeyId = model.KmsKeyId m.IsPvEncryptionInTransitEnabled = model.IsPvEncryptionInTransitEnabled @@ -104,10 +101,7 @@ func (m *UpdateNodePoolNodeConfigDetails) UnmarshalJSON(data []byte) (e error) { m.DefinedTags = model.DefinedTags m.PlacementConfigs = make([]NodePoolPlacementConfigDetails, len(model.PlacementConfigs)) - for i, n := range model.PlacementConfigs { - m.PlacementConfigs[i] = n - } - + copy(m.PlacementConfigs, model.PlacementConfigs) nn, e = model.NodePoolPodNetworkOptionDetails.UnmarshalPolymorphicJSON(model.NodePoolPodNetworkOptionDetails.JsonData) if e != nil { return diff --git a/containerinstances/container.go b/containerinstances/container.go index 2f8c7f8d8b..c9ca246831 100644 --- a/containerinstances/container.go +++ b/containerinstances/container.go @@ -187,24 +187,15 @@ func (m *Container) UnmarshalJSON(data []byte) (e error) { m.TimeUpdated = model.TimeUpdated m.Command = make([]string, len(model.Command)) - for i, n := range model.Command { - m.Command[i] = n - } - + copy(m.Command, model.Command) m.Arguments = make([]string, len(model.Arguments)) - for i, n := range model.Arguments { - m.Arguments[i] = n - } - + copy(m.Arguments, model.Arguments) m.WorkingDirectory = model.WorkingDirectory m.EnvironmentVariables = model.EnvironmentVariables m.VolumeMounts = make([]VolumeMount, len(model.VolumeMounts)) - for i, n := range model.VolumeMounts { - m.VolumeMounts[i] = n - } - + copy(m.VolumeMounts, model.VolumeMounts) m.HealthChecks = make([]ContainerHealthCheck, len(model.HealthChecks)) for i, n := range model.HealthChecks { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -217,7 +208,6 @@ func (m *Container) UnmarshalJSON(data []byte) (e error) { m.HealthChecks[i] = nil } } - m.IsResourcePrincipalDisabled = model.IsResourcePrincipalDisabled m.ResourceConfig = model.ResourceConfig diff --git a/containerinstances/container_health_check.go b/containerinstances/container_health_check.go index 748a963e95..3d9fed541e 100644 --- a/containerinstances/container_health_check.go +++ b/containerinstances/container_health_check.go @@ -114,47 +114,47 @@ func (m *containerhealthcheck) UnmarshalPolymorphicJSON(data []byte) (interface{ } } -//GetName returns Name +// GetName returns Name func (m containerhealthcheck) GetName() *string { return m.Name } -//GetInitialDelayInSeconds returns InitialDelayInSeconds +// GetInitialDelayInSeconds returns InitialDelayInSeconds func (m containerhealthcheck) GetInitialDelayInSeconds() *int { return m.InitialDelayInSeconds } -//GetIntervalInSeconds returns IntervalInSeconds +// GetIntervalInSeconds returns IntervalInSeconds func (m containerhealthcheck) GetIntervalInSeconds() *int { return m.IntervalInSeconds } -//GetFailureThreshold returns FailureThreshold +// GetFailureThreshold returns FailureThreshold func (m containerhealthcheck) GetFailureThreshold() *int { return m.FailureThreshold } -//GetSuccessThreshold returns SuccessThreshold +// GetSuccessThreshold returns SuccessThreshold func (m containerhealthcheck) GetSuccessThreshold() *int { return m.SuccessThreshold } -//GetTimeoutInSeconds returns TimeoutInSeconds +// GetTimeoutInSeconds returns TimeoutInSeconds func (m containerhealthcheck) GetTimeoutInSeconds() *int { return m.TimeoutInSeconds } -//GetStatus returns Status +// GetStatus returns Status func (m containerhealthcheck) GetStatus() ContainerHealthCheckStatusEnum { return m.Status } -//GetStatusDetails returns StatusDetails +// GetStatusDetails returns StatusDetails func (m containerhealthcheck) GetStatusDetails() *string { return m.StatusDetails } -//GetFailureAction returns FailureAction +// GetFailureAction returns FailureAction func (m containerhealthcheck) GetFailureAction() ContainerHealthCheckFailureActionEnum { return m.FailureAction } diff --git a/containerinstances/container_instance.go b/containerinstances/container_instance.go index 75034693e9..647cc3b60c 100644 --- a/containerinstances/container_instance.go +++ b/containerinstances/container_instance.go @@ -171,7 +171,6 @@ func (m *ContainerInstance) UnmarshalJSON(data []byte) (e error) { m.Volumes[i] = nil } } - m.VolumeCount = model.VolumeCount m.TimeUpdated = model.TimeUpdated @@ -192,7 +191,6 @@ func (m *ContainerInstance) UnmarshalJSON(data []byte) (e error) { m.ImagePullSecrets[i] = nil } } - m.Id = model.Id m.DisplayName = model.DisplayName @@ -204,10 +202,7 @@ func (m *ContainerInstance) UnmarshalJSON(data []byte) (e error) { m.LifecycleState = model.LifecycleState m.Containers = make([]ContainerInstanceContainer, len(model.Containers)) - for i, n := range model.Containers { - m.Containers[i] = n - } - + copy(m.Containers, model.Containers) m.ContainerCount = model.ContainerCount m.TimeCreated = model.TimeCreated @@ -217,10 +212,7 @@ func (m *ContainerInstance) UnmarshalJSON(data []byte) (e error) { m.ShapeConfig = model.ShapeConfig m.Vnics = make([]ContainerVnic, len(model.Vnics)) - for i, n := range model.Vnics { - m.Vnics[i] = n - } - + copy(m.Vnics, model.Vnics) m.ContainerRestartPolicy = model.ContainerRestartPolicy return diff --git a/containerinstances/container_volume.go b/containerinstances/container_volume.go index 25465e03c7..1669ee8b1f 100644 --- a/containerinstances/container_volume.go +++ b/containerinstances/container_volume.go @@ -70,7 +70,7 @@ func (m *containervolume) UnmarshalPolymorphicJSON(data []byte) (interface{}, er } } -//GetName returns Name +// GetName returns Name func (m containervolume) GetName() *string { return m.Name } diff --git a/containerinstances/containerinstances_containerinstance_client.go b/containerinstances/containerinstances_containerinstance_client.go index decee89495..58055bce46 100644 --- a/containerinstances/containerinstances_containerinstance_client.go +++ b/containerinstances/containerinstances_containerinstance_client.go @@ -80,7 +80,7 @@ func (client *ContainerInstanceClient) setConfigurationProvider(configProvider c 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/containerinstances/create_container_details.go b/containerinstances/create_container_details.go index 91a50d4f16..cce171a6a4 100644 --- a/containerinstances/create_container_details.go +++ b/containerinstances/create_container_details.go @@ -121,24 +121,15 @@ func (m *CreateContainerDetails) UnmarshalJSON(data []byte) (e error) { m.DisplayName = model.DisplayName m.Command = make([]string, len(model.Command)) - for i, n := range model.Command { - m.Command[i] = n - } - + copy(m.Command, model.Command) m.Arguments = make([]string, len(model.Arguments)) - for i, n := range model.Arguments { - m.Arguments[i] = n - } - + copy(m.Arguments, model.Arguments) m.WorkingDirectory = model.WorkingDirectory m.EnvironmentVariables = model.EnvironmentVariables m.VolumeMounts = make([]CreateVolumeMountDetails, len(model.VolumeMounts)) - for i, n := range model.VolumeMounts { - m.VolumeMounts[i] = n - } - + copy(m.VolumeMounts, model.VolumeMounts) m.IsResourcePrincipalDisabled = model.IsResourcePrincipalDisabled m.ResourceConfig = model.ResourceConfig @@ -155,7 +146,6 @@ func (m *CreateContainerDetails) UnmarshalJSON(data []byte) (e error) { m.HealthChecks[i] = nil } } - nn, e = model.SecurityContext.UnmarshalPolymorphicJSON(model.SecurityContext.JsonData) if e != nil { return diff --git a/containerinstances/create_container_health_check_details.go b/containerinstances/create_container_health_check_details.go index 7ee345d6b6..c4da8f354e 100644 --- a/containerinstances/create_container_health_check_details.go +++ b/containerinstances/create_container_health_check_details.go @@ -104,37 +104,37 @@ func (m *createcontainerhealthcheckdetails) UnmarshalPolymorphicJSON(data []byte } } -//GetName returns Name +// GetName returns Name func (m createcontainerhealthcheckdetails) GetName() *string { return m.Name } -//GetInitialDelayInSeconds returns InitialDelayInSeconds +// GetInitialDelayInSeconds returns InitialDelayInSeconds func (m createcontainerhealthcheckdetails) GetInitialDelayInSeconds() *int { return m.InitialDelayInSeconds } -//GetIntervalInSeconds returns IntervalInSeconds +// GetIntervalInSeconds returns IntervalInSeconds func (m createcontainerhealthcheckdetails) GetIntervalInSeconds() *int { return m.IntervalInSeconds } -//GetFailureThreshold returns FailureThreshold +// GetFailureThreshold returns FailureThreshold func (m createcontainerhealthcheckdetails) GetFailureThreshold() *int { return m.FailureThreshold } -//GetSuccessThreshold returns SuccessThreshold +// GetSuccessThreshold returns SuccessThreshold func (m createcontainerhealthcheckdetails) GetSuccessThreshold() *int { return m.SuccessThreshold } -//GetTimeoutInSeconds returns TimeoutInSeconds +// GetTimeoutInSeconds returns TimeoutInSeconds func (m createcontainerhealthcheckdetails) GetTimeoutInSeconds() *int { return m.TimeoutInSeconds } -//GetFailureAction returns FailureAction +// GetFailureAction returns FailureAction func (m createcontainerhealthcheckdetails) GetFailureAction() ContainerHealthCheckFailureActionEnum { return m.FailureAction } diff --git a/containerinstances/create_container_instance_details.go b/containerinstances/create_container_instance_details.go index 9fe3664140..53b8b01e90 100644 --- a/containerinstances/create_container_instance_details.go +++ b/containerinstances/create_container_instance_details.go @@ -127,7 +127,6 @@ func (m *CreateContainerInstanceDetails) UnmarshalJSON(data []byte) (e error) { m.Volumes[i] = nil } } - m.DnsConfig = model.DnsConfig m.GracefulShutdownTimeoutInSeconds = model.GracefulShutdownTimeoutInSeconds @@ -144,7 +143,6 @@ func (m *CreateContainerInstanceDetails) UnmarshalJSON(data []byte) (e error) { m.ImagePullSecrets[i] = nil } } - m.ContainerRestartPolicy = model.ContainerRestartPolicy m.FreeformTags = model.FreeformTags @@ -160,14 +158,8 @@ func (m *CreateContainerInstanceDetails) UnmarshalJSON(data []byte) (e error) { m.ShapeConfig = model.ShapeConfig m.Containers = make([]CreateContainerDetails, len(model.Containers)) - for i, n := range model.Containers { - m.Containers[i] = n - } - + copy(m.Containers, model.Containers) m.Vnics = make([]CreateContainerVnicDetails, len(model.Vnics)) - for i, n := range model.Vnics { - m.Vnics[i] = n - } - + copy(m.Vnics, model.Vnics) return } diff --git a/containerinstances/create_container_volume_details.go b/containerinstances/create_container_volume_details.go index 7de642b9a3..af1e3126b3 100644 --- a/containerinstances/create_container_volume_details.go +++ b/containerinstances/create_container_volume_details.go @@ -70,7 +70,7 @@ func (m *createcontainervolumedetails) UnmarshalPolymorphicJSON(data []byte) (in } } -//GetName returns Name +// GetName returns Name func (m createcontainervolumedetails) GetName() *string { return m.Name } diff --git a/containerinstances/create_image_pull_secret_details.go b/containerinstances/create_image_pull_secret_details.go index a47fb8e75c..4a8c329b27 100644 --- a/containerinstances/create_image_pull_secret_details.go +++ b/containerinstances/create_image_pull_secret_details.go @@ -69,7 +69,7 @@ func (m *createimagepullsecretdetails) UnmarshalPolymorphicJSON(data []byte) (in } } -//GetRegistryEndpoint returns RegistryEndpoint +// GetRegistryEndpoint returns RegistryEndpoint func (m createimagepullsecretdetails) GetRegistryEndpoint() *string { return m.RegistryEndpoint } diff --git a/containerinstances/image_pull_secret.go b/containerinstances/image_pull_secret.go index 08f77fb994..f283c1c6dd 100644 --- a/containerinstances/image_pull_secret.go +++ b/containerinstances/image_pull_secret.go @@ -69,7 +69,7 @@ func (m *imagepullsecret) UnmarshalPolymorphicJSON(data []byte) (interface{}, er } } -//GetRegistryEndpoint returns RegistryEndpoint +// GetRegistryEndpoint returns RegistryEndpoint func (m imagepullsecret) GetRegistryEndpoint() *string { return m.RegistryEndpoint } diff --git a/core/add_drg_route_distribution_statement_details.go b/core/add_drg_route_distribution_statement_details.go index d615fd3d0b..b1756228db 100644 --- a/core/add_drg_route_distribution_statement_details.go +++ b/core/add_drg_route_distribution_statement_details.go @@ -83,7 +83,6 @@ func (m *AddDrgRouteDistributionStatementDetails) UnmarshalJSON(data []byte) (e m.MatchCriteria[i] = nil } } - m.Action = model.Action m.Priority = model.Priority diff --git a/core/amd_milan_bm_gpu_launch_instance_platform_config.go b/core/amd_milan_bm_gpu_launch_instance_platform_config.go index 11857a7479..6ecf57ee9c 100644 --- a/core/amd_milan_bm_gpu_launch_instance_platform_config.go +++ b/core/amd_milan_bm_gpu_launch_instance_platform_config.go @@ -57,6 +57,9 @@ type AmdMilanBmGpuLaunchInstancePlatformConfig struct { // Whether the input-output memory management unit is enabled. IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket AmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } diff --git a/core/amd_milan_bm_gpu_platform_config.go b/core/amd_milan_bm_gpu_platform_config.go index 9f5865f36f..808b9d2810 100644 --- a/core/amd_milan_bm_gpu_platform_config.go +++ b/core/amd_milan_bm_gpu_platform_config.go @@ -57,6 +57,9 @@ type AmdMilanBmGpuPlatformConfig struct { // Whether the input-output memory management unit is enabled. IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket AmdMilanBmGpuPlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } diff --git a/core/amd_milan_bm_launch_instance_platform_config.go b/core/amd_milan_bm_launch_instance_platform_config.go index 6aaba54d46..f3ff83a9e5 100644 --- a/core/amd_milan_bm_launch_instance_platform_config.go +++ b/core/amd_milan_bm_launch_instance_platform_config.go @@ -65,6 +65,9 @@ type AmdMilanBmLaunchInstancePlatformConfig struct { // itself is billed for the full shape, regardless of whether all cores are enabled. PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket AmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } diff --git a/core/amd_milan_bm_platform_config.go b/core/amd_milan_bm_platform_config.go index fe9a6ec96a..ab0a3b8abe 100644 --- a/core/amd_milan_bm_platform_config.go +++ b/core/amd_milan_bm_platform_config.go @@ -65,6 +65,9 @@ type AmdMilanBmPlatformConfig struct { // itself is billed for the full shape, regardless of whether all cores are enabled. PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket AmdMilanBmPlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } diff --git a/core/amd_rome_bm_gpu_launch_instance_platform_config.go b/core/amd_rome_bm_gpu_launch_instance_platform_config.go index fffc58eec7..4e83514f75 100644 --- a/core/amd_rome_bm_gpu_launch_instance_platform_config.go +++ b/core/amd_rome_bm_gpu_launch_instance_platform_config.go @@ -57,6 +57,9 @@ type AmdRomeBmGpuLaunchInstancePlatformConfig struct { // Whether the input-output memory management unit is enabled. IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket AmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } diff --git a/core/amd_rome_bm_gpu_platform_config.go b/core/amd_rome_bm_gpu_platform_config.go index 4ca9073405..60343228d9 100644 --- a/core/amd_rome_bm_gpu_platform_config.go +++ b/core/amd_rome_bm_gpu_platform_config.go @@ -57,6 +57,9 @@ type AmdRomeBmGpuPlatformConfig struct { // Whether the input-output memory management unit is enabled. IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket AmdRomeBmGpuPlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } diff --git a/core/amd_rome_bm_launch_instance_platform_config.go b/core/amd_rome_bm_launch_instance_platform_config.go index a7e79f10ed..9b51c6c4f0 100644 --- a/core/amd_rome_bm_launch_instance_platform_config.go +++ b/core/amd_rome_bm_launch_instance_platform_config.go @@ -65,6 +65,9 @@ type AmdRomeBmLaunchInstancePlatformConfig struct { // itself is billed for the full shape, regardless of whether all cores are enabled. PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket AmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } diff --git a/core/amd_rome_bm_platform_config.go b/core/amd_rome_bm_platform_config.go index 1d8f02bd64..a756f8f513 100644 --- a/core/amd_rome_bm_platform_config.go +++ b/core/amd_rome_bm_platform_config.go @@ -64,6 +64,9 @@ type AmdRomeBmPlatformConfig struct { // itself is billed for the full shape, regardless of whether all cores are enabled. PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket AmdRomeBmPlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } diff --git a/core/attach_volume_details.go b/core/attach_volume_details.go index 51e891a966..c9a3f9bdf6 100644 --- a/core/attach_volume_details.go +++ b/core/attach_volume_details.go @@ -50,12 +50,12 @@ type AttachVolumeDetails interface { type attachvolumedetails struct { JsonData []byte - InstanceId *string `mandatory:"true" json:"instanceId"` - VolumeId *string `mandatory:"true" json:"volumeId"` Device *string `mandatory:"false" json:"device"` DisplayName *string `mandatory:"false" json:"displayName"` IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` IsShareable *bool `mandatory:"false" json:"isShareable"` + InstanceId *string `mandatory:"true" json:"instanceId"` + VolumeId *string `mandatory:"true" json:"volumeId"` Type string `json:"type"` } @@ -112,36 +112,36 @@ func (m *attachvolumedetails) UnmarshalPolymorphicJSON(data []byte) (interface{} } } -//GetInstanceId returns InstanceId -func (m attachvolumedetails) GetInstanceId() *string { - return m.InstanceId -} - -//GetVolumeId returns VolumeId -func (m attachvolumedetails) GetVolumeId() *string { - return m.VolumeId -} - -//GetDevice returns Device +// GetDevice returns Device func (m attachvolumedetails) GetDevice() *string { return m.Device } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m attachvolumedetails) GetDisplayName() *string { return m.DisplayName } -//GetIsReadOnly returns IsReadOnly +// GetIsReadOnly returns IsReadOnly func (m attachvolumedetails) GetIsReadOnly() *bool { return m.IsReadOnly } -//GetIsShareable returns IsShareable +// GetIsShareable returns IsShareable func (m attachvolumedetails) GetIsShareable() *bool { return m.IsShareable } +// GetInstanceId returns InstanceId +func (m attachvolumedetails) GetInstanceId() *string { + return m.InstanceId +} + +// GetVolumeId returns VolumeId +func (m attachvolumedetails) GetVolumeId() *string { + return m.VolumeId +} + func (m attachvolumedetails) String() string { return common.PointerString(m) } diff --git a/core/boot_volume.go b/core/boot_volume.go index 21add48e6a..da19cea90e 100644 --- a/core/boot_volume.go +++ b/core/boot_volume.go @@ -197,10 +197,7 @@ func (m *BootVolume) UnmarshalJSON(data []byte) (e error) { m.AutoTunedVpusPerGB = model.AutoTunedVpusPerGB m.BootVolumeReplicas = make([]BootVolumeReplicaInfo, len(model.BootVolumeReplicas)) - for i, n := range model.BootVolumeReplicas { - m.BootVolumeReplicas[i] = n - } - + copy(m.BootVolumeReplicas, model.BootVolumeReplicas) m.AutotunePolicies = make([]AutotunePolicy, len(model.AutotunePolicies)) for i, n := range model.AutotunePolicies { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -213,7 +210,6 @@ func (m *BootVolume) UnmarshalJSON(data []byte) (e error) { m.AutotunePolicies[i] = nil } } - m.AvailabilityDomain = model.AvailabilityDomain m.CompartmentId = model.CompartmentId diff --git a/core/capture_filter.go b/core/capture_filter.go index f8afe72646..200512cfce 100644 --- a/core/capture_filter.go +++ b/core/capture_filter.go @@ -21,8 +21,9 @@ import ( "strings" ) -// CaptureFilter A capture filter contains a set of *CaptureFilterRuleDetails* governing what traffic a *Vtap* mirrors. -// The capture filter is created with no rules defined, and it must have at least one rule for the VTAP to start mirroring traffic. +// CaptureFilter A capture filter contains a set of *CaptureFilterRuleDetails* governing what traffic is +// mirrored for a *Vtap* or captured for a *VCN Flow Log (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/vcn-flow-logs.htm)*. +// The capture filter is created with no rules defined, and it must have at least one rule to mirror traffic for the VTAP or collect VCN flow logs. type CaptureFilter struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the capture filter. diff --git a/core/change_capture_filter_compartment_details.go b/core/change_capture_filter_compartment_details.go index 883b8d2c8e..21f9e75c1a 100644 --- a/core/change_capture_filter_compartment_details.go +++ b/core/change_capture_filter_compartment_details.go @@ -21,7 +21,7 @@ import ( "strings" ) -// ChangeCaptureFilterCompartmentDetails These configuration details are used in the move operation when changing the compartment containing a virtual test access point (VTAP) capture filter. +// ChangeCaptureFilterCompartmentDetails These configuration details are used in the move operation when changing the compartment containing a capture filter. type ChangeCaptureFilterCompartmentDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the destination compartment for the VTAP diff --git a/core/cluster_network_placement_configuration_details.go b/core/cluster_network_placement_configuration_details.go index 4e8d57f97d..54febd508b 100644 --- a/core/cluster_network_placement_configuration_details.go +++ b/core/cluster_network_placement_configuration_details.go @@ -28,13 +28,15 @@ type ClusterNetworkPlacementConfigurationDetails struct { // Example: `Uocm:PHX-AD-1` AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet to place - // instances. - PrimarySubnetId *string `mandatory:"true" json:"primarySubnetId"` - // The placement constraint when reserving hosts. PlacementConstraint ClusterNetworkPlacementConfigurationDetailsPlacementConstraintEnum `mandatory:"false" json:"placementConstraint,omitempty"` + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet to place instances. This field is deprecated. + // Use `primaryVnicSubnets` instead to set VNIC data for instances in the pool. + PrimarySubnetId *string `mandatory:"false" json:"primarySubnetId"` + + PrimaryVnicSubnets *InstancePoolPlacementPrimarySubnet `mandatory:"false" json:"primaryVnicSubnets"` + // The set of secondary VNIC data for instances in the pool. SecondaryVnicSubnets []InstancePoolPlacementSecondaryVnicSubnet `mandatory:"false" json:"secondaryVnicSubnets"` } diff --git a/core/core_blockstorage_client.go b/core/core_blockstorage_client.go index d72f41063b..894b03573a 100644 --- a/core/core_blockstorage_client.go +++ b/core/core_blockstorage_client.go @@ -86,7 +86,7 @@ func (client *BlockstorageClient) setConfigurationProvider(configProvider common 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/core/core_compute_client.go b/core/core_compute_client.go index 114a832779..3451c7e7ee 100644 --- a/core/core_compute_client.go +++ b/core/core_compute_client.go @@ -84,7 +84,7 @@ func (client *ComputeClient) setConfigurationProvider(configProvider common.Conf 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/core/core_computemanagement_client.go b/core/core_computemanagement_client.go index 14594dd83b..04219c9a5e 100644 --- a/core/core_computemanagement_client.go +++ b/core/core_computemanagement_client.go @@ -86,7 +86,7 @@ func (client *ComputeManagementClient) setConfigurationProvider(configProvider c 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/core/core_virtualnetwork_client.go b/core/core_virtualnetwork_client.go index fe999c930b..3510649e50 100644 --- a/core/core_virtualnetwork_client.go +++ b/core/core_virtualnetwork_client.go @@ -86,7 +86,7 @@ func (client *VirtualNetworkClient) setConfigurationProvider(configProvider comm 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil @@ -11713,6 +11713,64 @@ func (client VirtualNetworkClient) listVcns(ctx context.Context, request common. return response, err } +// ListVirtualCircuitAssociatedTunnels Gets the specified virtual circuit's associatedTunnelsInfo. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVirtualCircuitAssociatedTunnels.go.html to see an example of how to use ListVirtualCircuitAssociatedTunnels API. +// A default retry strategy applies to this operation ListVirtualCircuitAssociatedTunnels() +func (client VirtualNetworkClient) ListVirtualCircuitAssociatedTunnels(ctx context.Context, request ListVirtualCircuitAssociatedTunnelsRequest) (response ListVirtualCircuitAssociatedTunnelsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVirtualCircuitAssociatedTunnels, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListVirtualCircuitAssociatedTunnelsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListVirtualCircuitAssociatedTunnelsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListVirtualCircuitAssociatedTunnelsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVirtualCircuitAssociatedTunnelsResponse") + } + return +} + +// listVirtualCircuitAssociatedTunnels implements the OCIOperation interface (enables retrying operations) +func (client VirtualNetworkClient) listVirtualCircuitAssociatedTunnels(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/virtualCircuits/{virtualCircuitId}/associatedTunnels", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListVirtualCircuitAssociatedTunnelsResponse + 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/iaas/20160918/VirtualCircuitAssociatedTunnelDetails/ListVirtualCircuitAssociatedTunnels" + err = common.PostProcessServiceError(err, "VirtualNetwork", "ListVirtualCircuitAssociatedTunnels", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListVirtualCircuitBandwidthShapes The deprecated operation lists available bandwidth levels for virtual circuits. For the compartment ID, provide the OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of your tenancy (the root compartment). // // See also diff --git a/core/cpe.go b/core/cpe.go index ed42d02df7..5304fc0f4a 100644 --- a/core/cpe.go +++ b/core/cpe.go @@ -71,6 +71,9 @@ type Cpe struct { // The date and time the CPE was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). // Example: `2016-08-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Indicates whether this CPE is of type `private` or not. + IsPrivate *bool `mandatory:"false" json:"isPrivate"` } func (m Cpe) String() string { diff --git a/core/create_boot_volume_details.go b/core/create_boot_volume_details.go index dda0189402..081f182c6c 100644 --- a/core/create_boot_volume_details.go +++ b/core/create_boot_volume_details.go @@ -139,10 +139,7 @@ func (m *CreateBootVolumeDetails) UnmarshalJSON(data []byte) (e error) { m.IsAutoTuneEnabled = model.IsAutoTuneEnabled m.BootVolumeReplicas = make([]BootVolumeReplicaDetails, len(model.BootVolumeReplicas)) - for i, n := range model.BootVolumeReplicas { - m.BootVolumeReplicas[i] = n - } - + copy(m.BootVolumeReplicas, model.BootVolumeReplicas) m.AutotunePolicies = make([]AutotunePolicy, len(model.AutotunePolicies)) for i, n := range model.AutotunePolicies { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -155,7 +152,6 @@ func (m *CreateBootVolumeDetails) UnmarshalJSON(data []byte) (e error) { m.AutotunePolicies[i] = nil } } - m.CompartmentId = model.CompartmentId nn, e = model.SourceDetails.UnmarshalPolymorphicJSON(model.SourceDetails.JsonData) diff --git a/core/create_capture_filter_details.go b/core/create_capture_filter_details.go index d7adaa104e..5ff6cabb34 100644 --- a/core/create_capture_filter_details.go +++ b/core/create_capture_filter_details.go @@ -21,7 +21,7 @@ import ( "strings" ) -// CreateCaptureFilterDetails A capture filter contains a set of rules governing what traffic a VTAP mirrors. +// CreateCaptureFilterDetails A capture filter contains a set of rules governing what traffic a VTAP mirrors or a VCN flow log collects. type CreateCaptureFilterDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the capture filter. diff --git a/core/create_cpe_details.go b/core/create_cpe_details.go index 94545f5cf4..97d035f710 100644 --- a/core/create_cpe_details.go +++ b/core/create_cpe_details.go @@ -56,6 +56,9 @@ type CreateCpeDetails struct { // * GetTunnelCpeDeviceConfigContent // * GetTunnelCpeDeviceConfig CpeDeviceShapeId *string `mandatory:"false" json:"cpeDeviceShapeId"` + + // Indicates whether this CPE is of type `private` or not. + IsPrivate *bool `mandatory:"false" json:"isPrivate"` } func (m CreateCpeDetails) String() string { diff --git a/core/create_dhcp_details.go b/core/create_dhcp_details.go index d3477a1e41..875c7c30ad 100644 --- a/core/create_dhcp_details.go +++ b/core/create_dhcp_details.go @@ -110,7 +110,6 @@ func (m *CreateDhcpDetails) UnmarshalJSON(data []byte) (e error) { m.Options[i] = nil } } - m.VcnId = model.VcnId return diff --git a/core/create_instance_configuration_base.go b/core/create_instance_configuration_base.go index 8929eee6e6..e49a2e924b 100644 --- a/core/create_instance_configuration_base.go +++ b/core/create_instance_configuration_base.go @@ -46,10 +46,10 @@ type CreateInstanceConfigurationBase interface { type createinstanceconfigurationbase struct { JsonData []byte - CompartmentId *string `mandatory:"true" json:"compartmentId"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` DisplayName *string `mandatory:"false" json:"displayName"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` Source string `json:"source"` } @@ -96,26 +96,26 @@ func (m *createinstanceconfigurationbase) UnmarshalPolymorphicJSON(data []byte) } } -//GetCompartmentId returns CompartmentId -func (m createinstanceconfigurationbase) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createinstanceconfigurationbase) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createinstanceconfigurationbase) GetDisplayName() *string { return m.DisplayName } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createinstanceconfigurationbase) GetFreeformTags() map[string]string { return m.FreeformTags } +// GetCompartmentId returns CompartmentId +func (m createinstanceconfigurationbase) GetCompartmentId() *string { + return m.CompartmentId +} + func (m createinstanceconfigurationbase) String() string { return common.PointerString(m) } diff --git a/core/create_instance_pool_placement_configuration_details.go b/core/create_instance_pool_placement_configuration_details.go index bf38a37ed1..2a486971b1 100644 --- a/core/create_instance_pool_placement_configuration_details.go +++ b/core/create_instance_pool_placement_configuration_details.go @@ -28,10 +28,6 @@ type CreateInstancePoolPlacementConfigurationDetails struct { // Example: `Uocm:PHX-AD-1` AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet in which to place - // instances. - PrimarySubnetId *string `mandatory:"true" json:"primarySubnetId"` - // The fault domains to place instances. // If you don't provide any values, the system makes a best effort to distribute // instances across all fault domains based on capacity. @@ -44,6 +40,12 @@ type CreateInstancePoolPlacementConfigurationDetails struct { // Example: `[FAULT-DOMAIN-1, FAULT-DOMAIN-2, FAULT-DOMAIN-3]` FaultDomains []string `mandatory:"false" json:"faultDomains"` + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet in which to place instances. This field is deprecated. + // Use `primaryVnicSubnets` instead to set VNIC data for instances in the pool. + PrimarySubnetId *string `mandatory:"false" json:"primarySubnetId"` + + PrimaryVnicSubnets *InstancePoolPlacementPrimarySubnet `mandatory:"false" json:"primaryVnicSubnets"` + // The set of secondary VNIC data for instances in the pool. SecondaryVnicSubnets []InstancePoolPlacementSecondaryVnicSubnet `mandatory:"false" json:"secondaryVnicSubnets"` } diff --git a/core/create_ip_sec_connection_tunnel_details.go b/core/create_ip_sec_connection_tunnel_details.go index 82f16d410c..d3d4c37458 100644 --- a/core/create_ip_sec_connection_tunnel_details.go +++ b/core/create_ip_sec_connection_tunnel_details.go @@ -59,6 +59,16 @@ type CreateIpSecConnectionTunnelDetails struct { DpdConfig *DpdConfig `mandatory:"false" json:"dpdConfig"` + // The headend IP that you can choose on the Oracle side to terminate your private IPSec tunnel. + OracleTunnelIp *string `mandatory:"false" json:"oracleTunnelIp"` + + // The list of virtual circuit OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)s over which your network can reach this tunnel. + AssociatedVirtualCircuits []string `mandatory:"false" json:"associatedVirtualCircuits"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG route table assigned to this attachment. + // The DRG route table manages traffic inside the DRG. + DrgRouteTableId *string `mandatory:"false" json:"drgRouteTableId"` + EncryptionDomainConfig *CreateIpSecTunnelEncryptionDomainDetails `mandatory:"false" json:"encryptionDomainConfig"` } diff --git a/core/create_macsec_properties.go b/core/create_macsec_properties.go index 5c02b1b017..aa1cc2ff48 100644 --- a/core/create_macsec_properties.go +++ b/core/create_macsec_properties.go @@ -31,6 +31,9 @@ type CreateMacsecProperties struct { // Type of encryption cipher suite to use for the MACsec connection. EncryptionCipher MacsecEncryptionCipherEnum `mandatory:"false" json:"encryptionCipher,omitempty"` + + // Indicates whether unencrypted traffic is allowed if MACsec Key Agreement protocol (MKA) fails. + IsUnprotectedTrafficAllowed *bool `mandatory:"false" json:"isUnprotectedTrafficAllowed"` } func (m CreateMacsecProperties) String() string { diff --git a/core/create_virtual_circuit_details.go b/core/create_virtual_circuit_details.go index 5e6ff90db9..b7c148d853 100644 --- a/core/create_virtual_circuit_details.go +++ b/core/create_virtual_circuit_details.go @@ -54,6 +54,9 @@ type CreateVirtualCircuitDetails struct { // Set to `true` to enable BFD for IPv4 BGP peering, or set to `false` to disable BFD. If this is not set, the default is `false`. IsBfdEnabled *bool `mandatory:"false" json:"isBfdEnabled"` + // Set to `true` for the virtual circuit to carry only encrypted traffic, or set to `false` for the virtual circuit to carry unencrypted traffic. If this is not set, the default is `false`. + IsTransportMode *bool `mandatory:"false" json:"isTransportMode"` + // Deprecated. Instead use `customerAsn`. // If you specify values for both, the request will be rejected. CustomerBgpAsn *int `mandatory:"false" json:"customerBgpAsn"` diff --git a/core/create_vnic_details.go b/core/create_vnic_details.go index fd4d3b7d4e..3fb456c6f4 100644 --- a/core/create_vnic_details.go +++ b/core/create_vnic_details.go @@ -27,6 +27,13 @@ import ( // Virtual Network Interface Cards (VNICs) (https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingVNICs.htm). type CreateVnicDetails struct { + // Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled + // subnet. Default: False. When provided you may optionally provide an IPv6 prefix + // (`ipv6SubnetCidr`) of your choice to assign the IPv6 address from. If `ipv6SubnetCidr` + // is not provided then an IPv6 prefix is chosen + // for you. + AssignIpv6Ip *bool `mandatory:"false" json:"assignIpv6Ip"` + // Whether the VNIC should be assigned a public IP address. Defaults to whether // the subnet is public or private. If not set and the VNIC is being created // in a private subnet (that is, where `prohibitPublicIpOnVnic` = true in the @@ -89,6 +96,12 @@ type CreateVnicDetails struct { // can not be assigned a hostname. See Vlan. HostnameLabel *string `mandatory:"false" json:"hostnameLabel"` + // A list of IPv6 prefix ranges from which the VNIC is assigned an IPv6 address. + // You can provide only the prefix ranges from which OCI selects an available + // address from the range. You can optionally choose to leave the prefix range empty + // and instead provide the specific IPv6 address within that range to use. + Ipv6AddressIpv6SubnetCidrPairDetails []Ipv6AddressIpv6SubnetCidrPairDetails `mandatory:"false" json:"ipv6AddressIpv6SubnetCidrPairDetails"` + // A list of the OCIDs of the network security groups (NSGs) to add the VNIC to. For more // information about NSGs, see // NetworkSecurityGroup. diff --git a/core/create_volume_details.go b/core/create_volume_details.go index 224f06193f..e211dd4cec 100644 --- a/core/create_volume_details.go +++ b/core/create_volume_details.go @@ -166,10 +166,7 @@ func (m *CreateVolumeDetails) UnmarshalJSON(data []byte) (e error) { m.IsAutoTuneEnabled = model.IsAutoTuneEnabled m.BlockVolumeReplicas = make([]BlockVolumeReplicaDetails, len(model.BlockVolumeReplicas)) - for i, n := range model.BlockVolumeReplicas { - m.BlockVolumeReplicas[i] = n - } - + copy(m.BlockVolumeReplicas, model.BlockVolumeReplicas) m.AutotunePolicies = make([]AutotunePolicy, len(model.AutotunePolicies)) for i, n := range model.AutotunePolicies { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -182,7 +179,6 @@ func (m *CreateVolumeDetails) UnmarshalJSON(data []byte) (e error) { m.AutotunePolicies[i] = nil } } - m.CompartmentId = model.CompartmentId return diff --git a/core/create_volume_group_details.go b/core/create_volume_group_details.go index 8ff819512e..2d18bb4387 100644 --- a/core/create_volume_group_details.go +++ b/core/create_volume_group_details.go @@ -99,10 +99,7 @@ func (m *CreateVolumeGroupDetails) UnmarshalJSON(data []byte) (e error) { m.FreeformTags = model.FreeformTags m.VolumeGroupReplicas = make([]VolumeGroupReplicaDetails, len(model.VolumeGroupReplicas)) - for i, n := range model.VolumeGroupReplicas { - m.VolumeGroupReplicas[i] = n - } - + copy(m.VolumeGroupReplicas, model.VolumeGroupReplicas) m.AvailabilityDomain = model.AvailabilityDomain m.CompartmentId = model.CompartmentId diff --git a/core/dhcp_options.go b/core/dhcp_options.go index 8a288fd09b..a9866504ab 100644 --- a/core/dhcp_options.go +++ b/core/dhcp_options.go @@ -140,7 +140,6 @@ func (m *DhcpOptions) UnmarshalJSON(data []byte) (e error) { m.Options[i] = nil } } - m.TimeCreated = model.TimeCreated m.VcnId = model.VcnId diff --git a/core/drg_attachment_network_create_details.go b/core/drg_attachment_network_create_details.go index 6e1e3273fd..cef401e927 100644 --- a/core/drg_attachment_network_create_details.go +++ b/core/drg_attachment_network_create_details.go @@ -31,7 +31,7 @@ type DrgAttachmentNetworkCreateDetails interface { type drgattachmentnetworkcreatedetails struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` + Id *string `mandatory:"false" json:"id"` Type string `json:"type"` } @@ -71,7 +71,7 @@ func (m *drgattachmentnetworkcreatedetails) UnmarshalPolymorphicJSON(data []byte } } -//GetId returns Id +// GetId returns Id func (m drgattachmentnetworkcreatedetails) GetId() *string { return m.Id } diff --git a/core/drg_attachment_network_details.go b/core/drg_attachment_network_details.go index 098c58a683..a9c0445ea1 100644 --- a/core/drg_attachment_network_details.go +++ b/core/drg_attachment_network_details.go @@ -31,7 +31,7 @@ type DrgAttachmentNetworkDetails interface { type drgattachmentnetworkdetails struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` + Id *string `mandatory:"false" json:"id"` Type string `json:"type"` } @@ -65,6 +65,10 @@ func (m *drgattachmentnetworkdetails) UnmarshalPolymorphicJSON(data []byte) (int mm := VcnDrgAttachmentNetworkDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "LOOPBACK": + mm := LoopBackDrgAttachmentNetworkDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "IPSEC_TUNNEL": mm := IpsecTunnelDrgAttachmentNetworkDetails{} err = json.Unmarshal(data, &mm) @@ -83,7 +87,7 @@ func (m *drgattachmentnetworkdetails) UnmarshalPolymorphicJSON(data []byte) (int } } -//GetId returns Id +// GetId returns Id func (m drgattachmentnetworkdetails) GetId() *string { return m.Id } diff --git a/core/drg_route_distribution_statement.go b/core/drg_route_distribution_statement.go index fa9d54637d..3e04abb2bc 100644 --- a/core/drg_route_distribution_statement.go +++ b/core/drg_route_distribution_statement.go @@ -90,7 +90,6 @@ func (m *DrgRouteDistributionStatement) UnmarshalJSON(data []byte) (e error) { m.MatchCriteria[i] = nil } } - m.Action = model.Action m.Priority = model.Priority diff --git a/core/export_image_details.go b/core/export_image_details.go index c39bee8ed1..2c8b30b687 100644 --- a/core/export_image_details.go +++ b/core/export_image_details.go @@ -88,7 +88,7 @@ func (m *exportimagedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetExportFormat returns ExportFormat +// GetExportFormat returns ExportFormat func (m exportimagedetails) GetExportFormat() ExportImageDetailsExportFormatEnum { return m.ExportFormat } diff --git a/core/generic_bm_launch_instance_platform_config.go b/core/generic_bm_launch_instance_platform_config.go new file mode 100644 index 0000000000..e6c023c072 --- /dev/null +++ b/core/generic_bm_launch_instance_platform_config.go @@ -0,0 +1,175 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GenericBmLaunchInstancePlatformConfig The standard platform configuration to be used when launching a bare metal instance. +type GenericBmLaunchInstancePlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the Access Control Service is enabled on the instance. When enabled, + // the platform can enforce PCIe device isolation, required for VFIO device pass-through. + IsAccessControlServiceEnabled *bool `mandatory:"false" json:"isAccessControlServiceEnabled"` + + // Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes + // or VT-x for Intel shapes. + AreVirtualInstructionsEnabled *bool `mandatory:"false" json:"areVirtualInstructionsEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +//GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m GenericBmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m GenericBmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m GenericBmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m GenericBmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m GenericBmLaunchInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m GenericBmLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m GenericBmLaunchInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeGenericBmLaunchInstancePlatformConfig GenericBmLaunchInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeGenericBmLaunchInstancePlatformConfig + }{ + "GENERIC_BM", + (MarshalTypeGenericBmLaunchInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +const ( + GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0 GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS0" + GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1 GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS1" + GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2 GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS2" + GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4 GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS4" +) + +var mappingGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = map[string]GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "NPS0": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "NPS1": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "NPS2": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "NPS4": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4, +} + +var mappingGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "nps0": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "nps1": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "nps2": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "nps4": GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4, +} + +// GetGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues() []GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values := make([]GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS0", + "NPS1", + "NPS2", + "NPS4", + } +} + +// GetMappingGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(val string) (GenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/core/generic_bm_platform_config.go b/core/generic_bm_platform_config.go new file mode 100644 index 0000000000..65e954a809 --- /dev/null +++ b/core/generic_bm_platform_config.go @@ -0,0 +1,175 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GenericBmPlatformConfig The standard platform configuration of a bare metal instance. +type GenericBmPlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the Access Control Service is enabled on the instance. When enabled, + // the platform can enforce PCIe device isolation, required for VFIO device pass-through. + IsAccessControlServiceEnabled *bool `mandatory:"false" json:"isAccessControlServiceEnabled"` + + // Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes + // or VT-x for Intel shapes. + AreVirtualInstructionsEnabled *bool `mandatory:"false" json:"areVirtualInstructionsEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket GenericBmPlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +//GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m GenericBmPlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m GenericBmPlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m GenericBmPlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m GenericBmPlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m GenericBmPlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m GenericBmPlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingGenericBmPlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetGenericBmPlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m GenericBmPlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeGenericBmPlatformConfig GenericBmPlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeGenericBmPlatformConfig + }{ + "GENERIC_BM", + (MarshalTypeGenericBmPlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// GenericBmPlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type GenericBmPlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for GenericBmPlatformConfigNumaNodesPerSocketEnum +const ( + GenericBmPlatformConfigNumaNodesPerSocketNps0 GenericBmPlatformConfigNumaNodesPerSocketEnum = "NPS0" + GenericBmPlatformConfigNumaNodesPerSocketNps1 GenericBmPlatformConfigNumaNodesPerSocketEnum = "NPS1" + GenericBmPlatformConfigNumaNodesPerSocketNps2 GenericBmPlatformConfigNumaNodesPerSocketEnum = "NPS2" + GenericBmPlatformConfigNumaNodesPerSocketNps4 GenericBmPlatformConfigNumaNodesPerSocketEnum = "NPS4" +) + +var mappingGenericBmPlatformConfigNumaNodesPerSocketEnum = map[string]GenericBmPlatformConfigNumaNodesPerSocketEnum{ + "NPS0": GenericBmPlatformConfigNumaNodesPerSocketNps0, + "NPS1": GenericBmPlatformConfigNumaNodesPerSocketNps1, + "NPS2": GenericBmPlatformConfigNumaNodesPerSocketNps2, + "NPS4": GenericBmPlatformConfigNumaNodesPerSocketNps4, +} + +var mappingGenericBmPlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]GenericBmPlatformConfigNumaNodesPerSocketEnum{ + "nps0": GenericBmPlatformConfigNumaNodesPerSocketNps0, + "nps1": GenericBmPlatformConfigNumaNodesPerSocketNps1, + "nps2": GenericBmPlatformConfigNumaNodesPerSocketNps2, + "nps4": GenericBmPlatformConfigNumaNodesPerSocketNps4, +} + +// GetGenericBmPlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for GenericBmPlatformConfigNumaNodesPerSocketEnum +func GetGenericBmPlatformConfigNumaNodesPerSocketEnumValues() []GenericBmPlatformConfigNumaNodesPerSocketEnum { + values := make([]GenericBmPlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingGenericBmPlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetGenericBmPlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for GenericBmPlatformConfigNumaNodesPerSocketEnum +func GetGenericBmPlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS0", + "NPS1", + "NPS2", + "NPS4", + } +} + +// GetMappingGenericBmPlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGenericBmPlatformConfigNumaNodesPerSocketEnum(val string) (GenericBmPlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingGenericBmPlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/core/image_capability_schema_descriptor.go b/core/image_capability_schema_descriptor.go index 013c13005f..e90927a87c 100644 --- a/core/image_capability_schema_descriptor.go +++ b/core/image_capability_schema_descriptor.go @@ -77,7 +77,7 @@ func (m *imagecapabilityschemadescriptor) UnmarshalPolymorphicJSON(data []byte) } } -//GetSource returns Source +// GetSource returns Source func (m imagecapabilityschemadescriptor) GetSource() ImageCapabilitySchemaDescriptorSourceEnum { return m.Source } diff --git a/core/image_source_details.go b/core/image_source_details.go index 655a779784..586bc4f70e 100644 --- a/core/image_source_details.go +++ b/core/image_source_details.go @@ -83,17 +83,17 @@ func (m *imagesourcedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetOperatingSystem returns OperatingSystem +// GetOperatingSystem returns OperatingSystem func (m imagesourcedetails) GetOperatingSystem() *string { return m.OperatingSystem } -//GetOperatingSystemVersion returns OperatingSystemVersion +// GetOperatingSystemVersion returns OperatingSystemVersion func (m imagesourcedetails) GetOperatingSystemVersion() *string { return m.OperatingSystemVersion } -//GetSourceImageType returns SourceImageType +// GetSourceImageType returns SourceImageType func (m imagesourcedetails) GetSourceImageType() ImageSourceDetailsSourceImageTypeEnum { return m.SourceImageType } diff --git a/core/instance_configuration.go b/core/instance_configuration.go index fe1d4d07ae..a935f1452d 100644 --- a/core/instance_configuration.go +++ b/core/instance_configuration.go @@ -111,10 +111,7 @@ func (m *InstanceConfiguration) UnmarshalJSON(data []byte) (e error) { } m.DeferredFields = make([]string, len(model.DeferredFields)) - for i, n := range model.DeferredFields { - m.DeferredFields[i] = n - } - + copy(m.DeferredFields, model.DeferredFields) m.CompartmentId = model.CompartmentId m.Id = model.Id diff --git a/core/instance_configuration_amd_milan_bm_gpu_launch_instance_platform_config.go b/core/instance_configuration_amd_milan_bm_gpu_launch_instance_platform_config.go index a5ba5d15c1..4a5a8c289c 100644 --- a/core/instance_configuration_amd_milan_bm_gpu_launch_instance_platform_config.go +++ b/core/instance_configuration_amd_milan_bm_gpu_launch_instance_platform_config.go @@ -57,6 +57,9 @@ type InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfig struct { // Whether the input-output memory management unit is enabled. IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket InstanceConfigurationAmdMilanBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } diff --git a/core/instance_configuration_amd_milan_bm_launch_instance_platform_config.go b/core/instance_configuration_amd_milan_bm_launch_instance_platform_config.go index 581236c5bb..1ae553c1d7 100644 --- a/core/instance_configuration_amd_milan_bm_launch_instance_platform_config.go +++ b/core/instance_configuration_amd_milan_bm_launch_instance_platform_config.go @@ -65,6 +65,9 @@ type InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfig struct { // itself is billed for the full shape, regardless of whether all cores are enabled. PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket InstanceConfigurationAmdMilanBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } diff --git a/core/instance_configuration_amd_rome_bm_gpu_launch_instance_platform_config.go b/core/instance_configuration_amd_rome_bm_gpu_launch_instance_platform_config.go index 0defe348cd..6ee20b349d 100644 --- a/core/instance_configuration_amd_rome_bm_gpu_launch_instance_platform_config.go +++ b/core/instance_configuration_amd_rome_bm_gpu_launch_instance_platform_config.go @@ -57,6 +57,9 @@ type InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfig struct { // Whether the input-output memory management unit is enabled. IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket InstanceConfigurationAmdRomeBmGpuLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } diff --git a/core/instance_configuration_amd_rome_bm_launch_instance_platform_config.go b/core/instance_configuration_amd_rome_bm_launch_instance_platform_config.go index 3d0cc25faa..d58454726b 100644 --- a/core/instance_configuration_amd_rome_bm_launch_instance_platform_config.go +++ b/core/instance_configuration_amd_rome_bm_launch_instance_platform_config.go @@ -65,6 +65,9 @@ type InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfig struct { // itself is billed for the full shape, regardless of whether all cores are enabled. PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } diff --git a/core/instance_configuration_attach_volume_details.go b/core/instance_configuration_attach_volume_details.go index 9aa9fb8759..d18cf4d505 100644 --- a/core/instance_configuration_attach_volume_details.go +++ b/core/instance_configuration_attach_volume_details.go @@ -94,22 +94,22 @@ func (m *instanceconfigurationattachvolumedetails) UnmarshalPolymorphicJSON(data } } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m instanceconfigurationattachvolumedetails) GetDisplayName() *string { return m.DisplayName } -//GetIsReadOnly returns IsReadOnly +// GetIsReadOnly returns IsReadOnly func (m instanceconfigurationattachvolumedetails) GetIsReadOnly() *bool { return m.IsReadOnly } -//GetDevice returns Device +// GetDevice returns Device func (m instanceconfigurationattachvolumedetails) GetDevice() *string { return m.Device } -//GetIsShareable returns IsShareable +// GetIsShareable returns IsShareable func (m instanceconfigurationattachvolumedetails) GetIsShareable() *bool { return m.IsShareable } diff --git a/core/instance_configuration_create_vnic_details.go b/core/instance_configuration_create_vnic_details.go index a846373b4d..d8fe767ed6 100644 --- a/core/instance_configuration_create_vnic_details.go +++ b/core/instance_configuration_create_vnic_details.go @@ -25,6 +25,13 @@ import ( // and Instance Configurations (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/instancemanagement.htm#config) for more information. type InstanceConfigurationCreateVnicDetails struct { + // Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled + // subnet. Default: False. When provided you may optionally provide an IPv6 prefix + // (`ipv6SubnetCidr`) of your choice to assign the IPv6 address from. If `ipv6SubnetCidr` + // is not provided then an IPv6 prefix is chosen + // for you. + AssignIpv6Ip *bool `mandatory:"false" json:"assignIpv6Ip"` + // Whether the VNIC should be assigned a public IP address. See the `assignPublicIp` attribute of CreateVnicDetails // for more information. AssignPublicIp *bool `mandatory:"false" json:"assignPublicIp"` @@ -47,6 +54,12 @@ type InstanceConfigurationCreateVnicDetails struct { // Example: `{"Department": "Finance"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + // A list of IPv6 prefixes from which the VNIC should be assigned an IPv6 address. + // You can provide only the prefix and OCI selects an available + // address from the range. You can optionally choose to leave the prefix range empty + // and instead provide the specific IPv6 address that should be used from within that range. + Ipv6AddressIpv6SubnetCidrPairDetails []InstanceConfigurationIpv6AddressIpv6SubnetCidrPairDetails `mandatory:"false" json:"ipv6AddressIpv6SubnetCidrPairDetails"` + // The hostname for the VNIC's primary private IP. // See the `hostnameLabel` attribute of CreateVnicDetails for more information. HostnameLabel *string `mandatory:"false" json:"hostnameLabel"` diff --git a/core/instance_configuration_create_volume_details.go b/core/instance_configuration_create_volume_details.go index 8dcc0f45f6..5e0fc3cb7a 100644 --- a/core/instance_configuration_create_volume_details.go +++ b/core/instance_configuration_create_volume_details.go @@ -130,10 +130,7 @@ func (m *InstanceConfigurationCreateVolumeDetails) UnmarshalJSON(data []byte) (e m.IsAutoTuneEnabled = model.IsAutoTuneEnabled m.BlockVolumeReplicas = make([]InstanceConfigurationBlockVolumeReplicaDetails, len(model.BlockVolumeReplicas)) - for i, n := range model.BlockVolumeReplicas { - m.BlockVolumeReplicas[i] = n - } - + copy(m.BlockVolumeReplicas, model.BlockVolumeReplicas) m.DefinedTags = model.DefinedTags m.DisplayName = model.DisplayName @@ -168,6 +165,5 @@ func (m *InstanceConfigurationCreateVolumeDetails) UnmarshalJSON(data []byte) (e m.AutotunePolicies[i] = nil } } - return } diff --git a/core/instance_configuration_generic_bm_launch_instance_platform_config.go b/core/instance_configuration_generic_bm_launch_instance_platform_config.go new file mode 100644 index 0000000000..fee1e028e1 --- /dev/null +++ b/core/instance_configuration_generic_bm_launch_instance_platform_config.go @@ -0,0 +1,175 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationGenericBmLaunchInstancePlatformConfig The standard platform configuration to be used when launching a bare metal instance. +type InstanceConfigurationGenericBmLaunchInstancePlatformConfig struct { + + // Whether Secure Boot is enabled on the instance. + IsSecureBootEnabled *bool `mandatory:"false" json:"isSecureBootEnabled"` + + // Whether the Trusted Platform Module (TPM) is enabled on the instance. + IsTrustedPlatformModuleEnabled *bool `mandatory:"false" json:"isTrustedPlatformModuleEnabled"` + + // Whether the Measured Boot feature is enabled on the instance. + IsMeasuredBootEnabled *bool `mandatory:"false" json:"isMeasuredBootEnabled"` + + // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. + IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the Access Control Service is enabled on the instance. When enabled, + // the platform can enforce PCIe device isolation, required for VFIO device pass-through. + IsAccessControlServiceEnabled *bool `mandatory:"false" json:"isAccessControlServiceEnabled"` + + // Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes + // or VT-x for Intel shapes. + AreVirtualInstructionsEnabled *bool `mandatory:"false" json:"areVirtualInstructionsEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` +} + +//GetIsSecureBootEnabled returns IsSecureBootEnabled +func (m InstanceConfigurationGenericBmLaunchInstancePlatformConfig) GetIsSecureBootEnabled() *bool { + return m.IsSecureBootEnabled +} + +//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +func (m InstanceConfigurationGenericBmLaunchInstancePlatformConfig) GetIsTrustedPlatformModuleEnabled() *bool { + return m.IsTrustedPlatformModuleEnabled +} + +//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +func (m InstanceConfigurationGenericBmLaunchInstancePlatformConfig) GetIsMeasuredBootEnabled() *bool { + return m.IsMeasuredBootEnabled +} + +//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +func (m InstanceConfigurationGenericBmLaunchInstancePlatformConfig) GetIsMemoryEncryptionEnabled() *bool { + return m.IsMemoryEncryptionEnabled +} + +func (m InstanceConfigurationGenericBmLaunchInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationGenericBmLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m InstanceConfigurationGenericBmLaunchInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeInstanceConfigurationGenericBmLaunchInstancePlatformConfig InstanceConfigurationGenericBmLaunchInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeInstanceConfigurationGenericBmLaunchInstancePlatformConfig + }{ + "GENERIC_BM", + (MarshalTypeInstanceConfigurationGenericBmLaunchInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} + +// InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +const ( + InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0 InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS0" + InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1 InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS1" + InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2 InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS2" + InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4 InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS4" +) + +var mappingInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = map[string]InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "NPS0": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "NPS1": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "NPS2": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "NPS4": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4, +} + +var mappingInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "nps0": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps0, + "nps1": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "nps2": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, + "nps4": InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketNps4, +} + +// GetInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues() []InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values := make([]InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS0", + "NPS1", + "NPS2", + "NPS4", + } +} + +// GetMappingInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(val string) (InstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingInstanceConfigurationGenericBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/core/instance_configuration_intel_icelake_bm_launch_instance_platform_config.go b/core/instance_configuration_intel_icelake_bm_launch_instance_platform_config.go index 7c922ae4f8..5fab63ed86 100644 --- a/core/instance_configuration_intel_icelake_bm_launch_instance_platform_config.go +++ b/core/instance_configuration_intel_icelake_bm_launch_instance_platform_config.go @@ -57,6 +57,9 @@ type InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfig struct { // itself is billed for the full shape, regardless of whether all cores are enabled. PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } diff --git a/core/instance_configuration_intel_skylake_bm_launch_instance_platform_config.go b/core/instance_configuration_intel_skylake_bm_launch_instance_platform_config.go index d6cb22ca65..d74b0644e7 100644 --- a/core/instance_configuration_intel_skylake_bm_launch_instance_platform_config.go +++ b/core/instance_configuration_intel_skylake_bm_launch_instance_platform_config.go @@ -37,6 +37,31 @@ type InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig struct { // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } //GetIsSecureBootEnabled returns IsSecureBootEnabled @@ -68,6 +93,9 @@ func (m InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig) String( // Not recommended for calling this function directly func (m InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) @@ -88,3 +116,45 @@ func (m InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfig) Marshal return json.Marshal(&s) } + +// InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +const ( + InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1 InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS1" + InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2 InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS2" +) + +var mappingInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = map[string]InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "NPS1": InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "NPS2": InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, +} + +var mappingInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "nps1": InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "nps2": InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, +} + +// GetInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues() []InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values := make([]InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS1", + "NPS2", + } +} + +// GetMappingInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(val string) (InstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingInstanceConfigurationIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/core/instance_configuration_ipv6_address_ipv6_subnet_cidr_pair_details.go b/core/instance_configuration_ipv6_address_ipv6_subnet_cidr_pair_details.go new file mode 100644 index 0000000000..32511997b8 --- /dev/null +++ b/core/instance_configuration_ipv6_address_ipv6_subnet_cidr_pair_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceConfigurationIpv6AddressIpv6SubnetCidrPairDetails Optional. Used to specify from which subnet prefixes an IPv6 address should be allocated, or to assign valid available IPv6 addresses. +type InstanceConfigurationIpv6AddressIpv6SubnetCidrPairDetails struct { + + // Optional. Used to disambiguate which subnet prefix should be used to create an IPv6 allocation. + Ipv6SubnetCidr *string `mandatory:"false" json:"ipv6SubnetCidr"` + + // Optional. An available IPv6 address of your subnet from a valid IPv6 prefix on the subnet (otherwise the IP address is automatically assigned). + Ipv6Address *string `mandatory:"false" json:"ipv6Address"` +} + +func (m InstanceConfigurationIpv6AddressIpv6SubnetCidrPairDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceConfigurationIpv6AddressIpv6SubnetCidrPairDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/core/instance_configuration_launch_instance_platform_config.go b/core/instance_configuration_launch_instance_platform_config.go index 218bb10180..eeee014c2e 100644 --- a/core/instance_configuration_launch_instance_platform_config.go +++ b/core/instance_configuration_launch_instance_platform_config.go @@ -97,6 +97,10 @@ func (m *instanceconfigurationlaunchinstanceplatformconfig) UnmarshalPolymorphic mm := InstanceConfigurationIntelIcelakeBmLaunchInstancePlatformConfig{} err = json.Unmarshal(data, &mm) return mm, err + case "GENERIC_BM": + mm := InstanceConfigurationGenericBmLaunchInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err case "AMD_ROME_BM": mm := InstanceConfigurationAmdRomeBmLaunchInstancePlatformConfig{} err = json.Unmarshal(data, &mm) @@ -119,22 +123,22 @@ func (m *instanceconfigurationlaunchinstanceplatformconfig) UnmarshalPolymorphic } } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m instanceconfigurationlaunchinstanceplatformconfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m instanceconfigurationlaunchinstanceplatformconfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m instanceconfigurationlaunchinstanceplatformconfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m instanceconfigurationlaunchinstanceplatformconfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } @@ -164,6 +168,7 @@ const ( InstanceConfigurationLaunchInstancePlatformConfigTypeAmdMilanBmGpu InstanceConfigurationLaunchInstancePlatformConfigTypeEnum = "AMD_MILAN_BM_GPU" InstanceConfigurationLaunchInstancePlatformConfigTypeAmdRomeBm InstanceConfigurationLaunchInstancePlatformConfigTypeEnum = "AMD_ROME_BM" InstanceConfigurationLaunchInstancePlatformConfigTypeAmdRomeBmGpu InstanceConfigurationLaunchInstancePlatformConfigTypeEnum = "AMD_ROME_BM_GPU" + InstanceConfigurationLaunchInstancePlatformConfigTypeGenericBm InstanceConfigurationLaunchInstancePlatformConfigTypeEnum = "GENERIC_BM" InstanceConfigurationLaunchInstancePlatformConfigTypeIntelIcelakeBm InstanceConfigurationLaunchInstancePlatformConfigTypeEnum = "INTEL_ICELAKE_BM" InstanceConfigurationLaunchInstancePlatformConfigTypeIntelSkylakeBm InstanceConfigurationLaunchInstancePlatformConfigTypeEnum = "INTEL_SKYLAKE_BM" InstanceConfigurationLaunchInstancePlatformConfigTypeAmdVm InstanceConfigurationLaunchInstancePlatformConfigTypeEnum = "AMD_VM" @@ -175,6 +180,7 @@ var mappingInstanceConfigurationLaunchInstancePlatformConfigTypeEnum = map[strin "AMD_MILAN_BM_GPU": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdMilanBmGpu, "AMD_ROME_BM": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdRomeBm, "AMD_ROME_BM_GPU": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdRomeBmGpu, + "GENERIC_BM": InstanceConfigurationLaunchInstancePlatformConfigTypeGenericBm, "INTEL_ICELAKE_BM": InstanceConfigurationLaunchInstancePlatformConfigTypeIntelIcelakeBm, "INTEL_SKYLAKE_BM": InstanceConfigurationLaunchInstancePlatformConfigTypeIntelSkylakeBm, "AMD_VM": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdVm, @@ -186,6 +192,7 @@ var mappingInstanceConfigurationLaunchInstancePlatformConfigTypeEnumLowerCase = "amd_milan_bm_gpu": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdMilanBmGpu, "amd_rome_bm": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdRomeBm, "amd_rome_bm_gpu": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdRomeBmGpu, + "generic_bm": InstanceConfigurationLaunchInstancePlatformConfigTypeGenericBm, "intel_icelake_bm": InstanceConfigurationLaunchInstancePlatformConfigTypeIntelIcelakeBm, "intel_skylake_bm": InstanceConfigurationLaunchInstancePlatformConfigTypeIntelSkylakeBm, "amd_vm": InstanceConfigurationLaunchInstancePlatformConfigTypeAmdVm, @@ -208,6 +215,7 @@ func GetInstanceConfigurationLaunchInstancePlatformConfigTypeEnumStringValues() "AMD_MILAN_BM_GPU", "AMD_ROME_BM", "AMD_ROME_BM_GPU", + "GENERIC_BM", "INTEL_ICELAKE_BM", "INTEL_SKYLAKE_BM", "AMD_VM", diff --git a/core/instance_pool_placement_configuration.go b/core/instance_pool_placement_configuration.go index a2b00bce4c..2aeeac0df9 100644 --- a/core/instance_pool_placement_configuration.go +++ b/core/instance_pool_placement_configuration.go @@ -28,8 +28,9 @@ type InstancePoolPlacementConfiguration struct { // Example: `Uocm:PHX-AD-1` AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet in which to place instances. - PrimarySubnetId *string `mandatory:"true" json:"primarySubnetId"` + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet in which to place instances. This field is deprecated. + // Use `primaryVnicSubnets` instead to set VNIC data for instances in the pool. + PrimarySubnetId *string `mandatory:"false" json:"primarySubnetId"` // The fault domains to place instances. // If you don't provide any values, the system makes a best effort to distribute @@ -43,6 +44,8 @@ type InstancePoolPlacementConfiguration struct { // Example: `[FAULT-DOMAIN-1, FAULT-DOMAIN-2, FAULT-DOMAIN-3]` FaultDomains []string `mandatory:"false" json:"faultDomains"` + PrimaryVnicSubnets *InstancePoolPlacementPrimarySubnet `mandatory:"false" json:"primaryVnicSubnets"` + // The set of secondary VNIC data for instances in the pool. SecondaryVnicSubnets []InstancePoolPlacementSecondaryVnicSubnet `mandatory:"false" json:"secondaryVnicSubnets"` } diff --git a/core/instance_pool_placement_ipv6_address_ipv6_subnet_cidr_details.go b/core/instance_pool_placement_ipv6_address_ipv6_subnet_cidr_details.go new file mode 100644 index 0000000000..9e17ba2b16 --- /dev/null +++ b/core/instance_pool_placement_ipv6_address_ipv6_subnet_cidr_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstancePoolPlacementIpv6AddressIpv6SubnetCidrDetails Optional. Used to specify from which subnet prefixes an IPv6 address should be allocated, or to assign valid available IPv6 addresses. +type InstancePoolPlacementIpv6AddressIpv6SubnetCidrDetails struct { + + // Optional. Used to disambiguate which subnet prefix should be used to create an IPv6 allocation. + Ipv6SubnetCidr *string `mandatory:"false" json:"ipv6SubnetCidr"` +} + +func (m InstancePoolPlacementIpv6AddressIpv6SubnetCidrDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstancePoolPlacementIpv6AddressIpv6SubnetCidrDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/core/instance_pool_placement_primary_subnet.go b/core/instance_pool_placement_primary_subnet.go new file mode 100644 index 0000000000..6f17bc43a6 --- /dev/null +++ b/core/instance_pool_placement_primary_subnet.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstancePoolPlacementPrimarySubnet Details about the IPv6 primary subnet. +type InstancePoolPlacementPrimarySubnet struct { + + // The subnet OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the secondary VNIC. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled + // subnet. Default: False. When provided you may optionally provide an IPv6 prefix + // (`ipv6SubnetCidr`) of your choice to assign the IPv6 address from. If `ipv6SubnetCidr` + // is not provided then an IPv6 prefix is chosen + // for you. + IsAssignIpv6Ip *bool `mandatory:"false" json:"isAssignIpv6Ip"` + + // A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address. + // You can provide only the prefix ranges and OCI will select an available + // address from the range. You can optionally choose to leave the prefix range empty + // and instead provide the specific IPv6 address that should be used from within that range. + Ipv6AddressIpv6SubnetCidrPairDetails []InstancePoolPlacementIpv6AddressIpv6SubnetCidrDetails `mandatory:"false" json:"ipv6AddressIpv6SubnetCidrPairDetails"` +} + +func (m InstancePoolPlacementPrimarySubnet) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstancePoolPlacementPrimarySubnet) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/core/instance_pool_placement_secondary_vnic_subnet.go b/core/instance_pool_placement_secondary_vnic_subnet.go index 1d7792d42d..83553fad3b 100644 --- a/core/instance_pool_placement_secondary_vnic_subnet.go +++ b/core/instance_pool_placement_secondary_vnic_subnet.go @@ -27,6 +27,19 @@ type InstancePoolPlacementSecondaryVnicSubnet struct { // The subnet OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the secondary VNIC. SubnetId *string `mandatory:"true" json:"subnetId"` + // Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled + // subnet. Default: False. When provided you may optionally provide an IPv6 prefix + // (`ipv6SubnetCidr`) of your choice to assign the IPv6 address from. If `ipv6SubnetCidr` + // is not provided then an IPv6 prefix is chosen + // for you. + IsAssignIpv6Ip *bool `mandatory:"false" json:"isAssignIpv6Ip"` + + // A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address. + // You can provide only the prefix ranges and OCI will select an available + // address from the range. You can optionally choose to leave the prefix range empty + // and instead provide the specific IPv6 address that should be used from within that range. + Ipv6AddressIpv6SubnetCidrPairDetails []InstancePoolPlacementIpv6AddressIpv6SubnetCidrDetails `mandatory:"false" json:"ipv6AddressIpv6SubnetCidrPairDetails"` + // The display name of the VNIC. This is also used to match against the instance configuration defined // secondary VNIC. DisplayName *string `mandatory:"false" json:"displayName"` diff --git a/core/instance_pool_placement_subnet_details.go b/core/instance_pool_placement_subnet_details.go new file mode 100644 index 0000000000..324f8fbbc4 --- /dev/null +++ b/core/instance_pool_placement_subnet_details.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstancePoolPlacementSubnetDetails Base details about the IPv6 subnet. +type InstancePoolPlacementSubnetDetails struct { + + // The subnet OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the secondary VNIC. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled + // subnet. Default: False. When provided you may optionally provide an IPv6 prefix + // (`ipv6SubnetCidr`) of your choice to assign the IPv6 address from. If `ipv6SubnetCidr` + // is not provided then an IPv6 prefix is chosen + // for you. + IsAssignIpv6Ip *bool `mandatory:"false" json:"isAssignIpv6Ip"` + + // A list of IPv6 prefix ranges from which the VNIC should be assigned an IPv6 address. + // You can provide only the prefix ranges and OCI will select an available + // address from the range. You can optionally choose to leave the prefix range empty + // and instead provide the specific IPv6 address that should be used from within that range. + Ipv6AddressIpv6SubnetCidrPairDetails []InstancePoolPlacementIpv6AddressIpv6SubnetCidrDetails `mandatory:"false" json:"ipv6AddressIpv6SubnetCidrPairDetails"` +} + +func (m InstancePoolPlacementSubnetDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstancePoolPlacementSubnetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/core/intel_icelake_bm_launch_instance_platform_config.go b/core/intel_icelake_bm_launch_instance_platform_config.go index dc70a275a8..2b85872d02 100644 --- a/core/intel_icelake_bm_launch_instance_platform_config.go +++ b/core/intel_icelake_bm_launch_instance_platform_config.go @@ -57,6 +57,9 @@ type IntelIcelakeBmLaunchInstancePlatformConfig struct { // itself is billed for the full shape, regardless of whether all cores are enabled. PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket IntelIcelakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } diff --git a/core/intel_icelake_bm_platform_config.go b/core/intel_icelake_bm_platform_config.go index 38a278545a..61c58cebe2 100644 --- a/core/intel_icelake_bm_platform_config.go +++ b/core/intel_icelake_bm_platform_config.go @@ -57,6 +57,9 @@ type IntelIcelakeBmPlatformConfig struct { // itself is billed for the full shape, regardless of whether all cores are enabled. PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + // The number of NUMA nodes per socket (NPS). NumaNodesPerSocket IntelIcelakeBmPlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } diff --git a/core/intel_skylake_bm_launch_instance_platform_config.go b/core/intel_skylake_bm_launch_instance_platform_config.go index 9a651b94a9..b5ff9cd4be 100644 --- a/core/intel_skylake_bm_launch_instance_platform_config.go +++ b/core/intel_skylake_bm_launch_instance_platform_config.go @@ -37,6 +37,31 @@ type IntelSkylakeBmLaunchInstancePlatformConfig struct { // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } //GetIsSecureBootEnabled returns IsSecureBootEnabled @@ -68,6 +93,9 @@ func (m IntelSkylakeBmLaunchInstancePlatformConfig) String() string { // Not recommended for calling this function directly func (m IntelSkylakeBmLaunchInstancePlatformConfig) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) @@ -88,3 +116,45 @@ func (m IntelSkylakeBmLaunchInstancePlatformConfig) MarshalJSON() (buff []byte, return json.Marshal(&s) } + +// IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +const ( + IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1 IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS1" + IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2 IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = "NPS2" +) + +var mappingIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum = map[string]IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "NPS1": IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "NPS2": IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, +} + +var mappingIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum{ + "nps1": IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps1, + "nps2": IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketNps2, +} + +// GetIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumValues() []IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values := make([]IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum +func GetIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS1", + "NPS2", + } +} + +// GetMappingIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum(val string) (IntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingIntelSkylakeBmLaunchInstancePlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/core/intel_skylake_bm_platform_config.go b/core/intel_skylake_bm_platform_config.go index 2f066a349f..0096de1f8b 100644 --- a/core/intel_skylake_bm_platform_config.go +++ b/core/intel_skylake_bm_platform_config.go @@ -37,6 +37,31 @@ type IntelSkylakeBmPlatformConfig struct { // Whether the instance is a confidential instance. If this value is `true`, the instance is a confidential instance. The default value is `false`. IsMemoryEncryptionEnabled *bool `mandatory:"false" json:"isMemoryEncryptionEnabled"` + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` + + // Whether the input-output memory management unit is enabled. + IsInputOutputMemoryManagementUnitEnabled *bool `mandatory:"false" json:"isInputOutputMemoryManagementUnitEnabled"` + + // The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage + // results in a fractional number of cores, the system rounds up the number of cores across processors + // and provisions an instance with a whole number of cores. + // If the applications that you run on the instance use a core-based licensing model and need fewer cores + // than the full size of the shape, you can disable cores to reduce your licensing costs. The instance + // itself is billed for the full shape, regardless of whether all cores are enabled. + PercentageOfCoresEnabled *int `mandatory:"false" json:"percentageOfCoresEnabled"` + + // Instance Platform Configuration Configuration Map for flexible setting input. + ConfigMap map[string]string `mandatory:"false" json:"configMap"` + + // The number of NUMA nodes per socket (NPS). + NumaNodesPerSocket IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum `mandatory:"false" json:"numaNodesPerSocket,omitempty"` } //GetIsSecureBootEnabled returns IsSecureBootEnabled @@ -68,6 +93,9 @@ func (m IntelSkylakeBmPlatformConfig) String() string { // Not recommended for calling this function directly func (m IntelSkylakeBmPlatformConfig) ValidateEnumValue() (bool, error) { errMessage := []string{} + if _, ok := GetMappingIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum(string(m.NumaNodesPerSocket)); !ok && m.NumaNodesPerSocket != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for NumaNodesPerSocket: %s. Supported values are: %s.", m.NumaNodesPerSocket, strings.Join(GetIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) @@ -88,3 +116,45 @@ func (m IntelSkylakeBmPlatformConfig) MarshalJSON() (buff []byte, e error) { return json.Marshal(&s) } + +// IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum Enum with underlying type: string +type IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum string + +// Set of constants representing the allowable values for IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum +const ( + IntelSkylakeBmPlatformConfigNumaNodesPerSocketNps1 IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum = "NPS1" + IntelSkylakeBmPlatformConfigNumaNodesPerSocketNps2 IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum = "NPS2" +) + +var mappingIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum = map[string]IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum{ + "NPS1": IntelSkylakeBmPlatformConfigNumaNodesPerSocketNps1, + "NPS2": IntelSkylakeBmPlatformConfigNumaNodesPerSocketNps2, +} + +var mappingIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnumLowerCase = map[string]IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum{ + "nps1": IntelSkylakeBmPlatformConfigNumaNodesPerSocketNps1, + "nps2": IntelSkylakeBmPlatformConfigNumaNodesPerSocketNps2, +} + +// GetIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnumValues Enumerates the set of values for IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum +func GetIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnumValues() []IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum { + values := make([]IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum, 0) + for _, v := range mappingIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum { + values = append(values, v) + } + return values +} + +// GetIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnumStringValues Enumerates the set of values in String for IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum +func GetIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnumStringValues() []string { + return []string{ + "NPS1", + "NPS2", + } +} + +// GetMappingIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum(val string) (IntelSkylakeBmPlatformConfigNumaNodesPerSocketEnum, bool) { + enum, ok := mappingIntelSkylakeBmPlatformConfigNumaNodesPerSocketEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/core/ip_sec_connection.go b/core/ip_sec_connection.go index 6e8022daf9..667c22add5 100644 --- a/core/ip_sec_connection.go +++ b/core/ip_sec_connection.go @@ -100,6 +100,9 @@ type IpSecConnection struct { // The date and time the IPSec connection was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). // Example: `2016-08-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The transport type used for the IPSec connection. + TransportType IpSecConnectionTransportTypeEnum `mandatory:"false" json:"transportType,omitempty"` } func (m IpSecConnection) String() string { @@ -118,6 +121,9 @@ func (m IpSecConnection) ValidateEnumValue() (bool, error) { if _, ok := GetMappingIpSecConnectionCpeLocalIdentifierTypeEnum(string(m.CpeLocalIdentifierType)); !ok && m.CpeLocalIdentifierType != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CpeLocalIdentifierType: %s. Supported values are: %s.", m.CpeLocalIdentifierType, strings.Join(GetIpSecConnectionCpeLocalIdentifierTypeEnumStringValues(), ","))) } + if _, ok := GetMappingIpSecConnectionTransportTypeEnum(string(m.TransportType)); !ok && m.TransportType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TransportType: %s. Supported values are: %s.", m.TransportType, strings.Join(GetIpSecConnectionTransportTypeEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -215,3 +221,45 @@ func GetMappingIpSecConnectionCpeLocalIdentifierTypeEnum(val string) (IpSecConne enum, ok := mappingIpSecConnectionCpeLocalIdentifierTypeEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// IpSecConnectionTransportTypeEnum Enum with underlying type: string +type IpSecConnectionTransportTypeEnum string + +// Set of constants representing the allowable values for IpSecConnectionTransportTypeEnum +const ( + IpSecConnectionTransportTypeInternet IpSecConnectionTransportTypeEnum = "INTERNET" + IpSecConnectionTransportTypeFastconnect IpSecConnectionTransportTypeEnum = "FASTCONNECT" +) + +var mappingIpSecConnectionTransportTypeEnum = map[string]IpSecConnectionTransportTypeEnum{ + "INTERNET": IpSecConnectionTransportTypeInternet, + "FASTCONNECT": IpSecConnectionTransportTypeFastconnect, +} + +var mappingIpSecConnectionTransportTypeEnumLowerCase = map[string]IpSecConnectionTransportTypeEnum{ + "internet": IpSecConnectionTransportTypeInternet, + "fastconnect": IpSecConnectionTransportTypeFastconnect, +} + +// GetIpSecConnectionTransportTypeEnumValues Enumerates the set of values for IpSecConnectionTransportTypeEnum +func GetIpSecConnectionTransportTypeEnumValues() []IpSecConnectionTransportTypeEnum { + values := make([]IpSecConnectionTransportTypeEnum, 0) + for _, v := range mappingIpSecConnectionTransportTypeEnum { + values = append(values, v) + } + return values +} + +// GetIpSecConnectionTransportTypeEnumStringValues Enumerates the set of values in String for IpSecConnectionTransportTypeEnum +func GetIpSecConnectionTransportTypeEnumStringValues() []string { + return []string{ + "INTERNET", + "FASTCONNECT", + } +} + +// GetMappingIpSecConnectionTransportTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIpSecConnectionTransportTypeEnum(val string) (IpSecConnectionTransportTypeEnum, bool) { + enum, ok := mappingIpSecConnectionTransportTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/core/ip_sec_connection_tunnel.go b/core/ip_sec_connection_tunnel.go index 644b056fd8..12c1784ce6 100644 --- a/core/ip_sec_connection_tunnel.go +++ b/core/ip_sec_connection_tunnel.go @@ -92,6 +92,9 @@ type IpSecConnectionTunnel struct { PhaseOneDetails *TunnelPhaseOneDetails `mandatory:"false" json:"phaseOneDetails"` PhaseTwoDetails *TunnelPhaseTwoDetails `mandatory:"false" json:"phaseTwoDetails"` + + // The list of virtual circuit OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)s over which your network can reach this tunnel. + AssociatedVirtualCircuits []string `mandatory:"false" json:"associatedVirtualCircuits"` } func (m IpSecConnectionTunnel) String() string { diff --git a/core/ipsec_tunnel_drg_attachment_network_details.go b/core/ipsec_tunnel_drg_attachment_network_details.go index abba23f021..f3be471efe 100644 --- a/core/ipsec_tunnel_drg_attachment_network_details.go +++ b/core/ipsec_tunnel_drg_attachment_network_details.go @@ -26,10 +26,13 @@ import ( type IpsecTunnelDrgAttachmentNetworkDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. - Id *string `mandatory:"true" json:"id"` + Id *string `mandatory:"false" json:"id"` // The IPSec connection that contains the attached IPSec tunnel. IpsecConnectionId *string `mandatory:"false" json:"ipsecConnectionId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual circuit's DRG attachment. + TransportAttachmentId *string `mandatory:"false" json:"transportAttachmentId"` } //GetId returns Id diff --git a/core/ipv6_address_ipv6_subnet_cidr_pair_details.go b/core/ipv6_address_ipv6_subnet_cidr_pair_details.go new file mode 100644 index 0000000000..14564d6fc1 --- /dev/null +++ b/core/ipv6_address_ipv6_subnet_cidr_pair_details.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Ipv6AddressIpv6SubnetCidrPairDetails Details to assign an IPv6 subnet prefix and IPv6 address on VNIC creation. +type Ipv6AddressIpv6SubnetCidrPairDetails struct { + + // The IPv6 prefix allocated to the subnet. + Ipv6SubnetCidr *string `mandatory:"false" json:"ipv6SubnetCidr"` + + // An IPv6 address of your choice. Must be an available IPv6 address within the subnet's prefix. + // If an IPv6 address is not provided: + // - Oracle will automatically assign an IPv6 address from the subnet's IPv6 prefix if and only if there is only one IPv6 prefix on the subnet. + // - Oracle will automatically assign an IPv6 address from the subnet's IPv6 Oracle GUA prefix if it exists on the subnet. + Ipv6Address *string `mandatory:"false" json:"ipv6Address"` +} + +func (m Ipv6AddressIpv6SubnetCidrPairDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Ipv6AddressIpv6SubnetCidrPairDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/core/launch_instance_platform_config.go b/core/launch_instance_platform_config.go index 7f153ac86e..dac7676b44 100644 --- a/core/launch_instance_platform_config.go +++ b/core/launch_instance_platform_config.go @@ -113,6 +113,10 @@ func (m *launchinstanceplatformconfig) UnmarshalPolymorphicJSON(data []byte) (in mm := AmdMilanBmLaunchInstancePlatformConfig{} err = json.Unmarshal(data, &mm) return mm, err + case "GENERIC_BM": + mm := GenericBmLaunchInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err case "AMD_MILAN_BM_GPU": mm := AmdMilanBmGpuLaunchInstancePlatformConfig{} err = json.Unmarshal(data, &mm) @@ -123,22 +127,22 @@ func (m *launchinstanceplatformconfig) UnmarshalPolymorphicJSON(data []byte) (in } } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m launchinstanceplatformconfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m launchinstanceplatformconfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m launchinstanceplatformconfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m launchinstanceplatformconfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } @@ -168,6 +172,7 @@ const ( LaunchInstancePlatformConfigTypeAmdMilanBmGpu LaunchInstancePlatformConfigTypeEnum = "AMD_MILAN_BM_GPU" LaunchInstancePlatformConfigTypeAmdRomeBm LaunchInstancePlatformConfigTypeEnum = "AMD_ROME_BM" LaunchInstancePlatformConfigTypeAmdRomeBmGpu LaunchInstancePlatformConfigTypeEnum = "AMD_ROME_BM_GPU" + LaunchInstancePlatformConfigTypeGenericBm LaunchInstancePlatformConfigTypeEnum = "GENERIC_BM" LaunchInstancePlatformConfigTypeIntelIcelakeBm LaunchInstancePlatformConfigTypeEnum = "INTEL_ICELAKE_BM" LaunchInstancePlatformConfigTypeIntelSkylakeBm LaunchInstancePlatformConfigTypeEnum = "INTEL_SKYLAKE_BM" LaunchInstancePlatformConfigTypeAmdVm LaunchInstancePlatformConfigTypeEnum = "AMD_VM" @@ -179,6 +184,7 @@ var mappingLaunchInstancePlatformConfigTypeEnum = map[string]LaunchInstancePlatf "AMD_MILAN_BM_GPU": LaunchInstancePlatformConfigTypeAmdMilanBmGpu, "AMD_ROME_BM": LaunchInstancePlatformConfigTypeAmdRomeBm, "AMD_ROME_BM_GPU": LaunchInstancePlatformConfigTypeAmdRomeBmGpu, + "GENERIC_BM": LaunchInstancePlatformConfigTypeGenericBm, "INTEL_ICELAKE_BM": LaunchInstancePlatformConfigTypeIntelIcelakeBm, "INTEL_SKYLAKE_BM": LaunchInstancePlatformConfigTypeIntelSkylakeBm, "AMD_VM": LaunchInstancePlatformConfigTypeAmdVm, @@ -190,6 +196,7 @@ var mappingLaunchInstancePlatformConfigTypeEnumLowerCase = map[string]LaunchInst "amd_milan_bm_gpu": LaunchInstancePlatformConfigTypeAmdMilanBmGpu, "amd_rome_bm": LaunchInstancePlatformConfigTypeAmdRomeBm, "amd_rome_bm_gpu": LaunchInstancePlatformConfigTypeAmdRomeBmGpu, + "generic_bm": LaunchInstancePlatformConfigTypeGenericBm, "intel_icelake_bm": LaunchInstancePlatformConfigTypeIntelIcelakeBm, "intel_skylake_bm": LaunchInstancePlatformConfigTypeIntelSkylakeBm, "amd_vm": LaunchInstancePlatformConfigTypeAmdVm, @@ -212,6 +219,7 @@ func GetLaunchInstancePlatformConfigTypeEnumStringValues() []string { "AMD_MILAN_BM_GPU", "AMD_ROME_BM", "AMD_ROME_BM_GPU", + "GENERIC_BM", "INTEL_ICELAKE_BM", "INTEL_SKYLAKE_BM", "AMD_VM", diff --git a/core/list_virtual_circuit_associated_tunnels_request_response.go b/core/list_virtual_circuit_associated_tunnels_request_response.go new file mode 100644 index 0000000000..6653c3e7c2 --- /dev/null +++ b/core/list_virtual_circuit_associated_tunnels_request_response.go @@ -0,0 +1,110 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListVirtualCircuitAssociatedTunnelsRequest wrapper for the ListVirtualCircuitAssociatedTunnels operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListVirtualCircuitAssociatedTunnels.go.html to see an example of how to use ListVirtualCircuitAssociatedTunnelsRequest. +type ListVirtualCircuitAssociatedTunnelsRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual circuit. + VirtualCircuitId *string `mandatory:"true" contributesTo:"path" name:"virtualCircuitId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" + // call. For important details about how pagination works, see + // List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListVirtualCircuitAssociatedTunnelsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListVirtualCircuitAssociatedTunnelsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListVirtualCircuitAssociatedTunnelsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVirtualCircuitAssociatedTunnelsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListVirtualCircuitAssociatedTunnelsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListVirtualCircuitAssociatedTunnelsResponse wrapper for the ListVirtualCircuitAssociatedTunnels operation +type ListVirtualCircuitAssociatedTunnelsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []VirtualCircuitAssociatedTunnelDetails instances + Items []VirtualCircuitAssociatedTunnelDetails `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListVirtualCircuitAssociatedTunnelsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListVirtualCircuitAssociatedTunnelsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/core/loop_back_drg_attachment_network_details.go b/core/loop_back_drg_attachment_network_details.go new file mode 100644 index 0000000000..3f35227ac9 --- /dev/null +++ b/core/loop_back_drg_attachment_network_details.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LoopBackDrgAttachmentNetworkDetails Specifies the loopback attachment on the DRG. A loopback attachment can be used to terminate a virtual circuit that is carrying an IPSec tunnel, routing traffic directly to the IPSec tunnel attachment where the tunnel can terminate. +type LoopBackDrgAttachmentNetworkDetails struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. + Id *string `mandatory:"false" json:"id"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the target IPSec tunnel attachment. + Ids []string `mandatory:"false" json:"ids"` +} + +//GetId returns Id +func (m LoopBackDrgAttachmentNetworkDetails) GetId() *string { + return m.Id +} + +func (m LoopBackDrgAttachmentNetworkDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m LoopBackDrgAttachmentNetworkDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m LoopBackDrgAttachmentNetworkDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeLoopBackDrgAttachmentNetworkDetails LoopBackDrgAttachmentNetworkDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeLoopBackDrgAttachmentNetworkDetails + }{ + "LOOPBACK", + (MarshalTypeLoopBackDrgAttachmentNetworkDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/core/macsec_properties.go b/core/macsec_properties.go index 1469d1bae8..0f64214fd6 100644 --- a/core/macsec_properties.go +++ b/core/macsec_properties.go @@ -31,6 +31,9 @@ type MacsecProperties struct { // Type of encryption cipher suite to use for the MACsec connection. EncryptionCipher MacsecEncryptionCipherEnum `mandatory:"false" json:"encryptionCipher,omitempty"` + + // Indicates whether unencrypted traffic is allowed if MACsec Key Agreement protocol (MKA) fails. + IsUnprotectedTrafficAllowed *bool `mandatory:"false" json:"isUnprotectedTrafficAllowed"` } func (m MacsecProperties) String() string { diff --git a/core/networking_topology.go b/core/networking_topology.go index c95c56d945..d22c747481 100644 --- a/core/networking_topology.go +++ b/core/networking_topology.go @@ -107,10 +107,7 @@ func (m *NetworkingTopology) UnmarshalJSON(data []byte) (e error) { } var nn interface{} m.Entities = make([]interface{}, len(model.Entities)) - for i, n := range model.Entities { - m.Entities[i] = n - } - + copy(m.Entities, model.Entities) m.Relationships = make([]TopologyEntityRelationship, len(model.Relationships)) for i, n := range model.Relationships { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -123,12 +120,8 @@ func (m *NetworkingTopology) UnmarshalJSON(data []byte) (e error) { m.Relationships[i] = nil } } - m.LimitedEntities = make([]string, len(model.LimitedEntities)) - for i, n := range model.LimitedEntities { - m.LimitedEntities[i] = n - } - + copy(m.LimitedEntities, model.LimitedEntities) m.TimeCreated = model.TimeCreated return diff --git a/core/platform_config.go b/core/platform_config.go index ab71b961d2..5081a5093f 100644 --- a/core/platform_config.go +++ b/core/platform_config.go @@ -104,6 +104,10 @@ func (m *platformconfig) UnmarshalPolymorphicJSON(data []byte) (interface{}, err mm := IntelVmPlatformConfig{} err = json.Unmarshal(data, &mm) return mm, err + case "GENERIC_BM": + mm := GenericBmPlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err case "AMD_MILAN_BM_GPU": mm := AmdMilanBmGpuPlatformConfig{} err = json.Unmarshal(data, &mm) @@ -114,22 +118,22 @@ func (m *platformconfig) UnmarshalPolymorphicJSON(data []byte) (interface{}, err } } -//GetIsSecureBootEnabled returns IsSecureBootEnabled +// GetIsSecureBootEnabled returns IsSecureBootEnabled func (m platformconfig) GetIsSecureBootEnabled() *bool { return m.IsSecureBootEnabled } -//GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled +// GetIsTrustedPlatformModuleEnabled returns IsTrustedPlatformModuleEnabled func (m platformconfig) GetIsTrustedPlatformModuleEnabled() *bool { return m.IsTrustedPlatformModuleEnabled } -//GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled +// GetIsMeasuredBootEnabled returns IsMeasuredBootEnabled func (m platformconfig) GetIsMeasuredBootEnabled() *bool { return m.IsMeasuredBootEnabled } -//GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled +// GetIsMemoryEncryptionEnabled returns IsMemoryEncryptionEnabled func (m platformconfig) GetIsMemoryEncryptionEnabled() *bool { return m.IsMemoryEncryptionEnabled } @@ -159,6 +163,7 @@ const ( PlatformConfigTypeAmdMilanBmGpu PlatformConfigTypeEnum = "AMD_MILAN_BM_GPU" PlatformConfigTypeAmdRomeBm PlatformConfigTypeEnum = "AMD_ROME_BM" PlatformConfigTypeAmdRomeBmGpu PlatformConfigTypeEnum = "AMD_ROME_BM_GPU" + PlatformConfigTypeGenericBm PlatformConfigTypeEnum = "GENERIC_BM" PlatformConfigTypeIntelIcelakeBm PlatformConfigTypeEnum = "INTEL_ICELAKE_BM" PlatformConfigTypeIntelSkylakeBm PlatformConfigTypeEnum = "INTEL_SKYLAKE_BM" PlatformConfigTypeAmdVm PlatformConfigTypeEnum = "AMD_VM" @@ -170,6 +175,7 @@ var mappingPlatformConfigTypeEnum = map[string]PlatformConfigTypeEnum{ "AMD_MILAN_BM_GPU": PlatformConfigTypeAmdMilanBmGpu, "AMD_ROME_BM": PlatformConfigTypeAmdRomeBm, "AMD_ROME_BM_GPU": PlatformConfigTypeAmdRomeBmGpu, + "GENERIC_BM": PlatformConfigTypeGenericBm, "INTEL_ICELAKE_BM": PlatformConfigTypeIntelIcelakeBm, "INTEL_SKYLAKE_BM": PlatformConfigTypeIntelSkylakeBm, "AMD_VM": PlatformConfigTypeAmdVm, @@ -181,6 +187,7 @@ var mappingPlatformConfigTypeEnumLowerCase = map[string]PlatformConfigTypeEnum{ "amd_milan_bm_gpu": PlatformConfigTypeAmdMilanBmGpu, "amd_rome_bm": PlatformConfigTypeAmdRomeBm, "amd_rome_bm_gpu": PlatformConfigTypeAmdRomeBmGpu, + "generic_bm": PlatformConfigTypeGenericBm, "intel_icelake_bm": PlatformConfigTypeIntelIcelakeBm, "intel_skylake_bm": PlatformConfigTypeIntelSkylakeBm, "amd_vm": PlatformConfigTypeAmdVm, @@ -203,6 +210,7 @@ func GetPlatformConfigTypeEnumStringValues() []string { "AMD_MILAN_BM_GPU", "AMD_ROME_BM", "AMD_ROME_BM_GPU", + "GENERIC_BM", "INTEL_ICELAKE_BM", "INTEL_SKYLAKE_BM", "AMD_VM", diff --git a/core/remote_peering_connection_drg_attachment_network_details.go b/core/remote_peering_connection_drg_attachment_network_details.go index 6cc8745510..54c170241e 100644 --- a/core/remote_peering_connection_drg_attachment_network_details.go +++ b/core/remote_peering_connection_drg_attachment_network_details.go @@ -26,7 +26,7 @@ import ( type RemotePeeringConnectionDrgAttachmentNetworkDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. - Id *string `mandatory:"true" json:"id"` + Id *string `mandatory:"false" json:"id"` } //GetId returns Id diff --git a/core/shape_platform_config_options.go b/core/shape_platform_config_options.go index 1f9bc035cc..0016fbb3c0 100644 --- a/core/shape_platform_config_options.go +++ b/core/shape_platform_config_options.go @@ -76,6 +76,7 @@ const ( ShapePlatformConfigOptionsTypeAmdMilanBmGpu ShapePlatformConfigOptionsTypeEnum = "AMD_MILAN_BM_GPU" ShapePlatformConfigOptionsTypeAmdRomeBm ShapePlatformConfigOptionsTypeEnum = "AMD_ROME_BM" ShapePlatformConfigOptionsTypeAmdRomeBmGpu ShapePlatformConfigOptionsTypeEnum = "AMD_ROME_BM_GPU" + ShapePlatformConfigOptionsTypeGenericBm ShapePlatformConfigOptionsTypeEnum = "GENERIC_BM" ShapePlatformConfigOptionsTypeIntelIcelakeBm ShapePlatformConfigOptionsTypeEnum = "INTEL_ICELAKE_BM" ShapePlatformConfigOptionsTypeIntelSkylakeBm ShapePlatformConfigOptionsTypeEnum = "INTEL_SKYLAKE_BM" ShapePlatformConfigOptionsTypeAmdVm ShapePlatformConfigOptionsTypeEnum = "AMD_VM" @@ -87,6 +88,7 @@ var mappingShapePlatformConfigOptionsTypeEnum = map[string]ShapePlatformConfigOp "AMD_MILAN_BM_GPU": ShapePlatformConfigOptionsTypeAmdMilanBmGpu, "AMD_ROME_BM": ShapePlatformConfigOptionsTypeAmdRomeBm, "AMD_ROME_BM_GPU": ShapePlatformConfigOptionsTypeAmdRomeBmGpu, + "GENERIC_BM": ShapePlatformConfigOptionsTypeGenericBm, "INTEL_ICELAKE_BM": ShapePlatformConfigOptionsTypeIntelIcelakeBm, "INTEL_SKYLAKE_BM": ShapePlatformConfigOptionsTypeIntelSkylakeBm, "AMD_VM": ShapePlatformConfigOptionsTypeAmdVm, @@ -98,6 +100,7 @@ var mappingShapePlatformConfigOptionsTypeEnumLowerCase = map[string]ShapePlatfor "amd_milan_bm_gpu": ShapePlatformConfigOptionsTypeAmdMilanBmGpu, "amd_rome_bm": ShapePlatformConfigOptionsTypeAmdRomeBm, "amd_rome_bm_gpu": ShapePlatformConfigOptionsTypeAmdRomeBmGpu, + "generic_bm": ShapePlatformConfigOptionsTypeGenericBm, "intel_icelake_bm": ShapePlatformConfigOptionsTypeIntelIcelakeBm, "intel_skylake_bm": ShapePlatformConfigOptionsTypeIntelSkylakeBm, "amd_vm": ShapePlatformConfigOptionsTypeAmdVm, @@ -120,6 +123,7 @@ func GetShapePlatformConfigOptionsTypeEnumStringValues() []string { "AMD_MILAN_BM_GPU", "AMD_ROME_BM", "AMD_ROME_BM_GPU", + "GENERIC_BM", "INTEL_ICELAKE_BM", "INTEL_SKYLAKE_BM", "AMD_VM", diff --git a/core/subnet_topology.go b/core/subnet_topology.go index 1077b59a99..a9fa672bca 100644 --- a/core/subnet_topology.go +++ b/core/subnet_topology.go @@ -113,10 +113,7 @@ func (m *SubnetTopology) UnmarshalJSON(data []byte) (e error) { m.SubnetId = model.SubnetId m.Entities = make([]interface{}, len(model.Entities)) - for i, n := range model.Entities { - m.Entities[i] = n - } - + copy(m.Entities, model.Entities) m.Relationships = make([]TopologyEntityRelationship, len(model.Relationships)) for i, n := range model.Relationships { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -129,12 +126,8 @@ func (m *SubnetTopology) UnmarshalJSON(data []byte) (e error) { m.Relationships[i] = nil } } - m.LimitedEntities = make([]string, len(model.LimitedEntities)) - for i, n := range model.LimitedEntities { - m.LimitedEntities[i] = n - } - + copy(m.LimitedEntities, model.LimitedEntities) m.TimeCreated = model.TimeCreated return diff --git a/core/topology.go b/core/topology.go index ba3be3e4e1..fcb44993cb 100644 --- a/core/topology.go +++ b/core/topology.go @@ -96,22 +96,22 @@ func (m *topology) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetEntities returns Entities +// GetEntities returns Entities func (m topology) GetEntities() []interface{} { return m.Entities } -//GetRelationships returns Relationships +// GetRelationships returns Relationships func (m topology) GetRelationships() json.RawMessage { return m.Relationships } -//GetLimitedEntities returns LimitedEntities +// GetLimitedEntities returns LimitedEntities func (m topology) GetLimitedEntities() []string { return m.LimitedEntities } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m topology) GetTimeCreated() *common.SDKTime { return m.TimeCreated } diff --git a/core/topology_entity_relationship.go b/core/topology_entity_relationship.go index f216da3856..e5611ad183 100644 --- a/core/topology_entity_relationship.go +++ b/core/topology_entity_relationship.go @@ -84,12 +84,12 @@ func (m *topologyentityrelationship) UnmarshalPolymorphicJSON(data []byte) (inte } } -//GetId1 returns Id1 +// GetId1 returns Id1 func (m topologyentityrelationship) GetId1() *string { return m.Id1 } -//GetId2 returns Id2 +// GetId2 returns Id2 func (m topologyentityrelationship) GetId2() *string { return m.Id2 } diff --git a/core/update_boot_volume_details.go b/core/update_boot_volume_details.go index 71e9211fcf..4d802fe9fb 100644 --- a/core/update_boot_volume_details.go +++ b/core/update_boot_volume_details.go @@ -111,10 +111,7 @@ func (m *UpdateBootVolumeDetails) UnmarshalJSON(data []byte) (e error) { m.IsAutoTuneEnabled = model.IsAutoTuneEnabled m.BootVolumeReplicas = make([]BootVolumeReplicaDetails, len(model.BootVolumeReplicas)) - for i, n := range model.BootVolumeReplicas { - m.BootVolumeReplicas[i] = n - } - + copy(m.BootVolumeReplicas, model.BootVolumeReplicas) m.AutotunePolicies = make([]AutotunePolicy, len(model.AutotunePolicies)) for i, n := range model.AutotunePolicies { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -127,6 +124,5 @@ func (m *UpdateBootVolumeDetails) UnmarshalJSON(data []byte) (e error) { m.AutotunePolicies[i] = nil } } - return } diff --git a/core/update_capture_filter_details.go b/core/update_capture_filter_details.go index 8a865626d7..d197f076ab 100644 --- a/core/update_capture_filter_details.go +++ b/core/update_capture_filter_details.go @@ -21,7 +21,7 @@ import ( "strings" ) -// UpdateCaptureFilterDetails These details can be included in a request to update a capture filter. A capture filter contains a set of rules governing what traffic a VTAP mirrors. +// UpdateCaptureFilterDetails These details can be included in a request to update a capture filter. A capture filter contains a set of rules governing what traffic a VTAP mirrors or a VCN flow log collects. type UpdateCaptureFilterDetails struct { // Defined tags for this resource. Each key is predefined and scoped to a diff --git a/core/update_dhcp_details.go b/core/update_dhcp_details.go index 99358111fb..4b59271862 100644 --- a/core/update_dhcp_details.go +++ b/core/update_dhcp_details.go @@ -97,7 +97,6 @@ func (m *UpdateDhcpDetails) UnmarshalJSON(data []byte) (e error) { m.Options[i] = nil } } - m.DomainNameType = model.DomainNameType return diff --git a/core/update_drg_route_distribution_statement_details.go b/core/update_drg_route_distribution_statement_details.go index edec535c5f..feffb2f3be 100644 --- a/core/update_drg_route_distribution_statement_details.go +++ b/core/update_drg_route_distribution_statement_details.go @@ -76,7 +76,6 @@ func (m *UpdateDrgRouteDistributionStatementDetails) UnmarshalJSON(data []byte) m.MatchCriteria[i] = nil } } - m.Priority = model.Priority m.Id = model.Id diff --git a/core/update_instance_pool_placement_configuration_details.go b/core/update_instance_pool_placement_configuration_details.go index aee92bf41e..99d7da6cac 100644 --- a/core/update_instance_pool_placement_configuration_details.go +++ b/core/update_instance_pool_placement_configuration_details.go @@ -28,10 +28,6 @@ type UpdateInstancePoolPlacementConfigurationDetails struct { // Example: `Uocm:PHX-AD-1` AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` - // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet in which to place - // instances. - PrimarySubnetId *string `mandatory:"true" json:"primarySubnetId"` - // The fault domains to place instances. // If you don't provide any values, the system makes a best effort to distribute // instances across all fault domains based on capacity. @@ -44,7 +40,13 @@ type UpdateInstancePoolPlacementConfigurationDetails struct { // Example: `[FAULT-DOMAIN-1, FAULT-DOMAIN-2, FAULT-DOMAIN-3]` FaultDomains []string `mandatory:"false" json:"faultDomains"` - // The set of subnet OCIDs for secondary VNICs for instances in the pool. + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the primary subnet in which to place instances. This field is deprecated. + // Use `primaryVnicSubnets` instead to set VNIC data for instances in the pool. + PrimarySubnetId *string `mandatory:"false" json:"primarySubnetId"` + + PrimaryVnicSubnets *InstancePoolPlacementPrimarySubnet `mandatory:"false" json:"primaryVnicSubnets"` + + // The set of secondary VNIC data for instances in the pool. SecondaryVnicSubnets []InstancePoolPlacementSecondaryVnicSubnet `mandatory:"false" json:"secondaryVnicSubnets"` } diff --git a/core/update_macsec_properties.go b/core/update_macsec_properties.go index 69300026e3..d3183fe381 100644 --- a/core/update_macsec_properties.go +++ b/core/update_macsec_properties.go @@ -31,6 +31,9 @@ type UpdateMacsecProperties struct { // Type of encryption cipher suite to use for the MACsec connection. EncryptionCipher MacsecEncryptionCipherEnum `mandatory:"false" json:"encryptionCipher,omitempty"` + + // Indicates whether unencrypted traffic is allowed if MACsec Key Agreement protocol (MKA) fails. + IsUnprotectedTrafficAllowed *bool `mandatory:"false" json:"isUnprotectedTrafficAllowed"` } func (m UpdateMacsecProperties) String() string { diff --git a/core/update_virtual_circuit_details.go b/core/update_virtual_circuit_details.go index 01de83e2e6..206135c092 100644 --- a/core/update_virtual_circuit_details.go +++ b/core/update_virtual_circuit_details.go @@ -49,6 +49,9 @@ type UpdateVirtualCircuitDetails struct { // Set to `true` to enable BFD for IPv4 BGP peering, or set to `false` to disable BFD. If this is not set, the default is `false`. IsBfdEnabled *bool `mandatory:"false" json:"isBfdEnabled"` + // Set to `true` for the virtual circuit to carry only encrypted traffic, or set to `false` for the virtual circuit to carry unencrypted traffic. If this is not set, the default is `false`. + IsTransportMode *bool `mandatory:"false" json:"isTransportMode"` + // Deprecated. Instead use `customerAsn`. // If you specify values for both, the request will be rejected. CustomerBgpAsn *int `mandatory:"false" json:"customerBgpAsn"` diff --git a/core/update_volume_details.go b/core/update_volume_details.go index c963ba858e..b842072411 100644 --- a/core/update_volume_details.go +++ b/core/update_volume_details.go @@ -112,10 +112,7 @@ func (m *UpdateVolumeDetails) UnmarshalJSON(data []byte) (e error) { m.IsAutoTuneEnabled = model.IsAutoTuneEnabled m.BlockVolumeReplicas = make([]BlockVolumeReplicaDetails, len(model.BlockVolumeReplicas)) - for i, n := range model.BlockVolumeReplicas { - m.BlockVolumeReplicas[i] = n - } - + copy(m.BlockVolumeReplicas, model.BlockVolumeReplicas) m.AutotunePolicies = make([]AutotunePolicy, len(model.AutotunePolicies)) for i, n := range model.AutotunePolicies { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -128,6 +125,5 @@ func (m *UpdateVolumeDetails) UnmarshalJSON(data []byte) (e error) { m.AutotunePolicies[i] = nil } } - return } diff --git a/core/vcn_drg_attachment_network_create_details.go b/core/vcn_drg_attachment_network_create_details.go index 2ca250a4dc..1164a08e20 100644 --- a/core/vcn_drg_attachment_network_create_details.go +++ b/core/vcn_drg_attachment_network_create_details.go @@ -26,7 +26,7 @@ import ( type VcnDrgAttachmentNetworkCreateDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. - Id *string `mandatory:"true" json:"id"` + Id *string `mandatory:"false" json:"id"` // This is the OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table that is used to route the traffic as it enters a VCN through this attachment. // For information about why you would associate a route table with a DRG attachment, see diff --git a/core/vcn_drg_attachment_network_details.go b/core/vcn_drg_attachment_network_details.go index af79d8efd1..2fed45922e 100644 --- a/core/vcn_drg_attachment_network_details.go +++ b/core/vcn_drg_attachment_network_details.go @@ -26,7 +26,7 @@ import ( type VcnDrgAttachmentNetworkDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. - Id *string `mandatory:"true" json:"id"` + Id *string `mandatory:"false" json:"id"` // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the DRG attachment is using. // For information about why you would associate a route table with a DRG attachment, see: diff --git a/core/vcn_topology.go b/core/vcn_topology.go index 59671bf002..4dc47140ac 100644 --- a/core/vcn_topology.go +++ b/core/vcn_topology.go @@ -113,10 +113,7 @@ func (m *VcnTopology) UnmarshalJSON(data []byte) (e error) { m.VcnId = model.VcnId m.Entities = make([]interface{}, len(model.Entities)) - for i, n := range model.Entities { - m.Entities[i] = n - } - + copy(m.Entities, model.Entities) m.Relationships = make([]TopologyEntityRelationship, len(model.Relationships)) for i, n := range model.Relationships { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -129,12 +126,8 @@ func (m *VcnTopology) UnmarshalJSON(data []byte) (e error) { m.Relationships[i] = nil } } - m.LimitedEntities = make([]string, len(model.LimitedEntities)) - for i, n := range model.LimitedEntities { - m.LimitedEntities[i] = n - } - + copy(m.LimitedEntities, model.LimitedEntities) m.TimeCreated = model.TimeCreated return diff --git a/core/virtual_circuit.go b/core/virtual_circuit.go index fd02c7ab38..11e9c7ec19 100644 --- a/core/virtual_circuit.go +++ b/core/virtual_circuit.go @@ -75,6 +75,9 @@ type VirtualCircuit struct { // Set to `true` to enable BFD for IPv4 BGP peering, or set to `false` to disable BFD. If this is not set, the default is `false`. IsBfdEnabled *bool `mandatory:"false" json:"isBfdEnabled"` + // Set to `true` for the virtual circuit to carry only encrypted traffic, or set to `false` for the virtual circuit to carry unencrypted traffic. If this is not set, the default is `false`. + IsTransportMode *bool `mandatory:"false" json:"isTransportMode"` + // Deprecated. Instead use `customerAsn`. // If you specify values for both, the request will be rejected. CustomerBgpAsn *int `mandatory:"false" json:"customerBgpAsn"` diff --git a/core/virtual_circuit_associated_tunnel_details.go b/core/virtual_circuit_associated_tunnel_details.go new file mode 100644 index 0000000000..cc07c03f49 --- /dev/null +++ b/core/virtual_circuit_associated_tunnel_details.go @@ -0,0 +1,92 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VirtualCircuitAssociatedTunnelDetails Detailed private tunnel info associated with the virtual circuit. +type VirtualCircuitAssociatedTunnelDetails struct { + + // The type of the tunnel associated with the virtual circuit. + TunnelType VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum `mandatory:"true" json:"tunnelType"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPSec tunnel associated with the virtual circuit. + TunnelId *string `mandatory:"true" json:"tunnelId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of IPSec connection associated with the virtual circuit. + IpsecConnectionId *string `mandatory:"false" json:"ipsecConnectionId"` +} + +func (m VirtualCircuitAssociatedTunnelDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VirtualCircuitAssociatedTunnelDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum(string(m.TunnelType)); !ok && m.TunnelType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TunnelType: %s. Supported values are: %s.", m.TunnelType, strings.Join(GetVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum Enum with underlying type: string +type VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum string + +// Set of constants representing the allowable values for VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum +const ( + VirtualCircuitAssociatedTunnelDetailsTunnelTypeIpsec VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum = "IPSEC" +) + +var mappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum = map[string]VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum{ + "IPSEC": VirtualCircuitAssociatedTunnelDetailsTunnelTypeIpsec, +} + +var mappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumLowerCase = map[string]VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum{ + "ipsec": VirtualCircuitAssociatedTunnelDetailsTunnelTypeIpsec, +} + +// GetVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumValues Enumerates the set of values for VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum +func GetVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumValues() []VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum { + values := make([]VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum, 0) + for _, v := range mappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum { + values = append(values, v) + } + return values +} + +// GetVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumStringValues Enumerates the set of values in String for VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum +func GetVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumStringValues() []string { + return []string{ + "IPSEC", + } +} + +// GetMappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum(val string) (VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum, bool) { + enum, ok := mappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/core/virtual_circuit_drg_attachment_network_details.go b/core/virtual_circuit_drg_attachment_network_details.go index 20c7d163df..494c23b6ee 100644 --- a/core/virtual_circuit_drg_attachment_network_details.go +++ b/core/virtual_circuit_drg_attachment_network_details.go @@ -26,7 +26,11 @@ import ( type VirtualCircuitDrgAttachmentNetworkDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. - Id *string `mandatory:"true" json:"id"` + Id *string `mandatory:"false" json:"id"` + + // Boolean flag that determines wether all traffic over the virtual circuits is encrypted. + // Example: `true` + TransportOnlyMode *bool `mandatory:"false" json:"transportOnlyMode"` } //GetId returns Id diff --git a/core/vnic.go b/core/vnic.go index 2f3eea8654..fd115b12bc 100644 --- a/core/vnic.go +++ b/core/vnic.go @@ -128,6 +128,10 @@ type Vnic struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet the VNIC is in. SubnetId *string `mandatory:"false" json:"subnetId"` + + // List of IPv6 addresses assigned to the VNIC. + // Example: `2001:DB8::` + Ipv6Addresses []string `mandatory:"false" json:"ipv6Addresses"` } func (m Vnic) String() string { diff --git a/core/volume.go b/core/volume.go index 40fdb1458e..79a69063ac 100644 --- a/core/volume.go +++ b/core/volume.go @@ -189,10 +189,7 @@ func (m *Volume) UnmarshalJSON(data []byte) (e error) { m.AutoTunedVpusPerGB = model.AutoTunedVpusPerGB m.BlockVolumeReplicas = make([]BlockVolumeReplicaInfo, len(model.BlockVolumeReplicas)) - for i, n := range model.BlockVolumeReplicas { - m.BlockVolumeReplicas[i] = n - } - + copy(m.BlockVolumeReplicas, model.BlockVolumeReplicas) m.AutotunePolicies = make([]AutotunePolicy, len(model.AutotunePolicies)) for i, n := range model.AutotunePolicies { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -205,7 +202,6 @@ func (m *Volume) UnmarshalJSON(data []byte) (e error) { m.AutotunePolicies[i] = nil } } - m.AvailabilityDomain = model.AvailabilityDomain m.CompartmentId = model.CompartmentId diff --git a/core/volume_attachment.go b/core/volume_attachment.go index d323c80376..2a7cb793c3 100644 --- a/core/volume_attachment.go +++ b/core/volume_attachment.go @@ -83,13 +83,6 @@ type VolumeAttachment interface { type volumeattachment struct { JsonData []byte - AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` - Id *string `mandatory:"true" json:"id"` - InstanceId *string `mandatory:"true" json:"instanceId"` - LifecycleState VolumeAttachmentLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - VolumeId *string `mandatory:"true" json:"volumeId"` Device *string `mandatory:"false" json:"device"` DisplayName *string `mandatory:"false" json:"displayName"` IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` @@ -97,6 +90,13 @@ type volumeattachment struct { IsPvEncryptionInTransitEnabled *bool `mandatory:"false" json:"isPvEncryptionInTransitEnabled"` IsMultipath *bool `mandatory:"false" json:"isMultipath"` IscsiLoginState VolumeAttachmentIscsiLoginStateEnum `mandatory:"false" json:"iscsiLoginState,omitempty"` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + Id *string `mandatory:"true" json:"id"` + InstanceId *string `mandatory:"true" json:"instanceId"` + LifecycleState VolumeAttachmentLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + VolumeId *string `mandatory:"true" json:"volumeId"` AttachmentType string `json:"attachmentType"` } @@ -157,76 +157,76 @@ func (m *volumeattachment) UnmarshalPolymorphicJSON(data []byte) (interface{}, e } } -//GetAvailabilityDomain returns AvailabilityDomain -func (m volumeattachment) GetAvailabilityDomain() *string { - return m.AvailabilityDomain -} - -//GetCompartmentId returns CompartmentId -func (m volumeattachment) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetId returns Id -func (m volumeattachment) GetId() *string { - return m.Id -} - -//GetInstanceId returns InstanceId -func (m volumeattachment) GetInstanceId() *string { - return m.InstanceId -} - -//GetLifecycleState returns LifecycleState -func (m volumeattachment) GetLifecycleState() VolumeAttachmentLifecycleStateEnum { - return m.LifecycleState -} - -//GetTimeCreated returns TimeCreated -func (m volumeattachment) GetTimeCreated() *common.SDKTime { - return m.TimeCreated -} - -//GetVolumeId returns VolumeId -func (m volumeattachment) GetVolumeId() *string { - return m.VolumeId -} - -//GetDevice returns Device +// GetDevice returns Device func (m volumeattachment) GetDevice() *string { return m.Device } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m volumeattachment) GetDisplayName() *string { return m.DisplayName } -//GetIsReadOnly returns IsReadOnly +// GetIsReadOnly returns IsReadOnly func (m volumeattachment) GetIsReadOnly() *bool { return m.IsReadOnly } -//GetIsShareable returns IsShareable +// GetIsShareable returns IsShareable func (m volumeattachment) GetIsShareable() *bool { return m.IsShareable } -//GetIsPvEncryptionInTransitEnabled returns IsPvEncryptionInTransitEnabled +// GetIsPvEncryptionInTransitEnabled returns IsPvEncryptionInTransitEnabled func (m volumeattachment) GetIsPvEncryptionInTransitEnabled() *bool { return m.IsPvEncryptionInTransitEnabled } -//GetIsMultipath returns IsMultipath +// GetIsMultipath returns IsMultipath func (m volumeattachment) GetIsMultipath() *bool { return m.IsMultipath } -//GetIscsiLoginState returns IscsiLoginState +// GetIscsiLoginState returns IscsiLoginState func (m volumeattachment) GetIscsiLoginState() VolumeAttachmentIscsiLoginStateEnum { return m.IscsiLoginState } +// GetAvailabilityDomain returns AvailabilityDomain +func (m volumeattachment) GetAvailabilityDomain() *string { + return m.AvailabilityDomain +} + +// GetCompartmentId returns CompartmentId +func (m volumeattachment) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetId returns Id +func (m volumeattachment) GetId() *string { + return m.Id +} + +// GetInstanceId returns InstanceId +func (m volumeattachment) GetInstanceId() *string { + return m.InstanceId +} + +// GetLifecycleState returns LifecycleState +func (m volumeattachment) GetLifecycleState() VolumeAttachmentLifecycleStateEnum { + return m.LifecycleState +} + +// GetTimeCreated returns TimeCreated +func (m volumeattachment) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetVolumeId returns VolumeId +func (m volumeattachment) GetVolumeId() *string { + return m.VolumeId +} + func (m volumeattachment) String() string { return common.PointerString(m) } diff --git a/core/volume_group.go b/core/volume_group.go index c74637f577..c55a66bcc7 100644 --- a/core/volume_group.go +++ b/core/volume_group.go @@ -138,10 +138,7 @@ func (m *VolumeGroup) UnmarshalJSON(data []byte) (e error) { m.IsHydrated = model.IsHydrated m.VolumeGroupReplicas = make([]VolumeGroupReplicaInfo, len(model.VolumeGroupReplicas)) - for i, n := range model.VolumeGroupReplicas { - m.VolumeGroupReplicas[i] = n - } - + copy(m.VolumeGroupReplicas, model.VolumeGroupReplicas) m.AvailabilityDomain = model.AvailabilityDomain m.CompartmentId = model.CompartmentId @@ -157,10 +154,7 @@ func (m *VolumeGroup) UnmarshalJSON(data []byte) (e error) { m.TimeCreated = model.TimeCreated m.VolumeIds = make([]string, len(model.VolumeIds)) - for i, n := range model.VolumeIds { - m.VolumeIds[i] = n - } - + copy(m.VolumeIds, model.VolumeIds) return } diff --git a/dashboardservice/create_dashboard_details.go b/dashboardservice/create_dashboard_details.go index 29cc4710f7..80050e7f99 100644 --- a/dashboardservice/create_dashboard_details.go +++ b/dashboardservice/create_dashboard_details.go @@ -48,11 +48,11 @@ type CreateDashboardDetails interface { type createdashboarddetails struct { JsonData []byte - DashboardGroupId *string `mandatory:"true" json:"dashboardGroupId"` DisplayName *string `mandatory:"false" json:"displayName"` Description *string `mandatory:"false" json:"description"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + DashboardGroupId *string `mandatory:"true" json:"dashboardGroupId"` SchemaVersion string `json:"schemaVersion"` } @@ -96,31 +96,31 @@ func (m *createdashboarddetails) UnmarshalPolymorphicJSON(data []byte) (interfac } } -//GetDashboardGroupId returns DashboardGroupId -func (m createdashboarddetails) GetDashboardGroupId() *string { - return m.DashboardGroupId -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createdashboarddetails) GetDisplayName() *string { return m.DisplayName } -//GetDescription returns Description +// GetDescription returns Description func (m createdashboarddetails) GetDescription() *string { return m.Description } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createdashboarddetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createdashboarddetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetDashboardGroupId returns DashboardGroupId +func (m createdashboarddetails) GetDashboardGroupId() *string { + return m.DashboardGroupId +} + func (m createdashboarddetails) String() string { return common.PointerString(m) } diff --git a/dashboardservice/dashboard.go b/dashboardservice/dashboard.go index ae3bdea761..c95ce18e2b 100644 --- a/dashboardservice/dashboard.go +++ b/dashboardservice/dashboard.go @@ -69,6 +69,7 @@ type Dashboard interface { type dashboard struct { JsonData []byte + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` Id *string `mandatory:"true" json:"id"` DashboardGroupId *string `mandatory:"true" json:"dashboardGroupId"` DisplayName *string `mandatory:"true" json:"displayName"` @@ -79,7 +80,6 @@ type dashboard struct { LifecycleState DashboardLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` FreeformTags map[string]string `mandatory:"true" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` - SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` SchemaVersion string `json:"schemaVersion"` } @@ -129,61 +129,61 @@ func (m *dashboard) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetId returns Id +// GetSystemTags returns SystemTags +func (m dashboard) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetId returns Id func (m dashboard) GetId() *string { return m.Id } -//GetDashboardGroupId returns DashboardGroupId +// GetDashboardGroupId returns DashboardGroupId func (m dashboard) GetDashboardGroupId() *string { return m.DashboardGroupId } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m dashboard) GetDisplayName() *string { return m.DisplayName } -//GetDescription returns Description +// GetDescription returns Description func (m dashboard) GetDescription() *string { return m.Description } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m dashboard) GetCompartmentId() *string { return m.CompartmentId } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m dashboard) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m dashboard) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m dashboard) GetLifecycleState() DashboardLifecycleStateEnum { return m.LifecycleState } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m dashboard) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m dashboard) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags -func (m dashboard) GetSystemTags() map[string]map[string]interface{} { - return m.SystemTags -} - func (m dashboard) String() string { return common.PointerString(m) } diff --git a/dashboardservice/dashboardservice_dashboard_client.go b/dashboardservice/dashboardservice_dashboard_client.go index 5983c033e6..32ff8a14d9 100644 --- a/dashboardservice/dashboardservice_dashboard_client.go +++ b/dashboardservice/dashboardservice_dashboard_client.go @@ -86,7 +86,7 @@ func (client *DashboardClient) setConfigurationProvider(configProvider common.Co 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/dashboardservice/dashboardservice_dashboardgroup_client.go b/dashboardservice/dashboardservice_dashboardgroup_client.go index 1d5a79e7a2..6960451b02 100644 --- a/dashboardservice/dashboardservice_dashboardgroup_client.go +++ b/dashboardservice/dashboardservice_dashboardgroup_client.go @@ -86,7 +86,7 @@ func (client *DashboardGroupClient) setConfigurationProvider(configProvider comm 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/dashboardservice/update_dashboard_details.go b/dashboardservice/update_dashboard_details.go index 697c0028dd..89da7950ba 100644 --- a/dashboardservice/update_dashboard_details.go +++ b/dashboardservice/update_dashboard_details.go @@ -91,22 +91,22 @@ func (m *updatedashboarddetails) UnmarshalPolymorphicJSON(data []byte) (interfac } } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m updatedashboarddetails) GetDisplayName() *string { return m.DisplayName } -//GetDescription returns Description +// GetDescription returns Description func (m updatedashboarddetails) GetDescription() *string { return m.Description } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updatedashboarddetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updatedashboarddetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/database/acd_avm_resource_stats.go b/database/acd_avm_resource_stats.go new file mode 100644 index 0000000000..ae237cb1a9 --- /dev/null +++ b/database/acd_avm_resource_stats.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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" +) + +// AcdAvmResourceStats Resource usage by autonomous container database in a particular VM. +type AcdAvmResourceStats struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Autonomous VM. + Id *string `mandatory:"false" json:"id"` + + // The user-friendly name for the Autonomous VM. The name does not need to be unique. + DisplayName *string `mandatory:"false" json:"displayName"` + + // CPUs/cores assigned to Autonomous Databases for the ACD instance in given Autonomus VM. + ProvisionedCpus *float32 `mandatory:"false" json:"provisionedCpus"` + + // CPUs/cores assigned to the ACD instance in given Autonomous VM. Sum of provisioned, + // reserved and reclaimable CPUs/ cores to the ACD instance. + UsedCpus *float32 `mandatory:"false" json:"usedCpus"` + + // CPUs/cores reserved for scalability, resilliency and other overheads. + // This includes failover, autoscaling and idle instance overhead. + ReservedCpus *float32 `mandatory:"false" json:"reservedCpus"` + + // CPUs/cores that continue to be included in the count of OCPUs available to the + // Autonomous Container Database in given Autonomous VM, even after one of its + // Autonomous Database is terminated or scaled down. You can release them to the available + // OCPUs at its parent AVMC level by restarting the Autonomous Container Database. + ReclaimableCpus *float32 `mandatory:"false" json:"reclaimableCpus"` +} + +func (m AcdAvmResourceStats) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AcdAvmResourceStats) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/database/autonomous_container_database.go b/database/autonomous_container_database.go index 0f9078690e..6b06d994ec 100644 --- a/database/autonomous_container_database.go +++ b/database/autonomous_container_database.go @@ -119,28 +119,37 @@ type AutonomousContainerDatabase struct { // The wallet name for Oracle Key Vault. KeyStoreWalletName *string `mandatory:"false" json:"keyStoreWalletName"` - // The amount of memory (in GBs) enabled per OCPU or ECPU in the Autonomous VM Cluster.See Compute Models (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // The amount of memory (in GBs) enabled per OCPU or ECPU in the Autonomous VM Cluster. MemoryPerOracleComputeUnitInGBs *int `mandatory:"false" json:"memoryPerOracleComputeUnitInGBs"` // Sum of CPUs available on the Autonomous VM Cluster + Sum of reclaimable CPUs available in the Autonomous Container Database.
- // For Autonomous Databases on Dedicated Exadata Infrastructure, the CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // For Autonomous Databases on Dedicated Exadata Infrastructure, the CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. AvailableCpus *float32 `mandatory:"false" json:"availableCpus"` // The number of CPUs allocated to the Autonomous VM cluster.
- // For Autonomous Databases on Dedicated Exadata Infrastructure, the CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // For Autonomous Databases on Dedicated Exadata Infrastructure, the CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. TotalCpus *int `mandatory:"false" json:"totalCpus"` // For Autonomous Databases on Dedicated Exadata Infrastructure: // - These are the CPUs that continue to be included in the count of CPUs available to the Autonomous Container Database even after one of its Autonomous Database is terminated or scaled down. You can release them to the available CPUs at its parent Autonomous VM Cluster level by restarting the Autonomous Container Database. - // - The CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // - The CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. ReclaimableCpus *float32 `mandatory:"false" json:"reclaimableCpus"` // An array of CPU values that can be used to successfully provision a single Autonomous Database.\ - // For Autonomous Database on Dedicated Exadata Infrastructure, the CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // For Autonomous Database on Dedicated Exadata Infrastructure, the CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. ProvisionableCpus []float32 `mandatory:"false" json:"provisionableCpus"` - // The compute model of the Autonomous VM Cluster. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // The compute model of the Autonomous VM Cluster. ComputeModel AutonomousContainerDatabaseComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` + + // The number of CPUs provisioned in an Autonomous Container Database. + ProvisionedCpus *float32 `mandatory:"false" json:"provisionedCpus"` + + // The number of CPUs reserved in an Autonomous Container Database. + ReservedCpus *float32 `mandatory:"false" json:"reservedCpus"` + + // The largest Autonomous Database (CPU) that can be created in a new Autonomous Container Database. + LargestProvisionableAutonomousDatabaseInCpus *float32 `mandatory:"false" json:"largestProvisionableAutonomousDatabaseInCpus"` } func (m AutonomousContainerDatabase) String() string { diff --git a/database/autonomous_container_database_resource_usage.go b/database/autonomous_container_database_resource_usage.go new file mode 100644 index 0000000000..9bc7aa0d17 --- /dev/null +++ b/database/autonomous_container_database_resource_usage.go @@ -0,0 +1,77 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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" +) + +// AutonomousContainerDatabaseResourceUsage Associated autonomous container databases usages. +type AutonomousContainerDatabaseResourceUsage struct { + + // The user-friendly name for the Autonomous Container Database. The name does not need to be unique. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Autonomous Container Database. + Id *string `mandatory:"false" json:"id"` + + // CPUs / cores reclaimable or released to cluster on Autonomous Container Database restart. + ReclaimableCpus *float32 `mandatory:"false" json:"reclaimableCpus"` + + // CPUs / cores available for ADB provisioning or scaling in the Autonomous Container Database. + AvailableCpus *float32 `mandatory:"false" json:"availableCpus"` + + // Largest provisionable ADB in the Autonomous Container Database. + LargestProvisionableAutonomousDatabaseInCpus *float32 `mandatory:"false" json:"largestProvisionableAutonomousDatabaseInCpus"` + + // CPUs / cores assigned to ADBs in the Autonomous Container Database. + ProvisionedCpus *float32 `mandatory:"false" json:"provisionedCpus"` + + // CPUs / cores reserved for scalability, resilliency and other overheads. + // This includes failover, autoscaling and idle instance overhead. + ReservedCpus *float32 `mandatory:"false" json:"reservedCpus"` + + // CPUs / cores assigned to the Autonomous Container Database. Sum of provisioned, + // reserved and reclaimable CPUs/ cores. + UsedCpus *float32 `mandatory:"false" json:"usedCpus"` + + // Valid list of provisionable CPUs / cores for ADB creation. + ProvisionableCpus []float32 `mandatory:"false" json:"provisionableCpus"` + + // List of autonomous container database resource usage per autonomous virtual machine. + AutonomousContainerDatabaseVmUsage []AcdAvmResourceStats `mandatory:"false" json:"autonomousContainerDatabaseVmUsage"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m AutonomousContainerDatabaseResourceUsage) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AutonomousContainerDatabaseResourceUsage) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/database/autonomous_container_database_summary.go b/database/autonomous_container_database_summary.go index 0555c51a90..7084bf94c7 100644 --- a/database/autonomous_container_database_summary.go +++ b/database/autonomous_container_database_summary.go @@ -119,28 +119,37 @@ type AutonomousContainerDatabaseSummary struct { // The wallet name for Oracle Key Vault. KeyStoreWalletName *string `mandatory:"false" json:"keyStoreWalletName"` - // The amount of memory (in GBs) enabled per OCPU or ECPU in the Autonomous VM Cluster.See Compute Models (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // The amount of memory (in GBs) enabled per OCPU or ECPU in the Autonomous VM Cluster. MemoryPerOracleComputeUnitInGBs *int `mandatory:"false" json:"memoryPerOracleComputeUnitInGBs"` // Sum of CPUs available on the Autonomous VM Cluster + Sum of reclaimable CPUs available in the Autonomous Container Database.
- // For Autonomous Databases on Dedicated Exadata Infrastructure, the CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // For Autonomous Databases on Dedicated Exadata Infrastructure, the CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. AvailableCpus *float32 `mandatory:"false" json:"availableCpus"` // The number of CPUs allocated to the Autonomous VM cluster.
- // For Autonomous Databases on Dedicated Exadata Infrastructure, the CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // For Autonomous Databases on Dedicated Exadata Infrastructure, the CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. TotalCpus *int `mandatory:"false" json:"totalCpus"` // For Autonomous Databases on Dedicated Exadata Infrastructure: // - These are the CPUs that continue to be included in the count of CPUs available to the Autonomous Container Database even after one of its Autonomous Database is terminated or scaled down. You can release them to the available CPUs at its parent Autonomous VM Cluster level by restarting the Autonomous Container Database. - // - The CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // - The CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. ReclaimableCpus *float32 `mandatory:"false" json:"reclaimableCpus"` // An array of CPU values that can be used to successfully provision a single Autonomous Database.\ - // For Autonomous Database on Dedicated Exadata Infrastructure, the CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // For Autonomous Database on Dedicated Exadata Infrastructure, the CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. ProvisionableCpus []float32 `mandatory:"false" json:"provisionableCpus"` - // The compute model of the Autonomous VM Cluster. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // The compute model of the Autonomous VM Cluster. ComputeModel AutonomousContainerDatabaseSummaryComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` + + // The number of CPUs provisioned in an Autonomous Container Database. + ProvisionedCpus *float32 `mandatory:"false" json:"provisionedCpus"` + + // The number of CPUs reserved in an Autonomous Container Database. + ReservedCpus *float32 `mandatory:"false" json:"reservedCpus"` + + // The largest Autonomous Database (CPU) that can be created in a new Autonomous Container Database. + LargestProvisionableAutonomousDatabaseInCpus *float32 `mandatory:"false" json:"largestProvisionableAutonomousDatabaseInCpus"` } func (m AutonomousContainerDatabaseSummary) String() string { diff --git a/database/autonomous_database.go b/database/autonomous_database.go index 7f6b0e2391..4a5884bb26 100644 --- a/database/autonomous_database.go +++ b/database/autonomous_database.go @@ -117,7 +117,7 @@ type AutonomousDatabase struct { // An array of CPU values that an Autonomous Database can be scaled to. ProvisionableCpus []float32 `mandatory:"false" json:"provisionableCpus"` - // The amount of memory (in GBs) enabled per OCPU or ECPU. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // The amount of memory (in GBs) enabled per OCPU or ECPU. MemoryPerOracleComputeUnitInGBs *int `mandatory:"false" json:"memoryPerOracleComputeUnitInGBs"` // The quantity of data in the database, in gigabytes. diff --git a/database/autonomous_database_connection_strings.go b/database/autonomous_database_connection_strings.go index 3ad4a1d19a..335c90ac40 100644 --- a/database/autonomous_database_connection_strings.go +++ b/database/autonomous_database_connection_strings.go @@ -17,7 +17,7 @@ import ( // AutonomousDatabaseConnectionStrings Connection strings to connect to an Oracle Autonomous Database. // Example output for connection strings. See DatabaseConnectionStringProfile for additional details: -// "connectionStrings": { +// "connectionStrings": { // "allConnectionStrings": { // "HIGH": "adb.region.oraclecloud.com:1522/unique_id_databasename_high.adwc.oraclecloud.com", // "LOW": "adb.region.oraclecloud.com:1522/unique_id_databasename_low.adwc.oraclecloud.com", diff --git a/database/autonomous_database_summary.go b/database/autonomous_database_summary.go index 50f5118b0a..474733d6f6 100644 --- a/database/autonomous_database_summary.go +++ b/database/autonomous_database_summary.go @@ -118,7 +118,7 @@ type AutonomousDatabaseSummary struct { // An array of CPU values that an Autonomous Database can be scaled to. ProvisionableCpus []float32 `mandatory:"false" json:"provisionableCpus"` - // The amount of memory (in GBs) enabled per OCPU or ECPU. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // The amount of memory (in GBs) enabled per OCPU or ECPU. MemoryPerOracleComputeUnitInGBs *int `mandatory:"false" json:"memoryPerOracleComputeUnitInGBs"` // The quantity of data in the database, in gigabytes. diff --git a/database/autonomous_vm_cluster.go b/database/autonomous_vm_cluster.go index 906409bd90..88149a79c0 100644 --- a/database/autonomous_vm_cluster.go +++ b/database/autonomous_vm_cluster.go @@ -51,7 +51,7 @@ type AutonomousVmCluster struct { // The number of enabled CPU cores. CpusEnabled *int `mandatory:"false" json:"cpusEnabled"` - // The compute model of the Autonomous VM Cluster. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // The compute model of the Autonomous VM Cluster. ComputeModel AutonomousVmClusterComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` // The number of enabled OCPU cores. @@ -63,7 +63,7 @@ type AutonomousVmCluster struct { // The total number of Autonomous Container Databases that can be created. TotalContainerDatabases *int `mandatory:"false" json:"totalContainerDatabases"` - // The amount of memory (in GBs) to be enabled per OCPU or ECPU. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // The amount of memory (in GBs) to be enabled per OCPU or ECPU. MemoryPerOracleComputeUnitInGBs *int `mandatory:"false" json:"memoryPerOracleComputeUnitInGBs"` // The number of CPU cores enabled per VM cluster node. @@ -115,7 +115,7 @@ type AutonomousVmCluster struct { // For Autonomous Databases on Dedicated Exadata Infrastructure: // - These are the CPUs that continue to be included in the count of CPUs available to the Autonomous Container Database even after one of its Autonomous Database is terminated or scaled down. You can release them to the available CPUs at its parent Autonomous VM Cluster level by restarting the Autonomous Container Database. - // - The CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // - The CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. ReclaimableCpus *int `mandatory:"false" json:"reclaimableCpus"` // The number of Autonomous Container Databases that can be created with the currently available local storage. diff --git a/database/autonomous_vm_cluster_summary.go b/database/autonomous_vm_cluster_summary.go index 7ebb3f4b13..927d49a2ea 100644 --- a/database/autonomous_vm_cluster_summary.go +++ b/database/autonomous_vm_cluster_summary.go @@ -51,7 +51,7 @@ type AutonomousVmClusterSummary struct { // The number of enabled CPU cores. CpusEnabled *int `mandatory:"false" json:"cpusEnabled"` - // The compute model of the Autonomous VM Cluster. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // The compute model of the Autonomous VM Cluster. ComputeModel AutonomousVmClusterSummaryComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` // The number of enabled OCPU cores. @@ -63,7 +63,7 @@ type AutonomousVmClusterSummary struct { // The total number of Autonomous Container Databases that can be created. TotalContainerDatabases *int `mandatory:"false" json:"totalContainerDatabases"` - // The amount of memory (in GBs) to be enabled per OCPU or ECPU. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // The amount of memory (in GBs) to be enabled per OCPU or ECPU. MemoryPerOracleComputeUnitInGBs *int `mandatory:"false" json:"memoryPerOracleComputeUnitInGBs"` // The number of CPU cores enabled per VM cluster node. @@ -115,7 +115,7 @@ type AutonomousVmClusterSummary struct { // For Autonomous Databases on Dedicated Exadata Infrastructure: // - These are the CPUs that continue to be included in the count of CPUs available to the Autonomous Container Database even after one of its Autonomous Database is terminated or scaled down. You can release them to the available CPUs at its parent Autonomous VM Cluster level by restarting the Autonomous Container Database. - // - The CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // - The CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. ReclaimableCpus *int `mandatory:"false" json:"reclaimableCpus"` // The number of Autonomous Container Databases that can be created with the currently available local storage. diff --git a/database/autonomous_vm_resource_usage.go b/database/autonomous_vm_resource_usage.go new file mode 100644 index 0000000000..7ae663c210 --- /dev/null +++ b/database/autonomous_vm_resource_usage.go @@ -0,0 +1,63 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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" +) + +// AutonomousVmResourceUsage Autonomous VM usage statistics. +type AutonomousVmResourceUsage struct { + + // The user-friendly name for the Autonomous VM cluster. The name does not need to be unique. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Autonomous VM Cluster. + Id *string `mandatory:"false" json:"id"` + + // The number of CPU cores alloted to the Autonomous Container Databases in an Cloud Autonomous VM cluster. + UsedCpus *float32 `mandatory:"false" json:"usedCpus"` + + // The number of CPU cores available. + AvailableCpus *float32 `mandatory:"false" json:"availableCpus"` + + // CPU cores that continue to be included in the count of OCPUs available to the + // Autonomous Container Database even after one of its Autonomous Database is + // terminated or scaled down. You can release them to the available OCPUs at its + // parent AVMC level by restarting the Autonomous Container Database. + ReclaimableCpus *float32 `mandatory:"false" json:"reclaimableCpus"` + + // The number of CPUs provisioned in an Autonomous VM Cluster. + ProvisionedCpus *float32 `mandatory:"false" json:"provisionedCpus"` + + // The number of CPUs reserved in an Autonomous VM Cluster. + ReservedCpus *float32 `mandatory:"false" json:"reservedCpus"` + + // Associated Autonomous Container Database Usages. + AutonomousContainerDatabaseUsage []AvmAcdResourceStats `mandatory:"false" json:"autonomousContainerDatabaseUsage"` +} + +func (m AutonomousVmResourceUsage) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AutonomousVmResourceUsage) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/database/avm_acd_resource_stats.go b/database/avm_acd_resource_stats.go new file mode 100644 index 0000000000..23e96e5b36 --- /dev/null +++ b/database/avm_acd_resource_stats.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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" +) + +// AvmAcdResourceStats Associated autonomous container databases usages. +type AvmAcdResourceStats struct { + + // The user-friendly name for the Autonomous Container Database. The name does not need to be unique. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Autonomous Container Database. + Id *string `mandatory:"false" json:"id"` + + // CPUs/cores assigned to Autonomous Databases in the ACD instances. + ProvisionedCpus *float32 `mandatory:"false" json:"provisionedCpus"` + + // The number of CPU cores available. + AvailableCpus *float32 `mandatory:"false" json:"availableCpus"` + + // CPUs/cores assigned to the ACD instance. Sum of provisioned, reserved and reclaimable CPUs/ cores + // to the ACD instance. + UsedCpus *float32 `mandatory:"false" json:"usedCpus"` + + // CPUs/cores reserved for scalability, resilliency and other overheads. This includes failover, + // autoscaling and idle instance overhead. + ReservedCpus *float32 `mandatory:"false" json:"reservedCpus"` + + // CPUs/cores that continue to be included in the count of OCPUs available to the + // Autonomous Container Database even after one of its Autonomous Database is terminated + // or scaled down. You can release them to the available OCPUs at its parent AVMC level by + // restarting the Autonomous Container Database. + ReclaimableCpus *float32 `mandatory:"false" json:"reclaimableCpus"` +} + +func (m AvmAcdResourceStats) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AvmAcdResourceStats) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/database/cloud_autonomous_vm_cluster.go b/database/cloud_autonomous_vm_cluster.go index 725ebf506e..33fec4efc7 100644 --- a/database/cloud_autonomous_vm_cluster.go +++ b/database/cloud_autonomous_vm_cluster.go @@ -91,7 +91,7 @@ type CloudAutonomousVmCluster struct { // The number of CPU cores on the cloud Autonomous VM cluster. Only 1 decimal place is allowed for the fractional part. OcpuCount *float32 `mandatory:"false" json:"ocpuCount"` - // The compute model of the Cloud Autonomous VM Cluster. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // The compute model of the Cloud Autonomous VM Cluster. ComputeModel CloudAutonomousVmClusterComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` // Enable mutual TLS(mTLS) authentication for database at time of provisioning a VMCluster. This is applicable to database TLS Certificates only. Default is TLS @@ -144,7 +144,7 @@ type CloudAutonomousVmCluster struct { // For Autonomous Databases on Dedicated Exadata Infrastructure: // - These are the CPUs that continue to be included in the count of CPUs available to the Autonomous Container Database even after one of its Autonomous Database is terminated or scaled down. You can release them to the available CPUs at its parent Autonomous VM Cluster level by restarting the Autonomous Container Database. - // - The CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // - The CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. ReclaimableCpus *float32 `mandatory:"false" json:"reclaimableCpus"` // The number of Autonomous Container Databases that can be created with the currently available local storage. @@ -162,11 +162,38 @@ type CloudAutonomousVmCluster struct { // The local node storage allocated in GBs. DbNodeStorageSizeInGBs *int `mandatory:"false" json:"dbNodeStorageSizeInGBs"` - // The amount of memory (in GBs) enabled per OCPU or ECPU. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // The amount of memory (in GBs) enabled per OCPU or ECPU. MemoryPerOracleComputeUnitInGBs *int `mandatory:"false" json:"memoryPerOracleComputeUnitInGBs"` // The list of OCIDs (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Db servers. DbServers []string `mandatory:"false" json:"dbServers"` + + // The percentage of total number of CPUs used in an Autonomous VM Cluster. + CpuPercentage *float32 `mandatory:"false" json:"cpuPercentage"` + + // The percentage of the data storage used for the Autonomous Databases in an Autonomous VM Cluster. + AutonomousDataStoragePercentage *float32 `mandatory:"false" json:"autonomousDataStoragePercentage"` + + // The number of CPUs provisioned in an Autonomous VM Cluster. + ProvisionedCpus *float32 `mandatory:"false" json:"provisionedCpus"` + + // The total number of CPUs in an Autonomous VM Cluster. + TotalCpus *float32 `mandatory:"false" json:"totalCpus"` + + // The total data disk group size for Autonomous Databases, in TBs. + TotalAutonomousDataStorageInTBs *float32 `mandatory:"false" json:"totalAutonomousDataStorageInTBs"` + + // The number of CPUs reserved in an Autonomous VM Cluster. + ReservedCpus *float32 `mandatory:"false" json:"reservedCpus"` + + // The number of provisionable Autonomous Container Databases in an Autonomous VM Cluster. + ProvisionableAutonomousContainerDatabases *int `mandatory:"false" json:"provisionableAutonomousContainerDatabases"` + + // The number of provisioned Autonomous Container Databases in an Autonomous VM Cluster. + ProvisionedAutonomousContainerDatabases *int `mandatory:"false" json:"provisionedAutonomousContainerDatabases"` + + // The number of non-provisionable Autonomous Container Databases in an Autonomous VM Cluster. + NonProvisionableAutonomousContainerDatabases *int `mandatory:"false" json:"nonProvisionableAutonomousContainerDatabases"` } func (m CloudAutonomousVmCluster) String() string { diff --git a/database/cloud_autonomous_vm_cluster_resource_usage.go b/database/cloud_autonomous_vm_cluster_resource_usage.go new file mode 100644 index 0000000000..2dfa81cdf5 --- /dev/null +++ b/database/cloud_autonomous_vm_cluster_resource_usage.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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" +) + +// CloudAutonomousVmClusterResourceUsage Cloud Autonomous VM Cluster usage details, including the Autonomous Container Databases usage. +type CloudAutonomousVmClusterResourceUsage struct { + + // The user-friendly name for the Autonomous VM cluster. The name does not need to be unique. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Cloud Autonomous VM cluster. + Id *string `mandatory:"false" json:"id"` + + // The data disk group size allocated for Autonomous Databases, in TBs. + AutonomousDataStorageSizeInTBs *float32 `mandatory:"false" json:"autonomousDataStorageSizeInTBs"` + + // The local node storage allocated in GBs. + DbNodeStorageSizeInGBs *int `mandatory:"false" json:"dbNodeStorageSizeInGBs"` + + // The memory allocated in GBs. + MemorySizeInGBs *int `mandatory:"false" json:"memorySizeInGBs"` + + // The total number of Autonomous Container Databases that can be created. + TotalContainerDatabases *int `mandatory:"false" json:"totalContainerDatabases"` + + // The data disk group size available for Autonomous Databases, in TBs. + AvailableAutonomousDataStorageSizeInTBs *float32 `mandatory:"false" json:"availableAutonomousDataStorageSizeInTBs"` + + // The data disk group size used for Autonomous Databases, in TBs. + UsedAutonomousDataStorageSizeInTBs *float32 `mandatory:"false" json:"usedAutonomousDataStorageSizeInTBs"` + + // The amount of memory (in GBs) to be enabled per each CPU core. + MemoryPerOracleComputeUnitInGBs *int `mandatory:"false" json:"memoryPerOracleComputeUnitInGBs"` + + // Total exadata storage allocated for the Autonomous VM Cluster. DATA + RECOVERY + SPARSE + any overhead in TBs. + ExadataStorageInTBs *float64 `mandatory:"false" json:"exadataStorageInTBs"` + + // The number of CPU cores enabled on the Cloud Autonomous VM cluster. + TotalCpus *float32 `mandatory:"false" json:"totalCpus"` + + // The number of CPU cores alloted to the Autonomous Container Databases + // in an Cloud Autonomous VM cluster. + UsedCpus *float32 `mandatory:"false" json:"usedCpus"` + + // The number of CPU cores available. + AvailableCpus *float32 `mandatory:"false" json:"availableCpus"` + + // CPU cores that continue to be included in the count of OCPUs available + // to the Autonomous Container Database even after one of its Autonomous Database is + // terminated or scaled down. You can release them to the available OCPUs at its parent + // AVMC level by restarting the Autonomous Container Database. + ReclaimableCpus *float32 `mandatory:"false" json:"reclaimableCpus"` + + // The number of CPUs provisioned in an Autonomous VM Cluster. + ProvisionedCpus *float32 `mandatory:"false" json:"provisionedCpus"` + + // The number of CPUs reserved in an Autonomous VM Cluster. + ReservedCpus *float32 `mandatory:"false" json:"reservedCpus"` + + // The number of provisionable Autonomous Container Databases in an Autonomous VM Cluster. + ProvisionableAutonomousContainerDatabases *int `mandatory:"false" json:"provisionableAutonomousContainerDatabases"` + + // The number of provisioned Autonomous Container Databases in an Autonomous VM Cluster. + ProvisionedAutonomousContainerDatabases *int `mandatory:"false" json:"provisionedAutonomousContainerDatabases"` + + // The number of non-provisionable Autonomous Container Databases in an Autonomous VM Cluster. + NonProvisionableAutonomousContainerDatabases *int `mandatory:"false" json:"nonProvisionableAutonomousContainerDatabases"` + + // List of Autonomous VM resource usages. + AutonomousVmResourceUsage []AutonomousVmResourceUsage `mandatory:"false" json:"autonomousVmResourceUsage"` +} + +func (m CloudAutonomousVmClusterResourceUsage) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CloudAutonomousVmClusterResourceUsage) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/database/cloud_autonomous_vm_cluster_summary.go b/database/cloud_autonomous_vm_cluster_summary.go index e39abc9426..73c2498e3a 100644 --- a/database/cloud_autonomous_vm_cluster_summary.go +++ b/database/cloud_autonomous_vm_cluster_summary.go @@ -91,7 +91,7 @@ type CloudAutonomousVmClusterSummary struct { // The number of CPU cores on the cloud Autonomous VM cluster. Only 1 decimal place is allowed for the fractional part. OcpuCount *float32 `mandatory:"false" json:"ocpuCount"` - // The compute model of the Cloud Autonomous VM Cluster. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // The compute model of the Cloud Autonomous VM Cluster. ComputeModel CloudAutonomousVmClusterSummaryComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` // Enable mutual TLS(mTLS) authentication for database at time of provisioning a VMCluster. This is applicable to database TLS Certificates only. Default is TLS @@ -144,7 +144,7 @@ type CloudAutonomousVmClusterSummary struct { // For Autonomous Databases on Dedicated Exadata Infrastructure: // - These are the CPUs that continue to be included in the count of CPUs available to the Autonomous Container Database even after one of its Autonomous Database is terminated or scaled down. You can release them to the available CPUs at its parent Autonomous VM Cluster level by restarting the Autonomous Container Database. - // - The CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // - The CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. ReclaimableCpus *float32 `mandatory:"false" json:"reclaimableCpus"` // The number of Autonomous Container Databases that can be created with the currently available local storage. @@ -162,11 +162,38 @@ type CloudAutonomousVmClusterSummary struct { // The local node storage allocated in GBs. DbNodeStorageSizeInGBs *int `mandatory:"false" json:"dbNodeStorageSizeInGBs"` - // The amount of memory (in GBs) enabled per OCPU or ECPU. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // The amount of memory (in GBs) enabled per OCPU or ECPU. MemoryPerOracleComputeUnitInGBs *int `mandatory:"false" json:"memoryPerOracleComputeUnitInGBs"` // The list of OCIDs (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Db servers. DbServers []string `mandatory:"false" json:"dbServers"` + + // The percentage of total number of CPUs used in an Autonomous VM Cluster. + CpuPercentage *float32 `mandatory:"false" json:"cpuPercentage"` + + // The percentage of the data storage used for the Autonomous Databases in an Autonomous VM Cluster. + AutonomousDataStoragePercentage *float32 `mandatory:"false" json:"autonomousDataStoragePercentage"` + + // The number of CPUs provisioned in an Autonomous VM Cluster. + ProvisionedCpus *float32 `mandatory:"false" json:"provisionedCpus"` + + // The total number of CPUs in an Autonomous VM Cluster. + TotalCpus *float32 `mandatory:"false" json:"totalCpus"` + + // The total data disk group size for Autonomous Databases, in TBs. + TotalAutonomousDataStorageInTBs *float32 `mandatory:"false" json:"totalAutonomousDataStorageInTBs"` + + // The number of CPUs reserved in an Autonomous VM Cluster. + ReservedCpus *float32 `mandatory:"false" json:"reservedCpus"` + + // The number of provisionable Autonomous Container Databases in an Autonomous VM Cluster. + ProvisionableAutonomousContainerDatabases *int `mandatory:"false" json:"provisionableAutonomousContainerDatabases"` + + // The number of provisioned Autonomous Container Databases in an Autonomous VM Cluster. + ProvisionedAutonomousContainerDatabases *int `mandatory:"false" json:"provisionedAutonomousContainerDatabases"` + + // The number of non-provisionable Autonomous Container Databases in an Autonomous VM Cluster. + NonProvisionableAutonomousContainerDatabases *int `mandatory:"false" json:"nonProvisionableAutonomousContainerDatabases"` } func (m CloudAutonomousVmClusterSummary) String() string { diff --git a/database/create_autonomous_database_base.go b/database/create_autonomous_database_base.go index 1c41b3204b..f708d6b92a 100644 --- a/database/create_autonomous_database_base.go +++ b/database/create_autonomous_database_base.go @@ -237,7 +237,6 @@ type CreateAutonomousDatabaseBase interface { type createautonomousdatabasebase struct { JsonData []byte - CompartmentId *string `mandatory:"true" json:"compartmentId"` CharacterSet *string `mandatory:"false" json:"characterSet"` NcharacterSet *string `mandatory:"false" json:"ncharacterSet"` DbName *string `mandatory:"false" json:"dbName"` @@ -283,6 +282,7 @@ type createautonomousdatabasebase struct { DbToolsDetails []DatabaseTool `mandatory:"false" json:"dbToolsDetails"` SecretId *string `mandatory:"false" json:"secretId"` SecretVersionNumber *int `mandatory:"false" json:"secretVersionNumber"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` Source string `json:"source"` } @@ -391,236 +391,236 @@ func (m *createautonomousdatabasebase) UnmarshalPolymorphicJSON(data []byte) (in } } -//GetCompartmentId returns CompartmentId -func (m createautonomousdatabasebase) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetCharacterSet returns CharacterSet +// GetCharacterSet returns CharacterSet func (m createautonomousdatabasebase) GetCharacterSet() *string { return m.CharacterSet } -//GetNcharacterSet returns NcharacterSet +// GetNcharacterSet returns NcharacterSet func (m createautonomousdatabasebase) GetNcharacterSet() *string { return m.NcharacterSet } -//GetDbName returns DbName +// GetDbName returns DbName func (m createautonomousdatabasebase) GetDbName() *string { return m.DbName } -//GetCpuCoreCount returns CpuCoreCount +// GetCpuCoreCount returns CpuCoreCount func (m createautonomousdatabasebase) GetCpuCoreCount() *int { return m.CpuCoreCount } -//GetBackupRetentionPeriodInDays returns BackupRetentionPeriodInDays +// GetBackupRetentionPeriodInDays returns BackupRetentionPeriodInDays func (m createautonomousdatabasebase) GetBackupRetentionPeriodInDays() *int { return m.BackupRetentionPeriodInDays } -//GetComputeModel returns ComputeModel +// GetComputeModel returns ComputeModel func (m createautonomousdatabasebase) GetComputeModel() CreateAutonomousDatabaseBaseComputeModelEnum { return m.ComputeModel } -//GetComputeCount returns ComputeCount +// GetComputeCount returns ComputeCount func (m createautonomousdatabasebase) GetComputeCount() *float32 { return m.ComputeCount } -//GetOcpuCount returns OcpuCount +// GetOcpuCount returns OcpuCount func (m createautonomousdatabasebase) GetOcpuCount() *float32 { return m.OcpuCount } -//GetDbWorkload returns DbWorkload +// GetDbWorkload returns DbWorkload func (m createautonomousdatabasebase) GetDbWorkload() CreateAutonomousDatabaseBaseDbWorkloadEnum { return m.DbWorkload } -//GetDataStorageSizeInTBs returns DataStorageSizeInTBs +// GetDataStorageSizeInTBs returns DataStorageSizeInTBs func (m createautonomousdatabasebase) GetDataStorageSizeInTBs() *int { return m.DataStorageSizeInTBs } -//GetDataStorageSizeInGBs returns DataStorageSizeInGBs +// GetDataStorageSizeInGBs returns DataStorageSizeInGBs func (m createautonomousdatabasebase) GetDataStorageSizeInGBs() *int { return m.DataStorageSizeInGBs } -//GetIsFreeTier returns IsFreeTier +// GetIsFreeTier returns IsFreeTier func (m createautonomousdatabasebase) GetIsFreeTier() *bool { return m.IsFreeTier } -//GetKmsKeyId returns KmsKeyId +// GetKmsKeyId returns KmsKeyId func (m createautonomousdatabasebase) GetKmsKeyId() *string { return m.KmsKeyId } -//GetVaultId returns VaultId +// GetVaultId returns VaultId func (m createautonomousdatabasebase) GetVaultId() *string { return m.VaultId } -//GetAdminPassword returns AdminPassword +// GetAdminPassword returns AdminPassword func (m createautonomousdatabasebase) GetAdminPassword() *string { return m.AdminPassword } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createautonomousdatabasebase) GetDisplayName() *string { return m.DisplayName } -//GetLicenseModel returns LicenseModel +// GetLicenseModel returns LicenseModel func (m createautonomousdatabasebase) GetLicenseModel() CreateAutonomousDatabaseBaseLicenseModelEnum { return m.LicenseModel } -//GetIsPreviewVersionWithServiceTermsAccepted returns IsPreviewVersionWithServiceTermsAccepted +// GetIsPreviewVersionWithServiceTermsAccepted returns IsPreviewVersionWithServiceTermsAccepted func (m createautonomousdatabasebase) GetIsPreviewVersionWithServiceTermsAccepted() *bool { return m.IsPreviewVersionWithServiceTermsAccepted } -//GetIsAutoScalingEnabled returns IsAutoScalingEnabled +// GetIsAutoScalingEnabled returns IsAutoScalingEnabled func (m createautonomousdatabasebase) GetIsAutoScalingEnabled() *bool { return m.IsAutoScalingEnabled } -//GetIsDedicated returns IsDedicated +// GetIsDedicated returns IsDedicated func (m createautonomousdatabasebase) GetIsDedicated() *bool { return m.IsDedicated } -//GetAutonomousContainerDatabaseId returns AutonomousContainerDatabaseId +// GetAutonomousContainerDatabaseId returns AutonomousContainerDatabaseId func (m createautonomousdatabasebase) GetAutonomousContainerDatabaseId() *string { return m.AutonomousContainerDatabaseId } -//GetInMemoryPercentage returns InMemoryPercentage +// GetInMemoryPercentage returns InMemoryPercentage func (m createautonomousdatabasebase) GetInMemoryPercentage() *int { return m.InMemoryPercentage } -//GetIsAccessControlEnabled returns IsAccessControlEnabled +// GetIsAccessControlEnabled returns IsAccessControlEnabled func (m createautonomousdatabasebase) GetIsAccessControlEnabled() *bool { return m.IsAccessControlEnabled } -//GetWhitelistedIps returns WhitelistedIps +// GetWhitelistedIps returns WhitelistedIps func (m createautonomousdatabasebase) GetWhitelistedIps() []string { return m.WhitelistedIps } -//GetArePrimaryWhitelistedIpsUsed returns ArePrimaryWhitelistedIpsUsed +// GetArePrimaryWhitelistedIpsUsed returns ArePrimaryWhitelistedIpsUsed func (m createautonomousdatabasebase) GetArePrimaryWhitelistedIpsUsed() *bool { return m.ArePrimaryWhitelistedIpsUsed } -//GetStandbyWhitelistedIps returns StandbyWhitelistedIps +// GetStandbyWhitelistedIps returns StandbyWhitelistedIps func (m createautonomousdatabasebase) GetStandbyWhitelistedIps() []string { return m.StandbyWhitelistedIps } -//GetIsDataGuardEnabled returns IsDataGuardEnabled +// GetIsDataGuardEnabled returns IsDataGuardEnabled func (m createautonomousdatabasebase) GetIsDataGuardEnabled() *bool { return m.IsDataGuardEnabled } -//GetIsLocalDataGuardEnabled returns IsLocalDataGuardEnabled +// GetIsLocalDataGuardEnabled returns IsLocalDataGuardEnabled func (m createautonomousdatabasebase) GetIsLocalDataGuardEnabled() *bool { return m.IsLocalDataGuardEnabled } -//GetSubnetId returns SubnetId +// GetSubnetId returns SubnetId func (m createautonomousdatabasebase) GetSubnetId() *string { return m.SubnetId } -//GetNsgIds returns NsgIds +// GetNsgIds returns NsgIds func (m createautonomousdatabasebase) GetNsgIds() []string { return m.NsgIds } -//GetPrivateEndpointLabel returns PrivateEndpointLabel +// GetPrivateEndpointLabel returns PrivateEndpointLabel func (m createautonomousdatabasebase) GetPrivateEndpointLabel() *string { return m.PrivateEndpointLabel } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createautonomousdatabasebase) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createautonomousdatabasebase) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetPrivateEndpointIp returns PrivateEndpointIp +// GetPrivateEndpointIp returns PrivateEndpointIp func (m createautonomousdatabasebase) GetPrivateEndpointIp() *string { return m.PrivateEndpointIp } -//GetDbVersion returns DbVersion +// GetDbVersion returns DbVersion func (m createautonomousdatabasebase) GetDbVersion() *string { return m.DbVersion } -//GetCustomerContacts returns CustomerContacts +// GetCustomerContacts returns CustomerContacts func (m createautonomousdatabasebase) GetCustomerContacts() []CustomerContact { return m.CustomerContacts } -//GetIsMtlsConnectionRequired returns IsMtlsConnectionRequired +// GetIsMtlsConnectionRequired returns IsMtlsConnectionRequired func (m createautonomousdatabasebase) GetIsMtlsConnectionRequired() *bool { return m.IsMtlsConnectionRequired } -//GetAutonomousMaintenanceScheduleType returns AutonomousMaintenanceScheduleType +// GetAutonomousMaintenanceScheduleType returns AutonomousMaintenanceScheduleType func (m createautonomousdatabasebase) GetAutonomousMaintenanceScheduleType() CreateAutonomousDatabaseBaseAutonomousMaintenanceScheduleTypeEnum { return m.AutonomousMaintenanceScheduleType } -//GetScheduledOperations returns ScheduledOperations +// GetScheduledOperations returns ScheduledOperations func (m createautonomousdatabasebase) GetScheduledOperations() []ScheduledOperationDetails { return m.ScheduledOperations } -//GetIsAutoScalingForStorageEnabled returns IsAutoScalingForStorageEnabled +// GetIsAutoScalingForStorageEnabled returns IsAutoScalingForStorageEnabled func (m createautonomousdatabasebase) GetIsAutoScalingForStorageEnabled() *bool { return m.IsAutoScalingForStorageEnabled } -//GetMaxCpuCoreCount returns MaxCpuCoreCount +// GetMaxCpuCoreCount returns MaxCpuCoreCount func (m createautonomousdatabasebase) GetMaxCpuCoreCount() *int { return m.MaxCpuCoreCount } -//GetDatabaseEdition returns DatabaseEdition +// GetDatabaseEdition returns DatabaseEdition func (m createautonomousdatabasebase) GetDatabaseEdition() AutonomousDatabaseSummaryDatabaseEditionEnum { return m.DatabaseEdition } -//GetDbToolsDetails returns DbToolsDetails +// GetDbToolsDetails returns DbToolsDetails func (m createautonomousdatabasebase) GetDbToolsDetails() []DatabaseTool { return m.DbToolsDetails } -//GetSecretId returns SecretId +// GetSecretId returns SecretId func (m createautonomousdatabasebase) GetSecretId() *string { return m.SecretId } -//GetSecretVersionNumber returns SecretVersionNumber +// GetSecretVersionNumber returns SecretVersionNumber func (m createautonomousdatabasebase) GetSecretVersionNumber() *int { return m.SecretVersionNumber } +// GetCompartmentId returns CompartmentId +func (m createautonomousdatabasebase) GetCompartmentId() *string { + return m.CompartmentId +} + func (m createautonomousdatabasebase) String() string { return common.PointerString(m) } diff --git a/database/create_autonomous_vm_cluster_details.go b/database/create_autonomous_vm_cluster_details.go index 8cb97c573a..ed7178d5f2 100644 --- a/database/create_autonomous_vm_cluster_details.go +++ b/database/create_autonomous_vm_cluster_details.go @@ -45,10 +45,10 @@ type CreateAutonomousVmClusterDetails struct { // The number of CPU cores to enable per VM cluster node. CpuCoreCountPerNode *int `mandatory:"false" json:"cpuCoreCountPerNode"` - // The compute model of the Autonomous VM Cluster. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // The compute model of the Autonomous VM Cluster. ComputeModel CreateAutonomousVmClusterDetailsComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` - // The amount of memory (in GBs) to be enabled per OCPU or ECPU. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // The amount of memory (in GBs) to be enabled per OCPU or ECPU. MemoryPerOracleComputeUnitInGBs *int `mandatory:"false" json:"memoryPerOracleComputeUnitInGBs"` // The data disk group size to be allocated for Autonomous Databases, in TBs. diff --git a/database/create_backup_destination_details.go b/database/create_backup_destination_details.go index 365cc9a805..9ebec1e27f 100644 --- a/database/create_backup_destination_details.go +++ b/database/create_backup_destination_details.go @@ -37,10 +37,10 @@ type CreateBackupDestinationDetails interface { type createbackupdestinationdetails struct { JsonData []byte - DisplayName *string `mandatory:"true" json:"displayName"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + DisplayName *string `mandatory:"true" json:"displayName"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` Type string `json:"type"` } @@ -87,26 +87,26 @@ func (m *createbackupdestinationdetails) UnmarshalPolymorphicJSON(data []byte) ( } } -//GetDisplayName returns DisplayName -func (m createbackupdestinationdetails) GetDisplayName() *string { - return m.DisplayName -} - -//GetCompartmentId returns CompartmentId -func (m createbackupdestinationdetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createbackupdestinationdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createbackupdestinationdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetDisplayName returns DisplayName +func (m createbackupdestinationdetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetCompartmentId returns CompartmentId +func (m createbackupdestinationdetails) GetCompartmentId() *string { + return m.CompartmentId +} + func (m createbackupdestinationdetails) String() string { return common.PointerString(m) } diff --git a/database/create_cloud_autonomous_vm_cluster_details.go b/database/create_cloud_autonomous_vm_cluster_details.go index 4dbf20dfbe..9321f58cc6 100644 --- a/database/create_cloud_autonomous_vm_cluster_details.go +++ b/database/create_cloud_autonomous_vm_cluster_details.go @@ -39,7 +39,7 @@ type CreateCloudAutonomousVmClusterDetails struct { // The number of CPU cores to be enabled per VM cluster node. CpuCoreCountPerNode *int `mandatory:"false" json:"cpuCoreCountPerNode"` - // The amount of memory (in GBs) to be enabled per OCPU or ECPU. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // The amount of memory (in GBs) to be enabled per OCPU or ECPU. MemoryPerOracleComputeUnitInGBs *int `mandatory:"false" json:"memoryPerOracleComputeUnitInGBs"` // The data disk group size to be allocated for Autonomous Databases, in TBs. @@ -48,7 +48,7 @@ type CreateCloudAutonomousVmClusterDetails struct { // The time zone to use for the Cloud Autonomous VM cluster. For details, see DB System Time Zones (https://docs.cloud.oracle.com/Content/Database/References/timezones.htm). ClusterTimeZone *string `mandatory:"false" json:"clusterTimeZone"` - // The compute model of the Cloud Autonomous VM Cluster. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // The compute model of the Cloud Autonomous VM Cluster. ComputeModel CreateCloudAutonomousVmClusterDetailsComputeModelEnum `mandatory:"false" json:"computeModel,omitempty"` // Enable mutual TLS(mTLS) authentication for database at time of provisioning a VMCluster. This is applicable to database TLS Certificates only. Default is TLS diff --git a/database/create_data_guard_association_details.go b/database/create_data_guard_association_details.go index be549315ea..69b6c3075b 100644 --- a/database/create_data_guard_association_details.go +++ b/database/create_data_guard_association_details.go @@ -60,13 +60,13 @@ type CreateDataGuardAssociationDetails interface { type createdataguardassociationdetails struct { JsonData []byte - DatabaseAdminPassword *string `mandatory:"true" json:"databaseAdminPassword"` - ProtectionMode CreateDataGuardAssociationDetailsProtectionModeEnum `mandatory:"true" json:"protectionMode"` - TransportType CreateDataGuardAssociationDetailsTransportTypeEnum `mandatory:"true" json:"transportType"` DatabaseSoftwareImageId *string `mandatory:"false" json:"databaseSoftwareImageId"` IsActiveDataGuardEnabled *bool `mandatory:"false" json:"isActiveDataGuardEnabled"` PeerDbUniqueName *string `mandatory:"false" json:"peerDbUniqueName"` PeerSidPrefix *string `mandatory:"false" json:"peerSidPrefix"` + DatabaseAdminPassword *string `mandatory:"true" json:"databaseAdminPassword"` + ProtectionMode CreateDataGuardAssociationDetailsProtectionModeEnum `mandatory:"true" json:"protectionMode"` + TransportType CreateDataGuardAssociationDetailsTransportTypeEnum `mandatory:"true" json:"transportType"` CreationType string `json:"creationType"` } @@ -120,41 +120,41 @@ func (m *createdataguardassociationdetails) UnmarshalPolymorphicJSON(data []byte } } -//GetDatabaseAdminPassword returns DatabaseAdminPassword -func (m createdataguardassociationdetails) GetDatabaseAdminPassword() *string { - return m.DatabaseAdminPassword -} - -//GetProtectionMode returns ProtectionMode -func (m createdataguardassociationdetails) GetProtectionMode() CreateDataGuardAssociationDetailsProtectionModeEnum { - return m.ProtectionMode -} - -//GetTransportType returns TransportType -func (m createdataguardassociationdetails) GetTransportType() CreateDataGuardAssociationDetailsTransportTypeEnum { - return m.TransportType -} - -//GetDatabaseSoftwareImageId returns DatabaseSoftwareImageId +// GetDatabaseSoftwareImageId returns DatabaseSoftwareImageId func (m createdataguardassociationdetails) GetDatabaseSoftwareImageId() *string { return m.DatabaseSoftwareImageId } -//GetIsActiveDataGuardEnabled returns IsActiveDataGuardEnabled +// GetIsActiveDataGuardEnabled returns IsActiveDataGuardEnabled func (m createdataguardassociationdetails) GetIsActiveDataGuardEnabled() *bool { return m.IsActiveDataGuardEnabled } -//GetPeerDbUniqueName returns PeerDbUniqueName +// GetPeerDbUniqueName returns PeerDbUniqueName func (m createdataguardassociationdetails) GetPeerDbUniqueName() *string { return m.PeerDbUniqueName } -//GetPeerSidPrefix returns PeerSidPrefix +// GetPeerSidPrefix returns PeerSidPrefix func (m createdataguardassociationdetails) GetPeerSidPrefix() *string { return m.PeerSidPrefix } +// GetDatabaseAdminPassword returns DatabaseAdminPassword +func (m createdataguardassociationdetails) GetDatabaseAdminPassword() *string { + return m.DatabaseAdminPassword +} + +// GetProtectionMode returns ProtectionMode +func (m createdataguardassociationdetails) GetProtectionMode() CreateDataGuardAssociationDetailsProtectionModeEnum { + return m.ProtectionMode +} + +// GetTransportType returns TransportType +func (m createdataguardassociationdetails) GetTransportType() CreateDataGuardAssociationDetailsTransportTypeEnum { + return m.TransportType +} + func (m createdataguardassociationdetails) String() string { return common.PointerString(m) } diff --git a/database/create_database_base.go b/database/create_database_base.go index f784f5b81c..f60cc14799 100644 --- a/database/create_database_base.go +++ b/database/create_database_base.go @@ -36,10 +36,10 @@ type CreateDatabaseBase interface { type createdatabasebase struct { JsonData []byte - DbHomeId *string `mandatory:"true" json:"dbHomeId"` DbVersion *string `mandatory:"false" json:"dbVersion"` KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` KmsKeyVersionId *string `mandatory:"false" json:"kmsKeyVersionId"` + DbHomeId *string `mandatory:"true" json:"dbHomeId"` Source string `json:"source"` } @@ -86,26 +86,26 @@ func (m *createdatabasebase) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetDbHomeId returns DbHomeId -func (m createdatabasebase) GetDbHomeId() *string { - return m.DbHomeId -} - -//GetDbVersion returns DbVersion +// GetDbVersion returns DbVersion func (m createdatabasebase) GetDbVersion() *string { return m.DbVersion } -//GetKmsKeyId returns KmsKeyId +// GetKmsKeyId returns KmsKeyId func (m createdatabasebase) GetKmsKeyId() *string { return m.KmsKeyId } -//GetKmsKeyVersionId returns KmsKeyVersionId +// GetKmsKeyVersionId returns KmsKeyVersionId func (m createdatabasebase) GetKmsKeyVersionId() *string { return m.KmsKeyVersionId } +// GetDbHomeId returns DbHomeId +func (m createdatabasebase) GetDbHomeId() *string { + return m.DbHomeId +} + func (m createdatabasebase) String() string { return common.PointerString(m) } diff --git a/database/create_db_home_base.go b/database/create_db_home_base.go index 7f210b985e..e1f29640b2 100644 --- a/database/create_db_home_base.go +++ b/database/create_db_home_base.go @@ -115,37 +115,37 @@ func (m *createdbhomebase) UnmarshalPolymorphicJSON(data []byte) (interface{}, e } } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createdbhomebase) GetDisplayName() *string { return m.DisplayName } -//GetKmsKeyId returns KmsKeyId +// GetKmsKeyId returns KmsKeyId func (m createdbhomebase) GetKmsKeyId() *string { return m.KmsKeyId } -//GetKmsKeyVersionId returns KmsKeyVersionId +// GetKmsKeyVersionId returns KmsKeyVersionId func (m createdbhomebase) GetKmsKeyVersionId() *string { return m.KmsKeyVersionId } -//GetDatabaseSoftwareImageId returns DatabaseSoftwareImageId +// GetDatabaseSoftwareImageId returns DatabaseSoftwareImageId func (m createdbhomebase) GetDatabaseSoftwareImageId() *string { return m.DatabaseSoftwareImageId } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createdbhomebase) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createdbhomebase) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetIsDesupportedVersion returns IsDesupportedVersion +// GetIsDesupportedVersion returns IsDesupportedVersion func (m createdbhomebase) GetIsDesupportedVersion() *bool { return m.IsDesupportedVersion } diff --git a/database/create_external_database_connector_details.go b/database/create_external_database_connector_details.go index 94a06db7c2..cafdaf757a 100644 --- a/database/create_external_database_connector_details.go +++ b/database/create_external_database_connector_details.go @@ -39,10 +39,10 @@ type CreateExternalDatabaseConnectorDetails interface { type createexternaldatabaseconnectordetails struct { JsonData []byte - DisplayName *string `mandatory:"true" json:"displayName"` - ExternalDatabaseId *string `mandatory:"true" json:"externalDatabaseId"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + DisplayName *string `mandatory:"true" json:"displayName"` + ExternalDatabaseId *string `mandatory:"true" json:"externalDatabaseId"` ConnectorType string `json:"connectorType"` } @@ -85,26 +85,26 @@ func (m *createexternaldatabaseconnectordetails) UnmarshalPolymorphicJSON(data [ } } -//GetDisplayName returns DisplayName -func (m createexternaldatabaseconnectordetails) GetDisplayName() *string { - return m.DisplayName -} - -//GetExternalDatabaseId returns ExternalDatabaseId -func (m createexternaldatabaseconnectordetails) GetExternalDatabaseId() *string { - return m.ExternalDatabaseId -} - -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createexternaldatabaseconnectordetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createexternaldatabaseconnectordetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetDisplayName returns DisplayName +func (m createexternaldatabaseconnectordetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetExternalDatabaseId returns ExternalDatabaseId +func (m createexternaldatabaseconnectordetails) GetExternalDatabaseId() *string { + return m.ExternalDatabaseId +} + func (m createexternaldatabaseconnectordetails) String() string { return common.PointerString(m) } diff --git a/database/database_client.go b/database/database_client.go index 232063bbee..63a246b51b 100644 --- a/database/database_client.go +++ b/database/database_client.go @@ -80,7 +80,7 @@ func (client *DatabaseClient) setConfigurationProvider(configProvider common.Con 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil @@ -7302,6 +7302,63 @@ func (client DatabaseClient) getAutonomousContainerDatabaseDataguardAssociation( return response, err } +// GetAutonomousContainerDatabaseResourceUsage Get resource usage details for the specified Autonomous Container Database. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/GetAutonomousContainerDatabaseResourceUsage.go.html to see an example of how to use GetAutonomousContainerDatabaseResourceUsage API. +func (client DatabaseClient) GetAutonomousContainerDatabaseResourceUsage(ctx context.Context, request GetAutonomousContainerDatabaseResourceUsageRequest) (response GetAutonomousContainerDatabaseResourceUsageResponse, 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.getAutonomousContainerDatabaseResourceUsage, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetAutonomousContainerDatabaseResourceUsageResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetAutonomousContainerDatabaseResourceUsageResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetAutonomousContainerDatabaseResourceUsageResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetAutonomousContainerDatabaseResourceUsageResponse") + } + return +} + +// getAutonomousContainerDatabaseResourceUsage implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) getAutonomousContainerDatabaseResourceUsage(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/autonomousContainerDatabases/{autonomousContainerDatabaseId}/resourceUsage", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetAutonomousContainerDatabaseResourceUsageResponse + 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/AutonomousContainerDatabase/GetAutonomousContainerDatabaseResourceUsage" + err = common.PostProcessServiceError(err, "Database", "GetAutonomousContainerDatabaseResourceUsage", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetAutonomousDatabase Gets the details of the specified Autonomous Database. // // See also @@ -7986,6 +8043,63 @@ func (client DatabaseClient) getCloudAutonomousVmCluster(ctx context.Context, re return response, err } +// GetCloudAutonomousVmClusterResourceUsage Get the resource usage details for the specified Cloud Autonomous Exadata VM cluster. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/GetCloudAutonomousVmClusterResourceUsage.go.html to see an example of how to use GetCloudAutonomousVmClusterResourceUsage API. +func (client DatabaseClient) GetCloudAutonomousVmClusterResourceUsage(ctx context.Context, request GetCloudAutonomousVmClusterResourceUsageRequest) (response GetCloudAutonomousVmClusterResourceUsageResponse, 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.getCloudAutonomousVmClusterResourceUsage, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetCloudAutonomousVmClusterResourceUsageResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetCloudAutonomousVmClusterResourceUsageResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetCloudAutonomousVmClusterResourceUsageResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCloudAutonomousVmClusterResourceUsageResponse") + } + return +} + +// getCloudAutonomousVmClusterResourceUsage implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) getCloudAutonomousVmClusterResourceUsage(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/cloudAutonomousVmClusters/{cloudAutonomousVmClusterId}/resourceUsage", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetCloudAutonomousVmClusterResourceUsageResponse + 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/CloudAutonomousVmCluster/GetCloudAutonomousVmClusterResourceUsage" + err = common.PostProcessServiceError(err, "Database", "GetCloudAutonomousVmClusterResourceUsage", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetCloudExadataInfrastructure Gets information about the specified cloud Exadata infrastructure resource. Applies to Exadata Cloud Service instances and Autonomous Database on dedicated Exadata infrastructure only. // // See also @@ -11550,6 +11664,64 @@ func (client DatabaseClient) listBackups(ctx context.Context, request common.OCI return response, err } +// ListCloudAutonomousVmClusterAcdResourceUsage Gets the list of resource usage details for all the Cloud Autonomous Container Database +// in the specified Cloud Autonomous Exadata VM cluster. +// +// See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/ListCloudAutonomousVmClusterAcdResourceUsage.go.html to see an example of how to use ListCloudAutonomousVmClusterAcdResourceUsage API. +func (client DatabaseClient) ListCloudAutonomousVmClusterAcdResourceUsage(ctx context.Context, request ListCloudAutonomousVmClusterAcdResourceUsageRequest) (response ListCloudAutonomousVmClusterAcdResourceUsageResponse, 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.listCloudAutonomousVmClusterAcdResourceUsage, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListCloudAutonomousVmClusterAcdResourceUsageResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListCloudAutonomousVmClusterAcdResourceUsageResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListCloudAutonomousVmClusterAcdResourceUsageResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListCloudAutonomousVmClusterAcdResourceUsageResponse") + } + return +} + +// listCloudAutonomousVmClusterAcdResourceUsage implements the OCIOperation interface (enables retrying operations) +func (client DatabaseClient) listCloudAutonomousVmClusterAcdResourceUsage(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/cloudAutonomousVmClusters/{cloudAutonomousVmClusterId}/acdResourceUsage", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListCloudAutonomousVmClusterAcdResourceUsageResponse + 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/CloudAutonomousVmCluster/ListCloudAutonomousVmClusterAcdResourceUsage" + err = common.PostProcessServiceError(err, "Database", "ListCloudAutonomousVmClusterAcdResourceUsage", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListCloudAutonomousVmClusters Lists Autonomous Exadata VM clusters in the Oracle cloud. For Exadata Cloud@Customer systems, see ListAutonomousVmClusters. // // See also diff --git a/database/database_upgrade_source_base.go b/database/database_upgrade_source_base.go index d78e4e938d..3a0895d5ec 100644 --- a/database/database_upgrade_source_base.go +++ b/database/database_upgrade_source_base.go @@ -74,7 +74,7 @@ func (m *databaseupgradesourcebase) UnmarshalPolymorphicJSON(data []byte) (inter } } -//GetOptions returns Options +// GetOptions returns Options func (m databaseupgradesourcebase) GetOptions() *string { return m.Options } diff --git a/database/external_database_connector.go b/database/external_database_connector.go index c997bc1611..5452a51ffe 100644 --- a/database/external_database_connector.go +++ b/database/external_database_connector.go @@ -63,6 +63,9 @@ type ExternalDatabaseConnector interface { type externaldatabaseconnector struct { JsonData []byte + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` CompartmentId *string `mandatory:"true" json:"compartmentId"` DisplayName *string `mandatory:"true" json:"displayName"` Id *string `mandatory:"true" json:"id"` @@ -71,9 +74,6 @@ type externaldatabaseconnector struct { ExternalDatabaseId *string `mandatory:"true" json:"externalDatabaseId"` ConnectionStatus *string `mandatory:"true" json:"connectionStatus"` TimeConnectionStatusLastUpdated *common.SDKTime `mandatory:"true" json:"timeConnectionStatusLastUpdated"` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` ConnectorType string `json:"connectorType"` } @@ -123,61 +123,61 @@ func (m *externaldatabaseconnector) UnmarshalPolymorphicJSON(data []byte) (inter } } -//GetCompartmentId returns CompartmentId +// GetFreeformTags returns FreeformTags +func (m externaldatabaseconnector) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m externaldatabaseconnector) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetLifecycleDetails returns LifecycleDetails +func (m externaldatabaseconnector) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetCompartmentId returns CompartmentId func (m externaldatabaseconnector) GetCompartmentId() *string { return m.CompartmentId } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m externaldatabaseconnector) GetDisplayName() *string { return m.DisplayName } -//GetId returns Id +// GetId returns Id func (m externaldatabaseconnector) GetId() *string { return m.Id } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m externaldatabaseconnector) GetLifecycleState() ExternalDatabaseConnectorLifecycleStateEnum { return m.LifecycleState } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m externaldatabaseconnector) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetExternalDatabaseId returns ExternalDatabaseId +// GetExternalDatabaseId returns ExternalDatabaseId func (m externaldatabaseconnector) GetExternalDatabaseId() *string { return m.ExternalDatabaseId } -//GetConnectionStatus returns ConnectionStatus +// GetConnectionStatus returns ConnectionStatus func (m externaldatabaseconnector) GetConnectionStatus() *string { return m.ConnectionStatus } -//GetTimeConnectionStatusLastUpdated returns TimeConnectionStatusLastUpdated +// GetTimeConnectionStatusLastUpdated returns TimeConnectionStatusLastUpdated func (m externaldatabaseconnector) GetTimeConnectionStatusLastUpdated() *common.SDKTime { return m.TimeConnectionStatusLastUpdated } -//GetFreeformTags returns FreeformTags -func (m externaldatabaseconnector) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m externaldatabaseconnector) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - -//GetLifecycleDetails returns LifecycleDetails -func (m externaldatabaseconnector) GetLifecycleDetails() *string { - return m.LifecycleDetails -} - func (m externaldatabaseconnector) String() string { return common.PointerString(m) } diff --git a/database/external_database_connector_summary.go b/database/external_database_connector_summary.go index a3146ee781..887277ef59 100644 --- a/database/external_database_connector_summary.go +++ b/database/external_database_connector_summary.go @@ -63,6 +63,9 @@ type ExternalDatabaseConnectorSummary interface { type externaldatabaseconnectorsummary struct { JsonData []byte + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` CompartmentId *string `mandatory:"true" json:"compartmentId"` DisplayName *string `mandatory:"true" json:"displayName"` Id *string `mandatory:"true" json:"id"` @@ -71,9 +74,6 @@ type externaldatabaseconnectorsummary struct { ExternalDatabaseId *string `mandatory:"true" json:"externalDatabaseId"` ConnectionStatus *string `mandatory:"true" json:"connectionStatus"` TimeConnectionStatusLastUpdated *common.SDKTime `mandatory:"true" json:"timeConnectionStatusLastUpdated"` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` ConnectorType string `json:"connectorType"` } @@ -123,61 +123,61 @@ func (m *externaldatabaseconnectorsummary) UnmarshalPolymorphicJSON(data []byte) } } -//GetCompartmentId returns CompartmentId +// GetFreeformTags returns FreeformTags +func (m externaldatabaseconnectorsummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m externaldatabaseconnectorsummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetLifecycleDetails returns LifecycleDetails +func (m externaldatabaseconnectorsummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetCompartmentId returns CompartmentId func (m externaldatabaseconnectorsummary) GetCompartmentId() *string { return m.CompartmentId } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m externaldatabaseconnectorsummary) GetDisplayName() *string { return m.DisplayName } -//GetId returns Id +// GetId returns Id func (m externaldatabaseconnectorsummary) GetId() *string { return m.Id } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m externaldatabaseconnectorsummary) GetLifecycleState() ExternalDatabaseConnectorLifecycleStateEnum { return m.LifecycleState } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m externaldatabaseconnectorsummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetExternalDatabaseId returns ExternalDatabaseId +// GetExternalDatabaseId returns ExternalDatabaseId func (m externaldatabaseconnectorsummary) GetExternalDatabaseId() *string { return m.ExternalDatabaseId } -//GetConnectionStatus returns ConnectionStatus +// GetConnectionStatus returns ConnectionStatus func (m externaldatabaseconnectorsummary) GetConnectionStatus() *string { return m.ConnectionStatus } -//GetTimeConnectionStatusLastUpdated returns TimeConnectionStatusLastUpdated +// GetTimeConnectionStatusLastUpdated returns TimeConnectionStatusLastUpdated func (m externaldatabaseconnectorsummary) GetTimeConnectionStatusLastUpdated() *common.SDKTime { return m.TimeConnectionStatusLastUpdated } -//GetFreeformTags returns FreeformTags -func (m externaldatabaseconnectorsummary) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m externaldatabaseconnectorsummary) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - -//GetLifecycleDetails returns LifecycleDetails -func (m externaldatabaseconnectorsummary) GetLifecycleDetails() *string { - return m.LifecycleDetails -} - func (m externaldatabaseconnectorsummary) String() string { return common.PointerString(m) } diff --git a/database/get_autonomous_container_database_resource_usage_request_response.go b/database/get_autonomous_container_database_resource_usage_request_response.go new file mode 100644 index 0000000000..c72ad3a29f --- /dev/null +++ b/database/get_autonomous_container_database_resource_usage_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 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" +) + +// GetAutonomousContainerDatabaseResourceUsageRequest wrapper for the GetAutonomousContainerDatabaseResourceUsage operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/GetAutonomousContainerDatabaseResourceUsage.go.html to see an example of how to use GetAutonomousContainerDatabaseResourceUsageRequest. +type GetAutonomousContainerDatabaseResourceUsageRequest struct { + + // The Autonomous Container Database OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + AutonomousContainerDatabaseId *string `mandatory:"true" contributesTo:"path" name:"autonomousContainerDatabaseId"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetAutonomousContainerDatabaseResourceUsageRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetAutonomousContainerDatabaseResourceUsageRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetAutonomousContainerDatabaseResourceUsageRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetAutonomousContainerDatabaseResourceUsageRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetAutonomousContainerDatabaseResourceUsageRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetAutonomousContainerDatabaseResourceUsageResponse wrapper for the GetAutonomousContainerDatabaseResourceUsage operation +type GetAutonomousContainerDatabaseResourceUsageResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The AutonomousContainerDatabaseResourceUsage instance + AutonomousContainerDatabaseResourceUsage `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetAutonomousContainerDatabaseResourceUsageResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetAutonomousContainerDatabaseResourceUsageResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/mysql/get_analytics_cluster_memory_estimate_request_response.go b/database/get_cloud_autonomous_vm_cluster_resource_usage_request_response.go similarity index 52% rename from mysql/get_analytics_cluster_memory_estimate_request_response.go rename to database/get_cloud_autonomous_vm_cluster_resource_usage_request_response.go index 31d1b45db7..c4c4d73ab4 100644 --- a/mysql/get_analytics_cluster_memory_estimate_request_response.go +++ b/database/get_cloud_autonomous_vm_cluster_resource_usage_request_response.go @@ -2,7 +2,7 @@ // This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. // Code generated. DO NOT EDIT. -package mysql +package database import ( "fmt" @@ -11,19 +11,17 @@ import ( "strings" ) -// GetAnalyticsClusterMemoryEstimateRequest wrapper for the GetAnalyticsClusterMemoryEstimate operation +// GetCloudAutonomousVmClusterResourceUsageRequest wrapper for the GetCloudAutonomousVmClusterResourceUsage operation // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/mysql/GetAnalyticsClusterMemoryEstimate.go.html to see an example of how to use GetAnalyticsClusterMemoryEstimateRequest. -type GetAnalyticsClusterMemoryEstimateRequest struct { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/GetCloudAutonomousVmClusterResourceUsage.go.html to see an example of how to use GetCloudAutonomousVmClusterResourceUsageRequest. +type GetCloudAutonomousVmClusterResourceUsageRequest struct { - // The DB System OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). - DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` + // The Cloud VM cluster OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + CloudAutonomousVmClusterId *string `mandatory:"true" contributesTo:"path" name:"cloudAutonomousVmClusterId"` - // Customer-defined unique identifier for the request. If you need to - // contact Oracle about a specific request, please provide the request - // ID that you supplied in this header with the request. + // Unique identifier for the request. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` // Metadata about the request. This information will not be transmitted to the service, but @@ -31,12 +29,12 @@ type GetAnalyticsClusterMemoryEstimateRequest struct { RequestMetadata common.RequestMetadata } -func (request GetAnalyticsClusterMemoryEstimateRequest) String() string { +func (request GetCloudAutonomousVmClusterResourceUsageRequest) String() string { return common.PointerString(request) } // HTTPRequest implements the OCIRequest interface -func (request GetAnalyticsClusterMemoryEstimateRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { +func (request GetCloudAutonomousVmClusterResourceUsageRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { _, err := request.ValidateEnumValue() if err != nil { @@ -46,21 +44,21 @@ func (request GetAnalyticsClusterMemoryEstimateRequest) HTTPRequest(method, path } // BinaryRequestBody implements the OCIRequest interface -func (request GetAnalyticsClusterMemoryEstimateRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { +func (request GetCloudAutonomousVmClusterResourceUsageRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { return nil, false } // RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetAnalyticsClusterMemoryEstimateRequest) RetryPolicy() *common.RetryPolicy { +func (request GetCloudAutonomousVmClusterResourceUsageRequest) RetryPolicy() *common.RetryPolicy { return request.RequestMetadata.RetryPolicy } // ValidateEnumValue returns an error when providing an unsupported enum value // This function is being called during constructing API request process // Not recommended for calling this function directly -func (request GetAnalyticsClusterMemoryEstimateRequest) ValidateEnumValue() (bool, error) { +func (request GetCloudAutonomousVmClusterResourceUsageRequest) ValidateEnumValue() (bool, error) { errMessage := []string{} if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) @@ -68,25 +66,28 @@ func (request GetAnalyticsClusterMemoryEstimateRequest) ValidateEnumValue() (boo return false, nil } -// GetAnalyticsClusterMemoryEstimateResponse wrapper for the GetAnalyticsClusterMemoryEstimate operation -type GetAnalyticsClusterMemoryEstimateResponse struct { +// GetCloudAutonomousVmClusterResourceUsageResponse wrapper for the GetCloudAutonomousVmClusterResourceUsage operation +type GetCloudAutonomousVmClusterResourceUsageResponse struct { // The underlying http response RawResponse *http.Response - // The AnalyticsClusterMemoryEstimate instance - AnalyticsClusterMemoryEstimate `presentIn:"body"` + // The CloudAutonomousVmClusterResourceUsage instance + CloudAutonomousVmClusterResourceUsage `presentIn:"body"` - // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about + // a particular request, please provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` } -func (response GetAnalyticsClusterMemoryEstimateResponse) String() string { +func (response GetCloudAutonomousVmClusterResourceUsageResponse) String() string { return common.PointerString(response) } // HTTPResponse implements the OCIResponse interface -func (response GetAnalyticsClusterMemoryEstimateResponse) HTTPResponse() *http.Response { +func (response GetCloudAutonomousVmClusterResourceUsageResponse) HTTPResponse() *http.Response { return response.RawResponse } diff --git a/database/key_store.go b/database/key_store.go index d912c3ba62..5e49af1a56 100644 --- a/database/key_store.go +++ b/database/key_store.go @@ -96,10 +96,7 @@ func (m *KeyStore) UnmarshalJSON(data []byte) (e error) { m.LifecycleDetails = model.LifecycleDetails m.AssociatedDatabases = make([]KeyStoreAssociatedDatabaseDetails, len(model.AssociatedDatabases)) - for i, n := range model.AssociatedDatabases { - m.AssociatedDatabases[i] = n - } - + copy(m.AssociatedDatabases, model.AssociatedDatabases) m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/database/key_store_summary.go b/database/key_store_summary.go index b54b2e94bc..999f1d7026 100644 --- a/database/key_store_summary.go +++ b/database/key_store_summary.go @@ -96,10 +96,7 @@ func (m *KeyStoreSummary) UnmarshalJSON(data []byte) (e error) { m.LifecycleDetails = model.LifecycleDetails m.AssociatedDatabases = make([]KeyStoreAssociatedDatabaseDetails, len(model.AssociatedDatabases)) - for i, n := range model.AssociatedDatabases { - m.AssociatedDatabases[i] = n - } - + copy(m.AssociatedDatabases, model.AssociatedDatabases) m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/database/launch_db_system_base.go b/database/launch_db_system_base.go index cf398f5fc3..cd925bad34 100644 --- a/database/launch_db_system_base.go +++ b/database/launch_db_system_base.go @@ -150,13 +150,6 @@ type LaunchDbSystemBase interface { type launchdbsystembase struct { JsonData []byte - CompartmentId *string `mandatory:"true" json:"compartmentId"` - AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` - SubnetId *string `mandatory:"true" json:"subnetId"` - Shape *string `mandatory:"true" json:"shape"` - SshPublicKeys []string `mandatory:"true" json:"sshPublicKeys"` - Hostname *string `mandatory:"true" json:"hostname"` - CpuCoreCount *int `mandatory:"true" json:"cpuCoreCount"` FaultDomains []string `mandatory:"false" json:"faultDomains"` DisplayName *string `mandatory:"false" json:"displayName"` BackupSubnetId *string `mandatory:"false" json:"backupSubnetId"` @@ -177,6 +170,13 @@ type launchdbsystembase struct { DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` PrivateIp *string `mandatory:"false" json:"privateIp"` DataCollectionOptions *DataCollectionOptions `mandatory:"false" json:"dataCollectionOptions"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + SubnetId *string `mandatory:"true" json:"subnetId"` + Shape *string `mandatory:"true" json:"shape"` + SshPublicKeys []string `mandatory:"true" json:"sshPublicKeys"` + Hostname *string `mandatory:"true" json:"hostname"` + CpuCoreCount *int `mandatory:"true" json:"cpuCoreCount"` Source string `json:"source"` } @@ -254,141 +254,141 @@ func (m *launchdbsystembase) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetCompartmentId returns CompartmentId -func (m launchdbsystembase) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetAvailabilityDomain returns AvailabilityDomain -func (m launchdbsystembase) GetAvailabilityDomain() *string { - return m.AvailabilityDomain -} - -//GetSubnetId returns SubnetId -func (m launchdbsystembase) GetSubnetId() *string { - return m.SubnetId -} - -//GetShape returns Shape -func (m launchdbsystembase) GetShape() *string { - return m.Shape -} - -//GetSshPublicKeys returns SshPublicKeys -func (m launchdbsystembase) GetSshPublicKeys() []string { - return m.SshPublicKeys -} - -//GetHostname returns Hostname -func (m launchdbsystembase) GetHostname() *string { - return m.Hostname -} - -//GetCpuCoreCount returns CpuCoreCount -func (m launchdbsystembase) GetCpuCoreCount() *int { - return m.CpuCoreCount -} - -//GetFaultDomains returns FaultDomains +// GetFaultDomains returns FaultDomains func (m launchdbsystembase) GetFaultDomains() []string { return m.FaultDomains } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m launchdbsystembase) GetDisplayName() *string { return m.DisplayName } -//GetBackupSubnetId returns BackupSubnetId +// GetBackupSubnetId returns BackupSubnetId func (m launchdbsystembase) GetBackupSubnetId() *string { return m.BackupSubnetId } -//GetNsgIds returns NsgIds +// GetNsgIds returns NsgIds func (m launchdbsystembase) GetNsgIds() []string { return m.NsgIds } -//GetBackupNetworkNsgIds returns BackupNetworkNsgIds +// GetBackupNetworkNsgIds returns BackupNetworkNsgIds func (m launchdbsystembase) GetBackupNetworkNsgIds() []string { return m.BackupNetworkNsgIds } -//GetTimeZone returns TimeZone +// GetTimeZone returns TimeZone func (m launchdbsystembase) GetTimeZone() *string { return m.TimeZone } -//GetDbSystemOptions returns DbSystemOptions +// GetDbSystemOptions returns DbSystemOptions func (m launchdbsystembase) GetDbSystemOptions() *DbSystemOptions { return m.DbSystemOptions } -//GetStorageVolumePerformanceMode returns StorageVolumePerformanceMode +// GetStorageVolumePerformanceMode returns StorageVolumePerformanceMode func (m launchdbsystembase) GetStorageVolumePerformanceMode() LaunchDbSystemBaseStorageVolumePerformanceModeEnum { return m.StorageVolumePerformanceMode } -//GetSparseDiskgroup returns SparseDiskgroup +// GetSparseDiskgroup returns SparseDiskgroup func (m launchdbsystembase) GetSparseDiskgroup() *bool { return m.SparseDiskgroup } -//GetDomain returns Domain +// GetDomain returns Domain func (m launchdbsystembase) GetDomain() *string { return m.Domain } -//GetClusterName returns ClusterName +// GetClusterName returns ClusterName func (m launchdbsystembase) GetClusterName() *string { return m.ClusterName } -//GetDataStoragePercentage returns DataStoragePercentage +// GetDataStoragePercentage returns DataStoragePercentage func (m launchdbsystembase) GetDataStoragePercentage() *int { return m.DataStoragePercentage } -//GetInitialDataStorageSizeInGB returns InitialDataStorageSizeInGB +// GetInitialDataStorageSizeInGB returns InitialDataStorageSizeInGB func (m launchdbsystembase) GetInitialDataStorageSizeInGB() *int { return m.InitialDataStorageSizeInGB } -//GetKmsKeyId returns KmsKeyId +// GetKmsKeyId returns KmsKeyId func (m launchdbsystembase) GetKmsKeyId() *string { return m.KmsKeyId } -//GetKmsKeyVersionId returns KmsKeyVersionId +// GetKmsKeyVersionId returns KmsKeyVersionId func (m launchdbsystembase) GetKmsKeyVersionId() *string { return m.KmsKeyVersionId } -//GetNodeCount returns NodeCount +// GetNodeCount returns NodeCount func (m launchdbsystembase) GetNodeCount() *int { return m.NodeCount } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m launchdbsystembase) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m launchdbsystembase) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetPrivateIp returns PrivateIp +// GetPrivateIp returns PrivateIp func (m launchdbsystembase) GetPrivateIp() *string { return m.PrivateIp } -//GetDataCollectionOptions returns DataCollectionOptions +// GetDataCollectionOptions returns DataCollectionOptions func (m launchdbsystembase) GetDataCollectionOptions() *DataCollectionOptions { return m.DataCollectionOptions } +// GetCompartmentId returns CompartmentId +func (m launchdbsystembase) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetAvailabilityDomain returns AvailabilityDomain +func (m launchdbsystembase) GetAvailabilityDomain() *string { + return m.AvailabilityDomain +} + +// GetSubnetId returns SubnetId +func (m launchdbsystembase) GetSubnetId() *string { + return m.SubnetId +} + +// GetShape returns Shape +func (m launchdbsystembase) GetShape() *string { + return m.Shape +} + +// GetSshPublicKeys returns SshPublicKeys +func (m launchdbsystembase) GetSshPublicKeys() []string { + return m.SshPublicKeys +} + +// GetHostname returns Hostname +func (m launchdbsystembase) GetHostname() *string { + return m.Hostname +} + +// GetCpuCoreCount returns CpuCoreCount +func (m launchdbsystembase) GetCpuCoreCount() *int { + return m.CpuCoreCount +} + func (m launchdbsystembase) String() string { return common.PointerString(m) } diff --git a/database/list_cloud_autonomous_vm_cluster_acd_resource_usage_request_response.go b/database/list_cloud_autonomous_vm_cluster_acd_resource_usage_request_response.go new file mode 100644 index 0000000000..6454869a43 --- /dev/null +++ b/database/list_cloud_autonomous_vm_cluster_acd_resource_usage_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 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" +) + +// ListCloudAutonomousVmClusterAcdResourceUsageRequest wrapper for the ListCloudAutonomousVmClusterAcdResourceUsage operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/database/ListCloudAutonomousVmClusterAcdResourceUsage.go.html to see an example of how to use ListCloudAutonomousVmClusterAcdResourceUsageRequest. +type ListCloudAutonomousVmClusterAcdResourceUsageRequest struct { + + // The Cloud VM cluster OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + CloudAutonomousVmClusterId *string `mandatory:"true" contributesTo:"path" name:"cloudAutonomousVmClusterId"` + + // The compartment OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Unique identifier for the request. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The maximum number of items to return per page. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The pagination token to continue listing from. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListCloudAutonomousVmClusterAcdResourceUsageRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListCloudAutonomousVmClusterAcdResourceUsageRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListCloudAutonomousVmClusterAcdResourceUsageRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListCloudAutonomousVmClusterAcdResourceUsageRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListCloudAutonomousVmClusterAcdResourceUsageRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListCloudAutonomousVmClusterAcdResourceUsageResponse wrapper for the ListCloudAutonomousVmClusterAcdResourceUsage operation +type ListCloudAutonomousVmClusterAcdResourceUsageResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []AutonomousContainerDatabaseResourceUsage instances + Items []AutonomousContainerDatabaseResourceUsage `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 there are additional items still to get. Include this value as the `page` parameter for the + // subsequent GET request. For information about pagination, see + // List Pagination (https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListCloudAutonomousVmClusterAcdResourceUsageResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListCloudAutonomousVmClusterAcdResourceUsageResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/database/update_autonomous_database_details.go b/database/update_autonomous_database_details.go index 9e5918fa35..390afe545c 100644 --- a/database/update_autonomous_database_details.go +++ b/database/update_autonomous_database_details.go @@ -37,7 +37,7 @@ type UpdateAutonomousDatabaseDetails struct { // The number of CPUs to be made available to the Autonomous Database.
// For Autonomous Databases on Dedicated Exadata Infrastructure: - // - The CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. See Compute Models in Autonomous Database on Dedicated Exadata Infrastructure (https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. + // - The CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. // - It is suggested to use 'computeCount' parameter if you want to use fractional value to provision less than 1 core. // **Note:** This parameter cannot be used with the `ocpuCount` or `computeCount` parameter. // This cannot be updated in parallel with any of the following: licenseModel, databaseEdition, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, or isFreeTier. diff --git a/database/update_external_database_connector_details.go b/database/update_external_database_connector_details.go index 4ca0374a17..2a15130ba4 100644 --- a/database/update_external_database_connector_details.go +++ b/database/update_external_database_connector_details.go @@ -80,17 +80,17 @@ func (m *updateexternaldatabaseconnectordetails) UnmarshalPolymorphicJSON(data [ } } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updateexternaldatabaseconnectordetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updateexternaldatabaseconnectordetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m updateexternaldatabaseconnectordetails) GetDisplayName() *string { return m.DisplayName } diff --git a/databasemanagement/add_data_files_details.go b/databasemanagement/add_data_files_details.go index fdf27ae360..bea0ec92ac 100644 --- a/databasemanagement/add_data_files_details.go +++ b/databasemanagement/add_data_files_details.go @@ -90,10 +90,7 @@ func (m *AddDataFilesDetails) UnmarshalJSON(data []byte) (e error) { } var nn interface{} m.DataFiles = make([]string, len(model.DataFiles)) - for i, n := range model.DataFiles { - m.DataFiles[i] = n - } - + copy(m.DataFiles, model.DataFiles) m.FileCount = model.FileCount m.FileSize = model.FileSize diff --git a/databasemanagement/awr_query_result.go b/databasemanagement/awr_query_result.go index 029ffba56c..9dbb32c5f3 100644 --- a/databasemanagement/awr_query_result.go +++ b/databasemanagement/awr_query_result.go @@ -36,10 +36,10 @@ type AwrQueryResult interface { type awrqueryresult struct { JsonData []byte - Name *string `mandatory:"true" json:"name"` Version *string `mandatory:"false" json:"version"` QueryKey *string `mandatory:"false" json:"queryKey"` DbQueryTimeInSecs *float64 `mandatory:"false" json:"dbQueryTimeInSecs"` + Name *string `mandatory:"true" json:"name"` AwrResultType string `json:"awrResultType"` } @@ -130,26 +130,26 @@ func (m *awrqueryresult) UnmarshalPolymorphicJSON(data []byte) (interface{}, err } } -//GetName returns Name -func (m awrqueryresult) GetName() *string { - return m.Name -} - -//GetVersion returns Version +// GetVersion returns Version func (m awrqueryresult) GetVersion() *string { return m.Version } -//GetQueryKey returns QueryKey +// GetQueryKey returns QueryKey func (m awrqueryresult) GetQueryKey() *string { return m.QueryKey } -//GetDbQueryTimeInSecs returns DbQueryTimeInSecs +// GetDbQueryTimeInSecs returns DbQueryTimeInSecs func (m awrqueryresult) GetDbQueryTimeInSecs() *float64 { return m.DbQueryTimeInSecs } +// GetName returns Name +func (m awrqueryresult) GetName() *string { + return m.Name +} + func (m awrqueryresult) String() string { return common.PointerString(m) } diff --git a/databasemanagement/configure_automatic_capture_filters_details.go b/databasemanagement/configure_automatic_capture_filters_details.go index adbbd0aa0b..d56ddbc906 100644 --- a/databasemanagement/configure_automatic_capture_filters_details.go +++ b/databasemanagement/configure_automatic_capture_filters_details.go @@ -56,10 +56,7 @@ func (m *ConfigureAutomaticCaptureFiltersDetails) UnmarshalJSON(data []byte) (e } var nn interface{} m.AutoCaptureFilters = make([]AutomaticCaptureFilterDetails, len(model.AutoCaptureFilters)) - for i, n := range model.AutoCaptureFilters { - m.AutoCaptureFilters[i] = n - } - + copy(m.AutoCaptureFilters, model.AutoCaptureFilters) nn, e = model.Credentials.UnmarshalPolymorphicJSON(model.Credentials.JsonData) if e != nil { return diff --git a/databasemanagement/create_external_db_system_connector_details.go b/databasemanagement/create_external_db_system_connector_details.go index c64e412e12..12dc7ef01f 100644 --- a/databasemanagement/create_external_db_system_connector_details.go +++ b/databasemanagement/create_external_db_system_connector_details.go @@ -30,8 +30,8 @@ type CreateExternalDbSystemConnectorDetails interface { type createexternaldbsystemconnectordetails struct { JsonData []byte - ExternalDbSystemId *string `mandatory:"true" json:"externalDbSystemId"` DisplayName *string `mandatory:"false" json:"displayName"` + ExternalDbSystemId *string `mandatory:"true" json:"externalDbSystemId"` ConnectorType string `json:"connectorType"` } @@ -72,16 +72,16 @@ func (m *createexternaldbsystemconnectordetails) UnmarshalPolymorphicJSON(data [ } } -//GetExternalDbSystemId returns ExternalDbSystemId -func (m createexternaldbsystemconnectordetails) GetExternalDbSystemId() *string { - return m.ExternalDbSystemId -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createexternaldbsystemconnectordetails) GetDisplayName() *string { return m.DisplayName } +// GetExternalDbSystemId returns ExternalDbSystemId +func (m createexternaldbsystemconnectordetails) GetExternalDbSystemId() *string { + return m.ExternalDbSystemId +} + func (m createexternaldbsystemconnectordetails) String() string { return common.PointerString(m) } diff --git a/databasemanagement/create_job_details.go b/databasemanagement/create_job_details.go index 7d37b489b7..8a343c7eef 100644 --- a/databasemanagement/create_job_details.go +++ b/databasemanagement/create_job_details.go @@ -54,16 +54,16 @@ type CreateJobDetails interface { type createjobdetails struct { JsonData []byte - Name *string `mandatory:"true" json:"name"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` - ScheduleType JobScheduleTypeEnum `mandatory:"true" json:"scheduleType"` Description *string `mandatory:"false" json:"description"` ManagedDatabaseGroupId *string `mandatory:"false" json:"managedDatabaseGroupId"` ManagedDatabaseId *string `mandatory:"false" json:"managedDatabaseId"` DatabaseSubType DatabaseSubTypeEnum `mandatory:"false" json:"databaseSubType,omitempty"` Timeout *string `mandatory:"false" json:"timeout"` - ResultLocation JobExecutionResultLocation `mandatory:"false" json:"resultLocation"` + ResultLocation jobexecutionresultlocation `mandatory:"false" json:"resultLocation"` ScheduleDetails *JobScheduleDetails `mandatory:"false" json:"scheduleDetails"` + Name *string `mandatory:"true" json:"name"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + ScheduleType JobScheduleTypeEnum `mandatory:"true" json:"scheduleType"` JobType string `json:"jobType"` } @@ -112,56 +112,56 @@ func (m *createjobdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, e } } -//GetName returns Name -func (m createjobdetails) GetName() *string { - return m.Name -} - -//GetCompartmentId returns CompartmentId -func (m createjobdetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetScheduleType returns ScheduleType -func (m createjobdetails) GetScheduleType() JobScheduleTypeEnum { - return m.ScheduleType -} - -//GetDescription returns Description +// GetDescription returns Description func (m createjobdetails) GetDescription() *string { return m.Description } -//GetManagedDatabaseGroupId returns ManagedDatabaseGroupId +// GetManagedDatabaseGroupId returns ManagedDatabaseGroupId func (m createjobdetails) GetManagedDatabaseGroupId() *string { return m.ManagedDatabaseGroupId } -//GetManagedDatabaseId returns ManagedDatabaseId +// GetManagedDatabaseId returns ManagedDatabaseId func (m createjobdetails) GetManagedDatabaseId() *string { return m.ManagedDatabaseId } -//GetDatabaseSubType returns DatabaseSubType +// GetDatabaseSubType returns DatabaseSubType func (m createjobdetails) GetDatabaseSubType() DatabaseSubTypeEnum { return m.DatabaseSubType } -//GetTimeout returns Timeout +// GetTimeout returns Timeout func (m createjobdetails) GetTimeout() *string { return m.Timeout } -//GetResultLocation returns ResultLocation -func (m createjobdetails) GetResultLocation() JobExecutionResultLocation { +// GetResultLocation returns ResultLocation +func (m createjobdetails) GetResultLocation() jobexecutionresultlocation { return m.ResultLocation } -//GetScheduleDetails returns ScheduleDetails +// GetScheduleDetails returns ScheduleDetails func (m createjobdetails) GetScheduleDetails() *JobScheduleDetails { return m.ScheduleDetails } +// GetName returns Name +func (m createjobdetails) GetName() *string { + return m.Name +} + +// GetCompartmentId returns CompartmentId +func (m createjobdetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetScheduleType returns ScheduleType +func (m createjobdetails) GetScheduleType() JobScheduleTypeEnum { + return m.ScheduleType +} + func (m createjobdetails) String() string { return common.PointerString(m) } diff --git a/databasemanagement/create_tablespace_details.go b/databasemanagement/create_tablespace_details.go index e6701f1b7c..9f62604c33 100644 --- a/databasemanagement/create_tablespace_details.go +++ b/databasemanagement/create_tablespace_details.go @@ -152,10 +152,7 @@ func (m *CreateTablespaceDetails) UnmarshalJSON(data []byte) (e error) { m.IsBigfile = model.IsBigfile m.DataFiles = make([]string, len(model.DataFiles)) - for i, n := range model.DataFiles { - m.DataFiles[i] = n - } - + copy(m.DataFiles, model.DataFiles) m.FileCount = model.FileCount m.FileSize = model.FileSize diff --git a/databasemanagement/databasemanagement_dbmanagement_client.go b/databasemanagement/databasemanagement_dbmanagement_client.go index 91fb2dd9db..774401e153 100644 --- a/databasemanagement/databasemanagement_dbmanagement_client.go +++ b/databasemanagement/databasemanagement_dbmanagement_client.go @@ -82,7 +82,7 @@ func (client *DbManagementClient) setConfigurationProvider(configProvider common 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/databasemanagement/databasemanagement_diagnosability_client.go b/databasemanagement/databasemanagement_diagnosability_client.go index 64a166c176..6f2c77018b 100644 --- a/databasemanagement/databasemanagement_diagnosability_client.go +++ b/databasemanagement/databasemanagement_diagnosability_client.go @@ -82,7 +82,7 @@ func (client *DiagnosabilityClient) setConfigurationProvider(configProvider comm 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/databasemanagement/databasemanagement_sqltuning_client.go b/databasemanagement/databasemanagement_sqltuning_client.go index 7b2bc0d0cb..a4ceefee56 100644 --- a/databasemanagement/databasemanagement_sqltuning_client.go +++ b/databasemanagement/databasemanagement_sqltuning_client.go @@ -82,7 +82,7 @@ func (client *SqlTuningClient) setConfigurationProvider(configProvider common.Co 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/databasemanagement/dbm_resource.go b/databasemanagement/dbm_resource.go index 0447d3648f..c4cd171919 100644 --- a/databasemanagement/dbm_resource.go +++ b/databasemanagement/dbm_resource.go @@ -55,8 +55,6 @@ type DbmResource interface { type dbmresource struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - DisplayName *string `mandatory:"true" json:"displayName"` Version *string `mandatory:"false" json:"version"` InternalId *string `mandatory:"false" json:"internalId"` Status *string `mandatory:"false" json:"status"` @@ -65,6 +63,8 @@ type dbmresource struct { TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` AdditionalDetails map[string]string `mandatory:"false" json:"additionalDetails"` + Id *string `mandatory:"true" json:"id"` + DisplayName *string `mandatory:"true" json:"displayName"` ResourceType string `json:"resourceType"` } @@ -145,56 +145,56 @@ func (m *dbmresource) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) } } -//GetId returns Id -func (m dbmresource) GetId() *string { - return m.Id -} - -//GetDisplayName returns DisplayName -func (m dbmresource) GetDisplayName() *string { - return m.DisplayName -} - -//GetVersion returns Version +// GetVersion returns Version func (m dbmresource) GetVersion() *string { return m.Version } -//GetInternalId returns InternalId +// GetInternalId returns InternalId func (m dbmresource) GetInternalId() *string { return m.InternalId } -//GetStatus returns Status +// GetStatus returns Status func (m dbmresource) GetStatus() *string { return m.Status } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m dbmresource) GetLifecycleState() DbmResourceLifecycleStateEnum { return m.LifecycleState } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m dbmresource) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m dbmresource) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m dbmresource) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetAdditionalDetails returns AdditionalDetails +// GetAdditionalDetails returns AdditionalDetails func (m dbmresource) GetAdditionalDetails() map[string]string { return m.AdditionalDetails } +// GetId returns Id +func (m dbmresource) GetId() *string { + return m.Id +} + +// GetDisplayName returns DisplayName +func (m dbmresource) GetDisplayName() *string { + return m.DisplayName +} + func (m dbmresource) String() string { return common.PointerString(m) } diff --git a/databasemanagement/discovered_external_asm.go b/databasemanagement/discovered_external_asm.go index 668dc5fc46..98d9a4dde5 100644 --- a/databasemanagement/discovered_external_asm.go +++ b/databasemanagement/discovered_external_asm.go @@ -153,10 +153,7 @@ func (m *DiscoveredExternalAsm) UnmarshalJSON(data []byte) (e error) { m.Status = model.Status m.AssociatedComponents = make([]AssociatedComponent, len(model.AssociatedComponents)) - for i, n := range model.AssociatedComponents { - m.AssociatedComponents[i] = n - } - + copy(m.AssociatedComponents, model.AssociatedComponents) m.GridHome = model.GridHome m.IsFlexEnabled = model.IsFlexEnabled @@ -164,10 +161,7 @@ func (m *DiscoveredExternalAsm) UnmarshalJSON(data []byte) (e error) { m.Version = model.Version m.AsmInstances = make([]DiscoveredExternalAsmInstance, len(model.AsmInstances)) - for i, n := range model.AsmInstances { - m.AsmInstances[i] = n - } - + copy(m.AsmInstances, model.AsmInstances) nn, e = model.Connector.UnmarshalPolymorphicJSON(model.Connector.JsonData) if e != nil { return diff --git a/databasemanagement/discovered_external_cluster_instance.go b/databasemanagement/discovered_external_cluster_instance.go index 52bd12e7ed..a3e564c21d 100644 --- a/databasemanagement/discovered_external_cluster_instance.go +++ b/databasemanagement/discovered_external_cluster_instance.go @@ -161,10 +161,7 @@ func (m *DiscoveredExternalClusterInstance) UnmarshalJSON(data []byte) (e error) m.Status = model.Status m.AssociatedComponents = make([]AssociatedComponent, len(model.AssociatedComponents)) - for i, n := range model.AssociatedComponents { - m.AssociatedComponents[i] = n - } - + copy(m.AssociatedComponents, model.AssociatedComponents) m.ClusterId = model.ClusterId m.NodeRole = model.NodeRole diff --git a/databasemanagement/discovered_external_database.go b/databasemanagement/discovered_external_database.go index 7aa02046f4..75e1bbfe0d 100644 --- a/databasemanagement/discovered_external_database.go +++ b/databasemanagement/discovered_external_database.go @@ -185,10 +185,7 @@ func (m *DiscoveredExternalDatabase) UnmarshalJSON(data []byte) (e error) { m.Status = model.Status m.AssociatedComponents = make([]AssociatedComponent, len(model.AssociatedComponents)) - for i, n := range model.AssociatedComponents { - m.AssociatedComponents[i] = n - } - + copy(m.AssociatedComponents, model.AssociatedComponents) m.DbType = model.DbType m.IsCluster = model.IsCluster @@ -204,10 +201,7 @@ func (m *DiscoveredExternalDatabase) UnmarshalJSON(data []byte) (e error) { m.DbVersion = model.DbVersion m.PluggableDatabases = make([]DiscoveredExternalPluggableDatabase, len(model.PluggableDatabases)) - for i, n := range model.PluggableDatabases { - m.PluggableDatabases[i] = n - } - + copy(m.PluggableDatabases, model.PluggableDatabases) nn, e = model.Connector.UnmarshalPolymorphicJSON(model.Connector.JsonData) if e != nil { return diff --git a/databasemanagement/discovered_external_db_node.go b/databasemanagement/discovered_external_db_node.go index 0da98a2387..0b8b6f482f 100644 --- a/databasemanagement/discovered_external_db_node.go +++ b/databasemanagement/discovered_external_db_node.go @@ -150,10 +150,7 @@ func (m *DiscoveredExternalDbNode) UnmarshalJSON(data []byte) (e error) { m.Status = model.Status m.AssociatedComponents = make([]AssociatedComponent, len(model.AssociatedComponents)) - for i, n := range model.AssociatedComponents { - m.AssociatedComponents[i] = n - } - + copy(m.AssociatedComponents, model.AssociatedComponents) m.CpuCoreCount = model.CpuCoreCount m.MemorySizeInGBs = model.MemorySizeInGBs diff --git a/databasemanagement/discovered_external_db_system_component.go b/databasemanagement/discovered_external_db_system_component.go index a336ffaa03..94d11ca27d 100644 --- a/databasemanagement/discovered_external_db_system_component.go +++ b/databasemanagement/discovered_external_db_system_component.go @@ -45,13 +45,13 @@ type DiscoveredExternalDbSystemComponent interface { type discoveredexternaldbsystemcomponent struct { JsonData []byte - ComponentId *string `mandatory:"true" json:"componentId"` - DisplayName *string `mandatory:"true" json:"displayName"` - ComponentName *string `mandatory:"true" json:"componentName"` ResourceId *string `mandatory:"false" json:"resourceId"` IsSelectedForMonitoring *bool `mandatory:"false" json:"isSelectedForMonitoring"` Status DiscoveredExternalDbSystemComponentStatusEnum `mandatory:"false" json:"status,omitempty"` AssociatedComponents []AssociatedComponent `mandatory:"false" json:"associatedComponents"` + ComponentId *string `mandatory:"true" json:"componentId"` + DisplayName *string `mandatory:"true" json:"displayName"` + ComponentName *string `mandatory:"true" json:"componentName"` ComponentType string `json:"componentType"` } @@ -129,41 +129,41 @@ func (m *discoveredexternaldbsystemcomponent) UnmarshalPolymorphicJSON(data []by } } -//GetComponentId returns ComponentId -func (m discoveredexternaldbsystemcomponent) GetComponentId() *string { - return m.ComponentId -} - -//GetDisplayName returns DisplayName -func (m discoveredexternaldbsystemcomponent) GetDisplayName() *string { - return m.DisplayName -} - -//GetComponentName returns ComponentName -func (m discoveredexternaldbsystemcomponent) GetComponentName() *string { - return m.ComponentName -} - -//GetResourceId returns ResourceId +// GetResourceId returns ResourceId func (m discoveredexternaldbsystemcomponent) GetResourceId() *string { return m.ResourceId } -//GetIsSelectedForMonitoring returns IsSelectedForMonitoring +// GetIsSelectedForMonitoring returns IsSelectedForMonitoring func (m discoveredexternaldbsystemcomponent) GetIsSelectedForMonitoring() *bool { return m.IsSelectedForMonitoring } -//GetStatus returns Status +// GetStatus returns Status func (m discoveredexternaldbsystemcomponent) GetStatus() DiscoveredExternalDbSystemComponentStatusEnum { return m.Status } -//GetAssociatedComponents returns AssociatedComponents +// GetAssociatedComponents returns AssociatedComponents func (m discoveredexternaldbsystemcomponent) GetAssociatedComponents() []AssociatedComponent { return m.AssociatedComponents } +// GetComponentId returns ComponentId +func (m discoveredexternaldbsystemcomponent) GetComponentId() *string { + return m.ComponentId +} + +// GetDisplayName returns DisplayName +func (m discoveredexternaldbsystemcomponent) GetDisplayName() *string { + return m.DisplayName +} + +// GetComponentName returns ComponentName +func (m discoveredexternaldbsystemcomponent) GetComponentName() *string { + return m.ComponentName +} + func (m discoveredexternaldbsystemcomponent) String() string { return common.PointerString(m) } diff --git a/databasemanagement/discovered_external_listener.go b/databasemanagement/discovered_external_listener.go index f931e03fec..8f3ed60ef7 100644 --- a/databasemanagement/discovered_external_listener.go +++ b/databasemanagement/discovered_external_listener.go @@ -181,10 +181,7 @@ func (m *DiscoveredExternalListener) UnmarshalJSON(data []byte) (e error) { m.Status = model.Status m.AssociatedComponents = make([]AssociatedComponent, len(model.AssociatedComponents)) - for i, n := range model.AssociatedComponents { - m.AssociatedComponents[i] = n - } - + copy(m.AssociatedComponents, model.AssociatedComponents) m.DbNodeName = model.DbNodeName m.OracleHome = model.OracleHome @@ -215,7 +212,6 @@ func (m *DiscoveredExternalListener) UnmarshalJSON(data []byte) (e error) { m.Endpoints[i] = nil } } - nn, e = model.Connector.UnmarshalPolymorphicJSON(model.Connector.JsonData) if e != nil { return diff --git a/databasemanagement/discovered_external_pluggable_database.go b/databasemanagement/discovered_external_pluggable_database.go index 46d6e0be31..b88bb62435 100644 --- a/databasemanagement/discovered_external_pluggable_database.go +++ b/databasemanagement/discovered_external_pluggable_database.go @@ -150,10 +150,7 @@ func (m *DiscoveredExternalPluggableDatabase) UnmarshalJSON(data []byte) (e erro m.Status = model.Status m.AssociatedComponents = make([]AssociatedComponent, len(model.AssociatedComponents)) - for i, n := range model.AssociatedComponents { - m.AssociatedComponents[i] = n - } - + copy(m.AssociatedComponents, model.AssociatedComponents) m.Guid = model.Guid nn, e = model.Connector.UnmarshalPolymorphicJSON(model.Connector.JsonData) diff --git a/databasemanagement/entity_discovered.go b/databasemanagement/entity_discovered.go index 5c6b06e6dc..aa177d8273 100644 --- a/databasemanagement/entity_discovered.go +++ b/databasemanagement/entity_discovered.go @@ -54,7 +54,6 @@ type EntityDiscovered interface { type entitydiscovered struct { JsonData []byte - DisplayName *string `mandatory:"true" json:"displayName"` Id *string `mandatory:"false" json:"id"` AgentId *string `mandatory:"false" json:"agentId"` ConnectorId *string `mandatory:"false" json:"connectorId"` @@ -64,6 +63,7 @@ type entitydiscovered struct { DiscoverStatus EntityDiscoveredDiscoverStatusEnum `mandatory:"false" json:"discoverStatus,omitempty"` DiscoverErrorCode *string `mandatory:"false" json:"discoverErrorCode"` DiscoverErrorMsg *string `mandatory:"false" json:"discoverErrorMsg"` + DisplayName *string `mandatory:"true" json:"displayName"` EntityType string `json:"entityType"` } @@ -128,56 +128,56 @@ func (m *entitydiscovered) UnmarshalPolymorphicJSON(data []byte) (interface{}, e } } -//GetDisplayName returns DisplayName -func (m entitydiscovered) GetDisplayName() *string { - return m.DisplayName -} - -//GetId returns Id +// GetId returns Id func (m entitydiscovered) GetId() *string { return m.Id } -//GetAgentId returns AgentId +// GetAgentId returns AgentId func (m entitydiscovered) GetAgentId() *string { return m.AgentId } -//GetConnectorId returns ConnectorId +// GetConnectorId returns ConnectorId func (m entitydiscovered) GetConnectorId() *string { return m.ConnectorId } -//GetVersion returns Version +// GetVersion returns Version func (m entitydiscovered) GetVersion() *string { return m.Version } -//GetInternalId returns InternalId +// GetInternalId returns InternalId func (m entitydiscovered) GetInternalId() *string { return m.InternalId } -//GetStatus returns Status +// GetStatus returns Status func (m entitydiscovered) GetStatus() *string { return m.Status } -//GetDiscoverStatus returns DiscoverStatus +// GetDiscoverStatus returns DiscoverStatus func (m entitydiscovered) GetDiscoverStatus() EntityDiscoveredDiscoverStatusEnum { return m.DiscoverStatus } -//GetDiscoverErrorCode returns DiscoverErrorCode +// GetDiscoverErrorCode returns DiscoverErrorCode func (m entitydiscovered) GetDiscoverErrorCode() *string { return m.DiscoverErrorCode } -//GetDiscoverErrorMsg returns DiscoverErrorMsg +// GetDiscoverErrorMsg returns DiscoverErrorMsg func (m entitydiscovered) GetDiscoverErrorMsg() *string { return m.DiscoverErrorMsg } +// GetDisplayName returns DisplayName +func (m entitydiscovered) GetDisplayName() *string { + return m.DisplayName +} + func (m entitydiscovered) String() string { return common.PointerString(m) } diff --git a/databasemanagement/external_db_system_connector.go b/databasemanagement/external_db_system_connector.go index 76cbcb17a7..ec48afd4c6 100644 --- a/databasemanagement/external_db_system_connector.go +++ b/databasemanagement/external_db_system_connector.go @@ -58,6 +58,10 @@ type ExternalDbSystemConnector interface { type externaldbsystemconnector struct { JsonData []byte + ConnectionStatus *string `mandatory:"false" json:"connectionStatus"` + ConnectionFailureMessage *string `mandatory:"false" json:"connectionFailureMessage"` + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + TimeConnectionStatusLastUpdated *common.SDKTime `mandatory:"false" json:"timeConnectionStatusLastUpdated"` Id *string `mandatory:"true" json:"id"` DisplayName *string `mandatory:"true" json:"displayName"` CompartmentId *string `mandatory:"true" json:"compartmentId"` @@ -65,10 +69,6 @@ type externaldbsystemconnector struct { LifecycleState ExternalDbSystemConnectorLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` - ConnectionStatus *string `mandatory:"false" json:"connectionStatus"` - ConnectionFailureMessage *string `mandatory:"false" json:"connectionFailureMessage"` - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - TimeConnectionStatusLastUpdated *common.SDKTime `mandatory:"false" json:"timeConnectionStatusLastUpdated"` ConnectorType string `json:"connectorType"` } @@ -118,61 +118,61 @@ func (m *externaldbsystemconnector) UnmarshalPolymorphicJSON(data []byte) (inter } } -//GetId returns Id +// GetConnectionStatus returns ConnectionStatus +func (m externaldbsystemconnector) GetConnectionStatus() *string { + return m.ConnectionStatus +} + +// GetConnectionFailureMessage returns ConnectionFailureMessage +func (m externaldbsystemconnector) GetConnectionFailureMessage() *string { + return m.ConnectionFailureMessage +} + +// GetLifecycleDetails returns LifecycleDetails +func (m externaldbsystemconnector) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetTimeConnectionStatusLastUpdated returns TimeConnectionStatusLastUpdated +func (m externaldbsystemconnector) GetTimeConnectionStatusLastUpdated() *common.SDKTime { + return m.TimeConnectionStatusLastUpdated +} + +// GetId returns Id func (m externaldbsystemconnector) GetId() *string { return m.Id } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m externaldbsystemconnector) GetDisplayName() *string { return m.DisplayName } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m externaldbsystemconnector) GetCompartmentId() *string { return m.CompartmentId } -//GetExternalDbSystemId returns ExternalDbSystemId +// GetExternalDbSystemId returns ExternalDbSystemId func (m externaldbsystemconnector) GetExternalDbSystemId() *string { return m.ExternalDbSystemId } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m externaldbsystemconnector) GetLifecycleState() ExternalDbSystemConnectorLifecycleStateEnum { return m.LifecycleState } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m externaldbsystemconnector) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m externaldbsystemconnector) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetConnectionStatus returns ConnectionStatus -func (m externaldbsystemconnector) GetConnectionStatus() *string { - return m.ConnectionStatus -} - -//GetConnectionFailureMessage returns ConnectionFailureMessage -func (m externaldbsystemconnector) GetConnectionFailureMessage() *string { - return m.ConnectionFailureMessage -} - -//GetLifecycleDetails returns LifecycleDetails -func (m externaldbsystemconnector) GetLifecycleDetails() *string { - return m.LifecycleDetails -} - -//GetTimeConnectionStatusLastUpdated returns TimeConnectionStatusLastUpdated -func (m externaldbsystemconnector) GetTimeConnectionStatusLastUpdated() *common.SDKTime { - return m.TimeConnectionStatusLastUpdated -} - func (m externaldbsystemconnector) String() string { return common.PointerString(m) } diff --git a/databasemanagement/external_db_system_discovery.go b/databasemanagement/external_db_system_discovery.go index 88c8122034..f49e633543 100644 --- a/databasemanagement/external_db_system_discovery.go +++ b/databasemanagement/external_db_system_discovery.go @@ -110,7 +110,6 @@ func (m *ExternalDbSystemDiscovery) UnmarshalJSON(data []byte) (e error) { m.DiscoveredComponents[i] = nil } } - m.ResourceId = model.ResourceId m.LifecycleDetails = model.LifecycleDetails diff --git a/databasemanagement/external_db_system_discovery_connector.go b/databasemanagement/external_db_system_discovery_connector.go index a772769a71..7763b7eda5 100644 --- a/databasemanagement/external_db_system_discovery_connector.go +++ b/databasemanagement/external_db_system_discovery_connector.go @@ -37,10 +37,10 @@ type ExternalDbSystemDiscoveryConnector interface { type externaldbsystemdiscoveryconnector struct { JsonData []byte - DisplayName *string `mandatory:"true" json:"displayName"` ConnectionStatus *string `mandatory:"false" json:"connectionStatus"` ConnectionFailureMessage *string `mandatory:"false" json:"connectionFailureMessage"` TimeConnectionStatusLastUpdated *common.SDKTime `mandatory:"false" json:"timeConnectionStatusLastUpdated"` + DisplayName *string `mandatory:"true" json:"displayName"` ConnectorType string `json:"connectorType"` } @@ -83,26 +83,26 @@ func (m *externaldbsystemdiscoveryconnector) UnmarshalPolymorphicJSON(data []byt } } -//GetDisplayName returns DisplayName -func (m externaldbsystemdiscoveryconnector) GetDisplayName() *string { - return m.DisplayName -} - -//GetConnectionStatus returns ConnectionStatus +// GetConnectionStatus returns ConnectionStatus func (m externaldbsystemdiscoveryconnector) GetConnectionStatus() *string { return m.ConnectionStatus } -//GetConnectionFailureMessage returns ConnectionFailureMessage +// GetConnectionFailureMessage returns ConnectionFailureMessage func (m externaldbsystemdiscoveryconnector) GetConnectionFailureMessage() *string { return m.ConnectionFailureMessage } -//GetTimeConnectionStatusLastUpdated returns TimeConnectionStatusLastUpdated +// GetTimeConnectionStatusLastUpdated returns TimeConnectionStatusLastUpdated func (m externaldbsystemdiscoveryconnector) GetTimeConnectionStatusLastUpdated() *common.SDKTime { return m.TimeConnectionStatusLastUpdated } +// GetDisplayName returns DisplayName +func (m externaldbsystemdiscoveryconnector) GetDisplayName() *string { + return m.DisplayName +} + func (m externaldbsystemdiscoveryconnector) String() string { return common.PointerString(m) } diff --git a/databasemanagement/external_listener.go b/databasemanagement/external_listener.go index dbf7437de6..2b98469d57 100644 --- a/databasemanagement/external_listener.go +++ b/databasemanagement/external_listener.go @@ -195,17 +195,10 @@ func (m *ExternalListener) UnmarshalJSON(data []byte) (e error) { m.Endpoints[i] = nil } } - m.ServicedDatabases = make([]ExternalListenerServicedDatabase, len(model.ServicedDatabases)) - for i, n := range model.ServicedDatabases { - m.ServicedDatabases[i] = n - } - + copy(m.ServicedDatabases, model.ServicedDatabases) m.ServicedAsms = make([]ExternalServicedAsm, len(model.ServicedAsms)) - for i, n := range model.ServicedAsms { - m.ServicedAsms[i] = n - } - + copy(m.ServicedAsms, model.ServicedAsms) m.Id = model.Id m.DisplayName = model.DisplayName diff --git a/databasemanagement/external_listener_endpoint.go b/databasemanagement/external_listener_endpoint.go index 5ff53d7e4a..80e91b93ff 100644 --- a/databasemanagement/external_listener_endpoint.go +++ b/databasemanagement/external_listener_endpoint.go @@ -75,7 +75,7 @@ func (m *externallistenerendpoint) UnmarshalPolymorphicJSON(data []byte) (interf } } -//GetServices returns Services +// GetServices returns Services func (m externallistenerendpoint) GetServices() []string { return m.Services } diff --git a/databasemanagement/job.go b/databasemanagement/job.go index 99aba8a914..6ecaa05fd1 100644 --- a/databasemanagement/job.go +++ b/databasemanagement/job.go @@ -70,22 +70,22 @@ type Job interface { type job struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` - Name *string `mandatory:"true" json:"name"` - ScheduleType JobScheduleTypeEnum `mandatory:"true" json:"scheduleType"` - LifecycleState JobLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` Description *string `mandatory:"false" json:"description"` ManagedDatabaseGroupId *string `mandatory:"false" json:"managedDatabaseGroupId"` ManagedDatabaseId *string `mandatory:"false" json:"managedDatabaseId"` ManagedDatabasesDetails []JobDatabase `mandatory:"false" json:"managedDatabasesDetails"` DatabaseSubType DatabaseSubTypeEnum `mandatory:"false" json:"databaseSubType,omitempty"` Timeout *string `mandatory:"false" json:"timeout"` - ResultLocation JobExecutionResultLocation `mandatory:"false" json:"resultLocation"` + ResultLocation jobexecutionresultlocation `mandatory:"false" json:"resultLocation"` ScheduleDetails *JobScheduleDetails `mandatory:"false" json:"scheduleDetails"` SubmissionErrorMessage *string `mandatory:"false" json:"submissionErrorMessage"` + Id *string `mandatory:"true" json:"id"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + Name *string `mandatory:"true" json:"name"` + ScheduleType JobScheduleTypeEnum `mandatory:"true" json:"scheduleType"` + LifecycleState JobLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` JobType string `json:"jobType"` } @@ -140,86 +140,86 @@ func (m *job) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetId returns Id -func (m job) GetId() *string { - return m.Id -} - -//GetCompartmentId returns CompartmentId -func (m job) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetName returns Name -func (m job) GetName() *string { - return m.Name -} - -//GetScheduleType returns ScheduleType -func (m job) GetScheduleType() JobScheduleTypeEnum { - return m.ScheduleType -} - -//GetLifecycleState returns LifecycleState -func (m job) GetLifecycleState() JobLifecycleStateEnum { - return m.LifecycleState -} - -//GetTimeCreated returns TimeCreated -func (m job) GetTimeCreated() *common.SDKTime { - return m.TimeCreated -} - -//GetTimeUpdated returns TimeUpdated -func (m job) GetTimeUpdated() *common.SDKTime { - return m.TimeUpdated -} - -//GetDescription returns Description +// GetDescription returns Description func (m job) GetDescription() *string { return m.Description } -//GetManagedDatabaseGroupId returns ManagedDatabaseGroupId +// GetManagedDatabaseGroupId returns ManagedDatabaseGroupId func (m job) GetManagedDatabaseGroupId() *string { return m.ManagedDatabaseGroupId } -//GetManagedDatabaseId returns ManagedDatabaseId +// GetManagedDatabaseId returns ManagedDatabaseId func (m job) GetManagedDatabaseId() *string { return m.ManagedDatabaseId } -//GetManagedDatabasesDetails returns ManagedDatabasesDetails +// GetManagedDatabasesDetails returns ManagedDatabasesDetails func (m job) GetManagedDatabasesDetails() []JobDatabase { return m.ManagedDatabasesDetails } -//GetDatabaseSubType returns DatabaseSubType +// GetDatabaseSubType returns DatabaseSubType func (m job) GetDatabaseSubType() DatabaseSubTypeEnum { return m.DatabaseSubType } -//GetTimeout returns Timeout +// GetTimeout returns Timeout func (m job) GetTimeout() *string { return m.Timeout } -//GetResultLocation returns ResultLocation -func (m job) GetResultLocation() JobExecutionResultLocation { +// GetResultLocation returns ResultLocation +func (m job) GetResultLocation() jobexecutionresultlocation { return m.ResultLocation } -//GetScheduleDetails returns ScheduleDetails +// GetScheduleDetails returns ScheduleDetails func (m job) GetScheduleDetails() *JobScheduleDetails { return m.ScheduleDetails } -//GetSubmissionErrorMessage returns SubmissionErrorMessage +// GetSubmissionErrorMessage returns SubmissionErrorMessage func (m job) GetSubmissionErrorMessage() *string { return m.SubmissionErrorMessage } +// GetId returns Id +func (m job) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m job) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetName returns Name +func (m job) GetName() *string { + return m.Name +} + +// GetScheduleType returns ScheduleType +func (m job) GetScheduleType() JobScheduleTypeEnum { + return m.ScheduleType +} + +// GetLifecycleState returns LifecycleState +func (m job) GetLifecycleState() JobLifecycleStateEnum { + return m.LifecycleState +} + +// GetTimeCreated returns TimeCreated +func (m job) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m job) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + func (m job) String() string { return common.PointerString(m) } diff --git a/databasemanagement/managed_database_credential.go b/databasemanagement/managed_database_credential.go index b16708de4b..9c190ea143 100644 --- a/databasemanagement/managed_database_credential.go +++ b/databasemanagement/managed_database_credential.go @@ -76,12 +76,12 @@ func (m *manageddatabasecredential) UnmarshalPolymorphicJSON(data []byte) (inter } } -//GetUsername returns Username +// GetUsername returns Username func (m manageddatabasecredential) GetUsername() *string { return m.Username } -//GetRole returns Role +// GetRole returns Role func (m manageddatabasecredential) GetRole() ManagedDatabaseCredentialRoleEnum { return m.Role } diff --git a/databasemanagement/patch_external_db_system_discovery_details.go b/databasemanagement/patch_external_db_system_discovery_details.go index 17045dcf82..b6648c1658 100644 --- a/databasemanagement/patch_external_db_system_discovery_details.go +++ b/databasemanagement/patch_external_db_system_discovery_details.go @@ -64,6 +64,5 @@ func (m *PatchExternalDbSystemDiscoveryDetails) UnmarshalJSON(data []byte) (e er m.Items[i] = nil } } - return } diff --git a/databasemanagement/patch_instruction.go b/databasemanagement/patch_instruction.go index 0c3d75979b..ae9ef63bf9 100644 --- a/databasemanagement/patch_instruction.go +++ b/databasemanagement/patch_instruction.go @@ -69,7 +69,7 @@ func (m *patchinstruction) UnmarshalPolymorphicJSON(data []byte) (interface{}, e } } -//GetSelection returns Selection +// GetSelection returns Selection func (m patchinstruction) GetSelection() *string { return m.Selection } diff --git a/databasemanagement/preferred_credential.go b/databasemanagement/preferred_credential.go index 1928bc1e3e..1175bbcac7 100644 --- a/databasemanagement/preferred_credential.go +++ b/databasemanagement/preferred_credential.go @@ -77,17 +77,17 @@ func (m *preferredcredential) UnmarshalPolymorphicJSON(data []byte) (interface{} } } -//GetCredentialName returns CredentialName +// GetCredentialName returns CredentialName func (m preferredcredential) GetCredentialName() *string { return m.CredentialName } -//GetStatus returns Status +// GetStatus returns Status func (m preferredcredential) GetStatus() PreferredCredentialStatusEnum { return m.Status } -//GetIsAccessible returns IsAccessible +// GetIsAccessible returns IsAccessible func (m preferredcredential) GetIsAccessible() *bool { return m.IsAccessible } diff --git a/databasemanagement/sql_job.go b/databasemanagement/sql_job.go index c151e3a014..4f2a64f867 100644 --- a/databasemanagement/sql_job.go +++ b/databasemanagement/sql_job.go @@ -256,10 +256,7 @@ func (m *SqlJob) UnmarshalJSON(data []byte) (e error) { m.ManagedDatabaseId = model.ManagedDatabaseId m.ManagedDatabasesDetails = make([]JobDatabase, len(model.ManagedDatabasesDetails)) - for i, n := range model.ManagedDatabasesDetails { - m.ManagedDatabasesDetails[i] = n - } - + copy(m.ManagedDatabasesDetails, model.ManagedDatabasesDetails) m.DatabaseSubType = model.DatabaseSubType m.Timeout = model.Timeout diff --git a/databasemanagement/sql_tuning_task_credential_details.go b/databasemanagement/sql_tuning_task_credential_details.go index e873ad84da..bb86991fb2 100644 --- a/databasemanagement/sql_tuning_task_credential_details.go +++ b/databasemanagement/sql_tuning_task_credential_details.go @@ -76,12 +76,12 @@ func (m *sqltuningtaskcredentialdetails) UnmarshalPolymorphicJSON(data []byte) ( } } -//GetUsername returns Username +// GetUsername returns Username func (m sqltuningtaskcredentialdetails) GetUsername() *string { return m.Username } -//GetRole returns Role +// GetRole returns Role func (m sqltuningtaskcredentialdetails) GetRole() SqlTuningTaskCredentialDetailsRoleEnum { return m.Role } diff --git a/databasemanagement/start_sql_tuning_task_details.go b/databasemanagement/start_sql_tuning_task_details.go index 55d85eaffc..f1f6617161 100644 --- a/databasemanagement/start_sql_tuning_task_details.go +++ b/databasemanagement/start_sql_tuning_task_details.go @@ -101,10 +101,7 @@ func (m *StartSqlTuningTaskDetails) UnmarshalJSON(data []byte) (e error) { m.SqlTuningSet = model.SqlTuningSet m.SqlDetails = make([]SqlTuningTaskSqlDetail, len(model.SqlDetails)) - for i, n := range model.SqlDetails { - m.SqlDetails[i] = n - } - + copy(m.SqlDetails, model.SqlDetails) m.TimeStarted = model.TimeStarted m.TimeEnded = model.TimeEnded diff --git a/databasemanagement/tablespace_admin_credential_details.go b/databasemanagement/tablespace_admin_credential_details.go index 77802f07fa..71fa7dec4d 100644 --- a/databasemanagement/tablespace_admin_credential_details.go +++ b/databasemanagement/tablespace_admin_credential_details.go @@ -76,12 +76,12 @@ func (m *tablespaceadmincredentialdetails) UnmarshalPolymorphicJSON(data []byte) } } -//GetUsername returns Username +// GetUsername returns Username func (m tablespaceadmincredentialdetails) GetUsername() *string { return m.Username } -//GetRole returns Role +// GetRole returns Role func (m tablespaceadmincredentialdetails) GetRole() TablespaceAdminCredentialDetailsRoleEnum { return m.Role } diff --git a/databasemanagement/update_job_details.go b/databasemanagement/update_job_details.go index 36635509a6..cafa0d7f10 100644 --- a/databasemanagement/update_job_details.go +++ b/databasemanagement/update_job_details.go @@ -36,7 +36,7 @@ type updatejobdetails struct { JsonData []byte Description *string `mandatory:"false" json:"description"` Timeout *string `mandatory:"false" json:"timeout"` - ResultLocation JobExecutionResultLocation `mandatory:"false" json:"resultLocation"` + ResultLocation jobexecutionresultlocation `mandatory:"false" json:"resultLocation"` ScheduleDetails *JobScheduleDetails `mandatory:"false" json:"scheduleDetails"` JobType string `json:"jobType"` } @@ -80,22 +80,22 @@ func (m *updatejobdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, e } } -//GetDescription returns Description +// GetDescription returns Description func (m updatejobdetails) GetDescription() *string { return m.Description } -//GetTimeout returns Timeout +// GetTimeout returns Timeout func (m updatejobdetails) GetTimeout() *string { return m.Timeout } -//GetResultLocation returns ResultLocation -func (m updatejobdetails) GetResultLocation() JobExecutionResultLocation { +// GetResultLocation returns ResultLocation +func (m updatejobdetails) GetResultLocation() jobexecutionresultlocation { return m.ResultLocation } -//GetScheduleDetails returns ScheduleDetails +// GetScheduleDetails returns ScheduleDetails func (m updatejobdetails) GetScheduleDetails() *JobScheduleDetails { return m.ScheduleDetails } diff --git a/databasemigration/connection.go b/databasemigration/connection.go index e478564b09..4c196281b8 100644 --- a/databasemigration/connection.go +++ b/databasemigration/connection.go @@ -57,6 +57,8 @@ type Connection struct { AdminCredentials *AdminCredentials `mandatory:"false" json:"adminCredentials"` + ReplicationCredentials *AdminCredentials `mandatory:"false" json:"replicationCredentials"` + PrivateEndpoint *PrivateEndpointDetails `mandatory:"false" json:"privateEndpoint"` VaultDetails *VaultDetails `mandatory:"false" json:"vaultDetails"` diff --git a/databasemigration/create_connection_details.go b/databasemigration/create_connection_details.go index 1d8f10c04c..37e9b5dd95 100644 --- a/databasemigration/create_connection_details.go +++ b/databasemigration/create_connection_details.go @@ -51,6 +51,8 @@ type CreateConnectionDetails struct { SshDetails *CreateSshDetails `mandatory:"false" json:"sshDetails"` + ReplicationCredentials *CreateAdminCredentials `mandatory:"false" json:"replicationCredentials"` + PrivateEndpoint *CreatePrivateEndpoint `mandatory:"false" json:"privateEndpoint"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. diff --git a/databasemigration/create_data_pump_settings.go b/databasemigration/create_data_pump_settings.go index 07f43b5c07..b65f97f33c 100644 --- a/databasemigration/create_data_pump_settings.go +++ b/databasemigration/create_data_pump_settings.go @@ -76,10 +76,7 @@ func (m *CreateDataPumpSettings) UnmarshalJSON(data []byte) (e error) { m.DataPumpParameters = model.DataPumpParameters m.MetadataRemaps = make([]MetadataRemap, len(model.MetadataRemaps)) - for i, n := range model.MetadataRemaps { - m.MetadataRemaps[i] = n - } - + copy(m.MetadataRemaps, model.MetadataRemaps) nn, e = model.TablespaceDetails.UnmarshalPolymorphicJSON(model.TablespaceDetails.JsonData) if e != nil { return diff --git a/databasemigration/create_golden_gate_hub.go b/databasemigration/create_golden_gate_hub.go index 327cc7f843..9d9d149c16 100644 --- a/databasemigration/create_golden_gate_hub.go +++ b/databasemigration/create_golden_gate_hub.go @@ -19,21 +19,21 @@ import ( type CreateGoldenGateHub struct { RestAdminCredentials *CreateAdminCredentials `mandatory:"true" json:"restAdminCredentials"` - SourceDbAdminCredentials *CreateAdminCredentials `mandatory:"true" json:"sourceDbAdminCredentials"` - - TargetDbAdminCredentials *CreateAdminCredentials `mandatory:"true" json:"targetDbAdminCredentials"` - // Oracle GoldenGate Microservices hub's REST endpoint. // Refer to https://docs.oracle.com/en/middleware/goldengate/core/19.1/securing/network.html#GUID-A709DA55-111D-455E-8942-C9BDD1E38CAA Url *string `mandatory:"true" json:"url"` + SourceDbAdminCredentials *CreateAdminCredentials `mandatory:"false" json:"sourceDbAdminCredentials"` + + SourceContainerDbAdminCredentials *CreateAdminCredentials `mandatory:"false" json:"sourceContainerDbAdminCredentials"` + + TargetDbAdminCredentials *CreateAdminCredentials `mandatory:"false" json:"targetDbAdminCredentials"` + // Name of GoldenGate Microservices deployment to operate on source database - SourceMicroservicesDeploymentName *string `mandatory:"true" json:"sourceMicroservicesDeploymentName"` + SourceMicroservicesDeploymentName *string `mandatory:"false" json:"sourceMicroservicesDeploymentName"` // Name of GoldenGate Microservices deployment to operate on target database - TargetMicroservicesDeploymentName *string `mandatory:"true" json:"targetMicroservicesDeploymentName"` - - SourceContainerDbAdminCredentials *CreateAdminCredentials `mandatory:"false" json:"sourceContainerDbAdminCredentials"` + TargetMicroservicesDeploymentName *string `mandatory:"false" json:"targetMicroservicesDeploymentName"` // OCID of GoldenGate Microservices compute instance. ComputeId *string `mandatory:"false" json:"computeId"` diff --git a/mysql/analytics_cluster_schema_memory_estimate.go b/databasemigration/create_golden_gate_service_details.go similarity index 51% rename from mysql/analytics_cluster_schema_memory_estimate.go rename to databasemigration/create_golden_gate_service_details.go index 41633cb59d..68c4e9a0fe 100644 --- a/mysql/analytics_cluster_schema_memory_estimate.go +++ b/databasemigration/create_golden_gate_service_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. -// MySQL Database Service API +// Database Migration API // -// The API for the MySQL Database Service +// Use the Oracle Cloud Infrastructure Database Migration APIs to perform database migration operations. // -package mysql +package databasemigration import ( "fmt" @@ -15,27 +15,25 @@ import ( "strings" ) -// AnalyticsClusterSchemaMemoryEstimate DEPRECATED -- please use HeatWave API instead. -// Schema with estimated memory footprints for each MySQL user table -// of the schema when loaded to Analytics Cluster memory. -type AnalyticsClusterSchemaMemoryEstimate struct { +// CreateGoldenGateServiceDetails Details about Oracle GoldenGate GGS Deployment. +type CreateGoldenGateServiceDetails struct { + SourceDbCredentials *DatabaseCredentials `mandatory:"false" json:"sourceDbCredentials"` - // The name of the schema. - SchemaName *string `mandatory:"true" json:"schemaName"` + SourceContainerDbCredentials *DatabaseCredentials `mandatory:"false" json:"sourceContainerDbCredentials"` - // Estimated memory footprints for MySQL user tables of the schema - // when loaded to Analytics Cluster memory. - PerTableEstimates []AnalyticsClusterTableMemoryEstimate `mandatory:"true" json:"perTableEstimates"` + TargetDbCredentials *DatabaseCredentials `mandatory:"false" json:"targetDbCredentials"` + + Settings *CreateGoldenGateSettings `mandatory:"false" json:"settings"` } -func (m AnalyticsClusterSchemaMemoryEstimate) String() string { +func (m CreateGoldenGateServiceDetails) String() string { return common.PointerString(m) } // ValidateEnumValue returns an error when providing an unsupported enum value // This function is being called during constructing API request process // Not recommended for calling this function directly -func (m AnalyticsClusterSchemaMemoryEstimate) ValidateEnumValue() (bool, error) { +func (m CreateGoldenGateServiceDetails) ValidateEnumValue() (bool, error) { errMessage := []string{} if len(errMessage) > 0 { diff --git a/databasemigration/create_host_dump_transfer_details.go b/databasemigration/create_host_dump_transfer_details.go index 68f9bc9e09..6f610c78fd 100644 --- a/databasemigration/create_host_dump_transfer_details.go +++ b/databasemigration/create_host_dump_transfer_details.go @@ -69,7 +69,7 @@ func (m *createhostdumptransferdetails) UnmarshalPolymorphicJSON(data []byte) (i } } -//GetWalletLocation returns WalletLocation +// GetWalletLocation returns WalletLocation func (m createhostdumptransferdetails) GetWalletLocation() *string { return m.WalletLocation } diff --git a/databasemigration/create_migration_details.go b/databasemigration/create_migration_details.go index a3f9019b4f..481ea2b9b1 100644 --- a/databasemigration/create_migration_details.go +++ b/databasemigration/create_migration_details.go @@ -59,6 +59,8 @@ type CreateMigrationDetails struct { GoldenGateDetails *CreateGoldenGateDetails `mandatory:"false" json:"goldenGateDetails"` + GoldenGateServiceDetails *CreateGoldenGateServiceDetails `mandatory:"false" json:"goldenGateServiceDetails"` + VaultDetails *CreateVaultDetails `mandatory:"false" json:"vaultDetails"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. diff --git a/databasemigration/data_pump_settings.go b/databasemigration/data_pump_settings.go index 75f1b70044..b5f96329d9 100644 --- a/databasemigration/data_pump_settings.go +++ b/databasemigration/data_pump_settings.go @@ -76,10 +76,7 @@ func (m *DataPumpSettings) UnmarshalJSON(data []byte) (e error) { m.DataPumpParameters = model.DataPumpParameters m.MetadataRemaps = make([]MetadataRemap, len(model.MetadataRemaps)) - for i, n := range model.MetadataRemaps { - m.MetadataRemaps[i] = n - } - + copy(m.MetadataRemaps, model.MetadataRemaps) nn, e = model.TablespaceDetails.UnmarshalPolymorphicJSON(model.TablespaceDetails.JsonData) if e != nil { return diff --git a/mysql/add_analytics_cluster_details.go b/databasemigration/database_credentials.go similarity index 54% rename from mysql/add_analytics_cluster_details.go rename to databasemigration/database_credentials.go index 381a45fbc8..82d3bbb9d3 100644 --- a/mysql/add_analytics_cluster_details.go +++ b/databasemigration/database_credentials.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. -// MySQL Database Service API +// Database Migration API // -// The API for the MySQL Database Service +// Use the Oracle Cloud Infrastructure Database Migration APIs to perform database migration operations. // -package mysql +package databasemigration import ( "fmt" @@ -15,27 +15,24 @@ import ( "strings" ) -// AddAnalyticsClusterDetails DEPRECATED -- please use HeatWave API instead. -// Details required to add an Analytics Cluster. -type AddAnalyticsClusterDetails struct { +// DatabaseCredentials Database Credentials details. +type DatabaseCredentials struct { - // The shape determines resources to allocate to the Analytics - // Cluster nodes - CPU cores, memory. - ShapeName *string `mandatory:"true" json:"shapeName"` + // Database username + Username *string `mandatory:"true" json:"username"` - // The number of analytics-processing nodes provisioned for the - // Analytics Cluster. - ClusterSize *int `mandatory:"true" json:"clusterSize"` + // Database password + Password *string `mandatory:"true" json:"password"` } -func (m AddAnalyticsClusterDetails) String() string { +func (m DatabaseCredentials) String() string { return common.PointerString(m) } // ValidateEnumValue returns an error when providing an unsupported enum value // This function is being called during constructing API request process // Not recommended for calling this function directly -func (m AddAnalyticsClusterDetails) ValidateEnumValue() (bool, error) { +func (m DatabaseCredentials) ValidateEnumValue() (bool, error) { errMessage := []string{} if len(errMessage) > 0 { diff --git a/databasemigration/databasemigration_client.go b/databasemigration/databasemigration_client.go index 79fcb87188..25c1455b19 100644 --- a/databasemigration/databasemigration_client.go +++ b/databasemigration/databasemigration_client.go @@ -80,7 +80,7 @@ func (client *DatabaseMigrationClient) setConfigurationProvider(configProvider c 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/databasemigration/ggs_deployment.go b/databasemigration/ggs_deployment.go new file mode 100644 index 0000000000..f3b807cdf9 --- /dev/null +++ b/databasemigration/ggs_deployment.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 +// +// Use the Oracle Cloud Infrastructure Database Migration APIs to perform database migration operations. +// + +package databasemigration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GgsDeployment Details about Oracle GoldenGate GGS Deployment. +type GgsDeployment struct { + + // OCID of a GoldenGate Deployment + DeploymentId *string `mandatory:"true" json:"deploymentId"` + + // OCID of a VaultSecret containing the Admin Credentials for the GGS Deployment + GgsAdminCredentialsSecretId *string `mandatory:"true" json:"ggsAdminCredentialsSecretId"` +} + +func (m GgsDeployment) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m GgsDeployment) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/databasemigration/golden_gate_service_details.go b/databasemigration/golden_gate_service_details.go new file mode 100644 index 0000000000..2a44f2fb74 --- /dev/null +++ b/databasemigration/golden_gate_service_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 +// +// Use the Oracle Cloud Infrastructure Database Migration APIs to perform database migration operations. +// + +package databasemigration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GoldenGateServiceDetails Details about Oracle GoldenGate GGS Deployment. +type GoldenGateServiceDetails struct { + GgsDeployment *GgsDeployment `mandatory:"false" json:"ggsDeployment"` + + Settings *GoldenGateSettings `mandatory:"false" json:"settings"` +} + +func (m GoldenGateServiceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m GoldenGateServiceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/databasemigration/host_dump_transfer_details.go b/databasemigration/host_dump_transfer_details.go index 0ad88550a9..dcbb14582b 100644 --- a/databasemigration/host_dump_transfer_details.go +++ b/databasemigration/host_dump_transfer_details.go @@ -69,7 +69,7 @@ func (m *hostdumptransferdetails) UnmarshalPolymorphicJSON(data []byte) (interfa } } -//GetWalletLocation returns WalletLocation +// GetWalletLocation returns WalletLocation func (m hostdumptransferdetails) GetWalletLocation() *string { return m.WalletLocation } diff --git a/databasemigration/migration.go b/databasemigration/migration.go index 78a1b94765..b59bc1e389 100644 --- a/databasemigration/migration.go +++ b/databasemigration/migration.go @@ -73,6 +73,8 @@ type Migration struct { // Database objects to include from migration. IncludeObjects []DatabaseObject `mandatory:"false" json:"includeObjects"` + GoldenGateServiceDetails *GoldenGateServiceDetails `mandatory:"false" json:"goldenGateServiceDetails"` + GoldenGateDetails *GoldenGateDetails `mandatory:"false" json:"goldenGateDetails"` VaultDetails *VaultDetails `mandatory:"false" json:"vaultDetails"` diff --git a/databasemigration/odms_job_phases.go b/databasemigration/odms_job_phases.go index 6034305271..c90ba5391a 100644 --- a/databasemigration/odms_job_phases.go +++ b/databasemigration/odms_job_phases.go @@ -22,11 +22,13 @@ const ( OdmsJobPhasesOdmsValidateSrc OdmsJobPhasesEnum = "ODMS_VALIDATE_SRC" OdmsJobPhasesOdmsValidatePremigrationAdvisor OdmsJobPhasesEnum = "ODMS_VALIDATE_PREMIGRATION_ADVISOR" OdmsJobPhasesOdmsValidateGgHub OdmsJobPhasesEnum = "ODMS_VALIDATE_GG_HUB" + OdmsJobPhasesOdmsValidateGgService OdmsJobPhasesEnum = "ODMS_VALIDATE_GG_SERVICE" OdmsJobPhasesOdmsValidateDatapumpSettings OdmsJobPhasesEnum = "ODMS_VALIDATE_DATAPUMP_SETTINGS" OdmsJobPhasesOdmsValidateDatapumpSettingsSrc OdmsJobPhasesEnum = "ODMS_VALIDATE_DATAPUMP_SETTINGS_SRC" OdmsJobPhasesOdmsValidateDatapumpSettingsTgt OdmsJobPhasesEnum = "ODMS_VALIDATE_DATAPUMP_SETTINGS_TGT" OdmsJobPhasesOdmsValidateDatapumpSrc OdmsJobPhasesEnum = "ODMS_VALIDATE_DATAPUMP_SRC" OdmsJobPhasesOdmsValidateDatapumpEstimateSrc OdmsJobPhasesEnum = "ODMS_VALIDATE_DATAPUMP_ESTIMATE_SRC" + OdmsJobPhasesOdmsInitializeGgs OdmsJobPhasesEnum = "ODMS_INITIALIZE_GGS" OdmsJobPhasesOdmsValidate OdmsJobPhasesEnum = "ODMS_VALIDATE" OdmsJobPhasesOdmsPrepare OdmsJobPhasesEnum = "ODMS_PREPARE" OdmsJobPhasesOdmsInitialLoadExport OdmsJobPhasesEnum = "ODMS_INITIAL_LOAD_EXPORT" @@ -44,11 +46,13 @@ var mappingOdmsJobPhasesEnum = map[string]OdmsJobPhasesEnum{ "ODMS_VALIDATE_SRC": OdmsJobPhasesOdmsValidateSrc, "ODMS_VALIDATE_PREMIGRATION_ADVISOR": OdmsJobPhasesOdmsValidatePremigrationAdvisor, "ODMS_VALIDATE_GG_HUB": OdmsJobPhasesOdmsValidateGgHub, + "ODMS_VALIDATE_GG_SERVICE": OdmsJobPhasesOdmsValidateGgService, "ODMS_VALIDATE_DATAPUMP_SETTINGS": OdmsJobPhasesOdmsValidateDatapumpSettings, "ODMS_VALIDATE_DATAPUMP_SETTINGS_SRC": OdmsJobPhasesOdmsValidateDatapumpSettingsSrc, "ODMS_VALIDATE_DATAPUMP_SETTINGS_TGT": OdmsJobPhasesOdmsValidateDatapumpSettingsTgt, "ODMS_VALIDATE_DATAPUMP_SRC": OdmsJobPhasesOdmsValidateDatapumpSrc, "ODMS_VALIDATE_DATAPUMP_ESTIMATE_SRC": OdmsJobPhasesOdmsValidateDatapumpEstimateSrc, + "ODMS_INITIALIZE_GGS": OdmsJobPhasesOdmsInitializeGgs, "ODMS_VALIDATE": OdmsJobPhasesOdmsValidate, "ODMS_PREPARE": OdmsJobPhasesOdmsPrepare, "ODMS_INITIAL_LOAD_EXPORT": OdmsJobPhasesOdmsInitialLoadExport, @@ -66,11 +70,13 @@ var mappingOdmsJobPhasesEnumLowerCase = map[string]OdmsJobPhasesEnum{ "odms_validate_src": OdmsJobPhasesOdmsValidateSrc, "odms_validate_premigration_advisor": OdmsJobPhasesOdmsValidatePremigrationAdvisor, "odms_validate_gg_hub": OdmsJobPhasesOdmsValidateGgHub, + "odms_validate_gg_service": OdmsJobPhasesOdmsValidateGgService, "odms_validate_datapump_settings": OdmsJobPhasesOdmsValidateDatapumpSettings, "odms_validate_datapump_settings_src": OdmsJobPhasesOdmsValidateDatapumpSettingsSrc, "odms_validate_datapump_settings_tgt": OdmsJobPhasesOdmsValidateDatapumpSettingsTgt, "odms_validate_datapump_src": OdmsJobPhasesOdmsValidateDatapumpSrc, "odms_validate_datapump_estimate_src": OdmsJobPhasesOdmsValidateDatapumpEstimateSrc, + "odms_initialize_ggs": OdmsJobPhasesOdmsInitializeGgs, "odms_validate": OdmsJobPhasesOdmsValidate, "odms_prepare": OdmsJobPhasesOdmsPrepare, "odms_initial_load_export": OdmsJobPhasesOdmsInitialLoadExport, @@ -99,11 +105,13 @@ func GetOdmsJobPhasesEnumStringValues() []string { "ODMS_VALIDATE_SRC", "ODMS_VALIDATE_PREMIGRATION_ADVISOR", "ODMS_VALIDATE_GG_HUB", + "ODMS_VALIDATE_GG_SERVICE", "ODMS_VALIDATE_DATAPUMP_SETTINGS", "ODMS_VALIDATE_DATAPUMP_SETTINGS_SRC", "ODMS_VALIDATE_DATAPUMP_SETTINGS_TGT", "ODMS_VALIDATE_DATAPUMP_SRC", "ODMS_VALIDATE_DATAPUMP_ESTIMATE_SRC", + "ODMS_INITIALIZE_GGS", "ODMS_VALIDATE", "ODMS_PREPARE", "ODMS_INITIAL_LOAD_EXPORT", diff --git a/databasemigration/update_connection_details.go b/databasemigration/update_connection_details.go index b83264cae1..1aa257d142 100644 --- a/databasemigration/update_connection_details.go +++ b/databasemigration/update_connection_details.go @@ -39,6 +39,8 @@ type UpdateConnectionDetails struct { AdminCredentials *UpdateAdminCredentials `mandatory:"false" json:"adminCredentials"` + ReplicationCredentials *UpdateAdminCredentials `mandatory:"false" json:"replicationCredentials"` + PrivateEndpoint *UpdatePrivateEndpoint `mandatory:"false" json:"privateEndpoint"` VaultDetails *UpdateVaultDetails `mandatory:"false" json:"vaultDetails"` diff --git a/databasemigration/update_data_pump_settings.go b/databasemigration/update_data_pump_settings.go index fd2b86d6c8..b4e1007415 100644 --- a/databasemigration/update_data_pump_settings.go +++ b/databasemigration/update_data_pump_settings.go @@ -77,10 +77,7 @@ func (m *UpdateDataPumpSettings) UnmarshalJSON(data []byte) (e error) { m.DataPumpParameters = model.DataPumpParameters m.MetadataRemaps = make([]MetadataRemap, len(model.MetadataRemaps)) - for i, n := range model.MetadataRemaps { - m.MetadataRemaps[i] = n - } - + copy(m.MetadataRemaps, model.MetadataRemaps) nn, e = model.TablespaceDetails.UnmarshalPolymorphicJSON(model.TablespaceDetails.JsonData) if e != nil { return diff --git a/databasemigration/update_golden_gate_service_details.go b/databasemigration/update_golden_gate_service_details.go new file mode 100644 index 0000000000..713b50b569 --- /dev/null +++ b/databasemigration/update_golden_gate_service_details.go @@ -0,0 +1,43 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache 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 +// +// Use the Oracle Cloud Infrastructure Database Migration APIs to perform database migration operations. +// + +package databasemigration + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateGoldenGateServiceDetails Details about the Oracle GoldenGate Microservices. If an empty object is specified, the stored Golden Gate details will be removed. +type UpdateGoldenGateServiceDetails struct { + SourceDbCredentials *DatabaseCredentials `mandatory:"false" json:"sourceDbCredentials"` + + SourceContainerDbCredentials *DatabaseCredentials `mandatory:"false" json:"sourceContainerDbCredentials"` + + TargetDbCredentials *DatabaseCredentials `mandatory:"false" json:"targetDbCredentials"` + + Settings *UpdateGoldenGateSettings `mandatory:"false" json:"settings"` +} + +func (m UpdateGoldenGateServiceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateGoldenGateServiceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/databasemigration/update_host_dump_transfer_details.go b/databasemigration/update_host_dump_transfer_details.go index 5cd072b87e..d4400e5d9c 100644 --- a/databasemigration/update_host_dump_transfer_details.go +++ b/databasemigration/update_host_dump_transfer_details.go @@ -69,7 +69,7 @@ func (m *updatehostdumptransferdetails) UnmarshalPolymorphicJSON(data []byte) (i } } -//GetWalletLocation returns WalletLocation +// GetWalletLocation returns WalletLocation func (m updatehostdumptransferdetails) GetWalletLocation() *string { return m.WalletLocation } diff --git a/databasemigration/update_migration_details.go b/databasemigration/update_migration_details.go index 44c7d7d5bd..34580498a5 100644 --- a/databasemigration/update_migration_details.go +++ b/databasemigration/update_migration_details.go @@ -54,6 +54,8 @@ type UpdateMigrationDetails struct { // If specified, the list will be replaced entirely. Empty list will remove stored includeObjects details. IncludeObjects []DatabaseObject `mandatory:"false" json:"includeObjects"` + GoldenGateServiceDetails *UpdateGoldenGateServiceDetails `mandatory:"false" json:"goldenGateServiceDetails"` + GoldenGateDetails *UpdateGoldenGateDetails `mandatory:"false" json:"goldenGateDetails"` VaultDetails *UpdateVaultDetails `mandatory:"false" json:"vaultDetails"` diff --git a/databasetools/create_database_tools_connection_details.go b/databasetools/create_database_tools_connection_details.go index cdb7dd3fff..e4dc45d787 100644 --- a/databasetools/create_database_tools_connection_details.go +++ b/databasetools/create_database_tools_connection_details.go @@ -36,10 +36,10 @@ type CreateDatabaseToolsConnectionDetails interface { type createdatabasetoolsconnectiondetails struct { JsonData []byte - DisplayName *string `mandatory:"true" json:"displayName"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DisplayName *string `mandatory:"true" json:"displayName"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` Type string `json:"type"` } @@ -86,26 +86,26 @@ func (m *createdatabasetoolsconnectiondetails) UnmarshalPolymorphicJSON(data []b } } -//GetDisplayName returns DisplayName -func (m createdatabasetoolsconnectiondetails) GetDisplayName() *string { - return m.DisplayName -} - -//GetCompartmentId returns CompartmentId -func (m createdatabasetoolsconnectiondetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createdatabasetoolsconnectiondetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createdatabasetoolsconnectiondetails) GetFreeformTags() map[string]string { return m.FreeformTags } +// GetDisplayName returns DisplayName +func (m createdatabasetoolsconnectiondetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetCompartmentId returns CompartmentId +func (m createdatabasetoolsconnectiondetails) GetCompartmentId() *string { + return m.CompartmentId +} + func (m createdatabasetoolsconnectiondetails) String() string { return common.PointerString(m) } diff --git a/databasetools/create_database_tools_connection_my_sql_details.go b/databasetools/create_database_tools_connection_my_sql_details.go index d239914640..9894783ec1 100644 --- a/databasetools/create_database_tools_connection_my_sql_details.go +++ b/databasetools/create_database_tools_connection_my_sql_details.go @@ -148,10 +148,7 @@ func (m *CreateDatabaseToolsConnectionMySqlDetails) UnmarshalJSON(data []byte) ( m.AdvancedProperties = model.AdvancedProperties m.KeyStores = make([]DatabaseToolsKeyStoreMySqlDetails, len(model.KeyStores)) - for i, n := range model.KeyStores { - m.KeyStores[i] = n - } - + copy(m.KeyStores, model.KeyStores) m.PrivateEndpointId = model.PrivateEndpointId m.DisplayName = model.DisplayName diff --git a/databasetools/create_database_tools_connection_oracle_database_details.go b/databasetools/create_database_tools_connection_oracle_database_details.go index 9e52c8727c..f1caf9af93 100644 --- a/databasetools/create_database_tools_connection_oracle_database_details.go +++ b/databasetools/create_database_tools_connection_oracle_database_details.go @@ -148,10 +148,7 @@ func (m *CreateDatabaseToolsConnectionOracleDatabaseDetails) UnmarshalJSON(data m.AdvancedProperties = model.AdvancedProperties m.KeyStores = make([]DatabaseToolsKeyStoreDetails, len(model.KeyStores)) - for i, n := range model.KeyStores { - m.KeyStores[i] = n - } - + copy(m.KeyStores, model.KeyStores) m.PrivateEndpointId = model.PrivateEndpointId m.DisplayName = model.DisplayName diff --git a/databasetools/database_tools_connection.go b/databasetools/database_tools_connection.go index 08e54b0464..a92f9f2ddc 100644 --- a/databasetools/database_tools_connection.go +++ b/databasetools/database_tools_connection.go @@ -55,16 +55,16 @@ type DatabaseToolsConnection interface { type databasetoolsconnection struct { JsonData []byte + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` Id *string `mandatory:"true" json:"id"` DisplayName *string `mandatory:"true" json:"displayName"` CompartmentId *string `mandatory:"true" json:"compartmentId"` LifecycleState LifecycleStateEnum `mandatory:"true" json:"lifecycleState"` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` Type string `json:"type"` } @@ -117,56 +117,56 @@ func (m *databasetoolsconnection) UnmarshalPolymorphicJSON(data []byte) (interfa } } -//GetId returns Id +// GetLifecycleDetails returns LifecycleDetails +func (m databasetoolsconnection) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetDefinedTags returns DefinedTags +func (m databasetoolsconnection) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetFreeformTags returns FreeformTags +func (m databasetoolsconnection) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetSystemTags returns SystemTags +func (m databasetoolsconnection) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetId returns Id func (m databasetoolsconnection) GetId() *string { return m.Id } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m databasetoolsconnection) GetDisplayName() *string { return m.DisplayName } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m databasetoolsconnection) GetCompartmentId() *string { return m.CompartmentId } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m databasetoolsconnection) GetLifecycleState() LifecycleStateEnum { return m.LifecycleState } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m databasetoolsconnection) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m databasetoolsconnection) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleDetails returns LifecycleDetails -func (m databasetoolsconnection) GetLifecycleDetails() *string { - return m.LifecycleDetails -} - -//GetDefinedTags returns DefinedTags -func (m databasetoolsconnection) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - -//GetFreeformTags returns FreeformTags -func (m databasetoolsconnection) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetSystemTags returns SystemTags -func (m databasetoolsconnection) GetSystemTags() map[string]map[string]interface{} { - return m.SystemTags -} - func (m databasetoolsconnection) String() string { return common.PointerString(m) } diff --git a/databasetools/database_tools_connection_collection.go b/databasetools/database_tools_connection_collection.go index b37b1b110e..e86b5339de 100644 --- a/databasetools/database_tools_connection_collection.go +++ b/databasetools/database_tools_connection_collection.go @@ -62,6 +62,5 @@ func (m *DatabaseToolsConnectionCollection) UnmarshalJSON(data []byte) (e error) m.Items[i] = nil } } - return } diff --git a/databasetools/database_tools_connection_my_sql.go b/databasetools/database_tools_connection_my_sql.go index 6c7144cf7e..eae6e3643f 100644 --- a/databasetools/database_tools_connection_my_sql.go +++ b/databasetools/database_tools_connection_my_sql.go @@ -210,10 +210,7 @@ func (m *DatabaseToolsConnectionMySql) UnmarshalJSON(data []byte) (e error) { m.AdvancedProperties = model.AdvancedProperties m.KeyStores = make([]DatabaseToolsKeyStoreMySql, len(model.KeyStores)) - for i, n := range model.KeyStores { - m.KeyStores[i] = n - } - + copy(m.KeyStores, model.KeyStores) m.PrivateEndpointId = model.PrivateEndpointId m.Id = model.Id diff --git a/databasetools/database_tools_connection_my_sql_summary.go b/databasetools/database_tools_connection_my_sql_summary.go index c91f477548..7e05e631f3 100644 --- a/databasetools/database_tools_connection_my_sql_summary.go +++ b/databasetools/database_tools_connection_my_sql_summary.go @@ -210,10 +210,7 @@ func (m *DatabaseToolsConnectionMySqlSummary) UnmarshalJSON(data []byte) (e erro m.AdvancedProperties = model.AdvancedProperties m.KeyStores = make([]DatabaseToolsKeyStoreMySqlSummary, len(model.KeyStores)) - for i, n := range model.KeyStores { - m.KeyStores[i] = n - } - + copy(m.KeyStores, model.KeyStores) m.PrivateEndpointId = model.PrivateEndpointId m.Id = model.Id diff --git a/databasetools/database_tools_connection_oracle_database.go b/databasetools/database_tools_connection_oracle_database.go index bfddbcb900..6fdd510772 100644 --- a/databasetools/database_tools_connection_oracle_database.go +++ b/databasetools/database_tools_connection_oracle_database.go @@ -210,10 +210,7 @@ func (m *DatabaseToolsConnectionOracleDatabase) UnmarshalJSON(data []byte) (e er m.AdvancedProperties = model.AdvancedProperties m.KeyStores = make([]DatabaseToolsKeyStore, len(model.KeyStores)) - for i, n := range model.KeyStores { - m.KeyStores[i] = n - } - + copy(m.KeyStores, model.KeyStores) m.PrivateEndpointId = model.PrivateEndpointId m.Id = model.Id diff --git a/databasetools/database_tools_connection_oracle_database_summary.go b/databasetools/database_tools_connection_oracle_database_summary.go index ae5d728daf..b6dc0d2396 100644 --- a/databasetools/database_tools_connection_oracle_database_summary.go +++ b/databasetools/database_tools_connection_oracle_database_summary.go @@ -210,10 +210,7 @@ func (m *DatabaseToolsConnectionOracleDatabaseSummary) UnmarshalJSON(data []byte m.AdvancedProperties = model.AdvancedProperties m.KeyStores = make([]DatabaseToolsKeyStoreSummary, len(model.KeyStores)) - for i, n := range model.KeyStores { - m.KeyStores[i] = n - } - + copy(m.KeyStores, model.KeyStores) m.PrivateEndpointId = model.PrivateEndpointId m.Id = model.Id diff --git a/databasetools/database_tools_connection_summary.go b/databasetools/database_tools_connection_summary.go index b87b48ffb7..613a3068d7 100644 --- a/databasetools/database_tools_connection_summary.go +++ b/databasetools/database_tools_connection_summary.go @@ -55,16 +55,16 @@ type DatabaseToolsConnectionSummary interface { type databasetoolsconnectionsummary struct { JsonData []byte + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` Id *string `mandatory:"true" json:"id"` DisplayName *string `mandatory:"true" json:"displayName"` CompartmentId *string `mandatory:"true" json:"compartmentId"` LifecycleState LifecycleStateEnum `mandatory:"true" json:"lifecycleState"` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` Type string `json:"type"` } @@ -117,56 +117,56 @@ func (m *databasetoolsconnectionsummary) UnmarshalPolymorphicJSON(data []byte) ( } } -//GetId returns Id +// GetLifecycleDetails returns LifecycleDetails +func (m databasetoolsconnectionsummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetDefinedTags returns DefinedTags +func (m databasetoolsconnectionsummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetFreeformTags returns FreeformTags +func (m databasetoolsconnectionsummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetSystemTags returns SystemTags +func (m databasetoolsconnectionsummary) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetId returns Id func (m databasetoolsconnectionsummary) GetId() *string { return m.Id } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m databasetoolsconnectionsummary) GetDisplayName() *string { return m.DisplayName } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m databasetoolsconnectionsummary) GetCompartmentId() *string { return m.CompartmentId } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m databasetoolsconnectionsummary) GetLifecycleState() LifecycleStateEnum { return m.LifecycleState } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m databasetoolsconnectionsummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m databasetoolsconnectionsummary) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleDetails returns LifecycleDetails -func (m databasetoolsconnectionsummary) GetLifecycleDetails() *string { - return m.LifecycleDetails -} - -//GetDefinedTags returns DefinedTags -func (m databasetoolsconnectionsummary) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - -//GetFreeformTags returns FreeformTags -func (m databasetoolsconnectionsummary) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetSystemTags returns SystemTags -func (m databasetoolsconnectionsummary) GetSystemTags() map[string]map[string]interface{} { - return m.SystemTags -} - func (m databasetoolsconnectionsummary) String() string { return common.PointerString(m) } diff --git a/databasetools/databasetools_client.go b/databasetools/databasetools_client.go index c8b91c1252..4e26e13fb7 100644 --- a/databasetools/databasetools_client.go +++ b/databasetools/databasetools_client.go @@ -80,7 +80,7 @@ func (client *DatabaseToolsClient) setConfigurationProvider(configProvider commo 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/databasetools/update_database_tools_connection_details.go b/databasetools/update_database_tools_connection_details.go index d4b9195d4c..c7539bc42e 100644 --- a/databasetools/update_database_tools_connection_details.go +++ b/databasetools/update_database_tools_connection_details.go @@ -81,17 +81,17 @@ func (m *updatedatabasetoolsconnectiondetails) UnmarshalPolymorphicJSON(data []b } } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m updatedatabasetoolsconnectiondetails) GetDisplayName() *string { return m.DisplayName } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updatedatabasetoolsconnectiondetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updatedatabasetoolsconnectiondetails) GetFreeformTags() map[string]string { return m.FreeformTags } diff --git a/databasetools/update_database_tools_connection_my_sql_details.go b/databasetools/update_database_tools_connection_my_sql_details.go index 92c911812c..6c1ec34cdb 100644 --- a/databasetools/update_database_tools_connection_my_sql_details.go +++ b/databasetools/update_database_tools_connection_my_sql_details.go @@ -141,10 +141,7 @@ func (m *UpdateDatabaseToolsConnectionMySqlDetails) UnmarshalJSON(data []byte) ( m.AdvancedProperties = model.AdvancedProperties m.KeyStores = make([]DatabaseToolsKeyStoreMySqlDetails, len(model.KeyStores)) - for i, n := range model.KeyStores { - m.KeyStores[i] = n - } - + copy(m.KeyStores, model.KeyStores) m.PrivateEndpointId = model.PrivateEndpointId return diff --git a/databasetools/update_database_tools_connection_oracle_database_details.go b/databasetools/update_database_tools_connection_oracle_database_details.go index 5d7a6ed68e..db5ca3a3fb 100644 --- a/databasetools/update_database_tools_connection_oracle_database_details.go +++ b/databasetools/update_database_tools_connection_oracle_database_details.go @@ -141,10 +141,7 @@ func (m *UpdateDatabaseToolsConnectionOracleDatabaseDetails) UnmarshalJSON(data m.AdvancedProperties = model.AdvancedProperties m.KeyStores = make([]DatabaseToolsKeyStoreDetails, len(model.KeyStores)) - for i, n := range model.KeyStores { - m.KeyStores[i] = n - } - + copy(m.KeyStores, model.KeyStores) m.PrivateEndpointId = model.PrivateEndpointId return diff --git a/databasetools/validate_database_tools_connection_result.go b/databasetools/validate_database_tools_connection_result.go index ceaac88783..20f55c9c3f 100644 --- a/databasetools/validate_database_tools_connection_result.go +++ b/databasetools/validate_database_tools_connection_result.go @@ -34,10 +34,10 @@ type ValidateDatabaseToolsConnectionResult interface { type validatedatabasetoolsconnectionresult struct { JsonData []byte - Code *string `mandatory:"true" json:"code"` - Message *string `mandatory:"true" json:"message"` Cause *string `mandatory:"false" json:"cause"` Action *string `mandatory:"false" json:"action"` + Code *string `mandatory:"true" json:"code"` + Message *string `mandatory:"true" json:"message"` Type string `json:"type"` } @@ -84,26 +84,26 @@ func (m *validatedatabasetoolsconnectionresult) UnmarshalPolymorphicJSON(data [] } } -//GetCode returns Code -func (m validatedatabasetoolsconnectionresult) GetCode() *string { - return m.Code -} - -//GetMessage returns Message -func (m validatedatabasetoolsconnectionresult) GetMessage() *string { - return m.Message -} - -//GetCause returns Cause +// GetCause returns Cause func (m validatedatabasetoolsconnectionresult) GetCause() *string { return m.Cause } -//GetAction returns Action +// GetAction returns Action func (m validatedatabasetoolsconnectionresult) GetAction() *string { return m.Action } +// GetCode returns Code +func (m validatedatabasetoolsconnectionresult) GetCode() *string { + return m.Code +} + +// GetMessage returns Message +func (m validatedatabasetoolsconnectionresult) GetMessage() *string { + return m.Message +} + func (m validatedatabasetoolsconnectionresult) String() string { return common.PointerString(m) } diff --git a/datacatalog/datacatalog_client.go b/datacatalog/datacatalog_client.go index eccc9448bc..edb7aba934 100644 --- a/datacatalog/datacatalog_client.go +++ b/datacatalog/datacatalog_client.go @@ -81,7 +81,7 @@ func (client *DataCatalogClient) setConfigurationProvider(configProvider common. 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/dataflow/dataflow_client.go b/dataflow/dataflow_client.go index 00e88de1d2..dc1187b507 100644 --- a/dataflow/dataflow_client.go +++ b/dataflow/dataflow_client.go @@ -80,7 +80,7 @@ func (client *DataFlowClient) setConfigurationProvider(configProvider common.Con 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/dataflow/statement_output.go b/dataflow/statement_output.go index a7525ee6f3..cd18a907d8 100644 --- a/dataflow/statement_output.go +++ b/dataflow/statement_output.go @@ -84,10 +84,7 @@ func (m *StatementOutput) UnmarshalJSON(data []byte) (e error) { m.ErrorValue = model.ErrorValue m.Traceback = make([]string, len(model.Traceback)) - for i, n := range model.Traceback { - m.Traceback[i] = n - } - + copy(m.Traceback, model.Traceback) return } diff --git a/dataintegration/abstract_call_attribute.go b/dataintegration/abstract_call_attribute.go index 8946d6d713..bd25b24306 100644 --- a/dataintegration/abstract_call_attribute.go +++ b/dataintegration/abstract_call_attribute.go @@ -69,7 +69,7 @@ func (m *abstractcallattribute) UnmarshalPolymorphicJSON(data []byte) (interface } } -//GetFetchSize returns FetchSize +// GetFetchSize returns FetchSize func (m abstractcallattribute) GetFetchSize() *int { return m.FetchSize } diff --git a/dataintegration/abstract_data_operation_config.go b/dataintegration/abstract_data_operation_config.go index e87adf88d6..e49b280b2b 100644 --- a/dataintegration/abstract_data_operation_config.go +++ b/dataintegration/abstract_data_operation_config.go @@ -78,17 +78,17 @@ func (m *abstractdataoperationconfig) UnmarshalPolymorphicJSON(data []byte) (int } } -//GetMetadataConfigProperties returns MetadataConfigProperties +// GetMetadataConfigProperties returns MetadataConfigProperties func (m abstractdataoperationconfig) GetMetadataConfigProperties() map[string]string { return m.MetadataConfigProperties } -//GetDerivedAttributes returns DerivedAttributes +// GetDerivedAttributes returns DerivedAttributes func (m abstractdataoperationconfig) GetDerivedAttributes() map[string]string { return m.DerivedAttributes } -//GetCallAttribute returns CallAttribute +// GetCallAttribute returns CallAttribute func (m abstractdataoperationconfig) GetCallAttribute() *BipCallAttribute { return m.CallAttribute } diff --git a/dataintegration/abstract_format_attribute.go b/dataintegration/abstract_format_attribute.go index d1a1cccf9d..2b375efcac 100644 --- a/dataintegration/abstract_format_attribute.go +++ b/dataintegration/abstract_format_attribute.go @@ -77,7 +77,7 @@ func (m *abstractformatattribute) UnmarshalPolymorphicJSON(data []byte) (interfa } } -//GetIsFilePattern returns IsFilePattern +// GetIsFilePattern returns IsFilePattern func (m abstractformatattribute) GetIsFilePattern() *bool { return m.IsFilePattern } diff --git a/dataintegration/abstract_frequency_details.go b/dataintegration/abstract_frequency_details.go index 51c2c906f0..d793256f99 100644 --- a/dataintegration/abstract_frequency_details.go +++ b/dataintegration/abstract_frequency_details.go @@ -85,7 +85,7 @@ func (m *abstractfrequencydetails) UnmarshalPolymorphicJSON(data []byte) (interf } } -//GetFrequency returns Frequency +// GetFrequency returns Frequency func (m abstractfrequencydetails) GetFrequency() AbstractFrequencyDetailsFrequencyEnum { return m.Frequency } diff --git a/dataintegration/aggregator.go b/dataintegration/aggregator.go index b032afbac0..29eed710a0 100644 --- a/dataintegration/aggregator.go +++ b/dataintegration/aggregator.go @@ -185,10 +185,7 @@ func (m *Aggregator) UnmarshalJSON(data []byte) (e error) { m.ObjectVersion = model.ObjectVersion m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]TypedObject, len(model.OutputPorts)) for i, n := range model.OutputPorts { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -201,16 +198,12 @@ func (m *Aggregator) UnmarshalJSON(data []byte) (e error) { m.OutputPorts[i] = nil } } - m.ObjectStatus = model.ObjectStatus m.Identifier = model.Identifier m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues m.GroupByColumns = model.GroupByColumns diff --git a/dataintegration/auth_config.go b/dataintegration/auth_config.go index a8c1d3a264..4bab3489b3 100644 --- a/dataintegration/auth_config.go +++ b/dataintegration/auth_config.go @@ -74,17 +74,17 @@ func (m *authconfig) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) } } -//GetKey returns Key +// GetKey returns Key func (m authconfig) GetKey() *string { return m.Key } -//GetModelVersion returns ModelVersion +// GetModelVersion returns ModelVersion func (m authconfig) GetModelVersion() *string { return m.ModelVersion } -//GetParentRef returns ParentRef +// GetParentRef returns ParentRef func (m authconfig) GetParentRef() *ParentReference { return m.ParentRef } diff --git a/dataintegration/base_type.go b/dataintegration/base_type.go index 42ad01f489..3a93c67e49 100644 --- a/dataintegration/base_type.go +++ b/dataintegration/base_type.go @@ -121,32 +121,32 @@ func (m *basetype) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetKey returns Key +// GetKey returns Key func (m basetype) GetKey() *string { return m.Key } -//GetModelVersion returns ModelVersion +// GetModelVersion returns ModelVersion func (m basetype) GetModelVersion() *string { return m.ModelVersion } -//GetParentRef returns ParentRef +// GetParentRef returns ParentRef func (m basetype) GetParentRef() *ParentReference { return m.ParentRef } -//GetName returns Name +// GetName returns Name func (m basetype) GetName() *string { return m.Name } -//GetObjectStatus returns ObjectStatus +// GetObjectStatus returns ObjectStatus func (m basetype) GetObjectStatus() *int { return m.ObjectStatus } -//GetDescription returns Description +// GetDescription returns Description func (m basetype) GetDescription() *string { return m.Description } diff --git a/dataintegration/composite_field_map.go b/dataintegration/composite_field_map.go index f76ab3719e..92b08e086b 100644 --- a/dataintegration/composite_field_map.go +++ b/dataintegration/composite_field_map.go @@ -115,6 +115,5 @@ func (m *CompositeFieldMap) UnmarshalJSON(data []byte) (e error) { m.FieldMaps[i] = nil } } - return } diff --git a/dataintegration/composite_type.go b/dataintegration/composite_type.go index 25f3847987..2509198f48 100644 --- a/dataintegration/composite_type.go +++ b/dataintegration/composite_type.go @@ -149,7 +149,6 @@ func (m *CompositeType) UnmarshalJSON(data []byte) (e error) { m.Elements[i] = nil } } - m.ConfigDefinition = model.ConfigDefinition return diff --git a/dataintegration/conditional_composite_field_map.go b/dataintegration/conditional_composite_field_map.go index 0060f44f46..8f01a88477 100644 --- a/dataintegration/conditional_composite_field_map.go +++ b/dataintegration/conditional_composite_field_map.go @@ -109,7 +109,6 @@ func (m *ConditionalCompositeFieldMap) UnmarshalJSON(data []byte) (e error) { m.FieldMapScope[i] = nil } } - m.Key = model.Key m.ModelVersion = model.ModelVersion @@ -132,6 +131,5 @@ func (m *ConditionalCompositeFieldMap) UnmarshalJSON(data []byte) (e error) { m.FieldMaps[i] = nil } } - return } diff --git a/dataintegration/conditional_output_port.go b/dataintegration/conditional_output_port.go index 775c0ae27d..55b6863a32 100644 --- a/dataintegration/conditional_output_port.go +++ b/dataintegration/conditional_output_port.go @@ -163,7 +163,6 @@ func (m *ConditionalOutputPort) UnmarshalJSON(data []byte) (e error) { m.Fields[i] = nil } } - m.SplitCondition = model.SplitCondition return diff --git a/dataintegration/connection.go b/dataintegration/connection.go index 56eb23daa7..d8f0d8a633 100644 --- a/dataintegration/connection.go +++ b/dataintegration/connection.go @@ -186,67 +186,67 @@ func (m *connection) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) } } -//GetKey returns Key +// GetKey returns Key func (m connection) GetKey() *string { return m.Key } -//GetModelVersion returns ModelVersion +// GetModelVersion returns ModelVersion func (m connection) GetModelVersion() *string { return m.ModelVersion } -//GetParentRef returns ParentRef +// GetParentRef returns ParentRef func (m connection) GetParentRef() *ParentReference { return m.ParentRef } -//GetName returns Name +// GetName returns Name func (m connection) GetName() *string { return m.Name } -//GetDescription returns Description +// GetDescription returns Description func (m connection) GetDescription() *string { return m.Description } -//GetObjectVersion returns ObjectVersion +// GetObjectVersion returns ObjectVersion func (m connection) GetObjectVersion() *int { return m.ObjectVersion } -//GetObjectStatus returns ObjectStatus +// GetObjectStatus returns ObjectStatus func (m connection) GetObjectStatus() *int { return m.ObjectStatus } -//GetIdentifier returns Identifier +// GetIdentifier returns Identifier func (m connection) GetIdentifier() *string { return m.Identifier } -//GetPrimarySchema returns PrimarySchema +// GetPrimarySchema returns PrimarySchema func (m connection) GetPrimarySchema() *Schema { return m.PrimarySchema } -//GetConnectionProperties returns ConnectionProperties +// GetConnectionProperties returns ConnectionProperties func (m connection) GetConnectionProperties() []ConnectionProperty { return m.ConnectionProperties } -//GetIsDefault returns IsDefault +// GetIsDefault returns IsDefault func (m connection) GetIsDefault() *bool { return m.IsDefault } -//GetMetadata returns Metadata +// GetMetadata returns Metadata func (m connection) GetMetadata() *ObjectMetadata { return m.Metadata } -//GetKeyMap returns KeyMap +// GetKeyMap returns KeyMap func (m connection) GetKeyMap() map[string]string { return m.KeyMap } diff --git a/dataintegration/connection_details.go b/dataintegration/connection_details.go index 94f42cc821..f6ee895637 100644 --- a/dataintegration/connection_details.go +++ b/dataintegration/connection_details.go @@ -181,62 +181,62 @@ func (m *connectiondetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetKey returns Key +// GetKey returns Key func (m connectiondetails) GetKey() *string { return m.Key } -//GetModelVersion returns ModelVersion +// GetModelVersion returns ModelVersion func (m connectiondetails) GetModelVersion() *string { return m.ModelVersion } -//GetParentRef returns ParentRef +// GetParentRef returns ParentRef func (m connectiondetails) GetParentRef() *ParentReference { return m.ParentRef } -//GetName returns Name +// GetName returns Name func (m connectiondetails) GetName() *string { return m.Name } -//GetDescription returns Description +// GetDescription returns Description func (m connectiondetails) GetDescription() *string { return m.Description } -//GetObjectVersion returns ObjectVersion +// GetObjectVersion returns ObjectVersion func (m connectiondetails) GetObjectVersion() *int { return m.ObjectVersion } -//GetObjectStatus returns ObjectStatus +// GetObjectStatus returns ObjectStatus func (m connectiondetails) GetObjectStatus() *int { return m.ObjectStatus } -//GetIdentifier returns Identifier +// GetIdentifier returns Identifier func (m connectiondetails) GetIdentifier() *string { return m.Identifier } -//GetPrimarySchema returns PrimarySchema +// GetPrimarySchema returns PrimarySchema func (m connectiondetails) GetPrimarySchema() *Schema { return m.PrimarySchema } -//GetConnectionProperties returns ConnectionProperties +// GetConnectionProperties returns ConnectionProperties func (m connectiondetails) GetConnectionProperties() []ConnectionProperty { return m.ConnectionProperties } -//GetIsDefault returns IsDefault +// GetIsDefault returns IsDefault func (m connectiondetails) GetIsDefault() *bool { return m.IsDefault } -//GetMetadata returns Metadata +// GetMetadata returns Metadata func (m connectiondetails) GetMetadata() *ObjectMetadata { return m.Metadata } diff --git a/dataintegration/connection_summary.go b/dataintegration/connection_summary.go index db46fdb190..184ec7e8c9 100644 --- a/dataintegration/connection_summary.go +++ b/dataintegration/connection_summary.go @@ -186,67 +186,67 @@ func (m *connectionsummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetKey returns Key +// GetKey returns Key func (m connectionsummary) GetKey() *string { return m.Key } -//GetModelVersion returns ModelVersion +// GetModelVersion returns ModelVersion func (m connectionsummary) GetModelVersion() *string { return m.ModelVersion } -//GetParentRef returns ParentRef +// GetParentRef returns ParentRef func (m connectionsummary) GetParentRef() *ParentReference { return m.ParentRef } -//GetName returns Name +// GetName returns Name func (m connectionsummary) GetName() *string { return m.Name } -//GetDescription returns Description +// GetDescription returns Description func (m connectionsummary) GetDescription() *string { return m.Description } -//GetObjectVersion returns ObjectVersion +// GetObjectVersion returns ObjectVersion func (m connectionsummary) GetObjectVersion() *int { return m.ObjectVersion } -//GetObjectStatus returns ObjectStatus +// GetObjectStatus returns ObjectStatus func (m connectionsummary) GetObjectStatus() *int { return m.ObjectStatus } -//GetIdentifier returns Identifier +// GetIdentifier returns Identifier func (m connectionsummary) GetIdentifier() *string { return m.Identifier } -//GetPrimarySchema returns PrimarySchema +// GetPrimarySchema returns PrimarySchema func (m connectionsummary) GetPrimarySchema() *Schema { return m.PrimarySchema } -//GetConnectionProperties returns ConnectionProperties +// GetConnectionProperties returns ConnectionProperties func (m connectionsummary) GetConnectionProperties() []ConnectionProperty { return m.ConnectionProperties } -//GetIsDefault returns IsDefault +// GetIsDefault returns IsDefault func (m connectionsummary) GetIsDefault() *bool { return m.IsDefault } -//GetMetadata returns Metadata +// GetMetadata returns Metadata func (m connectionsummary) GetMetadata() *ObjectMetadata { return m.Metadata } -//GetKeyMap returns KeyMap +// GetKeyMap returns KeyMap func (m connectionsummary) GetKeyMap() map[string]string { return m.KeyMap } diff --git a/dataintegration/connection_summary_collection.go b/dataintegration/connection_summary_collection.go index 53e3c15c2f..58f5c046e4 100644 --- a/dataintegration/connection_summary_collection.go +++ b/dataintegration/connection_summary_collection.go @@ -62,6 +62,5 @@ func (m *ConnectionSummaryCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/dataintegration/create_connection_details.go b/dataintegration/create_connection_details.go index 06c09853aa..6eb593d421 100644 --- a/dataintegration/create_connection_details.go +++ b/dataintegration/create_connection_details.go @@ -47,8 +47,6 @@ type CreateConnectionDetails interface { type createconnectiondetails struct { JsonData []byte - Name *string `mandatory:"true" json:"name"` - Identifier *string `mandatory:"true" json:"identifier"` Key *string `mandatory:"false" json:"key"` ModelVersion *string `mandatory:"false" json:"modelVersion"` ParentRef *ParentReference `mandatory:"false" json:"parentRef"` @@ -56,6 +54,8 @@ type createconnectiondetails struct { ObjectStatus *int `mandatory:"false" json:"objectStatus"` ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + Name *string `mandatory:"true" json:"name"` + Identifier *string `mandatory:"true" json:"identifier"` ModelType string `json:"modelType"` } @@ -167,51 +167,51 @@ func (m *createconnectiondetails) UnmarshalPolymorphicJSON(data []byte) (interfa } } -//GetName returns Name -func (m createconnectiondetails) GetName() *string { - return m.Name -} - -//GetIdentifier returns Identifier -func (m createconnectiondetails) GetIdentifier() *string { - return m.Identifier -} - -//GetKey returns Key +// GetKey returns Key func (m createconnectiondetails) GetKey() *string { return m.Key } -//GetModelVersion returns ModelVersion +// GetModelVersion returns ModelVersion func (m createconnectiondetails) GetModelVersion() *string { return m.ModelVersion } -//GetParentRef returns ParentRef +// GetParentRef returns ParentRef func (m createconnectiondetails) GetParentRef() *ParentReference { return m.ParentRef } -//GetDescription returns Description +// GetDescription returns Description func (m createconnectiondetails) GetDescription() *string { return m.Description } -//GetObjectStatus returns ObjectStatus +// GetObjectStatus returns ObjectStatus func (m createconnectiondetails) GetObjectStatus() *int { return m.ObjectStatus } -//GetConnectionProperties returns ConnectionProperties +// GetConnectionProperties returns ConnectionProperties func (m createconnectiondetails) GetConnectionProperties() []ConnectionProperty { return m.ConnectionProperties } -//GetRegistryMetadata returns RegistryMetadata +// GetRegistryMetadata returns RegistryMetadata func (m createconnectiondetails) GetRegistryMetadata() *RegistryMetadata { return m.RegistryMetadata } +// GetName returns Name +func (m createconnectiondetails) GetName() *string { + return m.Name +} + +// GetIdentifier returns Identifier +func (m createconnectiondetails) GetIdentifier() *string { + return m.Identifier +} + func (m createconnectiondetails) String() string { return common.PointerString(m) } diff --git a/dataintegration/create_data_asset_details.go b/dataintegration/create_data_asset_details.go index 19eaa8ed61..62fe3a506c 100644 --- a/dataintegration/create_data_asset_details.go +++ b/dataintegration/create_data_asset_details.go @@ -48,8 +48,6 @@ type CreateDataAssetDetails interface { type createdataassetdetails struct { JsonData []byte - Name *string `mandatory:"true" json:"name"` - Identifier *string `mandatory:"true" json:"identifier"` Key *string `mandatory:"false" json:"key"` ModelVersion *string `mandatory:"false" json:"modelVersion"` Description *string `mandatory:"false" json:"description"` @@ -57,6 +55,8 @@ type createdataassetdetails struct { ExternalKey *string `mandatory:"false" json:"externalKey"` AssetProperties map[string]string `mandatory:"false" json:"assetProperties"` RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + Name *string `mandatory:"true" json:"name"` + Identifier *string `mandatory:"true" json:"identifier"` ModelType string `json:"modelType"` } @@ -160,51 +160,51 @@ func (m *createdataassetdetails) UnmarshalPolymorphicJSON(data []byte) (interfac } } -//GetName returns Name -func (m createdataassetdetails) GetName() *string { - return m.Name -} - -//GetIdentifier returns Identifier -func (m createdataassetdetails) GetIdentifier() *string { - return m.Identifier -} - -//GetKey returns Key +// GetKey returns Key func (m createdataassetdetails) GetKey() *string { return m.Key } -//GetModelVersion returns ModelVersion +// GetModelVersion returns ModelVersion func (m createdataassetdetails) GetModelVersion() *string { return m.ModelVersion } -//GetDescription returns Description +// GetDescription returns Description func (m createdataassetdetails) GetDescription() *string { return m.Description } -//GetObjectStatus returns ObjectStatus +// GetObjectStatus returns ObjectStatus func (m createdataassetdetails) GetObjectStatus() *int { return m.ObjectStatus } -//GetExternalKey returns ExternalKey +// GetExternalKey returns ExternalKey func (m createdataassetdetails) GetExternalKey() *string { return m.ExternalKey } -//GetAssetProperties returns AssetProperties +// GetAssetProperties returns AssetProperties func (m createdataassetdetails) GetAssetProperties() map[string]string { return m.AssetProperties } -//GetRegistryMetadata returns RegistryMetadata +// GetRegistryMetadata returns RegistryMetadata func (m createdataassetdetails) GetRegistryMetadata() *RegistryMetadata { return m.RegistryMetadata } +// GetName returns Name +func (m createdataassetdetails) GetName() *string { + return m.Name +} + +// GetIdentifier returns Identifier +func (m createdataassetdetails) GetIdentifier() *string { + return m.Identifier +} + func (m createdataassetdetails) String() string { return common.PointerString(m) } diff --git a/dataintegration/create_entity_shape_from_file.go b/dataintegration/create_entity_shape_from_file.go index 090ebebd03..ecd8bbb52a 100644 --- a/dataintegration/create_entity_shape_from_file.go +++ b/dataintegration/create_entity_shape_from_file.go @@ -167,12 +167,8 @@ func (m *CreateEntityShapeFromFile) UnmarshalJSON(data []byte) (e error) { m.UniqueKeys[i] = nil } } - m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) - for i, n := range model.ForeignKeys { - m.ForeignKeys[i] = n - } - + copy(m.ForeignKeys, model.ForeignKeys) m.ResourceName = model.ResourceName m.DataFormat = model.DataFormat diff --git a/dataintegration/create_entity_shape_from_object.go b/dataintegration/create_entity_shape_from_object.go index 82317d528d..b5fc208a89 100644 --- a/dataintegration/create_entity_shape_from_object.go +++ b/dataintegration/create_entity_shape_from_object.go @@ -144,12 +144,8 @@ func (m *CreateEntityShapeFromObject) UnmarshalJSON(data []byte) (e error) { m.UniqueKeys[i] = nil } } - m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) - for i, n := range model.ForeignKeys { - m.ForeignKeys[i] = n - } - + copy(m.ForeignKeys, model.ForeignKeys) m.ResourceName = model.ResourceName m.DataFormat = model.DataFormat diff --git a/dataintegration/create_entity_shape_from_sql.go b/dataintegration/create_entity_shape_from_sql.go index a6fe82dbc8..cfe46e550c 100644 --- a/dataintegration/create_entity_shape_from_sql.go +++ b/dataintegration/create_entity_shape_from_sql.go @@ -166,12 +166,8 @@ func (m *CreateEntityShapeFromSql) UnmarshalJSON(data []byte) (e error) { m.UniqueKeys[i] = nil } } - m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) - for i, n := range model.ForeignKeys { - m.ForeignKeys[i] = n - } - + copy(m.ForeignKeys, model.ForeignKeys) m.ResourceName = model.ResourceName m.DataFormat = model.DataFormat diff --git a/dataintegration/create_task_details.go b/dataintegration/create_task_details.go index d7a6281350..9f4d2696f4 100644 --- a/dataintegration/create_task_details.go +++ b/dataintegration/create_task_details.go @@ -57,9 +57,6 @@ type CreateTaskDetails interface { type createtaskdetails struct { JsonData []byte - Name *string `mandatory:"true" json:"name"` - Identifier *string `mandatory:"true" json:"identifier"` - RegistryMetadata *RegistryMetadata `mandatory:"true" json:"registryMetadata"` Key *string `mandatory:"false" json:"key"` ModelVersion *string `mandatory:"false" json:"modelVersion"` ParentRef *ParentReference `mandatory:"false" json:"parentRef"` @@ -70,6 +67,9 @@ type createtaskdetails struct { Parameters []Parameter `mandatory:"false" json:"parameters"` OpConfigValues *ConfigValues `mandatory:"false" json:"opConfigValues"` ConfigProviderDelegate *CreateConfigProvider `mandatory:"false" json:"configProviderDelegate"` + Name *string `mandatory:"true" json:"name"` + Identifier *string `mandatory:"true" json:"identifier"` + RegistryMetadata *RegistryMetadata `mandatory:"true" json:"registryMetadata"` ModelType string `json:"modelType"` } @@ -141,71 +141,71 @@ func (m *createtaskdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetName returns Name -func (m createtaskdetails) GetName() *string { - return m.Name -} - -//GetIdentifier returns Identifier -func (m createtaskdetails) GetIdentifier() *string { - return m.Identifier -} - -//GetRegistryMetadata returns RegistryMetadata -func (m createtaskdetails) GetRegistryMetadata() *RegistryMetadata { - return m.RegistryMetadata -} - -//GetKey returns Key +// GetKey returns Key func (m createtaskdetails) GetKey() *string { return m.Key } -//GetModelVersion returns ModelVersion +// GetModelVersion returns ModelVersion func (m createtaskdetails) GetModelVersion() *string { return m.ModelVersion } -//GetParentRef returns ParentRef +// GetParentRef returns ParentRef func (m createtaskdetails) GetParentRef() *ParentReference { return m.ParentRef } -//GetDescription returns Description +// GetDescription returns Description func (m createtaskdetails) GetDescription() *string { return m.Description } -//GetObjectStatus returns ObjectStatus +// GetObjectStatus returns ObjectStatus func (m createtaskdetails) GetObjectStatus() *int { return m.ObjectStatus } -//GetInputPorts returns InputPorts +// GetInputPorts returns InputPorts func (m createtaskdetails) GetInputPorts() []InputPort { return m.InputPorts } -//GetOutputPorts returns OutputPorts +// GetOutputPorts returns OutputPorts func (m createtaskdetails) GetOutputPorts() []OutputPort { return m.OutputPorts } -//GetParameters returns Parameters +// GetParameters returns Parameters func (m createtaskdetails) GetParameters() []Parameter { return m.Parameters } -//GetOpConfigValues returns OpConfigValues +// GetOpConfigValues returns OpConfigValues func (m createtaskdetails) GetOpConfigValues() *ConfigValues { return m.OpConfigValues } -//GetConfigProviderDelegate returns ConfigProviderDelegate +// GetConfigProviderDelegate returns ConfigProviderDelegate func (m createtaskdetails) GetConfigProviderDelegate() *CreateConfigProvider { return m.ConfigProviderDelegate } +// GetName returns Name +func (m createtaskdetails) GetName() *string { + return m.Name +} + +// GetIdentifier returns Identifier +func (m createtaskdetails) GetIdentifier() *string { + return m.Identifier +} + +// GetRegistryMetadata returns RegistryMetadata +func (m createtaskdetails) GetRegistryMetadata() *RegistryMetadata { + return m.RegistryMetadata +} + func (m createtaskdetails) String() string { return common.PointerString(m) } diff --git a/dataintegration/create_task_from_rest_task.go b/dataintegration/create_task_from_rest_task.go index 008aaa82fc..dbf2fca182 100644 --- a/dataintegration/create_task_from_rest_task.go +++ b/dataintegration/create_task_from_rest_task.go @@ -238,20 +238,11 @@ func (m *CreateTaskFromRestTask) UnmarshalJSON(data []byte) (e error) { m.ObjectStatus = model.ObjectStatus m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]OutputPort, len(model.OutputPorts)) - for i, n := range model.OutputPorts { - m.OutputPorts[i] = n - } - + copy(m.OutputPorts, model.OutputPorts) m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues m.ConfigProviderDelegate = model.ConfigProviderDelegate @@ -289,10 +280,7 @@ func (m *CreateTaskFromRestTask) UnmarshalJSON(data []byte) (e error) { m.PollRestCallConfig = model.PollRestCallConfig m.TypedExpressions = make([]TypedExpression, len(model.TypedExpressions)) - for i, n := range model.TypedExpressions { - m.TypedExpressions[i] = n - } - + copy(m.TypedExpressions, model.TypedExpressions) m.Name = model.Name m.Identifier = model.Identifier diff --git a/dataintegration/create_task_validation_details.go b/dataintegration/create_task_validation_details.go index a65f184fb2..90138dcaad 100644 --- a/dataintegration/create_task_validation_details.go +++ b/dataintegration/create_task_validation_details.go @@ -134,72 +134,72 @@ func (m *createtaskvalidationdetails) UnmarshalPolymorphicJSON(data []byte) (int } } -//GetKey returns Key +// GetKey returns Key func (m createtaskvalidationdetails) GetKey() *string { return m.Key } -//GetModelVersion returns ModelVersion +// GetModelVersion returns ModelVersion func (m createtaskvalidationdetails) GetModelVersion() *string { return m.ModelVersion } -//GetParentRef returns ParentRef +// GetParentRef returns ParentRef func (m createtaskvalidationdetails) GetParentRef() *ParentReference { return m.ParentRef } -//GetName returns Name +// GetName returns Name func (m createtaskvalidationdetails) GetName() *string { return m.Name } -//GetDescription returns Description +// GetDescription returns Description func (m createtaskvalidationdetails) GetDescription() *string { return m.Description } -//GetObjectVersion returns ObjectVersion +// GetObjectVersion returns ObjectVersion func (m createtaskvalidationdetails) GetObjectVersion() *int { return m.ObjectVersion } -//GetObjectStatus returns ObjectStatus +// GetObjectStatus returns ObjectStatus func (m createtaskvalidationdetails) GetObjectStatus() *int { return m.ObjectStatus } -//GetIdentifier returns Identifier +// GetIdentifier returns Identifier func (m createtaskvalidationdetails) GetIdentifier() *string { return m.Identifier } -//GetInputPorts returns InputPorts +// GetInputPorts returns InputPorts func (m createtaskvalidationdetails) GetInputPorts() []InputPort { return m.InputPorts } -//GetOutputPorts returns OutputPorts +// GetOutputPorts returns OutputPorts func (m createtaskvalidationdetails) GetOutputPorts() []OutputPort { return m.OutputPorts } -//GetParameters returns Parameters +// GetParameters returns Parameters func (m createtaskvalidationdetails) GetParameters() []Parameter { return m.Parameters } -//GetOpConfigValues returns OpConfigValues +// GetOpConfigValues returns OpConfigValues func (m createtaskvalidationdetails) GetOpConfigValues() *ConfigValues { return m.OpConfigValues } -//GetConfigProviderDelegate returns ConfigProviderDelegate +// GetConfigProviderDelegate returns ConfigProviderDelegate func (m createtaskvalidationdetails) GetConfigProviderDelegate() *ConfigProvider { return m.ConfigProviderDelegate } -//GetMetadata returns Metadata +// GetMetadata returns Metadata func (m createtaskvalidationdetails) GetMetadata() *ObjectMetadata { return m.Metadata } diff --git a/dataintegration/data_asset.go b/dataintegration/data_asset.go index 6e2b528977..46dca9a948 100644 --- a/dataintegration/data_asset.go +++ b/dataintegration/data_asset.go @@ -178,67 +178,67 @@ func (m *dataasset) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetKey returns Key +// GetKey returns Key func (m dataasset) GetKey() *string { return m.Key } -//GetModelVersion returns ModelVersion +// GetModelVersion returns ModelVersion func (m dataasset) GetModelVersion() *string { return m.ModelVersion } -//GetName returns Name +// GetName returns Name func (m dataasset) GetName() *string { return m.Name } -//GetDescription returns Description +// GetDescription returns Description func (m dataasset) GetDescription() *string { return m.Description } -//GetObjectStatus returns ObjectStatus +// GetObjectStatus returns ObjectStatus func (m dataasset) GetObjectStatus() *int { return m.ObjectStatus } -//GetIdentifier returns Identifier +// GetIdentifier returns Identifier func (m dataasset) GetIdentifier() *string { return m.Identifier } -//GetExternalKey returns ExternalKey +// GetExternalKey returns ExternalKey func (m dataasset) GetExternalKey() *string { return m.ExternalKey } -//GetAssetProperties returns AssetProperties +// GetAssetProperties returns AssetProperties func (m dataasset) GetAssetProperties() map[string]string { return m.AssetProperties } -//GetNativeTypeSystem returns NativeTypeSystem +// GetNativeTypeSystem returns NativeTypeSystem func (m dataasset) GetNativeTypeSystem() *TypeSystem { return m.NativeTypeSystem } -//GetObjectVersion returns ObjectVersion +// GetObjectVersion returns ObjectVersion func (m dataasset) GetObjectVersion() *int { return m.ObjectVersion } -//GetParentRef returns ParentRef +// GetParentRef returns ParentRef func (m dataasset) GetParentRef() *ParentReference { return m.ParentRef } -//GetMetadata returns Metadata +// GetMetadata returns Metadata func (m dataasset) GetMetadata() *ObjectMetadata { return m.Metadata } -//GetKeyMap returns KeyMap +// GetKeyMap returns KeyMap func (m dataasset) GetKeyMap() map[string]string { return m.KeyMap } diff --git a/dataintegration/data_asset_from_adwc_details.go b/dataintegration/data_asset_from_adwc_details.go index 6df8523cee..c567e68c16 100644 --- a/dataintegration/data_asset_from_adwc_details.go +++ b/dataintegration/data_asset_from_adwc_details.go @@ -227,10 +227,7 @@ func (m *DataAssetFromAdwcDetails) UnmarshalJSON(data []byte) (e error) { m.ServiceName = model.ServiceName m.ServiceNames = make([]string, len(model.ServiceNames)) - for i, n := range model.ServiceNames { - m.ServiceNames[i] = n - } - + copy(m.ServiceNames, model.ServiceNames) m.DriverClass = model.DriverClass m.DefaultConnection = model.DefaultConnection diff --git a/dataintegration/data_asset_from_atp_details.go b/dataintegration/data_asset_from_atp_details.go index 15b86c039b..803a7cfd95 100644 --- a/dataintegration/data_asset_from_atp_details.go +++ b/dataintegration/data_asset_from_atp_details.go @@ -227,10 +227,7 @@ func (m *DataAssetFromAtpDetails) UnmarshalJSON(data []byte) (e error) { m.ServiceName = model.ServiceName m.ServiceNames = make([]string, len(model.ServiceNames)) - for i, n := range model.ServiceNames { - m.ServiceNames[i] = n - } - + copy(m.ServiceNames, model.ServiceNames) m.DriverClass = model.DriverClass m.DefaultConnection = model.DefaultConnection diff --git a/dataintegration/data_asset_summary.go b/dataintegration/data_asset_summary.go index 5c46e075e7..be3b4a0567 100644 --- a/dataintegration/data_asset_summary.go +++ b/dataintegration/data_asset_summary.go @@ -173,62 +173,62 @@ func (m *dataassetsummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, e } } -//GetKey returns Key +// GetKey returns Key func (m dataassetsummary) GetKey() *string { return m.Key } -//GetModelVersion returns ModelVersion +// GetModelVersion returns ModelVersion func (m dataassetsummary) GetModelVersion() *string { return m.ModelVersion } -//GetName returns Name +// GetName returns Name func (m dataassetsummary) GetName() *string { return m.Name } -//GetDescription returns Description +// GetDescription returns Description func (m dataassetsummary) GetDescription() *string { return m.Description } -//GetObjectStatus returns ObjectStatus +// GetObjectStatus returns ObjectStatus func (m dataassetsummary) GetObjectStatus() *int { return m.ObjectStatus } -//GetIdentifier returns Identifier +// GetIdentifier returns Identifier func (m dataassetsummary) GetIdentifier() *string { return m.Identifier } -//GetExternalKey returns ExternalKey +// GetExternalKey returns ExternalKey func (m dataassetsummary) GetExternalKey() *string { return m.ExternalKey } -//GetAssetProperties returns AssetProperties +// GetAssetProperties returns AssetProperties func (m dataassetsummary) GetAssetProperties() map[string]string { return m.AssetProperties } -//GetNativeTypeSystem returns NativeTypeSystem +// GetNativeTypeSystem returns NativeTypeSystem func (m dataassetsummary) GetNativeTypeSystem() *TypeSystem { return m.NativeTypeSystem } -//GetObjectVersion returns ObjectVersion +// GetObjectVersion returns ObjectVersion func (m dataassetsummary) GetObjectVersion() *int { return m.ObjectVersion } -//GetParentRef returns ParentRef +// GetParentRef returns ParentRef func (m dataassetsummary) GetParentRef() *ParentReference { return m.ParentRef } -//GetMetadata returns Metadata +// GetMetadata returns Metadata func (m dataassetsummary) GetMetadata() *ObjectMetadata { return m.Metadata } diff --git a/dataintegration/data_asset_summary_collection.go b/dataintegration/data_asset_summary_collection.go index 40a4b0af5b..94f7084548 100644 --- a/dataintegration/data_asset_summary_collection.go +++ b/dataintegration/data_asset_summary_collection.go @@ -62,6 +62,5 @@ func (m *DataAssetSummaryCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/dataintegration/data_entity.go b/dataintegration/data_entity.go index 18dcff3868..453c1615e9 100644 --- a/dataintegration/data_entity.go +++ b/dataintegration/data_entity.go @@ -87,7 +87,7 @@ func (m *dataentity) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) } } -//GetMetadata returns Metadata +// GetMetadata returns Metadata func (m dataentity) GetMetadata() *ObjectMetadata { return m.Metadata } diff --git a/dataintegration/data_entity_from_data_store.go b/dataintegration/data_entity_from_data_store.go index 388034c6a7..f4ae286cc9 100644 --- a/dataintegration/data_entity_from_data_store.go +++ b/dataintegration/data_entity_from_data_store.go @@ -193,12 +193,8 @@ func (m *DataEntityFromDataStore) UnmarshalJSON(data []byte) (e error) { m.UniqueKeys[i] = nil } } - m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) - for i, n := range model.ForeignKeys { - m.ForeignKeys[i] = n - } - + copy(m.ForeignKeys, model.ForeignKeys) m.ResourceName = model.ResourceName m.ObjectStatus = model.ObjectStatus diff --git a/dataintegration/data_entity_from_data_store_entity_details.go b/dataintegration/data_entity_from_data_store_entity_details.go index 5792e89cb0..3fe1ec7d51 100644 --- a/dataintegration/data_entity_from_data_store_entity_details.go +++ b/dataintegration/data_entity_from_data_store_entity_details.go @@ -184,12 +184,8 @@ func (m *DataEntityFromDataStoreEntityDetails) UnmarshalJSON(data []byte) (e err m.UniqueKeys[i] = nil } } - m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) - for i, n := range model.ForeignKeys { - m.ForeignKeys[i] = n - } - + copy(m.ForeignKeys, model.ForeignKeys) m.ResourceName = model.ResourceName m.ObjectStatus = model.ObjectStatus diff --git a/dataintegration/data_entity_from_file.go b/dataintegration/data_entity_from_file.go index a8d40ab9a9..4449c291bb 100644 --- a/dataintegration/data_entity_from_file.go +++ b/dataintegration/data_entity_from_file.go @@ -176,12 +176,8 @@ func (m *DataEntityFromFile) UnmarshalJSON(data []byte) (e error) { m.UniqueKeys[i] = nil } } - m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) - for i, n := range model.ForeignKeys { - m.ForeignKeys[i] = n - } - + copy(m.ForeignKeys, model.ForeignKeys) m.ResourceName = model.ResourceName m.DataFormat = model.DataFormat diff --git a/dataintegration/data_entity_from_file_entity_details.go b/dataintegration/data_entity_from_file_entity_details.go index 798aa1cd1d..8a97d3d4b9 100644 --- a/dataintegration/data_entity_from_file_entity_details.go +++ b/dataintegration/data_entity_from_file_entity_details.go @@ -167,12 +167,8 @@ func (m *DataEntityFromFileEntityDetails) UnmarshalJSON(data []byte) (e error) { m.UniqueKeys[i] = nil } } - m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) - for i, n := range model.ForeignKeys { - m.ForeignKeys[i] = n - } - + copy(m.ForeignKeys, model.ForeignKeys) m.ResourceName = model.ResourceName m.DataFormat = model.DataFormat diff --git a/dataintegration/data_entity_from_object.go b/dataintegration/data_entity_from_object.go index e7d2f970e8..94e5ed7f87 100644 --- a/dataintegration/data_entity_from_object.go +++ b/dataintegration/data_entity_from_object.go @@ -168,12 +168,8 @@ func (m *DataEntityFromObject) UnmarshalJSON(data []byte) (e error) { m.UniqueKeys[i] = nil } } - m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) - for i, n := range model.ForeignKeys { - m.ForeignKeys[i] = n - } - + copy(m.ForeignKeys, model.ForeignKeys) m.ResourceName = model.ResourceName m.ObjectStatus = model.ObjectStatus diff --git a/dataintegration/data_entity_from_object_entity_details.go b/dataintegration/data_entity_from_object_entity_details.go index 324250bfbb..d78f9740df 100644 --- a/dataintegration/data_entity_from_object_entity_details.go +++ b/dataintegration/data_entity_from_object_entity_details.go @@ -159,12 +159,8 @@ func (m *DataEntityFromObjectEntityDetails) UnmarshalJSON(data []byte) (e error) m.UniqueKeys[i] = nil } } - m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) - for i, n := range model.ForeignKeys { - m.ForeignKeys[i] = n - } - + copy(m.ForeignKeys, model.ForeignKeys) m.ResourceName = model.ResourceName m.ObjectStatus = model.ObjectStatus diff --git a/dataintegration/data_entity_from_sql.go b/dataintegration/data_entity_from_sql.go index 45e4dbf277..162f43e21c 100644 --- a/dataintegration/data_entity_from_sql.go +++ b/dataintegration/data_entity_from_sql.go @@ -172,12 +172,8 @@ func (m *DataEntityFromSql) UnmarshalJSON(data []byte) (e error) { m.UniqueKeys[i] = nil } } - m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) - for i, n := range model.ForeignKeys { - m.ForeignKeys[i] = n - } - + copy(m.ForeignKeys, model.ForeignKeys) m.ResourceName = model.ResourceName m.ObjectStatus = model.ObjectStatus diff --git a/dataintegration/data_entity_from_sql_entity_details.go b/dataintegration/data_entity_from_sql_entity_details.go index 3c65dd5dc8..dea0004846 100644 --- a/dataintegration/data_entity_from_sql_entity_details.go +++ b/dataintegration/data_entity_from_sql_entity_details.go @@ -163,12 +163,8 @@ func (m *DataEntityFromSqlEntityDetails) UnmarshalJSON(data []byte) (e error) { m.UniqueKeys[i] = nil } } - m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) - for i, n := range model.ForeignKeys { - m.ForeignKeys[i] = n - } - + copy(m.ForeignKeys, model.ForeignKeys) m.ResourceName = model.ResourceName m.ObjectStatus = model.ObjectStatus diff --git a/dataintegration/data_entity_from_table.go b/dataintegration/data_entity_from_table.go index d49b0c42dc..66e6eaf611 100644 --- a/dataintegration/data_entity_from_table.go +++ b/dataintegration/data_entity_from_table.go @@ -173,12 +173,8 @@ func (m *DataEntityFromTable) UnmarshalJSON(data []byte) (e error) { m.UniqueKeys[i] = nil } } - m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) - for i, n := range model.ForeignKeys { - m.ForeignKeys[i] = n - } - + copy(m.ForeignKeys, model.ForeignKeys) m.ResourceName = model.ResourceName m.ObjectStatus = model.ObjectStatus diff --git a/dataintegration/data_entity_from_table_entity_details.go b/dataintegration/data_entity_from_table_entity_details.go index 128a62329b..60e1d2e865 100644 --- a/dataintegration/data_entity_from_table_entity_details.go +++ b/dataintegration/data_entity_from_table_entity_details.go @@ -164,12 +164,8 @@ func (m *DataEntityFromTableEntityDetails) UnmarshalJSON(data []byte) (e error) m.UniqueKeys[i] = nil } } - m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) - for i, n := range model.ForeignKeys { - m.ForeignKeys[i] = n - } - + copy(m.ForeignKeys, model.ForeignKeys) m.ResourceName = model.ResourceName m.ObjectStatus = model.ObjectStatus diff --git a/dataintegration/data_entity_from_view.go b/dataintegration/data_entity_from_view.go index 52fc485866..621433ea76 100644 --- a/dataintegration/data_entity_from_view.go +++ b/dataintegration/data_entity_from_view.go @@ -173,12 +173,8 @@ func (m *DataEntityFromView) UnmarshalJSON(data []byte) (e error) { m.UniqueKeys[i] = nil } } - m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) - for i, n := range model.ForeignKeys { - m.ForeignKeys[i] = n - } - + copy(m.ForeignKeys, model.ForeignKeys) m.ResourceName = model.ResourceName m.ObjectStatus = model.ObjectStatus diff --git a/dataintegration/data_entity_from_view_entity_details.go b/dataintegration/data_entity_from_view_entity_details.go index dff21de478..2b5161933b 100644 --- a/dataintegration/data_entity_from_view_entity_details.go +++ b/dataintegration/data_entity_from_view_entity_details.go @@ -164,12 +164,8 @@ func (m *DataEntityFromViewEntityDetails) UnmarshalJSON(data []byte) (e error) { m.UniqueKeys[i] = nil } } - m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) - for i, n := range model.ForeignKeys { - m.ForeignKeys[i] = n - } - + copy(m.ForeignKeys, model.ForeignKeys) m.ResourceName = model.ResourceName m.ObjectStatus = model.ObjectStatus diff --git a/dataintegration/data_entity_summary.go b/dataintegration/data_entity_summary.go index 94786eba95..701031ef98 100644 --- a/dataintegration/data_entity_summary.go +++ b/dataintegration/data_entity_summary.go @@ -83,7 +83,7 @@ func (m *dataentitysummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetMetadata returns Metadata +// GetMetadata returns Metadata func (m dataentitysummary) GetMetadata() *ObjectMetadata { return m.Metadata } diff --git a/dataintegration/data_entity_summary_collection.go b/dataintegration/data_entity_summary_collection.go index 1c54923bc8..057e12ba7f 100644 --- a/dataintegration/data_entity_summary_collection.go +++ b/dataintegration/data_entity_summary_collection.go @@ -62,6 +62,5 @@ func (m *DataEntitySummaryCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/dataintegration/data_entity_summary_from_data_store.go b/dataintegration/data_entity_summary_from_data_store.go index 7770709f38..ee1354e751 100644 --- a/dataintegration/data_entity_summary_from_data_store.go +++ b/dataintegration/data_entity_summary_from_data_store.go @@ -193,12 +193,8 @@ func (m *DataEntitySummaryFromDataStore) UnmarshalJSON(data []byte) (e error) { m.UniqueKeys[i] = nil } } - m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) - for i, n := range model.ForeignKeys { - m.ForeignKeys[i] = n - } - + copy(m.ForeignKeys, model.ForeignKeys) m.ResourceName = model.ResourceName m.ObjectStatus = model.ObjectStatus diff --git a/dataintegration/data_entity_summary_from_file.go b/dataintegration/data_entity_summary_from_file.go index b0ace41a81..f125d8c011 100644 --- a/dataintegration/data_entity_summary_from_file.go +++ b/dataintegration/data_entity_summary_from_file.go @@ -176,12 +176,8 @@ func (m *DataEntitySummaryFromFile) UnmarshalJSON(data []byte) (e error) { m.UniqueKeys[i] = nil } } - m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) - for i, n := range model.ForeignKeys { - m.ForeignKeys[i] = n - } - + copy(m.ForeignKeys, model.ForeignKeys) m.ResourceName = model.ResourceName m.DataFormat = model.DataFormat diff --git a/dataintegration/data_entity_summary_from_object.go b/dataintegration/data_entity_summary_from_object.go index 8b842e0a5e..0030a4fd2b 100644 --- a/dataintegration/data_entity_summary_from_object.go +++ b/dataintegration/data_entity_summary_from_object.go @@ -168,12 +168,8 @@ func (m *DataEntitySummaryFromObject) UnmarshalJSON(data []byte) (e error) { m.UniqueKeys[i] = nil } } - m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) - for i, n := range model.ForeignKeys { - m.ForeignKeys[i] = n - } - + copy(m.ForeignKeys, model.ForeignKeys) m.ResourceName = model.ResourceName m.ObjectStatus = model.ObjectStatus diff --git a/dataintegration/data_entity_summary_from_sql.go b/dataintegration/data_entity_summary_from_sql.go index b252f5d656..cca4a7fdb7 100644 --- a/dataintegration/data_entity_summary_from_sql.go +++ b/dataintegration/data_entity_summary_from_sql.go @@ -172,12 +172,8 @@ func (m *DataEntitySummaryFromSql) UnmarshalJSON(data []byte) (e error) { m.UniqueKeys[i] = nil } } - m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) - for i, n := range model.ForeignKeys { - m.ForeignKeys[i] = n - } - + copy(m.ForeignKeys, model.ForeignKeys) m.ResourceName = model.ResourceName m.ObjectStatus = model.ObjectStatus diff --git a/dataintegration/data_entity_summary_from_table.go b/dataintegration/data_entity_summary_from_table.go index e88c96ea7d..8e08460db5 100644 --- a/dataintegration/data_entity_summary_from_table.go +++ b/dataintegration/data_entity_summary_from_table.go @@ -173,12 +173,8 @@ func (m *DataEntitySummaryFromTable) UnmarshalJSON(data []byte) (e error) { m.UniqueKeys[i] = nil } } - m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) - for i, n := range model.ForeignKeys { - m.ForeignKeys[i] = n - } - + copy(m.ForeignKeys, model.ForeignKeys) m.ResourceName = model.ResourceName m.ObjectStatus = model.ObjectStatus diff --git a/dataintegration/data_entity_summary_from_view.go b/dataintegration/data_entity_summary_from_view.go index 553800c053..70edf0e954 100644 --- a/dataintegration/data_entity_summary_from_view.go +++ b/dataintegration/data_entity_summary_from_view.go @@ -173,12 +173,8 @@ func (m *DataEntitySummaryFromView) UnmarshalJSON(data []byte) (e error) { m.UniqueKeys[i] = nil } } - m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) - for i, n := range model.ForeignKeys { - m.ForeignKeys[i] = n - } - + copy(m.ForeignKeys, model.ForeignKeys) m.ResourceName = model.ResourceName m.ObjectStatus = model.ObjectStatus diff --git a/dataintegration/dataintegration_client.go b/dataintegration/dataintegration_client.go index 6d3f8907a3..ad9dbd9493 100644 --- a/dataintegration/dataintegration_client.go +++ b/dataintegration/dataintegration_client.go @@ -80,7 +80,7 @@ func (client *DataIntegrationClient) setConfigurationProvider(configProvider com 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/dataintegration/decision_operator.go b/dataintegration/decision_operator.go index d847166446..4bb1770a83 100644 --- a/dataintegration/decision_operator.go +++ b/dataintegration/decision_operator.go @@ -192,10 +192,7 @@ func (m *DecisionOperator) UnmarshalJSON(data []byte) (e error) { m.ObjectVersion = model.ObjectVersion m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]TypedObject, len(model.OutputPorts)) for i, n := range model.OutputPorts { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -208,16 +205,12 @@ func (m *DecisionOperator) UnmarshalJSON(data []byte) (e error) { m.OutputPorts[i] = nil } } - m.ObjectStatus = model.ObjectStatus m.Identifier = model.Identifier m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues m.TriggerRule = model.TriggerRule diff --git a/dataintegration/decision_output_port.go b/dataintegration/decision_output_port.go index 5fde2dfb7c..e7115e4d6f 100644 --- a/dataintegration/decision_output_port.go +++ b/dataintegration/decision_output_port.go @@ -165,7 +165,6 @@ func (m *DecisionOutputPort) UnmarshalJSON(data []byte) (e error) { m.Fields[i] = nil } } - m.PortType = model.PortType m.DecisionOutputPortType = model.DecisionOutputPortType diff --git a/dataintegration/distinct.go b/dataintegration/distinct.go index 5cebb971ea..56f1ab9cb7 100644 --- a/dataintegration/distinct.go +++ b/dataintegration/distinct.go @@ -179,10 +179,7 @@ func (m *Distinct) UnmarshalJSON(data []byte) (e error) { m.ObjectVersion = model.ObjectVersion m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]TypedObject, len(model.OutputPorts)) for i, n := range model.OutputPorts { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -195,16 +192,12 @@ func (m *Distinct) UnmarshalJSON(data []byte) (e error) { m.OutputPorts[i] = nil } } - m.ObjectStatus = model.ObjectStatus m.Identifier = model.Identifier m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues return diff --git a/dataintegration/dynamic_input_field.go b/dataintegration/dynamic_input_field.go index fe90aff7b6..0233356d92 100644 --- a/dataintegration/dynamic_input_field.go +++ b/dataintegration/dynamic_input_field.go @@ -153,9 +153,6 @@ func (m *DynamicInputField) UnmarshalJSON(data []byte) (e error) { } m.Labels = make([]string, len(model.Labels)) - for i, n := range model.Labels { - m.Labels[i] = n - } - + copy(m.Labels, model.Labels) return } diff --git a/dataintegration/dynamic_proxy_field.go b/dataintegration/dynamic_proxy_field.go index c14db67adc..4956fb818f 100644 --- a/dataintegration/dynamic_proxy_field.go +++ b/dataintegration/dynamic_proxy_field.go @@ -153,9 +153,6 @@ func (m *DynamicProxyField) UnmarshalJSON(data []byte) (e error) { } m.Labels = make([]string, len(model.Labels)) - for i, n := range model.Labels { - m.Labels[i] = n - } - + copy(m.Labels, model.Labels) return } diff --git a/dataintegration/end_operator.go b/dataintegration/end_operator.go index f34aee096f..660b9bfbf1 100644 --- a/dataintegration/end_operator.go +++ b/dataintegration/end_operator.go @@ -189,10 +189,7 @@ func (m *EndOperator) UnmarshalJSON(data []byte) (e error) { m.ObjectVersion = model.ObjectVersion m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]TypedObject, len(model.OutputPorts)) for i, n := range model.OutputPorts { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -205,16 +202,12 @@ func (m *EndOperator) UnmarshalJSON(data []byte) (e error) { m.OutputPorts[i] = nil } } - m.ObjectStatus = model.ObjectStatus m.Identifier = model.Identifier m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues m.TriggerRule = model.TriggerRule diff --git a/dataintegration/entity_shape.go b/dataintegration/entity_shape.go index cf706bf08f..45644b00a0 100644 --- a/dataintegration/entity_shape.go +++ b/dataintegration/entity_shape.go @@ -71,7 +71,7 @@ func (m *entityshape) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) } } -//GetMetadata returns Metadata +// GetMetadata returns Metadata func (m entityshape) GetMetadata() *ObjectMetadata { return m.Metadata } diff --git a/dataintegration/entity_shape_from_file.go b/dataintegration/entity_shape_from_file.go index 5a6a841c66..736cad4cab 100644 --- a/dataintegration/entity_shape_from_file.go +++ b/dataintegration/entity_shape_from_file.go @@ -176,12 +176,8 @@ func (m *EntityShapeFromFile) UnmarshalJSON(data []byte) (e error) { m.UniqueKeys[i] = nil } } - m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) - for i, n := range model.ForeignKeys { - m.ForeignKeys[i] = n - } - + copy(m.ForeignKeys, model.ForeignKeys) m.ResourceName = model.ResourceName m.DataFormat = model.DataFormat diff --git a/dataintegration/entity_shape_from_object.go b/dataintegration/entity_shape_from_object.go index 3febb74e28..73c273127c 100644 --- a/dataintegration/entity_shape_from_object.go +++ b/dataintegration/entity_shape_from_object.go @@ -171,12 +171,8 @@ func (m *EntityShapeFromObject) UnmarshalJSON(data []byte) (e error) { m.UniqueKeys[i] = nil } } - m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) - for i, n := range model.ForeignKeys { - m.ForeignKeys[i] = n - } - + copy(m.ForeignKeys, model.ForeignKeys) m.ResourceName = model.ResourceName m.DataFormat = model.DataFormat diff --git a/dataintegration/entity_shape_from_sql.go b/dataintegration/entity_shape_from_sql.go index c14518231d..3389bfb5f4 100644 --- a/dataintegration/entity_shape_from_sql.go +++ b/dataintegration/entity_shape_from_sql.go @@ -175,12 +175,8 @@ func (m *EntityShapeFromSql) UnmarshalJSON(data []byte) (e error) { m.UniqueKeys[i] = nil } } - m.ForeignKeys = make([]ForeignKey, len(model.ForeignKeys)) - for i, n := range model.ForeignKeys { - m.ForeignKeys[i] = n - } - + copy(m.ForeignKeys, model.ForeignKeys) m.ResourceName = model.ResourceName m.DataFormat = model.DataFormat diff --git a/dataintegration/expression_operator.go b/dataintegration/expression_operator.go index 20028edd83..937bf1e1e3 100644 --- a/dataintegration/expression_operator.go +++ b/dataintegration/expression_operator.go @@ -192,10 +192,7 @@ func (m *ExpressionOperator) UnmarshalJSON(data []byte) (e error) { m.ObjectVersion = model.ObjectVersion m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]TypedObject, len(model.OutputPorts)) for i, n := range model.OutputPorts { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -208,16 +205,12 @@ func (m *ExpressionOperator) UnmarshalJSON(data []byte) (e error) { m.OutputPorts[i] = nil } } - m.ObjectStatus = model.ObjectStatus m.Identifier = model.Identifier m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues m.TriggerRule = model.TriggerRule diff --git a/dataintegration/field_map.go b/dataintegration/field_map.go index 71d9984558..697c96fbb7 100644 --- a/dataintegration/field_map.go +++ b/dataintegration/field_map.go @@ -89,7 +89,7 @@ func (m *fieldmap) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetDescription returns Description +// GetDescription returns Description func (m fieldmap) GetDescription() *string { return m.Description } diff --git a/dataintegration/filter.go b/dataintegration/filter.go index 11336c78f0..525c16b638 100644 --- a/dataintegration/filter.go +++ b/dataintegration/filter.go @@ -182,10 +182,7 @@ func (m *Filter) UnmarshalJSON(data []byte) (e error) { m.ObjectVersion = model.ObjectVersion m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]TypedObject, len(model.OutputPorts)) for i, n := range model.OutputPorts { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -198,16 +195,12 @@ func (m *Filter) UnmarshalJSON(data []byte) (e error) { m.OutputPorts[i] = nil } } - m.ObjectStatus = model.ObjectStatus m.Identifier = model.Identifier m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues m.FilterCondition = model.FilterCondition diff --git a/dataintegration/flatten.go b/dataintegration/flatten.go index 3bfb50914f..1cf0542fdd 100644 --- a/dataintegration/flatten.go +++ b/dataintegration/flatten.go @@ -188,10 +188,7 @@ func (m *Flatten) UnmarshalJSON(data []byte) (e error) { m.ObjectVersion = model.ObjectVersion m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]TypedObject, len(model.OutputPorts)) for i, n := range model.OutputPorts { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -204,16 +201,12 @@ func (m *Flatten) UnmarshalJSON(data []byte) (e error) { m.OutputPorts[i] = nil } } - m.ObjectStatus = model.ObjectStatus m.Identifier = model.Identifier m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues m.FlattenDetails = model.FlattenDetails diff --git a/dataintegration/flatten_details.go b/dataintegration/flatten_details.go index f0932b309f..95c16b4286 100644 --- a/dataintegration/flatten_details.go +++ b/dataintegration/flatten_details.go @@ -108,6 +108,5 @@ func (m *FlattenDetails) UnmarshalJSON(data []byte) (e error) { m.FlattenColumns[i] = nil } } - return } diff --git a/dataintegration/flow_node.go b/dataintegration/flow_node.go index f3ac2a18b5..e378e806bf 100644 --- a/dataintegration/flow_node.go +++ b/dataintegration/flow_node.go @@ -103,15 +103,9 @@ func (m *FlowNode) UnmarshalJSON(data []byte) (e error) { m.Description = model.Description m.InputLinks = make([]InputLink, len(model.InputLinks)) - for i, n := range model.InputLinks { - m.InputLinks[i] = n - } - + copy(m.InputLinks, model.InputLinks) m.OutputLinks = make([]OutputLink, len(model.OutputLinks)) - for i, n := range model.OutputLinks { - m.OutputLinks[i] = n - } - + copy(m.OutputLinks, model.OutputLinks) nn, e = model.Operator.UnmarshalPolymorphicJSON(model.Operator.JsonData) if e != nil { return diff --git a/dataintegration/flow_port_link.go b/dataintegration/flow_port_link.go index fc1a131ea7..8facf40898 100644 --- a/dataintegration/flow_port_link.go +++ b/dataintegration/flow_port_link.go @@ -97,32 +97,32 @@ func (m *flowportlink) UnmarshalPolymorphicJSON(data []byte) (interface{}, error } } -//GetKey returns Key +// GetKey returns Key func (m flowportlink) GetKey() *string { return m.Key } -//GetModelVersion returns ModelVersion +// GetModelVersion returns ModelVersion func (m flowportlink) GetModelVersion() *string { return m.ModelVersion } -//GetParentRef returns ParentRef +// GetParentRef returns ParentRef func (m flowportlink) GetParentRef() *ParentReference { return m.ParentRef } -//GetObjectStatus returns ObjectStatus +// GetObjectStatus returns ObjectStatus func (m flowportlink) GetObjectStatus() *int { return m.ObjectStatus } -//GetDescription returns Description +// GetDescription returns Description func (m flowportlink) GetDescription() *string { return m.Description } -//GetPort returns Port +// GetPort returns Port func (m flowportlink) GetPort() *string { return m.Port } diff --git a/dataintegration/foreign_key.go b/dataintegration/foreign_key.go index 3365ddb358..73526aa1c6 100644 --- a/dataintegration/foreign_key.go +++ b/dataintegration/foreign_key.go @@ -103,10 +103,7 @@ func (m *ForeignKey) UnmarshalJSON(data []byte) (e error) { m.Name = model.Name m.AttributeRefs = make([]KeyAttribute, len(model.AttributeRefs)) - for i, n := range model.AttributeRefs { - m.AttributeRefs[i] = n - } - + copy(m.AttributeRefs, model.AttributeRefs) m.UpdateRule = model.UpdateRule m.DeleteRule = model.DeleteRule diff --git a/dataintegration/function.go b/dataintegration/function.go index 27efb3e8cd..52f1514d25 100644 --- a/dataintegration/function.go +++ b/dataintegration/function.go @@ -182,10 +182,7 @@ func (m *Function) UnmarshalJSON(data []byte) (e error) { m.ObjectVersion = model.ObjectVersion m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]TypedObject, len(model.OutputPorts)) for i, n := range model.OutputPorts { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -198,16 +195,12 @@ func (m *Function) UnmarshalJSON(data []byte) (e error) { m.OutputPorts[i] = nil } } - m.ObjectStatus = model.ObjectStatus m.Identifier = model.Identifier m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues m.OciFunction = model.OciFunction diff --git a/dataintegration/function_signature.go b/dataintegration/function_signature.go index 09a637e7db..fff91d2f76 100644 --- a/dataintegration/function_signature.go +++ b/dataintegration/function_signature.go @@ -107,7 +107,6 @@ func (m *FunctionSignature) UnmarshalJSON(data []byte) (e error) { m.Arguments[i] = nil } } - m.Description = model.Description m.ObjectStatus = model.ObjectStatus diff --git a/dataintegration/input_field.go b/dataintegration/input_field.go index 857f8aa999..ba22c81b4a 100644 --- a/dataintegration/input_field.go +++ b/dataintegration/input_field.go @@ -153,9 +153,6 @@ func (m *InputField) UnmarshalJSON(data []byte) (e error) { } m.Labels = make([]string, len(model.Labels)) - for i, n := range model.Labels { - m.Labels[i] = n - } - + copy(m.Labels, model.Labels) return } diff --git a/dataintegration/input_port.go b/dataintegration/input_port.go index 3061c30231..4b3c492ad2 100644 --- a/dataintegration/input_port.go +++ b/dataintegration/input_port.go @@ -160,7 +160,6 @@ func (m *InputPort) UnmarshalJSON(data []byte) (e error) { m.Fields[i] = nil } } - return } diff --git a/dataintegration/input_proxy_field.go b/dataintegration/input_proxy_field.go index 0577634d3a..26230ee0fd 100644 --- a/dataintegration/input_proxy_field.go +++ b/dataintegration/input_proxy_field.go @@ -159,9 +159,6 @@ func (m *InputProxyField) UnmarshalJSON(data []byte) (e error) { } m.Labels = make([]string, len(model.Labels)) - for i, n := range model.Labels { - m.Labels[i] = n - } - + copy(m.Labels, model.Labels) return } diff --git a/dataintegration/intersect.go b/dataintegration/intersect.go index c73c9e5e9d..ff3bb021b4 100644 --- a/dataintegration/intersect.go +++ b/dataintegration/intersect.go @@ -190,10 +190,7 @@ func (m *Intersect) UnmarshalJSON(data []byte) (e error) { m.ObjectVersion = model.ObjectVersion m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]TypedObject, len(model.OutputPorts)) for i, n := range model.OutputPorts { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -206,16 +203,12 @@ func (m *Intersect) UnmarshalJSON(data []byte) (e error) { m.OutputPorts[i] = nil } } - m.ObjectStatus = model.ObjectStatus m.Identifier = model.Identifier m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues m.IntersectType = model.IntersectType diff --git a/dataintegration/joiner.go b/dataintegration/joiner.go index 8ec896f7e8..93e45061f7 100644 --- a/dataintegration/joiner.go +++ b/dataintegration/joiner.go @@ -189,10 +189,7 @@ func (m *Joiner) UnmarshalJSON(data []byte) (e error) { m.ObjectVersion = model.ObjectVersion m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]TypedObject, len(model.OutputPorts)) for i, n := range model.OutputPorts { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -205,16 +202,12 @@ func (m *Joiner) UnmarshalJSON(data []byte) (e error) { m.OutputPorts[i] = nil } } - m.ObjectStatus = model.ObjectStatus m.Identifier = model.Identifier m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues m.JoinType = model.JoinType diff --git a/dataintegration/lookup.go b/dataintegration/lookup.go index a863565505..898c6df01f 100644 --- a/dataintegration/lookup.go +++ b/dataintegration/lookup.go @@ -197,10 +197,7 @@ func (m *Lookup) UnmarshalJSON(data []byte) (e error) { m.ObjectVersion = model.ObjectVersion m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]TypedObject, len(model.OutputPorts)) for i, n := range model.OutputPorts { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -213,16 +210,12 @@ func (m *Lookup) UnmarshalJSON(data []byte) (e error) { m.OutputPorts[i] = nil } } - m.ObjectStatus = model.ObjectStatus m.Identifier = model.Identifier m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues m.LookupCondition = model.LookupCondition diff --git a/dataintegration/macro_field.go b/dataintegration/macro_field.go index cbedfeabc7..879c2d69ae 100644 --- a/dataintegration/macro_field.go +++ b/dataintegration/macro_field.go @@ -169,9 +169,6 @@ func (m *MacroField) UnmarshalJSON(data []byte) (e error) { m.UseType = model.UseType m.Labels = make([]string, len(model.Labels)) - for i, n := range model.Labels { - m.Labels[i] = n - } - + copy(m.Labels, model.Labels) return } diff --git a/dataintegration/merge_operator.go b/dataintegration/merge_operator.go index ed53479f56..c7396ea878 100644 --- a/dataintegration/merge_operator.go +++ b/dataintegration/merge_operator.go @@ -191,10 +191,7 @@ func (m *MergeOperator) UnmarshalJSON(data []byte) (e error) { m.ObjectVersion = model.ObjectVersion m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]TypedObject, len(model.OutputPorts)) for i, n := range model.OutputPorts { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -207,16 +204,12 @@ func (m *MergeOperator) UnmarshalJSON(data []byte) (e error) { m.OutputPorts[i] = nil } } - m.ObjectStatus = model.ObjectStatus m.Identifier = model.Identifier m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues m.TriggerRule = model.TriggerRule diff --git a/dataintegration/minus.go b/dataintegration/minus.go index 034055d3e8..0c313ea046 100644 --- a/dataintegration/minus.go +++ b/dataintegration/minus.go @@ -190,10 +190,7 @@ func (m *Minus) UnmarshalJSON(data []byte) (e error) { m.ObjectVersion = model.ObjectVersion m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]TypedObject, len(model.OutputPorts)) for i, n := range model.OutputPorts { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -206,16 +203,12 @@ func (m *Minus) UnmarshalJSON(data []byte) (e error) { m.OutputPorts[i] = nil } } - m.ObjectStatus = model.ObjectStatus m.Identifier = model.Identifier m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues m.MinusType = model.MinusType diff --git a/dataintegration/operation.go b/dataintegration/operation.go index 555c629c9e..ebc691bf5d 100644 --- a/dataintegration/operation.go +++ b/dataintegration/operation.go @@ -67,7 +67,7 @@ func (m *operation) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetMetadata returns Metadata +// GetMetadata returns Metadata func (m operation) GetMetadata() *ObjectMetadata { return m.Metadata } diff --git a/dataintegration/operator.go b/dataintegration/operator.go index ffa4e6863a..0ecfc43b0b 100644 --- a/dataintegration/operator.go +++ b/dataintegration/operator.go @@ -202,62 +202,62 @@ func (m *operator) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetKey returns Key +// GetKey returns Key func (m operator) GetKey() *string { return m.Key } -//GetModelVersion returns ModelVersion +// GetModelVersion returns ModelVersion func (m operator) GetModelVersion() *string { return m.ModelVersion } -//GetParentRef returns ParentRef +// GetParentRef returns ParentRef func (m operator) GetParentRef() *ParentReference { return m.ParentRef } -//GetName returns Name +// GetName returns Name func (m operator) GetName() *string { return m.Name } -//GetDescription returns Description +// GetDescription returns Description func (m operator) GetDescription() *string { return m.Description } -//GetObjectVersion returns ObjectVersion +// GetObjectVersion returns ObjectVersion func (m operator) GetObjectVersion() *int { return m.ObjectVersion } -//GetInputPorts returns InputPorts +// GetInputPorts returns InputPorts func (m operator) GetInputPorts() []InputPort { return m.InputPorts } -//GetOutputPorts returns OutputPorts +// GetOutputPorts returns OutputPorts func (m operator) GetOutputPorts() json.RawMessage { return m.OutputPorts } -//GetObjectStatus returns ObjectStatus +// GetObjectStatus returns ObjectStatus func (m operator) GetObjectStatus() *int { return m.ObjectStatus } -//GetIdentifier returns Identifier +// GetIdentifier returns Identifier func (m operator) GetIdentifier() *string { return m.Identifier } -//GetParameters returns Parameters +// GetParameters returns Parameters func (m operator) GetParameters() []Parameter { return m.Parameters } -//GetOpConfigValues returns OpConfigValues +// GetOpConfigValues returns OpConfigValues func (m operator) GetOpConfigValues() *ConfigValues { return m.OpConfigValues } diff --git a/dataintegration/output_field.go b/dataintegration/output_field.go index f34e61e07b..46288b4a94 100644 --- a/dataintegration/output_field.go +++ b/dataintegration/output_field.go @@ -153,9 +153,6 @@ func (m *OutputField) UnmarshalJSON(data []byte) (e error) { } m.Labels = make([]string, len(model.Labels)) - for i, n := range model.Labels { - m.Labels[i] = n - } - + copy(m.Labels, model.Labels) return } diff --git a/dataintegration/output_port.go b/dataintegration/output_port.go index 6fb9bbb555..b6e9a390bc 100644 --- a/dataintegration/output_port.go +++ b/dataintegration/output_port.go @@ -160,7 +160,6 @@ func (m *OutputPort) UnmarshalJSON(data []byte) (e error) { m.Fields[i] = nil } } - return } diff --git a/dataintegration/pivot.go b/dataintegration/pivot.go index 78842041f7..14fee5c708 100644 --- a/dataintegration/pivot.go +++ b/dataintegration/pivot.go @@ -188,10 +188,7 @@ func (m *Pivot) UnmarshalJSON(data []byte) (e error) { m.ObjectVersion = model.ObjectVersion m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]TypedObject, len(model.OutputPorts)) for i, n := range model.OutputPorts { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -204,16 +201,12 @@ func (m *Pivot) UnmarshalJSON(data []byte) (e error) { m.OutputPorts[i] = nil } } - m.ObjectStatus = model.ObjectStatus m.Identifier = model.Identifier m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues m.GroupByColumns = model.GroupByColumns diff --git a/dataintegration/projection.go b/dataintegration/projection.go index 3e76876de8..0cd9176977 100644 --- a/dataintegration/projection.go +++ b/dataintegration/projection.go @@ -179,10 +179,7 @@ func (m *Projection) UnmarshalJSON(data []byte) (e error) { m.ObjectVersion = model.ObjectVersion m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]TypedObject, len(model.OutputPorts)) for i, n := range model.OutputPorts { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -195,16 +192,12 @@ func (m *Projection) UnmarshalJSON(data []byte) (e error) { m.OutputPorts[i] = nil } } - m.ObjectStatus = model.ObjectStatus m.Identifier = model.Identifier m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues return diff --git a/dataintegration/projection_rule.go b/dataintegration/projection_rule.go index 5089597443..10935eca09 100644 --- a/dataintegration/projection_rule.go +++ b/dataintegration/projection_rule.go @@ -113,37 +113,37 @@ func (m *projectionrule) UnmarshalPolymorphicJSON(data []byte) (interface{}, err } } -//GetKey returns Key +// GetKey returns Key func (m projectionrule) GetKey() *string { return m.Key } -//GetModelVersion returns ModelVersion +// GetModelVersion returns ModelVersion func (m projectionrule) GetModelVersion() *string { return m.ModelVersion } -//GetParentRef returns ParentRef +// GetParentRef returns ParentRef func (m projectionrule) GetParentRef() *ParentReference { return m.ParentRef } -//GetIsJavaRegexSyntax returns IsJavaRegexSyntax +// GetIsJavaRegexSyntax returns IsJavaRegexSyntax func (m projectionrule) GetIsJavaRegexSyntax() *bool { return m.IsJavaRegexSyntax } -//GetConfigValues returns ConfigValues +// GetConfigValues returns ConfigValues func (m projectionrule) GetConfigValues() *ConfigValues { return m.ConfigValues } -//GetObjectStatus returns ObjectStatus +// GetObjectStatus returns ObjectStatus func (m projectionrule) GetObjectStatus() *int { return m.ObjectStatus } -//GetDescription returns Description +// GetDescription returns Description func (m projectionrule) GetDescription() *string { return m.Description } diff --git a/dataintegration/proxy_field.go b/dataintegration/proxy_field.go index 4c03d3fa12..6a70865ae4 100644 --- a/dataintegration/proxy_field.go +++ b/dataintegration/proxy_field.go @@ -164,9 +164,6 @@ func (m *ProxyField) UnmarshalJSON(data []byte) (e error) { } m.Labels = make([]string, len(model.Labels)) - for i, n := range model.Labels { - m.Labels[i] = n - } - + copy(m.Labels, model.Labels) return } diff --git a/dataintegration/published_object.go b/dataintegration/published_object.go index 15bb0eed83..96602889d3 100644 --- a/dataintegration/published_object.go +++ b/dataintegration/published_object.go @@ -107,42 +107,42 @@ func (m *publishedobject) UnmarshalPolymorphicJSON(data []byte) (interface{}, er } } -//GetKey returns Key +// GetKey returns Key func (m publishedobject) GetKey() *string { return m.Key } -//GetModelVersion returns ModelVersion +// GetModelVersion returns ModelVersion func (m publishedobject) GetModelVersion() *string { return m.ModelVersion } -//GetParentRef returns ParentRef +// GetParentRef returns ParentRef func (m publishedobject) GetParentRef() *ParentReference { return m.ParentRef } -//GetName returns Name +// GetName returns Name func (m publishedobject) GetName() *string { return m.Name } -//GetDescription returns Description +// GetDescription returns Description func (m publishedobject) GetDescription() *string { return m.Description } -//GetObjectVersion returns ObjectVersion +// GetObjectVersion returns ObjectVersion func (m publishedobject) GetObjectVersion() *int { return m.ObjectVersion } -//GetObjectStatus returns ObjectStatus +// GetObjectStatus returns ObjectStatus func (m publishedobject) GetObjectStatus() *int { return m.ObjectStatus } -//GetIdentifier returns Identifier +// GetIdentifier returns Identifier func (m publishedobject) GetIdentifier() *string { return m.Identifier } diff --git a/dataintegration/published_object_summary.go b/dataintegration/published_object_summary.go index e553941099..0faaf056ca 100644 --- a/dataintegration/published_object_summary.go +++ b/dataintegration/published_object_summary.go @@ -111,47 +111,47 @@ func (m *publishedobjectsummary) UnmarshalPolymorphicJSON(data []byte) (interfac } } -//GetKey returns Key +// GetKey returns Key func (m publishedobjectsummary) GetKey() *string { return m.Key } -//GetModelVersion returns ModelVersion +// GetModelVersion returns ModelVersion func (m publishedobjectsummary) GetModelVersion() *string { return m.ModelVersion } -//GetParentRef returns ParentRef +// GetParentRef returns ParentRef func (m publishedobjectsummary) GetParentRef() *ParentReference { return m.ParentRef } -//GetName returns Name +// GetName returns Name func (m publishedobjectsummary) GetName() *string { return m.Name } -//GetDescription returns Description +// GetDescription returns Description func (m publishedobjectsummary) GetDescription() *string { return m.Description } -//GetObjectVersion returns ObjectVersion +// GetObjectVersion returns ObjectVersion func (m publishedobjectsummary) GetObjectVersion() *int { return m.ObjectVersion } -//GetObjectStatus returns ObjectStatus +// GetObjectStatus returns ObjectStatus func (m publishedobjectsummary) GetObjectStatus() *int { return m.ObjectStatus } -//GetIdentifier returns Identifier +// GetIdentifier returns Identifier func (m publishedobjectsummary) GetIdentifier() *string { return m.Identifier } -//GetMetadata returns Metadata +// GetMetadata returns Metadata func (m publishedobjectsummary) GetMetadata() *ObjectMetadata { return m.Metadata } diff --git a/dataintegration/published_object_summary_collection.go b/dataintegration/published_object_summary_collection.go index bd3746ee80..70275de96a 100644 --- a/dataintegration/published_object_summary_collection.go +++ b/dataintegration/published_object_summary_collection.go @@ -62,6 +62,5 @@ func (m *PublishedObjectSummaryCollection) UnmarshalJSON(data []byte) (e error) m.Items[i] = nil } } - return } diff --git a/dataintegration/read_operation_config.go b/dataintegration/read_operation_config.go index 224a4a336d..91f3e14b03 100644 --- a/dataintegration/read_operation_config.go +++ b/dataintegration/read_operation_config.go @@ -138,7 +138,6 @@ func (m *ReadOperationConfig) UnmarshalJSON(data []byte) (e error) { m.Operations[i] = nil } } - m.DataFormat = model.DataFormat nn, e = model.PartitionConfig.UnmarshalPolymorphicJSON(model.PartitionConfig.JsonData) diff --git a/dataintegration/referenced_data_object.go b/dataintegration/referenced_data_object.go index 72365afdc3..278b0816f9 100644 --- a/dataintegration/referenced_data_object.go +++ b/dataintegration/referenced_data_object.go @@ -98,37 +98,37 @@ func (m *referenceddataobject) UnmarshalPolymorphicJSON(data []byte) (interface{ } } -//GetModelVersion returns ModelVersion +// GetModelVersion returns ModelVersion func (m referenceddataobject) GetModelVersion() *string { return m.ModelVersion } -//GetParentRef returns ParentRef +// GetParentRef returns ParentRef func (m referenceddataobject) GetParentRef() *ParentReference { return m.ParentRef } -//GetName returns Name +// GetName returns Name func (m referenceddataobject) GetName() *string { return m.Name } -//GetObjectVersion returns ObjectVersion +// GetObjectVersion returns ObjectVersion func (m referenceddataobject) GetObjectVersion() *int { return m.ObjectVersion } -//GetResourceName returns ResourceName +// GetResourceName returns ResourceName func (m referenceddataobject) GetResourceName() *string { return m.ResourceName } -//GetObjectStatus returns ObjectStatus +// GetObjectStatus returns ObjectStatus func (m referenceddataobject) GetObjectStatus() *int { return m.ObjectStatus } -//GetExternalKey returns ExternalKey +// GetExternalKey returns ExternalKey func (m referenceddataobject) GetExternalKey() *string { return m.ExternalKey } diff --git a/dataintegration/rule_type_config.go b/dataintegration/rule_type_config.go index ea3dfd6776..3c2b30b967 100644 --- a/dataintegration/rule_type_config.go +++ b/dataintegration/rule_type_config.go @@ -117,7 +117,6 @@ func (m *RuleTypeConfig) UnmarshalJSON(data []byte) (e error) { m.ProjectionRules[i] = nil } } - m.ConfigValues = model.ConfigValues m.ObjectStatus = model.ObjectStatus diff --git a/dataintegration/runtime_operator.go b/dataintegration/runtime_operator.go index ef5d5b05c7..fba0749d97 100644 --- a/dataintegration/runtime_operator.go +++ b/dataintegration/runtime_operator.go @@ -167,10 +167,7 @@ func (m *RuntimeOperator) UnmarshalJSON(data []byte) (e error) { m.ExecutionState = model.ExecutionState m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.ObjectStatus = model.ObjectStatus m.Metadata = model.Metadata diff --git a/dataintegration/runtime_operator_summary.go b/dataintegration/runtime_operator_summary.go index 139b74cd79..745f5819a4 100644 --- a/dataintegration/runtime_operator_summary.go +++ b/dataintegration/runtime_operator_summary.go @@ -167,10 +167,7 @@ func (m *RuntimeOperatorSummary) UnmarshalJSON(data []byte) (e error) { m.ExecutionState = model.ExecutionState m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.ObjectStatus = model.ObjectStatus m.Metadata = model.Metadata diff --git a/dataintegration/sort_oper.go b/dataintegration/sort_oper.go index 3954b9c0dc..22ca05cfd7 100644 --- a/dataintegration/sort_oper.go +++ b/dataintegration/sort_oper.go @@ -182,10 +182,7 @@ func (m *SortOper) UnmarshalJSON(data []byte) (e error) { m.ObjectVersion = model.ObjectVersion m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]TypedObject, len(model.OutputPorts)) for i, n := range model.OutputPorts { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -198,16 +195,12 @@ func (m *SortOper) UnmarshalJSON(data []byte) (e error) { m.OutputPorts[i] = nil } } - m.ObjectStatus = model.ObjectStatus m.Identifier = model.Identifier m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues m.SortKey = model.SortKey diff --git a/dataintegration/source.go b/dataintegration/source.go index fefa748ae2..5b0d93db4b 100644 --- a/dataintegration/source.go +++ b/dataintegration/source.go @@ -203,10 +203,7 @@ func (m *Source) UnmarshalJSON(data []byte) (e error) { m.ObjectVersion = model.ObjectVersion m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]TypedObject, len(model.OutputPorts)) for i, n := range model.OutputPorts { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -219,16 +216,12 @@ func (m *Source) UnmarshalJSON(data []byte) (e error) { m.OutputPorts[i] = nil } } - m.ObjectStatus = model.ObjectStatus m.Identifier = model.Identifier m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues nn, e = model.Entity.UnmarshalPolymorphicJSON(model.Entity.JsonData) diff --git a/dataintegration/split.go b/dataintegration/split.go index b2677c9d54..fbd38ca720 100644 --- a/dataintegration/split.go +++ b/dataintegration/split.go @@ -186,10 +186,7 @@ func (m *Split) UnmarshalJSON(data []byte) (e error) { m.ObjectVersion = model.ObjectVersion m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]TypedObject, len(model.OutputPorts)) for i, n := range model.OutputPorts { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -202,16 +199,12 @@ func (m *Split) UnmarshalJSON(data []byte) (e error) { m.OutputPorts[i] = nil } } - m.ObjectStatus = model.ObjectStatus m.Identifier = model.Identifier m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues m.DataRoutingStrategy = model.DataRoutingStrategy diff --git a/dataintegration/start_operator.go b/dataintegration/start_operator.go index 70482a564b..f40f19571a 100644 --- a/dataintegration/start_operator.go +++ b/dataintegration/start_operator.go @@ -179,10 +179,7 @@ func (m *StartOperator) UnmarshalJSON(data []byte) (e error) { m.ObjectVersion = model.ObjectVersion m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]TypedObject, len(model.OutputPorts)) for i, n := range model.OutputPorts { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -195,16 +192,12 @@ func (m *StartOperator) UnmarshalJSON(data []byte) (e error) { m.OutputPorts[i] = nil } } - m.ObjectStatus = model.ObjectStatus m.Identifier = model.Identifier m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues return diff --git a/dataintegration/target.go b/dataintegration/target.go index 9cd8a79aff..e9400f2848 100644 --- a/dataintegration/target.go +++ b/dataintegration/target.go @@ -226,10 +226,7 @@ func (m *Target) UnmarshalJSON(data []byte) (e error) { m.ObjectVersion = model.ObjectVersion m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]TypedObject, len(model.OutputPorts)) for i, n := range model.OutputPorts { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -242,16 +239,12 @@ func (m *Target) UnmarshalJSON(data []byte) (e error) { m.OutputPorts[i] = nil } } - m.ObjectStatus = model.ObjectStatus m.Identifier = model.Identifier m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues nn, e = model.Entity.UnmarshalPolymorphicJSON(model.Entity.JsonData) diff --git a/dataintegration/task.go b/dataintegration/task.go index 2054e6692b..e49c85659f 100644 --- a/dataintegration/task.go +++ b/dataintegration/task.go @@ -155,82 +155,82 @@ func (m *task) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetKey returns Key +// GetKey returns Key func (m task) GetKey() *string { return m.Key } -//GetModelVersion returns ModelVersion +// GetModelVersion returns ModelVersion func (m task) GetModelVersion() *string { return m.ModelVersion } -//GetParentRef returns ParentRef +// GetParentRef returns ParentRef func (m task) GetParentRef() *ParentReference { return m.ParentRef } -//GetName returns Name +// GetName returns Name func (m task) GetName() *string { return m.Name } -//GetDescription returns Description +// GetDescription returns Description func (m task) GetDescription() *string { return m.Description } -//GetObjectVersion returns ObjectVersion +// GetObjectVersion returns ObjectVersion func (m task) GetObjectVersion() *int { return m.ObjectVersion } -//GetObjectStatus returns ObjectStatus +// GetObjectStatus returns ObjectStatus func (m task) GetObjectStatus() *int { return m.ObjectStatus } -//GetIdentifier returns Identifier +// GetIdentifier returns Identifier func (m task) GetIdentifier() *string { return m.Identifier } -//GetInputPorts returns InputPorts +// GetInputPorts returns InputPorts func (m task) GetInputPorts() []InputPort { return m.InputPorts } -//GetOutputPorts returns OutputPorts +// GetOutputPorts returns OutputPorts func (m task) GetOutputPorts() []OutputPort { return m.OutputPorts } -//GetParameters returns Parameters +// GetParameters returns Parameters func (m task) GetParameters() []Parameter { return m.Parameters } -//GetOpConfigValues returns OpConfigValues +// GetOpConfigValues returns OpConfigValues func (m task) GetOpConfigValues() *ConfigValues { return m.OpConfigValues } -//GetConfigProviderDelegate returns ConfigProviderDelegate +// GetConfigProviderDelegate returns ConfigProviderDelegate func (m task) GetConfigProviderDelegate() *ConfigProvider { return m.ConfigProviderDelegate } -//GetMetadata returns Metadata +// GetMetadata returns Metadata func (m task) GetMetadata() *ObjectMetadata { return m.Metadata } -//GetKeyMap returns KeyMap +// GetKeyMap returns KeyMap func (m task) GetKeyMap() map[string]string { return m.KeyMap } -//GetRegistryMetadata returns RegistryMetadata +// GetRegistryMetadata returns RegistryMetadata func (m task) GetRegistryMetadata() *RegistryMetadata { return m.RegistryMetadata } diff --git a/dataintegration/task_from_rest_task_details.go b/dataintegration/task_from_rest_task_details.go index 3c7f973d92..8df0d52e7a 100644 --- a/dataintegration/task_from_rest_task_details.go +++ b/dataintegration/task_from_rest_task_details.go @@ -270,20 +270,11 @@ func (m *TaskFromRestTaskDetails) UnmarshalJSON(data []byte) (e error) { m.Identifier = model.Identifier m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]OutputPort, len(model.OutputPorts)) - for i, n := range model.OutputPorts { - m.OutputPorts[i] = n - } - + copy(m.OutputPorts, model.OutputPorts) m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues m.ConfigProviderDelegate = model.ConfigProviderDelegate @@ -327,10 +318,7 @@ func (m *TaskFromRestTaskDetails) UnmarshalJSON(data []byte) (e error) { m.PollRestCallConfig = model.PollRestCallConfig m.TypedExpressions = make([]TypedExpression, len(model.TypedExpressions)) - for i, n := range model.TypedExpressions { - m.TypedExpressions[i] = n - } - + copy(m.TypedExpressions, model.TypedExpressions) return } diff --git a/dataintegration/task_operator.go b/dataintegration/task_operator.go index a2fc3393d9..017558807b 100644 --- a/dataintegration/task_operator.go +++ b/dataintegration/task_operator.go @@ -228,10 +228,7 @@ func (m *TaskOperator) UnmarshalJSON(data []byte) (e error) { m.ObjectVersion = model.ObjectVersion m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]TypedObject, len(model.OutputPorts)) for i, n := range model.OutputPorts { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -244,16 +241,12 @@ func (m *TaskOperator) UnmarshalJSON(data []byte) (e error) { m.OutputPorts[i] = nil } } - m.ObjectStatus = model.ObjectStatus m.Identifier = model.Identifier m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues m.RetryAttempts = model.RetryAttempts diff --git a/dataintegration/task_summary.go b/dataintegration/task_summary.go index a67f817782..3a0043ad5d 100644 --- a/dataintegration/task_summary.go +++ b/dataintegration/task_summary.go @@ -151,77 +151,77 @@ func (m *tasksummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) } } -//GetKey returns Key +// GetKey returns Key func (m tasksummary) GetKey() *string { return m.Key } -//GetModelVersion returns ModelVersion +// GetModelVersion returns ModelVersion func (m tasksummary) GetModelVersion() *string { return m.ModelVersion } -//GetParentRef returns ParentRef +// GetParentRef returns ParentRef func (m tasksummary) GetParentRef() *ParentReference { return m.ParentRef } -//GetName returns Name +// GetName returns Name func (m tasksummary) GetName() *string { return m.Name } -//GetDescription returns Description +// GetDescription returns Description func (m tasksummary) GetDescription() *string { return m.Description } -//GetObjectVersion returns ObjectVersion +// GetObjectVersion returns ObjectVersion func (m tasksummary) GetObjectVersion() *int { return m.ObjectVersion } -//GetObjectStatus returns ObjectStatus +// GetObjectStatus returns ObjectStatus func (m tasksummary) GetObjectStatus() *int { return m.ObjectStatus } -//GetIdentifier returns Identifier +// GetIdentifier returns Identifier func (m tasksummary) GetIdentifier() *string { return m.Identifier } -//GetInputPorts returns InputPorts +// GetInputPorts returns InputPorts func (m tasksummary) GetInputPorts() []InputPort { return m.InputPorts } -//GetOutputPorts returns OutputPorts +// GetOutputPorts returns OutputPorts func (m tasksummary) GetOutputPorts() []OutputPort { return m.OutputPorts } -//GetParameters returns Parameters +// GetParameters returns Parameters func (m tasksummary) GetParameters() []Parameter { return m.Parameters } -//GetOpConfigValues returns OpConfigValues +// GetOpConfigValues returns OpConfigValues func (m tasksummary) GetOpConfigValues() *ConfigValues { return m.OpConfigValues } -//GetConfigProviderDelegate returns ConfigProviderDelegate +// GetConfigProviderDelegate returns ConfigProviderDelegate func (m tasksummary) GetConfigProviderDelegate() *ConfigProvider { return m.ConfigProviderDelegate } -//GetMetadata returns Metadata +// GetMetadata returns Metadata func (m tasksummary) GetMetadata() *ObjectMetadata { return m.Metadata } -//GetKeyMap returns KeyMap +// GetKeyMap returns KeyMap func (m tasksummary) GetKeyMap() map[string]string { return m.KeyMap } diff --git a/dataintegration/task_summary_collection.go b/dataintegration/task_summary_collection.go index 5c382f518f..79ec9c73e4 100644 --- a/dataintegration/task_summary_collection.go +++ b/dataintegration/task_summary_collection.go @@ -62,6 +62,5 @@ func (m *TaskSummaryCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/dataintegration/task_summary_from_rest_task.go b/dataintegration/task_summary_from_rest_task.go index 226f3a7f06..36559af023 100644 --- a/dataintegration/task_summary_from_rest_task.go +++ b/dataintegration/task_summary_from_rest_task.go @@ -258,20 +258,11 @@ func (m *TaskSummaryFromRestTask) UnmarshalJSON(data []byte) (e error) { m.Identifier = model.Identifier m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]OutputPort, len(model.OutputPorts)) - for i, n := range model.OutputPorts { - m.OutputPorts[i] = n - } - + copy(m.OutputPorts, model.OutputPorts) m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues m.ConfigProviderDelegate = model.ConfigProviderDelegate diff --git a/dataintegration/typed_object.go b/dataintegration/typed_object.go index 81dc656b55..159aa95a36 100644 --- a/dataintegration/typed_object.go +++ b/dataintegration/typed_object.go @@ -169,37 +169,37 @@ func (m *typedobject) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) } } -//GetKey returns Key +// GetKey returns Key func (m typedobject) GetKey() *string { return m.Key } -//GetModelVersion returns ModelVersion +// GetModelVersion returns ModelVersion func (m typedobject) GetModelVersion() *string { return m.ModelVersion } -//GetParentRef returns ParentRef +// GetParentRef returns ParentRef func (m typedobject) GetParentRef() *ParentReference { return m.ParentRef } -//GetConfigValues returns ConfigValues +// GetConfigValues returns ConfigValues func (m typedobject) GetConfigValues() *ConfigValues { return m.ConfigValues } -//GetObjectStatus returns ObjectStatus +// GetObjectStatus returns ObjectStatus func (m typedobject) GetObjectStatus() *int { return m.ObjectStatus } -//GetName returns Name +// GetName returns Name func (m typedobject) GetName() *string { return m.Name } -//GetDescription returns Description +// GetDescription returns Description func (m typedobject) GetDescription() *string { return m.Description } diff --git a/dataintegration/union.go b/dataintegration/union.go index 1b4654ce6c..be53267dd4 100644 --- a/dataintegration/union.go +++ b/dataintegration/union.go @@ -190,10 +190,7 @@ func (m *Union) UnmarshalJSON(data []byte) (e error) { m.ObjectVersion = model.ObjectVersion m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]TypedObject, len(model.OutputPorts)) for i, n := range model.OutputPorts { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -206,16 +203,12 @@ func (m *Union) UnmarshalJSON(data []byte) (e error) { m.OutputPorts[i] = nil } } - m.ObjectStatus = model.ObjectStatus m.Identifier = model.Identifier m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues m.UnionType = model.UnionType diff --git a/dataintegration/unique_key.go b/dataintegration/unique_key.go index ed73915796..adc1277901 100644 --- a/dataintegration/unique_key.go +++ b/dataintegration/unique_key.go @@ -93,32 +93,32 @@ func (m *uniquekey) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetKey returns Key +// GetKey returns Key func (m uniquekey) GetKey() *string { return m.Key } -//GetModelVersion returns ModelVersion +// GetModelVersion returns ModelVersion func (m uniquekey) GetModelVersion() *string { return m.ModelVersion } -//GetParentRef returns ParentRef +// GetParentRef returns ParentRef func (m uniquekey) GetParentRef() *ParentReference { return m.ParentRef } -//GetName returns Name +// GetName returns Name func (m uniquekey) GetName() *string { return m.Name } -//GetAttributeRefs returns AttributeRefs +// GetAttributeRefs returns AttributeRefs func (m uniquekey) GetAttributeRefs() []KeyAttribute { return m.AttributeRefs } -//GetObjectStatus returns ObjectStatus +// GetObjectStatus returns ObjectStatus func (m uniquekey) GetObjectStatus() *int { return m.ObjectStatus } diff --git a/dataintegration/update_connection_details.go b/dataintegration/update_connection_details.go index a376ed1555..a2c718907c 100644 --- a/dataintegration/update_connection_details.go +++ b/dataintegration/update_connection_details.go @@ -50,8 +50,6 @@ type UpdateConnectionDetails interface { type updateconnectiondetails struct { JsonData []byte - Key *string `mandatory:"true" json:"key"` - ObjectVersion *int `mandatory:"true" json:"objectVersion"` ModelVersion *string `mandatory:"false" json:"modelVersion"` ParentRef *ParentReference `mandatory:"false" json:"parentRef"` Name *string `mandatory:"false" json:"name"` @@ -60,6 +58,8 @@ type updateconnectiondetails struct { Identifier *string `mandatory:"false" json:"identifier"` ConnectionProperties []ConnectionProperty `mandatory:"false" json:"connectionProperties"` RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + Key *string `mandatory:"true" json:"key"` + ObjectVersion *int `mandatory:"true" json:"objectVersion"` ModelType string `json:"modelType"` } @@ -172,56 +172,56 @@ func (m *updateconnectiondetails) UnmarshalPolymorphicJSON(data []byte) (interfa } } -//GetKey returns Key -func (m updateconnectiondetails) GetKey() *string { - return m.Key -} - -//GetObjectVersion returns ObjectVersion -func (m updateconnectiondetails) GetObjectVersion() *int { - return m.ObjectVersion -} - -//GetModelVersion returns ModelVersion +// GetModelVersion returns ModelVersion func (m updateconnectiondetails) GetModelVersion() *string { return m.ModelVersion } -//GetParentRef returns ParentRef +// GetParentRef returns ParentRef func (m updateconnectiondetails) GetParentRef() *ParentReference { return m.ParentRef } -//GetName returns Name +// GetName returns Name func (m updateconnectiondetails) GetName() *string { return m.Name } -//GetDescription returns Description +// GetDescription returns Description func (m updateconnectiondetails) GetDescription() *string { return m.Description } -//GetObjectStatus returns ObjectStatus +// GetObjectStatus returns ObjectStatus func (m updateconnectiondetails) GetObjectStatus() *int { return m.ObjectStatus } -//GetIdentifier returns Identifier +// GetIdentifier returns Identifier func (m updateconnectiondetails) GetIdentifier() *string { return m.Identifier } -//GetConnectionProperties returns ConnectionProperties +// GetConnectionProperties returns ConnectionProperties func (m updateconnectiondetails) GetConnectionProperties() []ConnectionProperty { return m.ConnectionProperties } -//GetRegistryMetadata returns RegistryMetadata +// GetRegistryMetadata returns RegistryMetadata func (m updateconnectiondetails) GetRegistryMetadata() *RegistryMetadata { return m.RegistryMetadata } +// GetKey returns Key +func (m updateconnectiondetails) GetKey() *string { + return m.Key +} + +// GetObjectVersion returns ObjectVersion +func (m updateconnectiondetails) GetObjectVersion() *int { + return m.ObjectVersion +} + func (m updateconnectiondetails) String() string { return common.PointerString(m) } diff --git a/dataintegration/update_data_asset_details.go b/dataintegration/update_data_asset_details.go index 9cdce4327b..f2e1871b35 100644 --- a/dataintegration/update_data_asset_details.go +++ b/dataintegration/update_data_asset_details.go @@ -51,8 +51,6 @@ type UpdateDataAssetDetails interface { type updatedataassetdetails struct { JsonData []byte - Key *string `mandatory:"true" json:"key"` - ObjectVersion *int `mandatory:"true" json:"objectVersion"` ModelVersion *string `mandatory:"false" json:"modelVersion"` Name *string `mandatory:"false" json:"name"` Description *string `mandatory:"false" json:"description"` @@ -61,6 +59,8 @@ type updatedataassetdetails struct { ExternalKey *string `mandatory:"false" json:"externalKey"` AssetProperties map[string]string `mandatory:"false" json:"assetProperties"` RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + Key *string `mandatory:"true" json:"key"` + ObjectVersion *int `mandatory:"true" json:"objectVersion"` ModelType string `json:"modelType"` } @@ -165,56 +165,56 @@ func (m *updatedataassetdetails) UnmarshalPolymorphicJSON(data []byte) (interfac } } -//GetKey returns Key -func (m updatedataassetdetails) GetKey() *string { - return m.Key -} - -//GetObjectVersion returns ObjectVersion -func (m updatedataassetdetails) GetObjectVersion() *int { - return m.ObjectVersion -} - -//GetModelVersion returns ModelVersion +// GetModelVersion returns ModelVersion func (m updatedataassetdetails) GetModelVersion() *string { return m.ModelVersion } -//GetName returns Name +// GetName returns Name func (m updatedataassetdetails) GetName() *string { return m.Name } -//GetDescription returns Description +// GetDescription returns Description func (m updatedataassetdetails) GetDescription() *string { return m.Description } -//GetObjectStatus returns ObjectStatus +// GetObjectStatus returns ObjectStatus func (m updatedataassetdetails) GetObjectStatus() *int { return m.ObjectStatus } -//GetIdentifier returns Identifier +// GetIdentifier returns Identifier func (m updatedataassetdetails) GetIdentifier() *string { return m.Identifier } -//GetExternalKey returns ExternalKey +// GetExternalKey returns ExternalKey func (m updatedataassetdetails) GetExternalKey() *string { return m.ExternalKey } -//GetAssetProperties returns AssetProperties +// GetAssetProperties returns AssetProperties func (m updatedataassetdetails) GetAssetProperties() map[string]string { return m.AssetProperties } -//GetRegistryMetadata returns RegistryMetadata +// GetRegistryMetadata returns RegistryMetadata func (m updatedataassetdetails) GetRegistryMetadata() *RegistryMetadata { return m.RegistryMetadata } +// GetKey returns Key +func (m updatedataassetdetails) GetKey() *string { + return m.Key +} + +// GetObjectVersion returns ObjectVersion +func (m updatedataassetdetails) GetObjectVersion() *int { + return m.ObjectVersion +} + func (m updatedataassetdetails) String() string { return common.PointerString(m) } diff --git a/dataintegration/update_task_details.go b/dataintegration/update_task_details.go index 53e0be4d7e..ad14085db4 100644 --- a/dataintegration/update_task_details.go +++ b/dataintegration/update_task_details.go @@ -60,8 +60,6 @@ type UpdateTaskDetails interface { type updatetaskdetails struct { JsonData []byte - Key *string `mandatory:"true" json:"key"` - ObjectVersion *int `mandatory:"true" json:"objectVersion"` ModelVersion *string `mandatory:"false" json:"modelVersion"` ParentRef *ParentReference `mandatory:"false" json:"parentRef"` Name *string `mandatory:"false" json:"name"` @@ -74,6 +72,8 @@ type updatetaskdetails struct { OpConfigValues *ConfigValues `mandatory:"false" json:"opConfigValues"` ConfigProviderDelegate *ConfigProvider `mandatory:"false" json:"configProviderDelegate"` RegistryMetadata *RegistryMetadata `mandatory:"false" json:"registryMetadata"` + Key *string `mandatory:"true" json:"key"` + ObjectVersion *int `mandatory:"true" json:"objectVersion"` ModelType string `json:"modelType"` } @@ -146,76 +146,76 @@ func (m *updatetaskdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetKey returns Key -func (m updatetaskdetails) GetKey() *string { - return m.Key -} - -//GetObjectVersion returns ObjectVersion -func (m updatetaskdetails) GetObjectVersion() *int { - return m.ObjectVersion -} - -//GetModelVersion returns ModelVersion +// GetModelVersion returns ModelVersion func (m updatetaskdetails) GetModelVersion() *string { return m.ModelVersion } -//GetParentRef returns ParentRef +// GetParentRef returns ParentRef func (m updatetaskdetails) GetParentRef() *ParentReference { return m.ParentRef } -//GetName returns Name +// GetName returns Name func (m updatetaskdetails) GetName() *string { return m.Name } -//GetDescription returns Description +// GetDescription returns Description func (m updatetaskdetails) GetDescription() *string { return m.Description } -//GetObjectStatus returns ObjectStatus +// GetObjectStatus returns ObjectStatus func (m updatetaskdetails) GetObjectStatus() *int { return m.ObjectStatus } -//GetIdentifier returns Identifier +// GetIdentifier returns Identifier func (m updatetaskdetails) GetIdentifier() *string { return m.Identifier } -//GetInputPorts returns InputPorts +// GetInputPorts returns InputPorts func (m updatetaskdetails) GetInputPorts() []InputPort { return m.InputPorts } -//GetOutputPorts returns OutputPorts +// GetOutputPorts returns OutputPorts func (m updatetaskdetails) GetOutputPorts() []OutputPort { return m.OutputPorts } -//GetParameters returns Parameters +// GetParameters returns Parameters func (m updatetaskdetails) GetParameters() []Parameter { return m.Parameters } -//GetOpConfigValues returns OpConfigValues +// GetOpConfigValues returns OpConfigValues func (m updatetaskdetails) GetOpConfigValues() *ConfigValues { return m.OpConfigValues } -//GetConfigProviderDelegate returns ConfigProviderDelegate +// GetConfigProviderDelegate returns ConfigProviderDelegate func (m updatetaskdetails) GetConfigProviderDelegate() *ConfigProvider { return m.ConfigProviderDelegate } -//GetRegistryMetadata returns RegistryMetadata +// GetRegistryMetadata returns RegistryMetadata func (m updatetaskdetails) GetRegistryMetadata() *RegistryMetadata { return m.RegistryMetadata } +// GetKey returns Key +func (m updatetaskdetails) GetKey() *string { + return m.Key +} + +// GetObjectVersion returns ObjectVersion +func (m updatetaskdetails) GetObjectVersion() *int { + return m.ObjectVersion +} + func (m updatetaskdetails) String() string { return common.PointerString(m) } diff --git a/dataintegration/update_task_from_rest_task.go b/dataintegration/update_task_from_rest_task.go index 2caba2d9f7..18129c800c 100644 --- a/dataintegration/update_task_from_rest_task.go +++ b/dataintegration/update_task_from_rest_task.go @@ -253,20 +253,11 @@ func (m *UpdateTaskFromRestTask) UnmarshalJSON(data []byte) (e error) { m.Identifier = model.Identifier m.InputPorts = make([]InputPort, len(model.InputPorts)) - for i, n := range model.InputPorts { - m.InputPorts[i] = n - } - + copy(m.InputPorts, model.InputPorts) m.OutputPorts = make([]OutputPort, len(model.OutputPorts)) - for i, n := range model.OutputPorts { - m.OutputPorts[i] = n - } - + copy(m.OutputPorts, model.OutputPorts) m.Parameters = make([]Parameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.OpConfigValues = model.OpConfigValues m.ConfigProviderDelegate = model.ConfigProviderDelegate @@ -308,10 +299,7 @@ func (m *UpdateTaskFromRestTask) UnmarshalJSON(data []byte) (e error) { m.PollRestCallConfig = model.PollRestCallConfig m.TypedExpressions = make([]TypedExpression, len(model.TypedExpressions)) - for i, n := range model.TypedExpressions { - m.TypedExpressions[i] = n - } - + copy(m.TypedExpressions, model.TypedExpressions) m.Key = model.Key m.ObjectVersion = model.ObjectVersion diff --git a/dataintegration/write_operation_config.go b/dataintegration/write_operation_config.go index 24dcf0b9c8..0c3a7dc76e 100644 --- a/dataintegration/write_operation_config.go +++ b/dataintegration/write_operation_config.go @@ -148,7 +148,6 @@ func (m *WriteOperationConfig) UnmarshalJSON(data []byte) (e error) { m.Operations[i] = nil } } - m.DataFormat = model.DataFormat nn, e = model.PartitionConfig.UnmarshalPolymorphicJSON(model.PartitionConfig.JsonData) diff --git a/datalabelingservice/datalabelingservice_datalabelingmanagement_client.go b/datalabelingservice/datalabelingservice_datalabelingmanagement_client.go index e21e77b597..40619f06cb 100644 --- a/datalabelingservice/datalabelingservice_datalabelingmanagement_client.go +++ b/datalabelingservice/datalabelingservice_datalabelingmanagement_client.go @@ -80,7 +80,7 @@ func (client *DataLabelingManagementClient) setConfigurationProvider(configProvi 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/datalabelingservicedataplane/annotation.go b/datalabelingservicedataplane/annotation.go index 6817a43e62..381f0575d7 100644 --- a/datalabelingservicedataplane/annotation.go +++ b/datalabelingservicedataplane/annotation.go @@ -126,7 +126,6 @@ func (m *Annotation) UnmarshalJSON(data []byte) (e error) { m.Entities[i] = nil } } - m.CompartmentId = model.CompartmentId m.LifecycleState = model.LifecycleState diff --git a/datalabelingservicedataplane/create_annotation_details.go b/datalabelingservicedataplane/create_annotation_details.go index 8965744b62..9f03996fdf 100644 --- a/datalabelingservicedataplane/create_annotation_details.go +++ b/datalabelingservicedataplane/create_annotation_details.go @@ -88,6 +88,5 @@ func (m *CreateAnnotationDetails) UnmarshalJSON(data []byte) (e error) { m.Entities[i] = nil } } - return } diff --git a/datalabelingservicedataplane/datalabelingservicedataplane_datalabeling_client.go b/datalabelingservicedataplane/datalabelingservicedataplane_datalabeling_client.go index e1fb6693b2..8f14e0c522 100644 --- a/datalabelingservicedataplane/datalabelingservicedataplane_datalabeling_client.go +++ b/datalabelingservicedataplane/datalabelingservicedataplane_datalabeling_client.go @@ -80,7 +80,7 @@ func (client *DataLabelingClient) setConfigurationProvider(configProvider common 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/datalabelingservicedataplane/update_annotation_details.go b/datalabelingservicedataplane/update_annotation_details.go index e65aff196e..602975ff2f 100644 --- a/datalabelingservicedataplane/update_annotation_details.go +++ b/datalabelingservicedataplane/update_annotation_details.go @@ -72,7 +72,6 @@ func (m *UpdateAnnotationDetails) UnmarshalJSON(data []byte) (e error) { m.Entities[i] = nil } } - m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/datasafe/create_library_masking_format_details.go b/datasafe/create_library_masking_format_details.go index 7b9d105b95..b6c970b9d9 100644 --- a/datasafe/create_library_masking_format_details.go +++ b/datasafe/create_library_masking_format_details.go @@ -86,10 +86,7 @@ func (m *CreateLibraryMaskingFormatDetails) UnmarshalJSON(data []byte) (e error) m.Description = model.Description m.SensitiveTypeIds = make([]string, len(model.SensitiveTypeIds)) - for i, n := range model.SensitiveTypeIds { - m.SensitiveTypeIds[i] = n - } - + copy(m.SensitiveTypeIds, model.SensitiveTypeIds) m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags @@ -108,6 +105,5 @@ func (m *CreateLibraryMaskingFormatDetails) UnmarshalJSON(data []byte) (e error) m.FormatEntries[i] = nil } } - return } diff --git a/datasafe/create_sensitive_type_details.go b/datasafe/create_sensitive_type_details.go index 2eefc6cb02..e82c807563 100644 --- a/datasafe/create_sensitive_type_details.go +++ b/datasafe/create_sensitive_type_details.go @@ -45,13 +45,13 @@ type CreateSensitiveTypeDetails interface { type createsensitivetypedetails struct { JsonData []byte - CompartmentId *string `mandatory:"true" json:"compartmentId"` DisplayName *string `mandatory:"false" json:"displayName"` ShortName *string `mandatory:"false" json:"shortName"` Description *string `mandatory:"false" json:"description"` ParentCategoryId *string `mandatory:"false" json:"parentCategoryId"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` EntityType string `json:"entityType"` } @@ -101,41 +101,41 @@ func (m *createsensitivetypedetails) UnmarshalPolymorphicJSON(data []byte) (inte } } -//GetCompartmentId returns CompartmentId -func (m createsensitivetypedetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createsensitivetypedetails) GetDisplayName() *string { return m.DisplayName } -//GetShortName returns ShortName +// GetShortName returns ShortName func (m createsensitivetypedetails) GetShortName() *string { return m.ShortName } -//GetDescription returns Description +// GetDescription returns Description func (m createsensitivetypedetails) GetDescription() *string { return m.Description } -//GetParentCategoryId returns ParentCategoryId +// GetParentCategoryId returns ParentCategoryId func (m createsensitivetypedetails) GetParentCategoryId() *string { return m.ParentCategoryId } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createsensitivetypedetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createsensitivetypedetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetCompartmentId returns CompartmentId +func (m createsensitivetypedetails) GetCompartmentId() *string { + return m.CompartmentId +} + func (m createsensitivetypedetails) String() string { return common.PointerString(m) } diff --git a/datasafe/database_details.go b/datasafe/database_details.go index 00c73be2e7..a5aa144ea8 100644 --- a/datasafe/database_details.go +++ b/datasafe/database_details.go @@ -73,7 +73,7 @@ func (m *databasedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, er } } -//GetInfrastructureType returns InfrastructureType +// GetInfrastructureType returns InfrastructureType func (m databasedetails) GetInfrastructureType() InfrastructureTypeEnum { return m.InfrastructureType } diff --git a/datasafe/datasafe_client.go b/datasafe/datasafe_client.go index 721c76396c..aa509e34d9 100644 --- a/datasafe/datasafe_client.go +++ b/datasafe/datasafe_client.go @@ -80,7 +80,7 @@ func (client *DataSafeClient) setConfigurationProvider(configProvider common.Con 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/datasafe/format_entry.go b/datasafe/format_entry.go index 3e187d9c1a..bee13fc11e 100644 --- a/datasafe/format_entry.go +++ b/datasafe/format_entry.go @@ -156,7 +156,7 @@ func (m *formatentry) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) } } -//GetDescription returns Description +// GetDescription returns Description func (m formatentry) GetDescription() *string { return m.Description } diff --git a/datasafe/library_masking_format.go b/datasafe/library_masking_format.go index 0250a14258..2161b7a8e4 100644 --- a/datasafe/library_masking_format.go +++ b/datasafe/library_masking_format.go @@ -111,10 +111,7 @@ func (m *LibraryMaskingFormat) UnmarshalJSON(data []byte) (e error) { m.Description = model.Description m.SensitiveTypeIds = make([]string, len(model.SensitiveTypeIds)) - for i, n := range model.SensitiveTypeIds { - m.SensitiveTypeIds[i] = n - } - + copy(m.SensitiveTypeIds, model.SensitiveTypeIds) m.FormatEntries = make([]FormatEntry, len(model.FormatEntries)) for i, n := range model.FormatEntries { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -127,7 +124,6 @@ func (m *LibraryMaskingFormat) UnmarshalJSON(data []byte) (e error) { m.FormatEntries[i] = nil } } - m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/datasafe/masking_format.go b/datasafe/masking_format.go index 4f109f2ed0..975deb9af8 100644 --- a/datasafe/masking_format.go +++ b/datasafe/masking_format.go @@ -87,6 +87,5 @@ func (m *MaskingFormat) UnmarshalJSON(data []byte) (e error) { m.FormatEntries[i] = nil } } - return } diff --git a/datasafe/patch_alert_policy_rule_details.go b/datasafe/patch_alert_policy_rule_details.go index a4e18ad3b7..94f3a10fc4 100644 --- a/datasafe/patch_alert_policy_rule_details.go +++ b/datasafe/patch_alert_policy_rule_details.go @@ -62,6 +62,5 @@ func (m *PatchAlertPolicyRuleDetails) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/datasafe/patch_alerts_details.go b/datasafe/patch_alerts_details.go index f5512883d3..21fed74f55 100644 --- a/datasafe/patch_alerts_details.go +++ b/datasafe/patch_alerts_details.go @@ -66,7 +66,6 @@ func (m *PatchAlertsDetails) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - m.CompartmentId = model.CompartmentId return diff --git a/datasafe/patch_discovery_job_result_details.go b/datasafe/patch_discovery_job_result_details.go index d01389bfb3..005c3c6e5a 100644 --- a/datasafe/patch_discovery_job_result_details.go +++ b/datasafe/patch_discovery_job_result_details.go @@ -62,6 +62,5 @@ func (m *PatchDiscoveryJobResultDetails) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/datasafe/patch_instruction.go b/datasafe/patch_instruction.go index 5bf10461a2..95044356c2 100644 --- a/datasafe/patch_instruction.go +++ b/datasafe/patch_instruction.go @@ -73,7 +73,7 @@ func (m *patchinstruction) UnmarshalPolymorphicJSON(data []byte) (interface{}, e } } -//GetSelection returns Selection +// GetSelection returns Selection func (m patchinstruction) GetSelection() *string { return m.Selection } diff --git a/datasafe/patch_masking_columns_details.go b/datasafe/patch_masking_columns_details.go index 3c224b28ab..5750679ee5 100644 --- a/datasafe/patch_masking_columns_details.go +++ b/datasafe/patch_masking_columns_details.go @@ -62,6 +62,5 @@ func (m *PatchMaskingColumnsDetails) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/datasafe/patch_sdm_masking_policy_difference_columns_details.go b/datasafe/patch_sdm_masking_policy_difference_columns_details.go index cd54552d98..2bbee6d1ae 100644 --- a/datasafe/patch_sdm_masking_policy_difference_columns_details.go +++ b/datasafe/patch_sdm_masking_policy_difference_columns_details.go @@ -62,6 +62,5 @@ func (m *PatchSdmMaskingPolicyDifferenceColumnsDetails) UnmarshalJSON(data []byt m.Items[i] = nil } } - return } diff --git a/datasafe/patch_sensitive_column_details.go b/datasafe/patch_sensitive_column_details.go index 1ecf7abadf..754ec9a538 100644 --- a/datasafe/patch_sensitive_column_details.go +++ b/datasafe/patch_sensitive_column_details.go @@ -62,6 +62,5 @@ func (m *PatchSensitiveColumnDetails) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/datasafe/patch_target_alert_policy_association_details.go b/datasafe/patch_target_alert_policy_association_details.go index 4fe0514130..cc70f6958e 100644 --- a/datasafe/patch_target_alert_policy_association_details.go +++ b/datasafe/patch_target_alert_policy_association_details.go @@ -66,7 +66,6 @@ func (m *PatchTargetAlertPolicyAssociationDetails) UnmarshalJSON(data []byte) (e m.Items[i] = nil } } - m.CompartmentId = model.CompartmentId return diff --git a/datasafe/sensitive_type.go b/datasafe/sensitive_type.go index 26ec62d329..a7c5ae4fa8 100644 --- a/datasafe/sensitive_type.go +++ b/datasafe/sensitive_type.go @@ -66,6 +66,12 @@ type SensitiveType interface { type sensitivetype struct { JsonData []byte + ShortName *string `mandatory:"false" json:"shortName"` + Description *string `mandatory:"false" json:"description"` + ParentCategoryId *string `mandatory:"false" json:"parentCategoryId"` + 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"` Id *string `mandatory:"true" json:"id"` DisplayName *string `mandatory:"true" json:"displayName"` CompartmentId *string `mandatory:"true" json:"compartmentId"` @@ -73,12 +79,6 @@ type sensitivetype struct { Source SensitiveTypeSourceEnum `mandatory:"true" json:"source"` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` - ShortName *string `mandatory:"false" json:"shortName"` - Description *string `mandatory:"false" json:"description"` - ParentCategoryId *string `mandatory:"false" json:"parentCategoryId"` - 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"` EntityType string `json:"entityType"` } @@ -134,71 +134,71 @@ func (m *sensitivetype) UnmarshalPolymorphicJSON(data []byte) (interface{}, erro } } -//GetId returns Id +// GetShortName returns ShortName +func (m sensitivetype) GetShortName() *string { + return m.ShortName +} + +// GetDescription returns Description +func (m sensitivetype) GetDescription() *string { + return m.Description +} + +// GetParentCategoryId returns ParentCategoryId +func (m sensitivetype) GetParentCategoryId() *string { + return m.ParentCategoryId +} + +// GetFreeformTags returns FreeformTags +func (m sensitivetype) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m sensitivetype) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m sensitivetype) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetId returns Id func (m sensitivetype) GetId() *string { return m.Id } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m sensitivetype) GetDisplayName() *string { return m.DisplayName } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m sensitivetype) GetCompartmentId() *string { return m.CompartmentId } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m sensitivetype) GetLifecycleState() DiscoveryLifecycleStateEnum { return m.LifecycleState } -//GetSource returns Source +// GetSource returns Source func (m sensitivetype) GetSource() SensitiveTypeSourceEnum { return m.Source } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m sensitivetype) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m sensitivetype) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetShortName returns ShortName -func (m sensitivetype) GetShortName() *string { - return m.ShortName -} - -//GetDescription returns Description -func (m sensitivetype) GetDescription() *string { - return m.Description -} - -//GetParentCategoryId returns ParentCategoryId -func (m sensitivetype) GetParentCategoryId() *string { - return m.ParentCategoryId -} - -//GetFreeformTags returns FreeformTags -func (m sensitivetype) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m sensitivetype) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - -//GetSystemTags returns SystemTags -func (m sensitivetype) GetSystemTags() map[string]map[string]interface{} { - return m.SystemTags -} - func (m sensitivetype) String() string { return common.PointerString(m) } diff --git a/datasafe/target_database.go b/datasafe/target_database.go index 6d1360d9a6..40d24b7e11 100644 --- a/datasafe/target_database.go +++ b/datasafe/target_database.go @@ -129,10 +129,7 @@ func (m *TargetDatabase) UnmarshalJSON(data []byte) (e error) { } m.AssociatedResourceIds = make([]string, len(model.AssociatedResourceIds)) - for i, n := range model.AssociatedResourceIds { - m.AssociatedResourceIds[i] = n - } - + copy(m.AssociatedResourceIds, model.AssociatedResourceIds) m.LifecycleDetails = model.LifecycleDetails m.TimeUpdated = model.TimeUpdated diff --git a/datasafe/update_library_masking_format_details.go b/datasafe/update_library_masking_format_details.go index 3696c7251e..81d00a72d2 100644 --- a/datasafe/update_library_masking_format_details.go +++ b/datasafe/update_library_masking_format_details.go @@ -78,10 +78,7 @@ func (m *UpdateLibraryMaskingFormatDetails) UnmarshalJSON(data []byte) (e error) m.Description = model.Description m.SensitiveTypeIds = make([]string, len(model.SensitiveTypeIds)) - for i, n := range model.SensitiveTypeIds { - m.SensitiveTypeIds[i] = n - } - + copy(m.SensitiveTypeIds, model.SensitiveTypeIds) m.FormatEntries = make([]FormatEntry, len(model.FormatEntries)) for i, n := range model.FormatEntries { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -94,7 +91,6 @@ func (m *UpdateLibraryMaskingFormatDetails) UnmarshalJSON(data []byte) (e error) m.FormatEntries[i] = nil } } - m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/datasafe/update_sensitive_type_details.go b/datasafe/update_sensitive_type_details.go index 1a927ee44d..c38a58970a 100644 --- a/datasafe/update_sensitive_type_details.go +++ b/datasafe/update_sensitive_type_details.go @@ -96,32 +96,32 @@ func (m *updatesensitivetypedetails) UnmarshalPolymorphicJSON(data []byte) (inte } } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m updatesensitivetypedetails) GetDisplayName() *string { return m.DisplayName } -//GetShortName returns ShortName +// GetShortName returns ShortName func (m updatesensitivetypedetails) GetShortName() *string { return m.ShortName } -//GetDescription returns Description +// GetDescription returns Description func (m updatesensitivetypedetails) GetDescription() *string { return m.Description } -//GetParentCategoryId returns ParentCategoryId +// GetParentCategoryId returns ParentCategoryId func (m updatesensitivetypedetails) GetParentCategoryId() *string { return m.ParentCategoryId } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updatesensitivetypedetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updatesensitivetypedetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/datascience/create_pipeline_details.go b/datascience/create_pipeline_details.go index 4829e59626..5d546be79a 100644 --- a/datascience/create_pipeline_details.go +++ b/datascience/create_pipeline_details.go @@ -123,6 +123,5 @@ func (m *CreatePipelineDetails) UnmarshalJSON(data []byte) (e error) { m.StepDetails[i] = nil } } - return } diff --git a/datascience/create_pipeline_run_details.go b/datascience/create_pipeline_run_details.go index 471614980e..2c2048f99b 100644 --- a/datascience/create_pipeline_run_details.go +++ b/datascience/create_pipeline_run_details.go @@ -104,10 +104,7 @@ func (m *CreatePipelineRunDetails) UnmarshalJSON(data []byte) (e error) { m.LogConfigurationOverrideDetails = model.LogConfigurationOverrideDetails m.StepOverrideDetails = make([]PipelineStepOverrideDetails, len(model.StepOverrideDetails)) - for i, n := range model.StepOverrideDetails { - m.StepOverrideDetails[i] = n - } - + copy(m.StepOverrideDetails, model.StepOverrideDetails) m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/datascience/datascience_client.go b/datascience/datascience_client.go index ffa246202d..08b0ab49f4 100644 --- a/datascience/datascience_client.go +++ b/datascience/datascience_client.go @@ -80,7 +80,7 @@ func (client *DataScienceClient) setConfigurationProvider(configProvider common. 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/datascience/pipeline.go b/datascience/pipeline.go index fe9ce550e5..8dd024f81e 100644 --- a/datascience/pipeline.go +++ b/datascience/pipeline.go @@ -169,7 +169,6 @@ func (m *Pipeline) UnmarshalJSON(data []byte) (e error) { m.StepDetails[i] = nil } } - m.LifecycleState = model.LifecycleState return diff --git a/datascience/pipeline_run.go b/datascience/pipeline_run.go index d17806a4bc..54afd715d7 100644 --- a/datascience/pipeline_run.go +++ b/datascience/pipeline_run.go @@ -161,10 +161,7 @@ func (m *PipelineRun) UnmarshalJSON(data []byte) (e error) { m.LogConfigurationOverrideDetails = model.LogConfigurationOverrideDetails m.StepOverrideDetails = make([]PipelineStepOverrideDetails, len(model.StepOverrideDetails)) - for i, n := range model.StepOverrideDetails { - m.StepOverrideDetails[i] = n - } - + copy(m.StepOverrideDetails, model.StepOverrideDetails) m.LogDetails = model.LogDetails m.LifecycleDetails = model.LifecycleDetails @@ -201,7 +198,6 @@ func (m *PipelineRun) UnmarshalJSON(data []byte) (e error) { m.StepRuns[i] = nil } } - m.LifecycleState = model.LifecycleState return diff --git a/datascience/pipeline_step_details.go b/datascience/pipeline_step_details.go index 52b3a92147..402b2e773b 100644 --- a/datascience/pipeline_step_details.go +++ b/datascience/pipeline_step_details.go @@ -33,10 +33,10 @@ type PipelineStepDetails interface { type pipelinestepdetails struct { JsonData []byte - StepName *string `mandatory:"true" json:"stepName"` Description *string `mandatory:"false" json:"description"` DependsOn []string `mandatory:"false" json:"dependsOn"` StepConfigurationDetails *PipelineStepConfigurationDetails `mandatory:"false" json:"stepConfigurationDetails"` + StepName *string `mandatory:"true" json:"stepName"` StepType string `json:"stepType"` } @@ -83,26 +83,26 @@ func (m *pipelinestepdetails) UnmarshalPolymorphicJSON(data []byte) (interface{} } } -//GetStepName returns StepName -func (m pipelinestepdetails) GetStepName() *string { - return m.StepName -} - -//GetDescription returns Description +// GetDescription returns Description func (m pipelinestepdetails) GetDescription() *string { return m.Description } -//GetDependsOn returns DependsOn +// GetDependsOn returns DependsOn func (m pipelinestepdetails) GetDependsOn() []string { return m.DependsOn } -//GetStepConfigurationDetails returns StepConfigurationDetails +// GetStepConfigurationDetails returns StepConfigurationDetails func (m pipelinestepdetails) GetStepConfigurationDetails() *PipelineStepConfigurationDetails { return m.StepConfigurationDetails } +// GetStepName returns StepName +func (m pipelinestepdetails) GetStepName() *string { + return m.StepName +} + func (m pipelinestepdetails) String() string { return common.PointerString(m) } diff --git a/datascience/pipeline_step_run.go b/datascience/pipeline_step_run.go index e6f0ea2232..4e7bda8da4 100644 --- a/datascience/pipeline_step_run.go +++ b/datascience/pipeline_step_run.go @@ -37,11 +37,11 @@ type PipelineStepRun interface { type pipelinesteprun struct { JsonData []byte - TimeStarted *common.SDKTime `mandatory:"true" json:"timeStarted"` - StepName *string `mandatory:"true" json:"stepName"` TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` LifecycleState PipelineStepRunLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + TimeStarted *common.SDKTime `mandatory:"true" json:"timeStarted"` + StepName *string `mandatory:"true" json:"stepName"` StepType string `json:"stepType"` } @@ -89,31 +89,31 @@ func (m *pipelinesteprun) UnmarshalPolymorphicJSON(data []byte) (interface{}, er } } -//GetTimeStarted returns TimeStarted -func (m pipelinesteprun) GetTimeStarted() *common.SDKTime { - return m.TimeStarted -} - -//GetStepName returns StepName -func (m pipelinesteprun) GetStepName() *string { - return m.StepName -} - -//GetTimeFinished returns TimeFinished +// GetTimeFinished returns TimeFinished func (m pipelinesteprun) GetTimeFinished() *common.SDKTime { return m.TimeFinished } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m pipelinesteprun) GetLifecycleState() PipelineStepRunLifecycleStateEnum { return m.LifecycleState } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m pipelinesteprun) GetLifecycleDetails() *string { return m.LifecycleDetails } +// GetTimeStarted returns TimeStarted +func (m pipelinesteprun) GetTimeStarted() *common.SDKTime { + return m.TimeStarted +} + +// GetStepName returns StepName +func (m pipelinesteprun) GetStepName() *string { + return m.StepName +} + func (m pipelinesteprun) String() string { return common.PointerString(m) } diff --git a/datascience/pipeline_step_update_details.go b/datascience/pipeline_step_update_details.go index 462729711d..9bcf87e103 100644 --- a/datascience/pipeline_step_update_details.go +++ b/datascience/pipeline_step_update_details.go @@ -30,9 +30,9 @@ type PipelineStepUpdateDetails interface { type pipelinestepupdatedetails struct { JsonData []byte - StepName *string `mandatory:"true" json:"stepName"` Description *string `mandatory:"false" json:"description"` StepConfigurationDetails *PipelineStepConfigurationDetails `mandatory:"false" json:"stepConfigurationDetails"` + StepName *string `mandatory:"true" json:"stepName"` StepType string `json:"stepType"` } @@ -78,21 +78,21 @@ func (m *pipelinestepupdatedetails) UnmarshalPolymorphicJSON(data []byte) (inter } } -//GetStepName returns StepName -func (m pipelinestepupdatedetails) GetStepName() *string { - return m.StepName -} - -//GetDescription returns Description +// GetDescription returns Description func (m pipelinestepupdatedetails) GetDescription() *string { return m.Description } -//GetStepConfigurationDetails returns StepConfigurationDetails +// GetStepConfigurationDetails returns StepConfigurationDetails func (m pipelinestepupdatedetails) GetStepConfigurationDetails() *PipelineStepConfigurationDetails { return m.StepConfigurationDetails } +// GetStepName returns StepName +func (m pipelinestepupdatedetails) GetStepName() *string { + return m.StepName +} + func (m pipelinestepupdatedetails) String() string { return common.PointerString(m) } diff --git a/datascience/update_pipeline_details.go b/datascience/update_pipeline_details.go index c389e0b293..e8a5671e17 100644 --- a/datascience/update_pipeline_details.go +++ b/datascience/update_pipeline_details.go @@ -102,7 +102,6 @@ func (m *UpdatePipelineDetails) UnmarshalJSON(data []byte) (e error) { m.StepDetails[i] = nil } } - m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/devops/bitbucket_cloud_trigger.go b/devops/bitbucket_cloud_trigger.go index 18547430aa..0b4921ce05 100644 --- a/devops/bitbucket_cloud_trigger.go +++ b/devops/bitbucket_cloud_trigger.go @@ -226,7 +226,6 @@ func (m *BitbucketCloudTrigger) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - m.TriggerUrl = model.TriggerUrl return diff --git a/devops/bitbucket_cloud_trigger_create_result.go b/devops/bitbucket_cloud_trigger_create_result.go index 99303bb3c5..ea4d442dbb 100644 --- a/devops/bitbucket_cloud_trigger_create_result.go +++ b/devops/bitbucket_cloud_trigger_create_result.go @@ -226,7 +226,6 @@ func (m *BitbucketCloudTriggerCreateResult) UnmarshalJSON(data []byte) (e error) m.Actions[i] = nil } } - m.TriggerUrl = model.TriggerUrl return diff --git a/devops/bitbucket_server_trigger.go b/devops/bitbucket_server_trigger.go index 4580974ab8..d6215abfd6 100644 --- a/devops/bitbucket_server_trigger.go +++ b/devops/bitbucket_server_trigger.go @@ -220,7 +220,6 @@ func (m *BitbucketServerTrigger) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - m.TriggerUrl = model.TriggerUrl return diff --git a/devops/bitbucket_server_trigger_create_result.go b/devops/bitbucket_server_trigger_create_result.go index b5a95ee38d..4907370a1d 100644 --- a/devops/bitbucket_server_trigger_create_result.go +++ b/devops/bitbucket_server_trigger_create_result.go @@ -224,7 +224,6 @@ func (m *BitbucketServerTriggerCreateResult) UnmarshalJSON(data []byte) (e error m.Actions[i] = nil } } - m.Secret = model.Secret m.TriggerUrl = model.TriggerUrl diff --git a/devops/build_pipeline_stage.go b/devops/build_pipeline_stage.go index fab90e9b5c..c7cfea2673 100644 --- a/devops/build_pipeline_stage.go +++ b/devops/build_pipeline_stage.go @@ -64,10 +64,6 @@ type BuildPipelineStage interface { type buildpipelinestage struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - ProjectId *string `mandatory:"true" json:"projectId"` - BuildPipelineId *string `mandatory:"true" json:"buildPipelineId"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` DisplayName *string `mandatory:"false" json:"displayName"` Description *string `mandatory:"false" json:"description"` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` @@ -78,6 +74,10 @@ type buildpipelinestage struct { 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"` + Id *string `mandatory:"true" json:"id"` + ProjectId *string `mandatory:"true" json:"projectId"` + BuildPipelineId *string `mandatory:"true" json:"buildPipelineId"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` BuildPipelineStageType string `json:"buildPipelineStageType"` } @@ -142,76 +142,76 @@ func (m *buildpipelinestage) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetId returns Id -func (m buildpipelinestage) GetId() *string { - return m.Id -} - -//GetProjectId returns ProjectId -func (m buildpipelinestage) GetProjectId() *string { - return m.ProjectId -} - -//GetBuildPipelineId returns BuildPipelineId -func (m buildpipelinestage) GetBuildPipelineId() *string { - return m.BuildPipelineId -} - -//GetCompartmentId returns CompartmentId -func (m buildpipelinestage) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m buildpipelinestage) GetDisplayName() *string { return m.DisplayName } -//GetDescription returns Description +// GetDescription returns Description func (m buildpipelinestage) GetDescription() *string { return m.Description } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m buildpipelinestage) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m buildpipelinestage) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m buildpipelinestage) GetLifecycleState() BuildPipelineStageLifecycleStateEnum { return m.LifecycleState } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m buildpipelinestage) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetBuildPipelineStagePredecessorCollection returns BuildPipelineStagePredecessorCollection +// GetBuildPipelineStagePredecessorCollection returns BuildPipelineStagePredecessorCollection func (m buildpipelinestage) GetBuildPipelineStagePredecessorCollection() *BuildPipelineStagePredecessorCollection { return m.BuildPipelineStagePredecessorCollection } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m buildpipelinestage) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m buildpipelinestage) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m buildpipelinestage) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetId returns Id +func (m buildpipelinestage) GetId() *string { + return m.Id +} + +// GetProjectId returns ProjectId +func (m buildpipelinestage) GetProjectId() *string { + return m.ProjectId +} + +// GetBuildPipelineId returns BuildPipelineId +func (m buildpipelinestage) GetBuildPipelineId() *string { + return m.BuildPipelineId +} + +// GetCompartmentId returns CompartmentId +func (m buildpipelinestage) GetCompartmentId() *string { + return m.CompartmentId +} + func (m buildpipelinestage) String() string { return common.PointerString(m) } diff --git a/devops/build_pipeline_stage_collection.go b/devops/build_pipeline_stage_collection.go index 86d882948f..8d3473c6f4 100644 --- a/devops/build_pipeline_stage_collection.go +++ b/devops/build_pipeline_stage_collection.go @@ -62,6 +62,5 @@ func (m *BuildPipelineStageCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/devops/build_pipeline_stage_run_progress.go b/devops/build_pipeline_stage_run_progress.go index 67b8db4b91..02a23073a0 100644 --- a/devops/build_pipeline_stage_run_progress.go +++ b/devops/build_pipeline_stage_run_progress.go @@ -101,32 +101,32 @@ func (m *buildpipelinestagerunprogress) UnmarshalPolymorphicJSON(data []byte) (i } } -//GetStageDisplayName returns StageDisplayName +// GetStageDisplayName returns StageDisplayName func (m buildpipelinestagerunprogress) GetStageDisplayName() *string { return m.StageDisplayName } -//GetBuildPipelineStageId returns BuildPipelineStageId +// GetBuildPipelineStageId returns BuildPipelineStageId func (m buildpipelinestagerunprogress) GetBuildPipelineStageId() *string { return m.BuildPipelineStageId } -//GetTimeStarted returns TimeStarted +// GetTimeStarted returns TimeStarted func (m buildpipelinestagerunprogress) GetTimeStarted() *common.SDKTime { return m.TimeStarted } -//GetTimeFinished returns TimeFinished +// GetTimeFinished returns TimeFinished func (m buildpipelinestagerunprogress) GetTimeFinished() *common.SDKTime { return m.TimeFinished } -//GetStatus returns Status +// GetStatus returns Status func (m buildpipelinestagerunprogress) GetStatus() BuildPipelineStageRunProgressStatusEnum { return m.Status } -//GetBuildPipelineStagePredecessors returns BuildPipelineStagePredecessors +// GetBuildPipelineStagePredecessors returns BuildPipelineStagePredecessors func (m buildpipelinestagerunprogress) GetBuildPipelineStagePredecessors() *BuildPipelineStagePredecessorCollection { return m.BuildPipelineStagePredecessors } diff --git a/devops/build_pipeline_stage_summary.go b/devops/build_pipeline_stage_summary.go index 74cf2f19fc..3055a2a3ab 100644 --- a/devops/build_pipeline_stage_summary.go +++ b/devops/build_pipeline_stage_summary.go @@ -63,10 +63,6 @@ type BuildPipelineStageSummary interface { type buildpipelinestagesummary struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - ProjectId *string `mandatory:"true" json:"projectId"` - BuildPipelineId *string `mandatory:"true" json:"buildPipelineId"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` DisplayName *string `mandatory:"false" json:"displayName"` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` @@ -77,6 +73,10 @@ type buildpipelinestagesummary struct { 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"` + Id *string `mandatory:"true" json:"id"` + ProjectId *string `mandatory:"true" json:"projectId"` + BuildPipelineId *string `mandatory:"true" json:"buildPipelineId"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` BuildPipelineStageType string `json:"buildPipelineStageType"` } @@ -141,76 +141,76 @@ func (m *buildpipelinestagesummary) UnmarshalPolymorphicJSON(data []byte) (inter } } -//GetId returns Id -func (m buildpipelinestagesummary) GetId() *string { - return m.Id -} - -//GetProjectId returns ProjectId -func (m buildpipelinestagesummary) GetProjectId() *string { - return m.ProjectId -} - -//GetBuildPipelineId returns BuildPipelineId -func (m buildpipelinestagesummary) GetBuildPipelineId() *string { - return m.BuildPipelineId -} - -//GetCompartmentId returns CompartmentId -func (m buildpipelinestagesummary) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m buildpipelinestagesummary) GetDisplayName() *string { return m.DisplayName } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m buildpipelinestagesummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m buildpipelinestagesummary) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m buildpipelinestagesummary) GetLifecycleState() BuildPipelineStageLifecycleStateEnum { return m.LifecycleState } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m buildpipelinestagesummary) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetDescription returns Description +// GetDescription returns Description func (m buildpipelinestagesummary) GetDescription() *string { return m.Description } -//GetBuildPipelineStagePredecessorCollection returns BuildPipelineStagePredecessorCollection +// GetBuildPipelineStagePredecessorCollection returns BuildPipelineStagePredecessorCollection func (m buildpipelinestagesummary) GetBuildPipelineStagePredecessorCollection() *BuildPipelineStagePredecessorCollection { return m.BuildPipelineStagePredecessorCollection } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m buildpipelinestagesummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m buildpipelinestagesummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m buildpipelinestagesummary) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetId returns Id +func (m buildpipelinestagesummary) GetId() *string { + return m.Id +} + +// GetProjectId returns ProjectId +func (m buildpipelinestagesummary) GetProjectId() *string { + return m.ProjectId +} + +// GetBuildPipelineId returns BuildPipelineId +func (m buildpipelinestagesummary) GetBuildPipelineId() *string { + return m.BuildPipelineId +} + +// GetCompartmentId returns CompartmentId +func (m buildpipelinestagesummary) GetCompartmentId() *string { + return m.CompartmentId +} + func (m buildpipelinestagesummary) String() string { return common.PointerString(m) } diff --git a/devops/build_source.go b/devops/build_source.go index ada37326bc..0b37ee40e3 100644 --- a/devops/build_source.go +++ b/devops/build_source.go @@ -99,17 +99,17 @@ func (m *buildsource) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) } } -//GetName returns Name +// GetName returns Name func (m buildsource) GetName() *string { return m.Name } -//GetRepositoryUrl returns RepositoryUrl +// GetRepositoryUrl returns RepositoryUrl func (m buildsource) GetRepositoryUrl() *string { return m.RepositoryUrl } -//GetBranch returns Branch +// GetBranch returns Branch func (m buildsource) GetBranch() *string { return m.Branch } diff --git a/devops/build_source_collection.go b/devops/build_source_collection.go index 239ae98be3..dcb7fcc05d 100644 --- a/devops/build_source_collection.go +++ b/devops/build_source_collection.go @@ -62,6 +62,5 @@ func (m *BuildSourceCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/devops/build_stage_run_progress.go b/devops/build_stage_run_progress.go index 16c58c1a4e..a060da9580 100644 --- a/devops/build_stage_run_progress.go +++ b/devops/build_stage_run_progress.go @@ -177,10 +177,7 @@ func (m *BuildStageRunProgress) UnmarshalJSON(data []byte) (e error) { m.PrimaryBuildSource = model.PrimaryBuildSource m.Steps = make([]BuildStageRunStep, len(model.Steps)) - for i, n := range model.Steps { - m.Steps[i] = n - } - + copy(m.Steps, model.Steps) m.ExportedVariables = model.ExportedVariables nn, e = model.PrivateAccessConfig.UnmarshalPolymorphicJSON(model.PrivateAccessConfig.JsonData) diff --git a/devops/compute_instance_group_blue_green_deploy_stage.go b/devops/compute_instance_group_blue_green_deploy_stage.go index 91a5fb8c27..93c3fa271f 100644 --- a/devops/compute_instance_group_blue_green_deploy_stage.go +++ b/devops/compute_instance_group_blue_green_deploy_stage.go @@ -237,10 +237,7 @@ func (m *ComputeInstanceGroupBlueGreenDeployStage) UnmarshalJSON(data []byte) (e m.SystemTags = model.SystemTags m.DeployArtifactIds = make([]string, len(model.DeployArtifactIds)) - for i, n := range model.DeployArtifactIds { - m.DeployArtifactIds[i] = n - } - + copy(m.DeployArtifactIds, model.DeployArtifactIds) nn, e = model.FailurePolicy.UnmarshalPolymorphicJSON(model.FailurePolicy.JsonData) if e != nil { return diff --git a/devops/compute_instance_group_blue_green_deploy_stage_summary.go b/devops/compute_instance_group_blue_green_deploy_stage_summary.go index 7f3a98003f..da716b0cc4 100644 --- a/devops/compute_instance_group_blue_green_deploy_stage_summary.go +++ b/devops/compute_instance_group_blue_green_deploy_stage_summary.go @@ -237,10 +237,7 @@ func (m *ComputeInstanceGroupBlueGreenDeployStageSummary) UnmarshalJSON(data []b m.SystemTags = model.SystemTags m.DeployArtifactIds = make([]string, len(model.DeployArtifactIds)) - for i, n := range model.DeployArtifactIds { - m.DeployArtifactIds[i] = n - } - + copy(m.DeployArtifactIds, model.DeployArtifactIds) nn, e = model.FailurePolicy.UnmarshalPolymorphicJSON(model.FailurePolicy.JsonData) if e != nil { return diff --git a/devops/compute_instance_group_canary_deploy_stage.go b/devops/compute_instance_group_canary_deploy_stage.go index 1ea514439a..6935155712 100644 --- a/devops/compute_instance_group_canary_deploy_stage.go +++ b/devops/compute_instance_group_canary_deploy_stage.go @@ -230,10 +230,7 @@ func (m *ComputeInstanceGroupCanaryDeployStage) UnmarshalJSON(data []byte) (e er m.SystemTags = model.SystemTags m.DeployArtifactIds = make([]string, len(model.DeployArtifactIds)) - for i, n := range model.DeployArtifactIds { - m.DeployArtifactIds[i] = n - } - + copy(m.DeployArtifactIds, model.DeployArtifactIds) m.TestLoadBalancerConfig = model.TestLoadBalancerConfig m.Id = model.Id diff --git a/devops/compute_instance_group_canary_deploy_stage_summary.go b/devops/compute_instance_group_canary_deploy_stage_summary.go index 0bb1f8fa25..78c371a7ca 100644 --- a/devops/compute_instance_group_canary_deploy_stage_summary.go +++ b/devops/compute_instance_group_canary_deploy_stage_summary.go @@ -230,10 +230,7 @@ func (m *ComputeInstanceGroupCanaryDeployStageSummary) UnmarshalJSON(data []byte m.SystemTags = model.SystemTags m.DeployArtifactIds = make([]string, len(model.DeployArtifactIds)) - for i, n := range model.DeployArtifactIds { - m.DeployArtifactIds[i] = n - } - + copy(m.DeployArtifactIds, model.DeployArtifactIds) m.TestLoadBalancerConfig = model.TestLoadBalancerConfig m.Id = model.Id diff --git a/devops/compute_instance_group_deploy_stage.go b/devops/compute_instance_group_deploy_stage.go index 50ce832b75..798a780cf0 100644 --- a/devops/compute_instance_group_deploy_stage.go +++ b/devops/compute_instance_group_deploy_stage.go @@ -233,10 +233,7 @@ func (m *ComputeInstanceGroupDeployStage) UnmarshalJSON(data []byte) (e error) { m.SystemTags = model.SystemTags m.DeployArtifactIds = make([]string, len(model.DeployArtifactIds)) - for i, n := range model.DeployArtifactIds { - m.DeployArtifactIds[i] = n - } - + copy(m.DeployArtifactIds, model.DeployArtifactIds) nn, e = model.RollbackPolicy.UnmarshalPolymorphicJSON(model.RollbackPolicy.JsonData) if e != nil { return diff --git a/devops/compute_instance_group_deploy_stage_summary.go b/devops/compute_instance_group_deploy_stage_summary.go index 59b8bfc054..3f39d2aea6 100644 --- a/devops/compute_instance_group_deploy_stage_summary.go +++ b/devops/compute_instance_group_deploy_stage_summary.go @@ -233,10 +233,7 @@ func (m *ComputeInstanceGroupDeployStageSummary) UnmarshalJSON(data []byte) (e e m.SystemTags = model.SystemTags m.DeployArtifactIds = make([]string, len(model.DeployArtifactIds)) - for i, n := range model.DeployArtifactIds { - m.DeployArtifactIds[i] = n - } - + copy(m.DeployArtifactIds, model.DeployArtifactIds) nn, e = model.RollbackPolicy.UnmarshalPolymorphicJSON(model.RollbackPolicy.JsonData) if e != nil { return diff --git a/devops/compute_instance_group_rollout_policy.go b/devops/compute_instance_group_rollout_policy.go index cd3df63e0e..dba0e9d90a 100644 --- a/devops/compute_instance_group_rollout_policy.go +++ b/devops/compute_instance_group_rollout_policy.go @@ -69,7 +69,7 @@ func (m *computeinstancegrouprolloutpolicy) UnmarshalPolymorphicJSON(data []byte } } -//GetBatchDelayInSeconds returns BatchDelayInSeconds +// GetBatchDelayInSeconds returns BatchDelayInSeconds func (m computeinstancegrouprolloutpolicy) GetBatchDelayInSeconds() *int { return m.BatchDelayInSeconds } diff --git a/devops/compute_instance_group_selector_collection.go b/devops/compute_instance_group_selector_collection.go index 2668abc714..38bd0bca79 100644 --- a/devops/compute_instance_group_selector_collection.go +++ b/devops/compute_instance_group_selector_collection.go @@ -62,6 +62,5 @@ func (m *ComputeInstanceGroupSelectorCollection) UnmarshalJSON(data []byte) (e e m.Items[i] = nil } } - return } diff --git a/devops/connection.go b/devops/connection.go index dd7f5a9e16..61fc9e143d 100644 --- a/devops/connection.go +++ b/devops/connection.go @@ -60,9 +60,6 @@ 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"` @@ -73,6 +70,9 @@ type connection struct { 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"` + Id *string `mandatory:"true" json:"id"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + ProjectId *string `mandatory:"true" json:"projectId"` ConnectionType string `json:"connectionType"` } @@ -144,71 +144,71 @@ func (m *connection) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) } } -//GetId returns Id -func (m connection) GetId() *string { - return m.Id -} - -//GetCompartmentId returns CompartmentId -func (m connection) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetProjectId returns ProjectId -func (m connection) GetProjectId() *string { - return m.ProjectId -} - -//GetDescription returns Description +// GetDescription returns Description func (m connection) GetDescription() *string { return m.Description } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m connection) GetDisplayName() *string { return m.DisplayName } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m connection) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m connection) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLastConnectionValidationResult returns LastConnectionValidationResult +// GetLastConnectionValidationResult returns LastConnectionValidationResult func (m connection) GetLastConnectionValidationResult() *ConnectionValidationResult { return m.LastConnectionValidationResult } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m connection) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m connection) GetLifecycleState() ConnectionLifecycleStateEnum { return m.LifecycleState } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m connection) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m connection) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m connection) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetId returns Id +func (m connection) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m connection) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetProjectId returns ProjectId +func (m connection) GetProjectId() *string { + return m.ProjectId +} + func (m connection) String() string { return common.PointerString(m) } diff --git a/devops/connection_collection.go b/devops/connection_collection.go index 3baa07ce6d..c77ed074ae 100644 --- a/devops/connection_collection.go +++ b/devops/connection_collection.go @@ -62,6 +62,5 @@ func (m *ConnectionCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/devops/connection_summary.go b/devops/connection_summary.go index d36a33f449..4f4e568963 100644 --- a/devops/connection_summary.go +++ b/devops/connection_summary.go @@ -60,9 +60,6 @@ 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"` @@ -73,6 +70,9 @@ type connectionsummary struct { 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"` + Id *string `mandatory:"true" json:"id"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + ProjectId *string `mandatory:"true" json:"projectId"` ConnectionType string `json:"connectionType"` } @@ -144,71 +144,71 @@ func (m *connectionsummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetId returns Id -func (m connectionsummary) GetId() *string { - return m.Id -} - -//GetCompartmentId returns CompartmentId -func (m connectionsummary) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetProjectId returns ProjectId -func (m connectionsummary) GetProjectId() *string { - return m.ProjectId -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m connectionsummary) GetDisplayName() *string { return m.DisplayName } -//GetDescription returns Description +// GetDescription returns Description func (m connectionsummary) GetDescription() *string { return m.Description } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m connectionsummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m connectionsummary) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLastConnectionValidationResult returns LastConnectionValidationResult +// GetLastConnectionValidationResult returns LastConnectionValidationResult func (m connectionsummary) GetLastConnectionValidationResult() *ConnectionValidationResult { return m.LastConnectionValidationResult } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m connectionsummary) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m connectionsummary) GetLifecycleState() ConnectionLifecycleStateEnum { return m.LifecycleState } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m connectionsummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m connectionsummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m connectionsummary) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetId returns Id +func (m connectionsummary) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m connectionsummary) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetProjectId returns ProjectId +func (m connectionsummary) GetProjectId() *string { + return m.ProjectId +} + func (m connectionsummary) String() string { return common.PointerString(m) } diff --git a/devops/create_bitbucket_cloud_trigger_details.go b/devops/create_bitbucket_cloud_trigger_details.go index 95943d41e8..14262b0333 100644 --- a/devops/create_bitbucket_cloud_trigger_details.go +++ b/devops/create_bitbucket_cloud_trigger_details.go @@ -142,6 +142,5 @@ func (m *CreateBitbucketCloudTriggerDetails) UnmarshalJSON(data []byte) (e error m.Actions[i] = nil } } - return } diff --git a/devops/create_bitbucket_server_trigger_details.go b/devops/create_bitbucket_server_trigger_details.go index 5f19990868..3b7ce837d1 100644 --- a/devops/create_bitbucket_server_trigger_details.go +++ b/devops/create_bitbucket_server_trigger_details.go @@ -136,6 +136,5 @@ func (m *CreateBitbucketServerTriggerDetails) UnmarshalJSON(data []byte) (e erro m.Actions[i] = nil } } - return } diff --git a/devops/create_build_pipeline_stage_details.go b/devops/create_build_pipeline_stage_details.go index 551e11c2dd..71e855cc9b 100644 --- a/devops/create_build_pipeline_stage_details.go +++ b/devops/create_build_pipeline_stage_details.go @@ -39,12 +39,12 @@ type CreateBuildPipelineStageDetails interface { type createbuildpipelinestagedetails struct { JsonData []byte - BuildPipelineId *string `mandatory:"true" json:"buildPipelineId"` - BuildPipelineStagePredecessorCollection *BuildPipelineStagePredecessorCollection `mandatory:"true" json:"buildPipelineStagePredecessorCollection"` DisplayName *string `mandatory:"false" json:"displayName"` Description *string `mandatory:"false" json:"description"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + BuildPipelineId *string `mandatory:"true" json:"buildPipelineId"` + BuildPipelineStagePredecessorCollection *BuildPipelineStagePredecessorCollection `mandatory:"true" json:"buildPipelineStagePredecessorCollection"` BuildPipelineStageType string `json:"buildPipelineStageType"` } @@ -101,36 +101,36 @@ func (m *createbuildpipelinestagedetails) UnmarshalPolymorphicJSON(data []byte) } } -//GetBuildPipelineId returns BuildPipelineId -func (m createbuildpipelinestagedetails) GetBuildPipelineId() *string { - return m.BuildPipelineId -} - -//GetBuildPipelineStagePredecessorCollection returns BuildPipelineStagePredecessorCollection -func (m createbuildpipelinestagedetails) GetBuildPipelineStagePredecessorCollection() *BuildPipelineStagePredecessorCollection { - return m.BuildPipelineStagePredecessorCollection -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createbuildpipelinestagedetails) GetDisplayName() *string { return m.DisplayName } -//GetDescription returns Description +// GetDescription returns Description func (m createbuildpipelinestagedetails) GetDescription() *string { return m.Description } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createbuildpipelinestagedetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createbuildpipelinestagedetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetBuildPipelineId returns BuildPipelineId +func (m createbuildpipelinestagedetails) GetBuildPipelineId() *string { + return m.BuildPipelineId +} + +// GetBuildPipelineStagePredecessorCollection returns BuildPipelineStagePredecessorCollection +func (m createbuildpipelinestagedetails) GetBuildPipelineStagePredecessorCollection() *BuildPipelineStagePredecessorCollection { + return m.BuildPipelineStagePredecessorCollection +} + func (m createbuildpipelinestagedetails) String() string { return common.PointerString(m) } diff --git a/devops/create_compute_instance_group_blue_green_deploy_stage_details.go b/devops/create_compute_instance_group_blue_green_deploy_stage_details.go index d05d0d52a0..72c6293a8d 100644 --- a/devops/create_compute_instance_group_blue_green_deploy_stage_details.go +++ b/devops/create_compute_instance_group_blue_green_deploy_stage_details.go @@ -150,10 +150,7 @@ func (m *CreateComputeInstanceGroupBlueGreenDeployStageDetails) UnmarshalJSON(da m.DefinedTags = model.DefinedTags m.DeployArtifactIds = make([]string, len(model.DeployArtifactIds)) - for i, n := range model.DeployArtifactIds { - m.DeployArtifactIds[i] = n - } - + copy(m.DeployArtifactIds, model.DeployArtifactIds) nn, e = model.FailurePolicy.UnmarshalPolymorphicJSON(model.FailurePolicy.JsonData) if e != nil { return diff --git a/devops/create_compute_instance_group_canary_deploy_stage_details.go b/devops/create_compute_instance_group_canary_deploy_stage_details.go index fc4069fb48..6860382249 100644 --- a/devops/create_compute_instance_group_canary_deploy_stage_details.go +++ b/devops/create_compute_instance_group_canary_deploy_stage_details.go @@ -143,10 +143,7 @@ func (m *CreateComputeInstanceGroupCanaryDeployStageDetails) UnmarshalJSON(data m.DefinedTags = model.DefinedTags m.DeployArtifactIds = make([]string, len(model.DeployArtifactIds)) - for i, n := range model.DeployArtifactIds { - m.DeployArtifactIds[i] = n - } - + copy(m.DeployArtifactIds, model.DeployArtifactIds) m.TestLoadBalancerConfig = model.TestLoadBalancerConfig m.DeployPipelineId = model.DeployPipelineId diff --git a/devops/create_compute_instance_group_deploy_stage_details.go b/devops/create_compute_instance_group_deploy_stage_details.go index 206e4999aa..3d8a3c037b 100644 --- a/devops/create_compute_instance_group_deploy_stage_details.go +++ b/devops/create_compute_instance_group_deploy_stage_details.go @@ -146,10 +146,7 @@ func (m *CreateComputeInstanceGroupDeployStageDetails) UnmarshalJSON(data []byte m.DefinedTags = model.DefinedTags m.DeployArtifactIds = make([]string, len(model.DeployArtifactIds)) - for i, n := range model.DeployArtifactIds { - m.DeployArtifactIds[i] = n - } - + copy(m.DeployArtifactIds, model.DeployArtifactIds) nn, e = model.RollbackPolicy.UnmarshalPolymorphicJSON(model.RollbackPolicy.JsonData) if e != nil { return diff --git a/devops/create_connection_details.go b/devops/create_connection_details.go index bb6f664c52..bfae04156a 100644 --- a/devops/create_connection_details.go +++ b/devops/create_connection_details.go @@ -37,11 +37,11 @@ type CreateConnectionDetails interface { type createconnectiondetails struct { JsonData []byte - ProjectId *string `mandatory:"true" json:"projectId"` Description *string `mandatory:"false" json:"description"` DisplayName *string `mandatory:"false" json:"displayName"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + ProjectId *string `mandatory:"true" json:"projectId"` ConnectionType string `json:"connectionType"` } @@ -105,31 +105,31 @@ func (m *createconnectiondetails) UnmarshalPolymorphicJSON(data []byte) (interfa } } -//GetProjectId returns ProjectId -func (m createconnectiondetails) GetProjectId() *string { - return m.ProjectId -} - -//GetDescription returns Description +// GetDescription returns Description func (m createconnectiondetails) GetDescription() *string { return m.Description } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createconnectiondetails) GetDisplayName() *string { return m.DisplayName } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createconnectiondetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createconnectiondetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetProjectId returns ProjectId +func (m createconnectiondetails) GetProjectId() *string { + return m.ProjectId +} + func (m createconnectiondetails) String() string { return common.PointerString(m) } diff --git a/devops/create_deploy_environment_details.go b/devops/create_deploy_environment_details.go index 3454f59dcb..4b00cc1d3b 100644 --- a/devops/create_deploy_environment_details.go +++ b/devops/create_deploy_environment_details.go @@ -37,11 +37,11 @@ type CreateDeployEnvironmentDetails interface { type createdeployenvironmentdetails struct { JsonData []byte - ProjectId *string `mandatory:"true" json:"projectId"` Description *string `mandatory:"false" json:"description"` DisplayName *string `mandatory:"false" json:"displayName"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + ProjectId *string `mandatory:"true" json:"projectId"` DeployEnvironmentType string `json:"deployEnvironmentType"` } @@ -93,31 +93,31 @@ func (m *createdeployenvironmentdetails) UnmarshalPolymorphicJSON(data []byte) ( } } -//GetProjectId returns ProjectId -func (m createdeployenvironmentdetails) GetProjectId() *string { - return m.ProjectId -} - -//GetDescription returns Description +// GetDescription returns Description func (m createdeployenvironmentdetails) GetDescription() *string { return m.Description } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createdeployenvironmentdetails) GetDisplayName() *string { return m.DisplayName } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createdeployenvironmentdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createdeployenvironmentdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetProjectId returns ProjectId +func (m createdeployenvironmentdetails) GetProjectId() *string { + return m.ProjectId +} + func (m createdeployenvironmentdetails) String() string { return common.PointerString(m) } diff --git a/devops/create_deploy_stage_details.go b/devops/create_deploy_stage_details.go index 668b57abf0..b55e55965a 100644 --- a/devops/create_deploy_stage_details.go +++ b/devops/create_deploy_stage_details.go @@ -39,12 +39,12 @@ type CreateDeployStageDetails interface { type createdeploystagedetails struct { JsonData []byte - DeployPipelineId *string `mandatory:"true" json:"deployPipelineId"` - DeployStagePredecessorCollection *DeployStagePredecessorCollection `mandatory:"true" json:"deployStagePredecessorCollection"` Description *string `mandatory:"false" json:"description"` DisplayName *string `mandatory:"false" json:"displayName"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + DeployPipelineId *string `mandatory:"true" json:"deployPipelineId"` + DeployStagePredecessorCollection *DeployStagePredecessorCollection `mandatory:"true" json:"deployStagePredecessorCollection"` DeployStageType string `json:"deployStageType"` } @@ -161,36 +161,36 @@ func (m *createdeploystagedetails) UnmarshalPolymorphicJSON(data []byte) (interf } } -//GetDeployPipelineId returns DeployPipelineId -func (m createdeploystagedetails) GetDeployPipelineId() *string { - return m.DeployPipelineId -} - -//GetDeployStagePredecessorCollection returns DeployStagePredecessorCollection -func (m createdeploystagedetails) GetDeployStagePredecessorCollection() *DeployStagePredecessorCollection { - return m.DeployStagePredecessorCollection -} - -//GetDescription returns Description +// GetDescription returns Description func (m createdeploystagedetails) GetDescription() *string { return m.Description } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createdeploystagedetails) GetDisplayName() *string { return m.DisplayName } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createdeploystagedetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createdeploystagedetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetDeployPipelineId returns DeployPipelineId +func (m createdeploystagedetails) GetDeployPipelineId() *string { + return m.DeployPipelineId +} + +// GetDeployStagePredecessorCollection returns DeployStagePredecessorCollection +func (m createdeploystagedetails) GetDeployStagePredecessorCollection() *DeployStagePredecessorCollection { + return m.DeployStagePredecessorCollection +} + func (m createdeploystagedetails) String() string { return common.PointerString(m) } diff --git a/devops/create_deployment_details.go b/devops/create_deployment_details.go index bee43eee3c..b3ab3788b3 100644 --- a/devops/create_deployment_details.go +++ b/devops/create_deployment_details.go @@ -34,10 +34,10 @@ type CreateDeploymentDetails interface { type createdeploymentdetails struct { JsonData []byte - DeployPipelineId *string `mandatory:"true" json:"deployPipelineId"` DisplayName *string `mandatory:"false" json:"displayName"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + DeployPipelineId *string `mandatory:"true" json:"deployPipelineId"` DeploymentType string `json:"deploymentType"` } @@ -92,26 +92,26 @@ func (m *createdeploymentdetails) UnmarshalPolymorphicJSON(data []byte) (interfa } } -//GetDeployPipelineId returns DeployPipelineId -func (m createdeploymentdetails) GetDeployPipelineId() *string { - return m.DeployPipelineId -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createdeploymentdetails) GetDisplayName() *string { return m.DisplayName } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createdeploymentdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createdeploymentdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetDeployPipelineId returns DeployPipelineId +func (m createdeploymentdetails) GetDeployPipelineId() *string { + return m.DeployPipelineId +} + func (m createdeploymentdetails) String() string { return common.PointerString(m) } diff --git a/devops/create_devops_code_repository_trigger_details.go b/devops/create_devops_code_repository_trigger_details.go index 12c5c42f8c..ad01d45c5e 100644 --- a/devops/create_devops_code_repository_trigger_details.go +++ b/devops/create_devops_code_repository_trigger_details.go @@ -142,6 +142,5 @@ func (m *CreateDevopsCodeRepositoryTriggerDetails) UnmarshalJSON(data []byte) (e m.Actions[i] = nil } } - return } diff --git a/devops/create_github_trigger_details.go b/devops/create_github_trigger_details.go index 1e209e29fc..9c298a2722 100644 --- a/devops/create_github_trigger_details.go +++ b/devops/create_github_trigger_details.go @@ -142,6 +142,5 @@ func (m *CreateGithubTriggerDetails) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - return } diff --git a/devops/create_gitlab_server_trigger_details.go b/devops/create_gitlab_server_trigger_details.go index c5dc716f17..bda0b74b77 100644 --- a/devops/create_gitlab_server_trigger_details.go +++ b/devops/create_gitlab_server_trigger_details.go @@ -136,6 +136,5 @@ func (m *CreateGitlabServerTriggerDetails) UnmarshalJSON(data []byte) (e error) m.Actions[i] = nil } } - return } diff --git a/devops/create_gitlab_trigger_details.go b/devops/create_gitlab_trigger_details.go index 78669d6152..b34d0d0e3a 100644 --- a/devops/create_gitlab_trigger_details.go +++ b/devops/create_gitlab_trigger_details.go @@ -142,6 +142,5 @@ func (m *CreateGitlabTriggerDetails) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - return } diff --git a/devops/create_oke_blue_green_deploy_stage_details.go b/devops/create_oke_blue_green_deploy_stage_details.go index 98cc01d475..344b4ed690 100644 --- a/devops/create_oke_blue_green_deploy_stage_details.go +++ b/devops/create_oke_blue_green_deploy_stage_details.go @@ -139,10 +139,7 @@ func (m *CreateOkeBlueGreenDeployStageDetails) UnmarshalJSON(data []byte) (e err m.OkeClusterDeployEnvironmentId = model.OkeClusterDeployEnvironmentId m.KubernetesManifestDeployArtifactIds = make([]string, len(model.KubernetesManifestDeployArtifactIds)) - for i, n := range model.KubernetesManifestDeployArtifactIds { - m.KubernetesManifestDeployArtifactIds[i] = n - } - + copy(m.KubernetesManifestDeployArtifactIds, model.KubernetesManifestDeployArtifactIds) nn, e = model.BlueGreenStrategy.UnmarshalPolymorphicJSON(model.BlueGreenStrategy.JsonData) if e != nil { return diff --git a/devops/create_oke_canary_deploy_stage_details.go b/devops/create_oke_canary_deploy_stage_details.go index 6cd6b4e267..ea341897f7 100644 --- a/devops/create_oke_canary_deploy_stage_details.go +++ b/devops/create_oke_canary_deploy_stage_details.go @@ -139,10 +139,7 @@ func (m *CreateOkeCanaryDeployStageDetails) UnmarshalJSON(data []byte) (e error) m.OkeClusterDeployEnvironmentId = model.OkeClusterDeployEnvironmentId m.KubernetesManifestDeployArtifactIds = make([]string, len(model.KubernetesManifestDeployArtifactIds)) - for i, n := range model.KubernetesManifestDeployArtifactIds { - m.KubernetesManifestDeployArtifactIds[i] = n - } - + copy(m.KubernetesManifestDeployArtifactIds, model.KubernetesManifestDeployArtifactIds) nn, e = model.CanaryStrategy.UnmarshalPolymorphicJSON(model.CanaryStrategy.JsonData) if e != nil { return diff --git a/devops/create_oke_deploy_stage_details.go b/devops/create_oke_deploy_stage_details.go index ea02c7fa9c..2711ee0450 100644 --- a/devops/create_oke_deploy_stage_details.go +++ b/devops/create_oke_deploy_stage_details.go @@ -155,9 +155,6 @@ func (m *CreateOkeDeployStageDetails) UnmarshalJSON(data []byte) (e error) { m.OkeClusterDeployEnvironmentId = model.OkeClusterDeployEnvironmentId m.KubernetesManifestDeployArtifactIds = make([]string, len(model.KubernetesManifestDeployArtifactIds)) - for i, n := range model.KubernetesManifestDeployArtifactIds { - m.KubernetesManifestDeployArtifactIds[i] = n - } - + copy(m.KubernetesManifestDeployArtifactIds, model.KubernetesManifestDeployArtifactIds) return } diff --git a/devops/create_oke_helm_chart_deploy_stage_details.go b/devops/create_oke_helm_chart_deploy_stage_details.go index a4aea947d1..47ca1108c5 100644 --- a/devops/create_oke_helm_chart_deploy_stage_details.go +++ b/devops/create_oke_helm_chart_deploy_stage_details.go @@ -195,10 +195,7 @@ func (m *CreateOkeHelmChartDeployStageDetails) UnmarshalJSON(data []byte) (e err m.DefinedTags = model.DefinedTags m.ValuesArtifactIds = make([]string, len(model.ValuesArtifactIds)) - for i, n := range model.ValuesArtifactIds { - m.ValuesArtifactIds[i] = n - } - + copy(m.ValuesArtifactIds, model.ValuesArtifactIds) m.Namespace = model.Namespace m.TimeoutInSeconds = model.TimeoutInSeconds diff --git a/devops/create_trigger_details.go b/devops/create_trigger_details.go index bf8c0a2b5f..dbd0917afe 100644 --- a/devops/create_trigger_details.go +++ b/devops/create_trigger_details.go @@ -40,12 +40,12 @@ type CreateTriggerDetails interface { type createtriggerdetails struct { JsonData []byte - ProjectId *string `mandatory:"true" json:"projectId"` - Actions json.RawMessage `mandatory:"true" json:"actions"` DisplayName *string `mandatory:"false" json:"displayName"` Description *string `mandatory:"false" json:"description"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + ProjectId *string `mandatory:"true" json:"projectId"` + Actions json.RawMessage `mandatory:"true" json:"actions"` TriggerSource string `json:"triggerSource"` } @@ -114,36 +114,36 @@ func (m *createtriggerdetails) UnmarshalPolymorphicJSON(data []byte) (interface{ } } -//GetProjectId returns ProjectId -func (m createtriggerdetails) GetProjectId() *string { - return m.ProjectId -} - -//GetActions returns Actions -func (m createtriggerdetails) GetActions() json.RawMessage { - return m.Actions -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createtriggerdetails) GetDisplayName() *string { return m.DisplayName } -//GetDescription returns Description +// GetDescription returns Description func (m createtriggerdetails) GetDescription() *string { return m.Description } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createtriggerdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createtriggerdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetProjectId returns ProjectId +func (m createtriggerdetails) GetProjectId() *string { + return m.ProjectId +} + +// GetActions returns Actions +func (m createtriggerdetails) GetActions() json.RawMessage { + return m.Actions +} + func (m createtriggerdetails) String() string { return common.PointerString(m) } diff --git a/devops/create_vbs_trigger_details.go b/devops/create_vbs_trigger_details.go index f3587d2050..41aa56bdc8 100644 --- a/devops/create_vbs_trigger_details.go +++ b/devops/create_vbs_trigger_details.go @@ -142,6 +142,5 @@ func (m *CreateVbsTriggerDetails) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - return } diff --git a/devops/delivered_artifact.go b/devops/delivered_artifact.go index b3891927e9..bf7d7cb597 100644 --- a/devops/delivered_artifact.go +++ b/devops/delivered_artifact.go @@ -74,12 +74,12 @@ func (m *deliveredartifact) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetDeployArtifactId returns DeployArtifactId +// GetDeployArtifactId returns DeployArtifactId func (m deliveredartifact) GetDeployArtifactId() *string { return m.DeployArtifactId } -//GetOutputArtifactName returns OutputArtifactName +// GetOutputArtifactName returns OutputArtifactName func (m deliveredartifact) GetOutputArtifactName() *string { return m.OutputArtifactName } diff --git a/devops/delivered_artifact_collection.go b/devops/delivered_artifact_collection.go index 1293b884c0..835af02531 100644 --- a/devops/delivered_artifact_collection.go +++ b/devops/delivered_artifact_collection.go @@ -62,6 +62,5 @@ func (m *DeliveredArtifactCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/devops/deploy_environment.go b/devops/deploy_environment.go index cbb1396004..f34e39d703 100644 --- a/devops/deploy_environment.go +++ b/devops/deploy_environment.go @@ -58,9 +58,6 @@ type DeployEnvironment interface { type deployenvironment struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - ProjectId *string `mandatory:"true" json:"projectId"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` Description *string `mandatory:"false" json:"description"` DisplayName *string `mandatory:"false" json:"displayName"` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` @@ -70,6 +67,9 @@ type deployenvironment struct { 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"` + Id *string `mandatory:"true" json:"id"` + ProjectId *string `mandatory:"true" json:"projectId"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` DeployEnvironmentType string `json:"deployEnvironmentType"` } @@ -128,66 +128,66 @@ func (m *deployenvironment) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetId returns Id -func (m deployenvironment) GetId() *string { - return m.Id -} - -//GetProjectId returns ProjectId -func (m deployenvironment) GetProjectId() *string { - return m.ProjectId -} - -//GetCompartmentId returns CompartmentId -func (m deployenvironment) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetDescription returns Description +// GetDescription returns Description func (m deployenvironment) GetDescription() *string { return m.Description } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m deployenvironment) GetDisplayName() *string { return m.DisplayName } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m deployenvironment) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m deployenvironment) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m deployenvironment) GetLifecycleState() DeployEnvironmentLifecycleStateEnum { return m.LifecycleState } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m deployenvironment) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m deployenvironment) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m deployenvironment) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m deployenvironment) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetId returns Id +func (m deployenvironment) GetId() *string { + return m.Id +} + +// GetProjectId returns ProjectId +func (m deployenvironment) GetProjectId() *string { + return m.ProjectId +} + +// GetCompartmentId returns CompartmentId +func (m deployenvironment) GetCompartmentId() *string { + return m.CompartmentId +} + func (m deployenvironment) String() string { return common.PointerString(m) } diff --git a/devops/deploy_environment_collection.go b/devops/deploy_environment_collection.go index 9e67379a1b..ee78d9d73c 100644 --- a/devops/deploy_environment_collection.go +++ b/devops/deploy_environment_collection.go @@ -62,6 +62,5 @@ func (m *DeployEnvironmentCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/devops/deploy_environment_summary.go b/devops/deploy_environment_summary.go index db12514176..d871d18bff 100644 --- a/devops/deploy_environment_summary.go +++ b/devops/deploy_environment_summary.go @@ -58,9 +58,6 @@ type DeployEnvironmentSummary interface { type deployenvironmentsummary struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - ProjectId *string `mandatory:"true" json:"projectId"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` Description *string `mandatory:"false" json:"description"` DisplayName *string `mandatory:"false" json:"displayName"` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` @@ -70,6 +67,9 @@ type deployenvironmentsummary struct { 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"` + Id *string `mandatory:"true" json:"id"` + ProjectId *string `mandatory:"true" json:"projectId"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` DeployEnvironmentType string `json:"deployEnvironmentType"` } @@ -128,66 +128,66 @@ func (m *deployenvironmentsummary) UnmarshalPolymorphicJSON(data []byte) (interf } } -//GetId returns Id -func (m deployenvironmentsummary) GetId() *string { - return m.Id -} - -//GetProjectId returns ProjectId -func (m deployenvironmentsummary) GetProjectId() *string { - return m.ProjectId -} - -//GetCompartmentId returns CompartmentId -func (m deployenvironmentsummary) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetDescription returns Description +// GetDescription returns Description func (m deployenvironmentsummary) GetDescription() *string { return m.Description } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m deployenvironmentsummary) GetDisplayName() *string { return m.DisplayName } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m deployenvironmentsummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m deployenvironmentsummary) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m deployenvironmentsummary) GetLifecycleState() DeployEnvironmentLifecycleStateEnum { return m.LifecycleState } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m deployenvironmentsummary) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m deployenvironmentsummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m deployenvironmentsummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m deployenvironmentsummary) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetId returns Id +func (m deployenvironmentsummary) GetId() *string { + return m.Id +} + +// GetProjectId returns ProjectId +func (m deployenvironmentsummary) GetProjectId() *string { + return m.ProjectId +} + +// GetCompartmentId returns CompartmentId +func (m deployenvironmentsummary) GetCompartmentId() *string { + return m.CompartmentId +} + func (m deployenvironmentsummary) String() string { return common.PointerString(m) } diff --git a/devops/deploy_stage.go b/devops/deploy_stage.go index 1fd6a80ccb..e1ccabafcf 100644 --- a/devops/deploy_stage.go +++ b/devops/deploy_stage.go @@ -63,10 +63,6 @@ type DeployStage interface { type deploystage struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - ProjectId *string `mandatory:"true" json:"projectId"` - DeployPipelineId *string `mandatory:"true" json:"deployPipelineId"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` Description *string `mandatory:"false" json:"description"` DisplayName *string `mandatory:"false" json:"displayName"` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` @@ -77,6 +73,10 @@ type deploystage struct { 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"` + Id *string `mandatory:"true" json:"id"` + ProjectId *string `mandatory:"true" json:"projectId"` + DeployPipelineId *string `mandatory:"true" json:"deployPipelineId"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` DeployStageType string `json:"deployStageType"` } @@ -201,76 +201,76 @@ func (m *deploystage) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) } } -//GetId returns Id -func (m deploystage) GetId() *string { - return m.Id -} - -//GetProjectId returns ProjectId -func (m deploystage) GetProjectId() *string { - return m.ProjectId -} - -//GetDeployPipelineId returns DeployPipelineId -func (m deploystage) GetDeployPipelineId() *string { - return m.DeployPipelineId -} - -//GetCompartmentId returns CompartmentId -func (m deploystage) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetDescription returns Description +// GetDescription returns Description func (m deploystage) GetDescription() *string { return m.Description } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m deploystage) GetDisplayName() *string { return m.DisplayName } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m deploystage) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m deploystage) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m deploystage) GetLifecycleState() DeployStageLifecycleStateEnum { return m.LifecycleState } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m deploystage) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetDeployStagePredecessorCollection returns DeployStagePredecessorCollection +// GetDeployStagePredecessorCollection returns DeployStagePredecessorCollection func (m deploystage) GetDeployStagePredecessorCollection() *DeployStagePredecessorCollection { return m.DeployStagePredecessorCollection } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m deploystage) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m deploystage) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m deploystage) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetId returns Id +func (m deploystage) GetId() *string { + return m.Id +} + +// GetProjectId returns ProjectId +func (m deploystage) GetProjectId() *string { + return m.ProjectId +} + +// GetDeployPipelineId returns DeployPipelineId +func (m deploystage) GetDeployPipelineId() *string { + return m.DeployPipelineId +} + +// GetCompartmentId returns CompartmentId +func (m deploystage) GetCompartmentId() *string { + return m.CompartmentId +} + func (m deploystage) String() string { return common.PointerString(m) } diff --git a/devops/deploy_stage_collection.go b/devops/deploy_stage_collection.go index 8119f77247..aecd029d8a 100644 --- a/devops/deploy_stage_collection.go +++ b/devops/deploy_stage_collection.go @@ -62,6 +62,5 @@ func (m *DeployStageCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/devops/deploy_stage_execution_progress.go b/devops/deploy_stage_execution_progress.go index ea506e0c18..39ebcbbb48 100644 --- a/devops/deploy_stage_execution_progress.go +++ b/devops/deploy_stage_execution_progress.go @@ -166,37 +166,37 @@ func (m *deploystageexecutionprogress) UnmarshalPolymorphicJSON(data []byte) (in } } -//GetDeployStageDisplayName returns DeployStageDisplayName +// GetDeployStageDisplayName returns DeployStageDisplayName func (m deploystageexecutionprogress) GetDeployStageDisplayName() *string { return m.DeployStageDisplayName } -//GetDeployStageId returns DeployStageId +// GetDeployStageId returns DeployStageId func (m deploystageexecutionprogress) GetDeployStageId() *string { return m.DeployStageId } -//GetTimeStarted returns TimeStarted +// GetTimeStarted returns TimeStarted func (m deploystageexecutionprogress) GetTimeStarted() *common.SDKTime { return m.TimeStarted } -//GetTimeFinished returns TimeFinished +// GetTimeFinished returns TimeFinished func (m deploystageexecutionprogress) GetTimeFinished() *common.SDKTime { return m.TimeFinished } -//GetStatus returns Status +// GetStatus returns Status func (m deploystageexecutionprogress) GetStatus() DeployStageExecutionProgressStatusEnum { return m.Status } -//GetDeployStagePredecessors returns DeployStagePredecessors +// GetDeployStagePredecessors returns DeployStagePredecessors func (m deploystageexecutionprogress) GetDeployStagePredecessors() *DeployStagePredecessorCollection { return m.DeployStagePredecessors } -//GetDeployStageExecutionProgressDetails returns DeployStageExecutionProgressDetails +// GetDeployStageExecutionProgressDetails returns DeployStageExecutionProgressDetails func (m deploystageexecutionprogress) GetDeployStageExecutionProgressDetails() []DeployStageExecutionProgressDetails { return m.DeployStageExecutionProgressDetails } diff --git a/devops/deploy_stage_summary.go b/devops/deploy_stage_summary.go index 0a6aad7c0d..ade1bc7836 100644 --- a/devops/deploy_stage_summary.go +++ b/devops/deploy_stage_summary.go @@ -63,10 +63,6 @@ type DeployStageSummary interface { type deploystagesummary struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - ProjectId *string `mandatory:"true" json:"projectId"` - DeployPipelineId *string `mandatory:"true" json:"deployPipelineId"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` Description *string `mandatory:"false" json:"description"` DisplayName *string `mandatory:"false" json:"displayName"` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` @@ -77,6 +73,10 @@ type deploystagesummary struct { 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"` + Id *string `mandatory:"true" json:"id"` + ProjectId *string `mandatory:"true" json:"projectId"` + DeployPipelineId *string `mandatory:"true" json:"deployPipelineId"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` DeployStageType string `json:"deployStageType"` } @@ -201,76 +201,76 @@ func (m *deploystagesummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetId returns Id -func (m deploystagesummary) GetId() *string { - return m.Id -} - -//GetProjectId returns ProjectId -func (m deploystagesummary) GetProjectId() *string { - return m.ProjectId -} - -//GetDeployPipelineId returns DeployPipelineId -func (m deploystagesummary) GetDeployPipelineId() *string { - return m.DeployPipelineId -} - -//GetCompartmentId returns CompartmentId -func (m deploystagesummary) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetDescription returns Description +// GetDescription returns Description func (m deploystagesummary) GetDescription() *string { return m.Description } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m deploystagesummary) GetDisplayName() *string { return m.DisplayName } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m deploystagesummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m deploystagesummary) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m deploystagesummary) GetLifecycleState() DeployStageLifecycleStateEnum { return m.LifecycleState } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m deploystagesummary) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetDeployStagePredecessorCollection returns DeployStagePredecessorCollection +// GetDeployStagePredecessorCollection returns DeployStagePredecessorCollection func (m deploystagesummary) GetDeployStagePredecessorCollection() *DeployStagePredecessorCollection { return m.DeployStagePredecessorCollection } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m deploystagesummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m deploystagesummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m deploystagesummary) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetId returns Id +func (m deploystagesummary) GetId() *string { + return m.Id +} + +// GetProjectId returns ProjectId +func (m deploystagesummary) GetProjectId() *string { + return m.ProjectId +} + +// GetDeployPipelineId returns DeployPipelineId +func (m deploystagesummary) GetDeployPipelineId() *string { + return m.DeployPipelineId +} + +// GetCompartmentId returns CompartmentId +func (m deploystagesummary) GetCompartmentId() *string { + return m.CompartmentId +} + func (m deploystagesummary) String() string { return common.PointerString(m) } diff --git a/devops/deployment.go b/devops/deployment.go index 932f43c69b..7b6b008974 100644 --- a/devops/deployment.go +++ b/devops/deployment.go @@ -70,10 +70,6 @@ type Deployment interface { type deployment struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - ProjectId *string `mandatory:"true" json:"projectId"` - DeployPipelineId *string `mandatory:"true" json:"deployPipelineId"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` DeployPipelineArtifacts *DeployPipelineArtifactCollection `mandatory:"false" json:"deployPipelineArtifacts"` DeployPipelineEnvironments *DeployPipelineEnvironmentCollection `mandatory:"false" json:"deployPipelineEnvironments"` DisplayName *string `mandatory:"false" json:"displayName"` @@ -88,6 +84,10 @@ type deployment struct { 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"` + Id *string `mandatory:"true" json:"id"` + ProjectId *string `mandatory:"true" json:"projectId"` + DeployPipelineId *string `mandatory:"true" json:"deployPipelineId"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` DeploymentType string `json:"deploymentType"` } @@ -156,96 +156,96 @@ func (m *deployment) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) } } -//GetId returns Id -func (m deployment) GetId() *string { - return m.Id -} - -//GetProjectId returns ProjectId -func (m deployment) GetProjectId() *string { - return m.ProjectId -} - -//GetDeployPipelineId returns DeployPipelineId -func (m deployment) GetDeployPipelineId() *string { - return m.DeployPipelineId -} - -//GetCompartmentId returns CompartmentId -func (m deployment) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetDeployPipelineArtifacts returns DeployPipelineArtifacts +// GetDeployPipelineArtifacts returns DeployPipelineArtifacts func (m deployment) GetDeployPipelineArtifacts() *DeployPipelineArtifactCollection { return m.DeployPipelineArtifacts } -//GetDeployPipelineEnvironments returns DeployPipelineEnvironments +// GetDeployPipelineEnvironments returns DeployPipelineEnvironments func (m deployment) GetDeployPipelineEnvironments() *DeployPipelineEnvironmentCollection { return m.DeployPipelineEnvironments } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m deployment) GetDisplayName() *string { return m.DisplayName } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m deployment) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m deployment) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m deployment) GetLifecycleState() DeploymentLifecycleStateEnum { return m.LifecycleState } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m deployment) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetDeploymentArguments returns DeploymentArguments +// GetDeploymentArguments returns DeploymentArguments func (m deployment) GetDeploymentArguments() *DeploymentArgumentCollection { return m.DeploymentArguments } -//GetDeployStageOverrideArguments returns DeployStageOverrideArguments +// GetDeployStageOverrideArguments returns DeployStageOverrideArguments func (m deployment) GetDeployStageOverrideArguments() *DeployStageOverrideArgumentCollection { return m.DeployStageOverrideArguments } -//GetDeployArtifactOverrideArguments returns DeployArtifactOverrideArguments +// GetDeployArtifactOverrideArguments returns DeployArtifactOverrideArguments func (m deployment) GetDeployArtifactOverrideArguments() *DeployArtifactOverrideArgumentCollection { return m.DeployArtifactOverrideArguments } -//GetDeploymentExecutionProgress returns DeploymentExecutionProgress +// GetDeploymentExecutionProgress returns DeploymentExecutionProgress func (m deployment) GetDeploymentExecutionProgress() *DeploymentExecutionProgress { return m.DeploymentExecutionProgress } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m deployment) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m deployment) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m deployment) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetId returns Id +func (m deployment) GetId() *string { + return m.Id +} + +// GetProjectId returns ProjectId +func (m deployment) GetProjectId() *string { + return m.ProjectId +} + +// GetDeployPipelineId returns DeployPipelineId +func (m deployment) GetDeployPipelineId() *string { + return m.DeployPipelineId +} + +// GetCompartmentId returns CompartmentId +func (m deployment) GetCompartmentId() *string { + return m.CompartmentId +} + func (m deployment) String() string { return common.PointerString(m) } diff --git a/devops/deployment_collection.go b/devops/deployment_collection.go index aca40fc4b2..eb97381844 100644 --- a/devops/deployment_collection.go +++ b/devops/deployment_collection.go @@ -62,6 +62,5 @@ func (m *DeploymentCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/devops/deployment_summary.go b/devops/deployment_summary.go index 6cc4895581..3a4ec8ed30 100644 --- a/devops/deployment_summary.go +++ b/devops/deployment_summary.go @@ -64,10 +64,6 @@ type DeploymentSummary interface { type deploymentsummary struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - ProjectId *string `mandatory:"true" json:"projectId"` - DeployPipelineId *string `mandatory:"true" json:"deployPipelineId"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` DisplayName *string `mandatory:"false" json:"displayName"` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` @@ -79,6 +75,10 @@ type deploymentsummary struct { 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"` + Id *string `mandatory:"true" json:"id"` + ProjectId *string `mandatory:"true" json:"projectId"` + DeployPipelineId *string `mandatory:"true" json:"deployPipelineId"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` DeploymentType string `json:"deploymentType"` } @@ -144,81 +144,81 @@ func (m *deploymentsummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetId returns Id -func (m deploymentsummary) GetId() *string { - return m.Id -} - -//GetProjectId returns ProjectId -func (m deploymentsummary) GetProjectId() *string { - return m.ProjectId -} - -//GetDeployPipelineId returns DeployPipelineId -func (m deploymentsummary) GetDeployPipelineId() *string { - return m.DeployPipelineId -} - -//GetCompartmentId returns CompartmentId -func (m deploymentsummary) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m deploymentsummary) GetDisplayName() *string { return m.DisplayName } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m deploymentsummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m deploymentsummary) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m deploymentsummary) GetLifecycleState() DeploymentLifecycleStateEnum { return m.LifecycleState } -//GetDeploymentArguments returns DeploymentArguments +// GetDeploymentArguments returns DeploymentArguments func (m deploymentsummary) GetDeploymentArguments() *DeploymentArgumentCollection { return m.DeploymentArguments } -//GetDeployStageOverrideArguments returns DeployStageOverrideArguments +// GetDeployStageOverrideArguments returns DeployStageOverrideArguments func (m deploymentsummary) GetDeployStageOverrideArguments() *DeployStageOverrideArgumentCollection { return m.DeployStageOverrideArguments } -//GetDeployArtifactOverrideArguments returns DeployArtifactOverrideArguments +// GetDeployArtifactOverrideArguments returns DeployArtifactOverrideArguments func (m deploymentsummary) GetDeployArtifactOverrideArguments() *DeployArtifactOverrideArgumentCollection { return m.DeployArtifactOverrideArguments } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m deploymentsummary) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m deploymentsummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m deploymentsummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m deploymentsummary) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetId returns Id +func (m deploymentsummary) GetId() *string { + return m.Id +} + +// GetProjectId returns ProjectId +func (m deploymentsummary) GetProjectId() *string { + return m.ProjectId +} + +// GetDeployPipelineId returns DeployPipelineId +func (m deploymentsummary) GetDeployPipelineId() *string { + return m.DeployPipelineId +} + +// GetCompartmentId returns CompartmentId +func (m deploymentsummary) GetCompartmentId() *string { + return m.CompartmentId +} + func (m deploymentsummary) String() string { return common.PointerString(m) } diff --git a/devops/devops_client.go b/devops/devops_client.go index 6a4f73ccfd..302841d963 100644 --- a/devops/devops_client.go +++ b/devops/devops_client.go @@ -80,7 +80,7 @@ func (client *DevopsClient) setConfigurationProvider(configProvider common.Confi 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/devops/devops_code_repository_trigger.go b/devops/devops_code_repository_trigger.go index b5104b0551..1b5d28c2a1 100644 --- a/devops/devops_code_repository_trigger.go +++ b/devops/devops_code_repository_trigger.go @@ -220,7 +220,6 @@ func (m *DevopsCodeRepositoryTrigger) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - m.RepositoryId = model.RepositoryId return diff --git a/devops/devops_code_repository_trigger_create_result.go b/devops/devops_code_repository_trigger_create_result.go index 75e2b105ea..8f4d2ca8a2 100644 --- a/devops/devops_code_repository_trigger_create_result.go +++ b/devops/devops_code_repository_trigger_create_result.go @@ -220,7 +220,6 @@ func (m *DevopsCodeRepositoryTriggerCreateResult) UnmarshalJSON(data []byte) (e m.Actions[i] = nil } } - m.RepositoryId = model.RepositoryId return diff --git a/devops/github_trigger.go b/devops/github_trigger.go index dbf71876a4..72b65a1dda 100644 --- a/devops/github_trigger.go +++ b/devops/github_trigger.go @@ -226,7 +226,6 @@ func (m *GithubTrigger) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - m.TriggerUrl = model.TriggerUrl return diff --git a/devops/github_trigger_create_result.go b/devops/github_trigger_create_result.go index 7e0a4c48ce..88e705536e 100644 --- a/devops/github_trigger_create_result.go +++ b/devops/github_trigger_create_result.go @@ -230,7 +230,6 @@ func (m *GithubTriggerCreateResult) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - m.Secret = model.Secret m.TriggerUrl = model.TriggerUrl diff --git a/devops/gitlab_server_trigger.go b/devops/gitlab_server_trigger.go index f7cd981e7a..ab1bce7034 100644 --- a/devops/gitlab_server_trigger.go +++ b/devops/gitlab_server_trigger.go @@ -220,7 +220,6 @@ func (m *GitlabServerTrigger) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - m.TriggerUrl = model.TriggerUrl return diff --git a/devops/gitlab_server_trigger_create_result.go b/devops/gitlab_server_trigger_create_result.go index deaa4b6459..c05183f37b 100644 --- a/devops/gitlab_server_trigger_create_result.go +++ b/devops/gitlab_server_trigger_create_result.go @@ -224,7 +224,6 @@ func (m *GitlabServerTriggerCreateResult) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - m.Secret = model.Secret m.TriggerUrl = model.TriggerUrl diff --git a/devops/gitlab_trigger.go b/devops/gitlab_trigger.go index 058df93584..47cc29fb48 100644 --- a/devops/gitlab_trigger.go +++ b/devops/gitlab_trigger.go @@ -226,7 +226,6 @@ func (m *GitlabTrigger) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - m.TriggerUrl = model.TriggerUrl return diff --git a/devops/gitlab_trigger_create_result.go b/devops/gitlab_trigger_create_result.go index b78dd90cd8..a19656eac9 100644 --- a/devops/gitlab_trigger_create_result.go +++ b/devops/gitlab_trigger_create_result.go @@ -230,7 +230,6 @@ func (m *GitlabTriggerCreateResult) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - m.Secret = model.Secret m.TriggerUrl = model.TriggerUrl diff --git a/devops/oke_blue_green_deploy_stage.go b/devops/oke_blue_green_deploy_stage.go index cf854305c3..487774f5ef 100644 --- a/devops/oke_blue_green_deploy_stage.go +++ b/devops/oke_blue_green_deploy_stage.go @@ -230,10 +230,7 @@ func (m *OkeBlueGreenDeployStage) UnmarshalJSON(data []byte) (e error) { m.OkeClusterDeployEnvironmentId = model.OkeClusterDeployEnvironmentId m.KubernetesManifestDeployArtifactIds = make([]string, len(model.KubernetesManifestDeployArtifactIds)) - for i, n := range model.KubernetesManifestDeployArtifactIds { - m.KubernetesManifestDeployArtifactIds[i] = n - } - + copy(m.KubernetesManifestDeployArtifactIds, model.KubernetesManifestDeployArtifactIds) nn, e = model.BlueGreenStrategy.UnmarshalPolymorphicJSON(model.BlueGreenStrategy.JsonData) if e != nil { return diff --git a/devops/oke_blue_green_deploy_stage_summary.go b/devops/oke_blue_green_deploy_stage_summary.go index 808d429af3..3a10df3b56 100644 --- a/devops/oke_blue_green_deploy_stage_summary.go +++ b/devops/oke_blue_green_deploy_stage_summary.go @@ -230,10 +230,7 @@ func (m *OkeBlueGreenDeployStageSummary) UnmarshalJSON(data []byte) (e error) { m.OkeClusterDeployEnvironmentId = model.OkeClusterDeployEnvironmentId m.KubernetesManifestDeployArtifactIds = make([]string, len(model.KubernetesManifestDeployArtifactIds)) - for i, n := range model.KubernetesManifestDeployArtifactIds { - m.KubernetesManifestDeployArtifactIds[i] = n - } - + copy(m.KubernetesManifestDeployArtifactIds, model.KubernetesManifestDeployArtifactIds) nn, e = model.BlueGreenStrategy.UnmarshalPolymorphicJSON(model.BlueGreenStrategy.JsonData) if e != nil { return diff --git a/devops/oke_canary_deploy_stage.go b/devops/oke_canary_deploy_stage.go index 67c36a72c6..4383ec37d0 100644 --- a/devops/oke_canary_deploy_stage.go +++ b/devops/oke_canary_deploy_stage.go @@ -230,10 +230,7 @@ func (m *OkeCanaryDeployStage) UnmarshalJSON(data []byte) (e error) { m.OkeClusterDeployEnvironmentId = model.OkeClusterDeployEnvironmentId m.KubernetesManifestDeployArtifactIds = make([]string, len(model.KubernetesManifestDeployArtifactIds)) - for i, n := range model.KubernetesManifestDeployArtifactIds { - m.KubernetesManifestDeployArtifactIds[i] = n - } - + copy(m.KubernetesManifestDeployArtifactIds, model.KubernetesManifestDeployArtifactIds) nn, e = model.CanaryStrategy.UnmarshalPolymorphicJSON(model.CanaryStrategy.JsonData) if e != nil { return diff --git a/devops/oke_canary_deploy_stage_summary.go b/devops/oke_canary_deploy_stage_summary.go index 5ddff8f83c..5e68ab3616 100644 --- a/devops/oke_canary_deploy_stage_summary.go +++ b/devops/oke_canary_deploy_stage_summary.go @@ -230,10 +230,7 @@ func (m *OkeCanaryDeployStageSummary) UnmarshalJSON(data []byte) (e error) { m.OkeClusterDeployEnvironmentId = model.OkeClusterDeployEnvironmentId m.KubernetesManifestDeployArtifactIds = make([]string, len(model.KubernetesManifestDeployArtifactIds)) - for i, n := range model.KubernetesManifestDeployArtifactIds { - m.KubernetesManifestDeployArtifactIds[i] = n - } - + copy(m.KubernetesManifestDeployArtifactIds, model.KubernetesManifestDeployArtifactIds) nn, e = model.CanaryStrategy.UnmarshalPolymorphicJSON(model.CanaryStrategy.JsonData) if e != nil { return diff --git a/devops/oke_deploy_stage.go b/devops/oke_deploy_stage.go index 1c91d85684..14db28371b 100644 --- a/devops/oke_deploy_stage.go +++ b/devops/oke_deploy_stage.go @@ -244,10 +244,7 @@ func (m *OkeDeployStage) UnmarshalJSON(data []byte) (e error) { m.OkeClusterDeployEnvironmentId = model.OkeClusterDeployEnvironmentId m.KubernetesManifestDeployArtifactIds = make([]string, len(model.KubernetesManifestDeployArtifactIds)) - for i, n := range model.KubernetesManifestDeployArtifactIds { - m.KubernetesManifestDeployArtifactIds[i] = n - } - + copy(m.KubernetesManifestDeployArtifactIds, model.KubernetesManifestDeployArtifactIds) m.Namespace = model.Namespace return diff --git a/devops/oke_deploy_stage_summary.go b/devops/oke_deploy_stage_summary.go index 7b435974e6..e40042fb37 100644 --- a/devops/oke_deploy_stage_summary.go +++ b/devops/oke_deploy_stage_summary.go @@ -244,10 +244,7 @@ func (m *OkeDeployStageSummary) UnmarshalJSON(data []byte) (e error) { m.OkeClusterDeployEnvironmentId = model.OkeClusterDeployEnvironmentId m.KubernetesManifestDeployArtifactIds = make([]string, len(model.KubernetesManifestDeployArtifactIds)) - for i, n := range model.KubernetesManifestDeployArtifactIds { - m.KubernetesManifestDeployArtifactIds[i] = n - } - + copy(m.KubernetesManifestDeployArtifactIds, model.KubernetesManifestDeployArtifactIds) m.Namespace = model.Namespace return diff --git a/devops/oke_helm_chart_deploy_stage.go b/devops/oke_helm_chart_deploy_stage.go index e6252d1a4e..ff341be674 100644 --- a/devops/oke_helm_chart_deploy_stage.go +++ b/devops/oke_helm_chart_deploy_stage.go @@ -282,10 +282,7 @@ func (m *OkeHelmChartDeployStage) UnmarshalJSON(data []byte) (e error) { m.SystemTags = model.SystemTags m.ValuesArtifactIds = make([]string, len(model.ValuesArtifactIds)) - for i, n := range model.ValuesArtifactIds { - m.ValuesArtifactIds[i] = n - } - + copy(m.ValuesArtifactIds, model.ValuesArtifactIds) m.Namespace = model.Namespace m.TimeoutInSeconds = model.TimeoutInSeconds diff --git a/devops/oke_helm_chart_deploy_stage_summary.go b/devops/oke_helm_chart_deploy_stage_summary.go index 30ee23e4ab..b14220469d 100644 --- a/devops/oke_helm_chart_deploy_stage_summary.go +++ b/devops/oke_helm_chart_deploy_stage_summary.go @@ -282,10 +282,7 @@ func (m *OkeHelmChartDeployStageSummary) UnmarshalJSON(data []byte) (e error) { m.SystemTags = model.SystemTags m.ValuesArtifactIds = make([]string, len(model.ValuesArtifactIds)) - for i, n := range model.ValuesArtifactIds { - m.ValuesArtifactIds[i] = n - } - + copy(m.ValuesArtifactIds, model.ValuesArtifactIds) m.Namespace = model.Namespace m.TimeoutInSeconds = model.TimeoutInSeconds diff --git a/devops/repository_ref.go b/devops/repository_ref.go index 91124b6946..054443fbab 100644 --- a/devops/repository_ref.go +++ b/devops/repository_ref.go @@ -37,11 +37,11 @@ type RepositoryRef interface { type repositoryref struct { JsonData []byte + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` RefName *string `mandatory:"true" json:"refName"` FullRefName *string `mandatory:"true" json:"fullRefName"` RepositoryId *string `mandatory:"true" json:"repositoryId"` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` RefType string `json:"refType"` } @@ -89,31 +89,31 @@ func (m *repositoryref) UnmarshalPolymorphicJSON(data []byte) (interface{}, erro } } -//GetRefName returns RefName +// GetFreeformTags returns FreeformTags +func (m repositoryref) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m repositoryref) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetRefName returns RefName func (m repositoryref) GetRefName() *string { return m.RefName } -//GetFullRefName returns FullRefName +// GetFullRefName returns FullRefName func (m repositoryref) GetFullRefName() *string { return m.FullRefName } -//GetRepositoryId returns RepositoryId +// GetRepositoryId returns RepositoryId func (m repositoryref) GetRepositoryId() *string { return m.RepositoryId } -//GetFreeformTags returns FreeformTags -func (m repositoryref) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m repositoryref) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - func (m repositoryref) String() string { return common.PointerString(m) } diff --git a/devops/repository_ref_collection.go b/devops/repository_ref_collection.go index 15736a8ecb..96e7e0447b 100644 --- a/devops/repository_ref_collection.go +++ b/devops/repository_ref_collection.go @@ -62,6 +62,5 @@ func (m *RepositoryRefCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/devops/repository_ref_summary.go b/devops/repository_ref_summary.go index 335d85eaf7..a812e304c9 100644 --- a/devops/repository_ref_summary.go +++ b/devops/repository_ref_summary.go @@ -37,11 +37,11 @@ type RepositoryRefSummary interface { type repositoryrefsummary struct { JsonData []byte + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` RefName *string `mandatory:"true" json:"refName"` FullRefName *string `mandatory:"true" json:"fullRefName"` RepositoryId *string `mandatory:"true" json:"repositoryId"` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` RefType string `json:"refType"` } @@ -89,31 +89,31 @@ func (m *repositoryrefsummary) UnmarshalPolymorphicJSON(data []byte) (interface{ } } -//GetRefName returns RefName +// GetFreeformTags returns FreeformTags +func (m repositoryrefsummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m repositoryrefsummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetRefName returns RefName func (m repositoryrefsummary) GetRefName() *string { return m.RefName } -//GetFullRefName returns FullRefName +// GetFullRefName returns FullRefName func (m repositoryrefsummary) GetFullRefName() *string { return m.FullRefName } -//GetRepositoryId returns RepositoryId +// GetRepositoryId returns RepositoryId func (m repositoryrefsummary) GetRepositoryId() *string { return m.RepositoryId } -//GetFreeformTags returns FreeformTags -func (m repositoryrefsummary) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m repositoryrefsummary) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - func (m repositoryrefsummary) String() string { return common.PointerString(m) } diff --git a/devops/trigger.go b/devops/trigger.go index c5a7aea5e6..9e446dfd11 100644 --- a/devops/trigger.go +++ b/devops/trigger.go @@ -61,10 +61,6 @@ type Trigger interface { type trigger struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - ProjectId *string `mandatory:"true" json:"projectId"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` - Actions json.RawMessage `mandatory:"true" json:"actions"` DisplayName *string `mandatory:"false" json:"displayName"` Description *string `mandatory:"false" json:"description"` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` @@ -74,6 +70,10 @@ type trigger struct { 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"` + Id *string `mandatory:"true" json:"id"` + ProjectId *string `mandatory:"true" json:"projectId"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + Actions json.RawMessage `mandatory:"true" json:"actions"` TriggerSource string `json:"triggerSource"` } @@ -149,71 +149,71 @@ func (m *trigger) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetId returns Id -func (m trigger) GetId() *string { - return m.Id -} - -//GetProjectId returns ProjectId -func (m trigger) GetProjectId() *string { - return m.ProjectId -} - -//GetCompartmentId returns CompartmentId -func (m trigger) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetActions returns Actions -func (m trigger) GetActions() json.RawMessage { - return m.Actions -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m trigger) GetDisplayName() *string { return m.DisplayName } -//GetDescription returns Description +// GetDescription returns Description func (m trigger) GetDescription() *string { return m.Description } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m trigger) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m trigger) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m trigger) GetLifecycleState() TriggerLifecycleStateEnum { return m.LifecycleState } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m trigger) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m trigger) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m trigger) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m trigger) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetId returns Id +func (m trigger) GetId() *string { + return m.Id +} + +// GetProjectId returns ProjectId +func (m trigger) GetProjectId() *string { + return m.ProjectId +} + +// GetCompartmentId returns CompartmentId +func (m trigger) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetActions returns Actions +func (m trigger) GetActions() json.RawMessage { + return m.Actions +} + func (m trigger) String() string { return common.PointerString(m) } diff --git a/devops/trigger_action.go b/devops/trigger_action.go index ab9a583854..cc9e60ba9c 100644 --- a/devops/trigger_action.go +++ b/devops/trigger_action.go @@ -23,7 +23,7 @@ type TriggerAction interface { type triggeraction struct { JsonData []byte - Filter Filter `mandatory:"false" json:"filter"` + Filter filter `mandatory:"false" json:"filter"` Type string `json:"type"` } @@ -63,8 +63,8 @@ func (m *triggeraction) UnmarshalPolymorphicJSON(data []byte) (interface{}, erro } } -//GetFilter returns Filter -func (m triggeraction) GetFilter() Filter { +// GetFilter returns Filter +func (m triggeraction) GetFilter() filter { return m.Filter } diff --git a/devops/trigger_collection.go b/devops/trigger_collection.go index 2c86231493..41c880b33d 100644 --- a/devops/trigger_collection.go +++ b/devops/trigger_collection.go @@ -62,6 +62,5 @@ func (m *TriggerCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/devops/trigger_create_result.go b/devops/trigger_create_result.go index aead897e15..0c51a6b6e2 100644 --- a/devops/trigger_create_result.go +++ b/devops/trigger_create_result.go @@ -61,10 +61,6 @@ type TriggerCreateResult interface { type triggercreateresult struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - ProjectId *string `mandatory:"true" json:"projectId"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` - Actions json.RawMessage `mandatory:"true" json:"actions"` DisplayName *string `mandatory:"false" json:"displayName"` Description *string `mandatory:"false" json:"description"` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` @@ -74,6 +70,10 @@ type triggercreateresult struct { 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"` + Id *string `mandatory:"true" json:"id"` + ProjectId *string `mandatory:"true" json:"projectId"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + Actions json.RawMessage `mandatory:"true" json:"actions"` TriggerSource string `json:"triggerSource"` } @@ -149,71 +149,71 @@ func (m *triggercreateresult) UnmarshalPolymorphicJSON(data []byte) (interface{} } } -//GetId returns Id -func (m triggercreateresult) GetId() *string { - return m.Id -} - -//GetProjectId returns ProjectId -func (m triggercreateresult) GetProjectId() *string { - return m.ProjectId -} - -//GetCompartmentId returns CompartmentId -func (m triggercreateresult) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetActions returns Actions -func (m triggercreateresult) GetActions() json.RawMessage { - return m.Actions -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m triggercreateresult) GetDisplayName() *string { return m.DisplayName } -//GetDescription returns Description +// GetDescription returns Description func (m triggercreateresult) GetDescription() *string { return m.Description } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m triggercreateresult) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m triggercreateresult) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m triggercreateresult) GetLifecycleState() TriggerLifecycleStateEnum { return m.LifecycleState } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m triggercreateresult) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m triggercreateresult) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m triggercreateresult) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m triggercreateresult) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetId returns Id +func (m triggercreateresult) GetId() *string { + return m.Id +} + +// GetProjectId returns ProjectId +func (m triggercreateresult) GetProjectId() *string { + return m.ProjectId +} + +// GetCompartmentId returns CompartmentId +func (m triggercreateresult) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetActions returns Actions +func (m triggercreateresult) GetActions() json.RawMessage { + return m.Actions +} + func (m triggercreateresult) String() string { return common.PointerString(m) } diff --git a/devops/trigger_info.go b/devops/trigger_info.go index 397cfb9555..dd3369cb73 100644 --- a/devops/trigger_info.go +++ b/devops/trigger_info.go @@ -68,6 +68,5 @@ func (m *TriggerInfo) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - return } diff --git a/devops/trigger_summary.go b/devops/trigger_summary.go index f0e74095b9..0a01c4a820 100644 --- a/devops/trigger_summary.go +++ b/devops/trigger_summary.go @@ -58,9 +58,6 @@ type TriggerSummary interface { type triggersummary struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - ProjectId *string `mandatory:"true" json:"projectId"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` DisplayName *string `mandatory:"false" json:"displayName"` Description *string `mandatory:"false" json:"description"` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` @@ -70,6 +67,9 @@ type triggersummary struct { 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"` + Id *string `mandatory:"true" json:"id"` + ProjectId *string `mandatory:"true" json:"projectId"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` TriggerSource string `json:"triggerSource"` } @@ -144,66 +144,66 @@ func (m *triggersummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, err } } -//GetId returns Id -func (m triggersummary) GetId() *string { - return m.Id -} - -//GetProjectId returns ProjectId -func (m triggersummary) GetProjectId() *string { - return m.ProjectId -} - -//GetCompartmentId returns CompartmentId -func (m triggersummary) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m triggersummary) GetDisplayName() *string { return m.DisplayName } -//GetDescription returns Description +// GetDescription returns Description func (m triggersummary) GetDescription() *string { return m.Description } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m triggersummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m triggersummary) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m triggersummary) GetLifecycleState() TriggerLifecycleStateEnum { return m.LifecycleState } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m triggersummary) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m triggersummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m triggersummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m triggersummary) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetId returns Id +func (m triggersummary) GetId() *string { + return m.Id +} + +// GetProjectId returns ProjectId +func (m triggersummary) GetProjectId() *string { + return m.ProjectId +} + +// GetCompartmentId returns CompartmentId +func (m triggersummary) GetCompartmentId() *string { + return m.CompartmentId +} + func (m triggersummary) String() string { return common.PointerString(m) } diff --git a/devops/update_bitbucket_cloud_trigger_details.go b/devops/update_bitbucket_cloud_trigger_details.go index adabb7aa54..6d9fe39c3f 100644 --- a/devops/update_bitbucket_cloud_trigger_details.go +++ b/devops/update_bitbucket_cloud_trigger_details.go @@ -125,7 +125,6 @@ func (m *UpdateBitbucketCloudTriggerDetails) UnmarshalJSON(data []byte) (e error m.Actions[i] = nil } } - m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/devops/update_bitbucket_server_trigger_details.go b/devops/update_bitbucket_server_trigger_details.go index 251518c39f..f6854836c1 100644 --- a/devops/update_bitbucket_server_trigger_details.go +++ b/devops/update_bitbucket_server_trigger_details.go @@ -121,7 +121,6 @@ func (m *UpdateBitbucketServerTriggerDetails) UnmarshalJSON(data []byte) (e erro m.Actions[i] = nil } } - m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/devops/update_build_pipeline_stage_details.go b/devops/update_build_pipeline_stage_details.go index 942431d55a..b11d98371d 100644 --- a/devops/update_build_pipeline_stage_details.go +++ b/devops/update_build_pipeline_stage_details.go @@ -96,27 +96,27 @@ func (m *updatebuildpipelinestagedetails) UnmarshalPolymorphicJSON(data []byte) } } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m updatebuildpipelinestagedetails) GetDisplayName() *string { return m.DisplayName } -//GetDescription returns Description +// GetDescription returns Description func (m updatebuildpipelinestagedetails) GetDescription() *string { return m.Description } -//GetBuildPipelineStagePredecessorCollection returns BuildPipelineStagePredecessorCollection +// GetBuildPipelineStagePredecessorCollection returns BuildPipelineStagePredecessorCollection func (m updatebuildpipelinestagedetails) GetBuildPipelineStagePredecessorCollection() *BuildPipelineStagePredecessorCollection { return m.BuildPipelineStagePredecessorCollection } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updatebuildpipelinestagedetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updatebuildpipelinestagedetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/devops/update_compute_instance_group_blue_green_deploy_stage_details.go b/devops/update_compute_instance_group_blue_green_deploy_stage_details.go index e750d18cad..fd21487553 100644 --- a/devops/update_compute_instance_group_blue_green_deploy_stage_details.go +++ b/devops/update_compute_instance_group_blue_green_deploy_stage_details.go @@ -134,10 +134,7 @@ func (m *UpdateComputeInstanceGroupBlueGreenDeployStageDetails) UnmarshalJSON(da m.DeploymentSpecDeployArtifactId = model.DeploymentSpecDeployArtifactId m.DeployArtifactIds = make([]string, len(model.DeployArtifactIds)) - for i, n := range model.DeployArtifactIds { - m.DeployArtifactIds[i] = n - } - + copy(m.DeployArtifactIds, model.DeployArtifactIds) nn, e = model.RolloutPolicy.UnmarshalPolymorphicJSON(model.RolloutPolicy.JsonData) if e != nil { return diff --git a/devops/update_compute_instance_group_canary_deploy_stage_details.go b/devops/update_compute_instance_group_canary_deploy_stage_details.go index bc3bc2bcd3..db3dbdc725 100644 --- a/devops/update_compute_instance_group_canary_deploy_stage_details.go +++ b/devops/update_compute_instance_group_canary_deploy_stage_details.go @@ -131,10 +131,7 @@ func (m *UpdateComputeInstanceGroupCanaryDeployStageDetails) UnmarshalJSON(data m.DeploymentSpecDeployArtifactId = model.DeploymentSpecDeployArtifactId m.DeployArtifactIds = make([]string, len(model.DeployArtifactIds)) - for i, n := range model.DeployArtifactIds { - m.DeployArtifactIds[i] = n - } - + copy(m.DeployArtifactIds, model.DeployArtifactIds) nn, e = model.RolloutPolicy.UnmarshalPolymorphicJSON(model.RolloutPolicy.JsonData) if e != nil { return diff --git a/devops/update_compute_instance_group_deploy_stage_details.go b/devops/update_compute_instance_group_deploy_stage_details.go index fce105b0e9..5dcf394de3 100644 --- a/devops/update_compute_instance_group_deploy_stage_details.go +++ b/devops/update_compute_instance_group_deploy_stage_details.go @@ -143,10 +143,7 @@ func (m *UpdateComputeInstanceGroupDeployStageDetails) UnmarshalJSON(data []byte m.DeploymentSpecDeployArtifactId = model.DeploymentSpecDeployArtifactId m.DeployArtifactIds = make([]string, len(model.DeployArtifactIds)) - for i, n := range model.DeployArtifactIds { - m.DeployArtifactIds[i] = n - } - + copy(m.DeployArtifactIds, model.DeployArtifactIds) nn, e = model.RolloutPolicy.UnmarshalPolymorphicJSON(model.RolloutPolicy.JsonData) if e != nil { return diff --git a/devops/update_connection_details.go b/devops/update_connection_details.go index 8ce92a75cc..332d624c4d 100644 --- a/devops/update_connection_details.go +++ b/devops/update_connection_details.go @@ -100,22 +100,22 @@ func (m *updateconnectiondetails) UnmarshalPolymorphicJSON(data []byte) (interfa } } -//GetDescription returns Description +// GetDescription returns Description func (m updateconnectiondetails) GetDescription() *string { return m.Description } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m updateconnectiondetails) GetDisplayName() *string { return m.DisplayName } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updateconnectiondetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updateconnectiondetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/devops/update_deploy_environment_details.go b/devops/update_deploy_environment_details.go index f32bc10809..705fe009ca 100644 --- a/devops/update_deploy_environment_details.go +++ b/devops/update_deploy_environment_details.go @@ -88,22 +88,22 @@ func (m *updatedeployenvironmentdetails) UnmarshalPolymorphicJSON(data []byte) ( } } -//GetDescription returns Description +// GetDescription returns Description func (m updatedeployenvironmentdetails) GetDescription() *string { return m.Description } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m updatedeployenvironmentdetails) GetDisplayName() *string { return m.DisplayName } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updatedeployenvironmentdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updatedeployenvironmentdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/devops/update_deploy_stage_details.go b/devops/update_deploy_stage_details.go index be237f4505..82cbbe66b2 100644 --- a/devops/update_deploy_stage_details.go +++ b/devops/update_deploy_stage_details.go @@ -156,27 +156,27 @@ func (m *updatedeploystagedetails) UnmarshalPolymorphicJSON(data []byte) (interf } } -//GetDescription returns Description +// GetDescription returns Description func (m updatedeploystagedetails) GetDescription() *string { return m.Description } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m updatedeploystagedetails) GetDisplayName() *string { return m.DisplayName } -//GetDeployStagePredecessorCollection returns DeployStagePredecessorCollection +// GetDeployStagePredecessorCollection returns DeployStagePredecessorCollection func (m updatedeploystagedetails) GetDeployStagePredecessorCollection() *DeployStagePredecessorCollection { return m.DeployStagePredecessorCollection } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updatedeploystagedetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updatedeploystagedetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/devops/update_deployment_details.go b/devops/update_deployment_details.go index 799816ed77..8d5fae3074 100644 --- a/devops/update_deployment_details.go +++ b/devops/update_deployment_details.go @@ -87,17 +87,17 @@ func (m *updatedeploymentdetails) UnmarshalPolymorphicJSON(data []byte) (interfa } } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m updatedeploymentdetails) GetDisplayName() *string { return m.DisplayName } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updatedeploymentdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updatedeploymentdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/devops/update_devops_code_repository_trigger_details.go b/devops/update_devops_code_repository_trigger_details.go index f6253bda3f..a169a4cec5 100644 --- a/devops/update_devops_code_repository_trigger_details.go +++ b/devops/update_devops_code_repository_trigger_details.go @@ -125,7 +125,6 @@ func (m *UpdateDevopsCodeRepositoryTriggerDetails) UnmarshalJSON(data []byte) (e m.Actions[i] = nil } } - m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/devops/update_github_trigger_details.go b/devops/update_github_trigger_details.go index 57504dc0aa..2cd96bb91b 100644 --- a/devops/update_github_trigger_details.go +++ b/devops/update_github_trigger_details.go @@ -125,7 +125,6 @@ func (m *UpdateGithubTriggerDetails) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/devops/update_gitlab_server_trigger_details.go b/devops/update_gitlab_server_trigger_details.go index f3c8ff6bba..edc54cbbef 100644 --- a/devops/update_gitlab_server_trigger_details.go +++ b/devops/update_gitlab_server_trigger_details.go @@ -121,7 +121,6 @@ func (m *UpdateGitlabServerTriggerDetails) UnmarshalJSON(data []byte) (e error) m.Actions[i] = nil } } - m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/devops/update_gitlab_trigger_details.go b/devops/update_gitlab_trigger_details.go index 16f0e334d5..fa2efda0c5 100644 --- a/devops/update_gitlab_trigger_details.go +++ b/devops/update_gitlab_trigger_details.go @@ -125,7 +125,6 @@ func (m *UpdateGitlabTriggerDetails) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/devops/update_oke_deploy_stage_details.go b/devops/update_oke_deploy_stage_details.go index ea319505df..3ec64dd01b 100644 --- a/devops/update_oke_deploy_stage_details.go +++ b/devops/update_oke_deploy_stage_details.go @@ -132,10 +132,7 @@ func (m *UpdateOkeDeployStageDetails) UnmarshalJSON(data []byte) (e error) { m.OkeClusterDeployEnvironmentId = model.OkeClusterDeployEnvironmentId m.KubernetesManifestDeployArtifactIds = make([]string, len(model.KubernetesManifestDeployArtifactIds)) - for i, n := range model.KubernetesManifestDeployArtifactIds { - m.KubernetesManifestDeployArtifactIds[i] = n - } - + copy(m.KubernetesManifestDeployArtifactIds, model.KubernetesManifestDeployArtifactIds) m.Namespace = model.Namespace nn, e = model.RollbackPolicy.UnmarshalPolymorphicJSON(model.RollbackPolicy.JsonData) diff --git a/devops/update_oke_helm_chart_deploy_stage_details.go b/devops/update_oke_helm_chart_deploy_stage_details.go index 7a7e7c35bd..dc8f9743b9 100644 --- a/devops/update_oke_helm_chart_deploy_stage_details.go +++ b/devops/update_oke_helm_chart_deploy_stage_details.go @@ -192,10 +192,7 @@ func (m *UpdateOkeHelmChartDeployStageDetails) UnmarshalJSON(data []byte) (e err m.HelmChartDeployArtifactId = model.HelmChartDeployArtifactId m.ValuesArtifactIds = make([]string, len(model.ValuesArtifactIds)) - for i, n := range model.ValuesArtifactIds { - m.ValuesArtifactIds[i] = n - } - + copy(m.ValuesArtifactIds, model.ValuesArtifactIds) m.ReleaseName = model.ReleaseName m.Namespace = model.Namespace diff --git a/devops/update_trigger_details.go b/devops/update_trigger_details.go index 0eb297afeb..a579deb5f7 100644 --- a/devops/update_trigger_details.go +++ b/devops/update_trigger_details.go @@ -109,27 +109,27 @@ func (m *updatetriggerdetails) UnmarshalPolymorphicJSON(data []byte) (interface{ } } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m updatetriggerdetails) GetDisplayName() *string { return m.DisplayName } -//GetDescription returns Description +// GetDescription returns Description func (m updatetriggerdetails) GetDescription() *string { return m.Description } -//GetActions returns Actions +// GetActions returns Actions func (m updatetriggerdetails) GetActions() json.RawMessage { return m.Actions } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updatetriggerdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updatetriggerdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/devops/update_vbs_trigger_details.go b/devops/update_vbs_trigger_details.go index 25369d44e7..8fd3a3e3cb 100644 --- a/devops/update_vbs_trigger_details.go +++ b/devops/update_vbs_trigger_details.go @@ -125,7 +125,6 @@ func (m *UpdateVbsTriggerDetails) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/devops/vbs_trigger.go b/devops/vbs_trigger.go index 418adfdc02..1b931df4d5 100644 --- a/devops/vbs_trigger.go +++ b/devops/vbs_trigger.go @@ -226,7 +226,6 @@ func (m *VbsTrigger) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - m.TriggerUrl = model.TriggerUrl return diff --git a/devops/vbs_trigger_create_result.go b/devops/vbs_trigger_create_result.go index 22a42d501b..7c29c6e59c 100644 --- a/devops/vbs_trigger_create_result.go +++ b/devops/vbs_trigger_create_result.go @@ -230,7 +230,6 @@ func (m *VbsTriggerCreateResult) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - m.Secret = model.Secret m.TriggerUrl = model.TriggerUrl diff --git a/disasterrecovery/create_dr_protection_group_details.go b/disasterrecovery/create_dr_protection_group_details.go index 547e29198c..fb708e9c08 100644 --- a/disasterrecovery/create_dr_protection_group_details.go +++ b/disasterrecovery/create_dr_protection_group_details.go @@ -92,7 +92,6 @@ func (m *CreateDrProtectionGroupDetails) UnmarshalJSON(data []byte) (e error) { m.Members[i] = nil } } - m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/disasterrecovery/create_dr_protection_group_member_details.go b/disasterrecovery/create_dr_protection_group_member_details.go index 9d4e92466a..a37aa88f39 100644 --- a/disasterrecovery/create_dr_protection_group_member_details.go +++ b/disasterrecovery/create_dr_protection_group_member_details.go @@ -88,7 +88,7 @@ func (m *createdrprotectiongroupmemberdetails) UnmarshalPolymorphicJSON(data []b } } -//GetMemberId returns MemberId +// GetMemberId returns MemberId func (m createdrprotectiongroupmemberdetails) GetMemberId() *string { return m.MemberId } diff --git a/disasterrecovery/disasterrecovery_client.go b/disasterrecovery/disasterrecovery_client.go index c906f45221..c09c965489 100644 --- a/disasterrecovery/disasterrecovery_client.go +++ b/disasterrecovery/disasterrecovery_client.go @@ -82,7 +82,7 @@ func (client *DisasterRecoveryClient) setConfigurationProvider(configProvider co 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/disasterrecovery/dr_plan_execution.go b/disasterrecovery/dr_plan_execution.go index 8500a7bede..cd490adfdc 100644 --- a/disasterrecovery/dr_plan_execution.go +++ b/disasterrecovery/dr_plan_execution.go @@ -201,10 +201,7 @@ func (m *DrPlanExecution) UnmarshalJSON(data []byte) (e error) { m.TimeUpdated = model.TimeUpdated m.GroupExecutions = make([]DrPlanGroupExecution, len(model.GroupExecutions)) - for i, n := range model.GroupExecutions { - m.GroupExecutions[i] = n - } - + copy(m.GroupExecutions, model.GroupExecutions) m.LifecycleState = model.LifecycleState return diff --git a/disasterrecovery/dr_protection_group.go b/disasterrecovery/dr_protection_group.go index 4c34589947..581b7d14a2 100644 --- a/disasterrecovery/dr_protection_group.go +++ b/disasterrecovery/dr_protection_group.go @@ -141,7 +141,6 @@ func (m *DrProtectionGroup) UnmarshalJSON(data []byte) (e error) { m.Members[i] = nil } } - m.LifeCycleDetails = model.LifeCycleDetails m.FreeformTags = model.FreeformTags diff --git a/disasterrecovery/dr_protection_group_member.go b/disasterrecovery/dr_protection_group_member.go index 8b75f0c737..b661e3e8e9 100644 --- a/disasterrecovery/dr_protection_group_member.go +++ b/disasterrecovery/dr_protection_group_member.go @@ -88,7 +88,7 @@ func (m *drprotectiongroupmember) UnmarshalPolymorphicJSON(data []byte) (interfa } } -//GetMemberId returns MemberId +// GetMemberId returns MemberId func (m drprotectiongroupmember) GetMemberId() *string { return m.MemberId } diff --git a/disasterrecovery/update_dr_protection_group_details.go b/disasterrecovery/update_dr_protection_group_details.go index 3e500eab38..7e7aedd512 100644 --- a/disasterrecovery/update_dr_protection_group_details.go +++ b/disasterrecovery/update_dr_protection_group_details.go @@ -86,7 +86,6 @@ func (m *UpdateDrProtectionGroupDetails) UnmarshalJSON(data []byte) (e error) { m.Members[i] = nil } } - m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/disasterrecovery/update_dr_protection_group_member_details.go b/disasterrecovery/update_dr_protection_group_member_details.go index 8bb3efaa4d..fd8e35cb41 100644 --- a/disasterrecovery/update_dr_protection_group_member_details.go +++ b/disasterrecovery/update_dr_protection_group_member_details.go @@ -88,7 +88,7 @@ func (m *updatedrprotectiongroupmemberdetails) UnmarshalPolymorphicJSON(data []b } } -//GetMemberId returns MemberId +// GetMemberId returns MemberId func (m updatedrprotectiongroupmemberdetails) GetMemberId() *string { return m.MemberId } diff --git a/dns/create_resolver_endpoint_details.go b/dns/create_resolver_endpoint_details.go index 2da71dbcee..3c84eedd6e 100644 --- a/dns/create_resolver_endpoint_details.go +++ b/dns/create_resolver_endpoint_details.go @@ -41,11 +41,11 @@ type CreateResolverEndpointDetails interface { type createresolverendpointdetails struct { JsonData []byte + ForwardingAddress *string `mandatory:"false" json:"forwardingAddress"` + ListeningAddress *string `mandatory:"false" json:"listeningAddress"` Name *string `mandatory:"true" json:"name"` IsForwarding *bool `mandatory:"true" json:"isForwarding"` IsListening *bool `mandatory:"true" json:"isListening"` - ForwardingAddress *string `mandatory:"false" json:"forwardingAddress"` - ListeningAddress *string `mandatory:"false" json:"listeningAddress"` EndpointType string `json:"endpointType"` } @@ -89,31 +89,31 @@ func (m *createresolverendpointdetails) UnmarshalPolymorphicJSON(data []byte) (i } } -//GetName returns Name +// GetForwardingAddress returns ForwardingAddress +func (m createresolverendpointdetails) GetForwardingAddress() *string { + return m.ForwardingAddress +} + +// GetListeningAddress returns ListeningAddress +func (m createresolverendpointdetails) GetListeningAddress() *string { + return m.ListeningAddress +} + +// GetName returns Name func (m createresolverendpointdetails) GetName() *string { return m.Name } -//GetIsForwarding returns IsForwarding +// GetIsForwarding returns IsForwarding func (m createresolverendpointdetails) GetIsForwarding() *bool { return m.IsForwarding } -//GetIsListening returns IsListening +// GetIsListening returns IsListening func (m createresolverendpointdetails) GetIsListening() *bool { return m.IsListening } -//GetForwardingAddress returns ForwardingAddress -func (m createresolverendpointdetails) GetForwardingAddress() *string { - return m.ForwardingAddress -} - -//GetListeningAddress returns ListeningAddress -func (m createresolverendpointdetails) GetListeningAddress() *string { - return m.ListeningAddress -} - func (m createresolverendpointdetails) String() string { return common.PointerString(m) } diff --git a/dns/create_steering_policy_details.go b/dns/create_steering_policy_details.go index 02d2d21900..74a91dffd7 100644 --- a/dns/create_steering_policy_details.go +++ b/dns/create_steering_policy_details.go @@ -146,10 +146,7 @@ func (m *CreateSteeringPolicyDetails) UnmarshalJSON(data []byte) (e error) { m.DefinedTags = model.DefinedTags m.Answers = make([]SteeringPolicyAnswer, len(model.Answers)) - for i, n := range model.Answers { - m.Answers[i] = n - } - + copy(m.Answers, model.Answers) m.Rules = make([]SteeringPolicyRule, len(model.Rules)) for i, n := range model.Rules { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -162,7 +159,6 @@ func (m *CreateSteeringPolicyDetails) UnmarshalJSON(data []byte) (e error) { m.Rules[i] = nil } } - m.CompartmentId = model.CompartmentId m.DisplayName = model.DisplayName diff --git a/dns/create_zone_base_details.go b/dns/create_zone_base_details.go index 6601cb6f7b..e5f72fd125 100644 --- a/dns/create_zone_base_details.go +++ b/dns/create_zone_base_details.go @@ -43,10 +43,10 @@ type CreateZoneBaseDetails interface { type createzonebasedetails struct { JsonData []byte - Name *string `mandatory:"true" json:"name"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + Name *string `mandatory:"true" json:"name"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` MigrationSource string `json:"migrationSource"` } @@ -93,26 +93,26 @@ func (m *createzonebasedetails) UnmarshalPolymorphicJSON(data []byte) (interface } } -//GetName returns Name -func (m createzonebasedetails) GetName() *string { - return m.Name -} - -//GetCompartmentId returns CompartmentId -func (m createzonebasedetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createzonebasedetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createzonebasedetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetName returns Name +func (m createzonebasedetails) GetName() *string { + return m.Name +} + +// GetCompartmentId returns CompartmentId +func (m createzonebasedetails) GetCompartmentId() *string { + return m.CompartmentId +} + func (m createzonebasedetails) String() string { return common.PointerString(m) } diff --git a/dns/dns_client.go b/dns/dns_client.go index f4e583ec19..3c2f4b5057 100644 --- a/dns/dns_client.go +++ b/dns/dns_client.go @@ -81,7 +81,7 @@ func (client *DnsClient) setConfigurationProvider(configProvider common.Configur 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/dns/resolver.go b/dns/resolver.go index e1811c6c06..b6c867df7a 100644 --- a/dns/resolver.go +++ b/dns/resolver.go @@ -141,7 +141,6 @@ func (m *Resolver) UnmarshalJSON(data []byte) (e error) { m.Rules[i] = nil } } - m.CompartmentId = model.CompartmentId m.DisplayName = model.DisplayName @@ -174,12 +173,8 @@ func (m *Resolver) UnmarshalJSON(data []byte) (e error) { m.Endpoints[i] = nil } } - m.AttachedViews = make([]AttachedView, len(model.AttachedViews)) - for i, n := range model.AttachedViews { - m.AttachedViews[i] = n - } - + copy(m.AttachedViews, model.AttachedViews) return } diff --git a/dns/resolver_endpoint.go b/dns/resolver_endpoint.go index 062b9700c2..10aa1c4f34 100644 --- a/dns/resolver_endpoint.go +++ b/dns/resolver_endpoint.go @@ -61,6 +61,8 @@ type ResolverEndpoint interface { type resolverendpoint struct { JsonData []byte + ForwardingAddress *string `mandatory:"false" json:"forwardingAddress"` + ListeningAddress *string `mandatory:"false" json:"listeningAddress"` Name *string `mandatory:"true" json:"name"` IsForwarding *bool `mandatory:"true" json:"isForwarding"` IsListening *bool `mandatory:"true" json:"isListening"` @@ -69,8 +71,6 @@ type resolverendpoint struct { TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` LifecycleState ResolverEndpointLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` Self *string `mandatory:"true" json:"self"` - ForwardingAddress *string `mandatory:"false" json:"forwardingAddress"` - ListeningAddress *string `mandatory:"false" json:"listeningAddress"` EndpointType string `json:"endpointType"` } @@ -119,56 +119,56 @@ func (m *resolverendpoint) UnmarshalPolymorphicJSON(data []byte) (interface{}, e } } -//GetName returns Name +// GetForwardingAddress returns ForwardingAddress +func (m resolverendpoint) GetForwardingAddress() *string { + return m.ForwardingAddress +} + +// GetListeningAddress returns ListeningAddress +func (m resolverendpoint) GetListeningAddress() *string { + return m.ListeningAddress +} + +// GetName returns Name func (m resolverendpoint) GetName() *string { return m.Name } -//GetIsForwarding returns IsForwarding +// GetIsForwarding returns IsForwarding func (m resolverendpoint) GetIsForwarding() *bool { return m.IsForwarding } -//GetIsListening returns IsListening +// GetIsListening returns IsListening func (m resolverendpoint) GetIsListening() *bool { return m.IsListening } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m resolverendpoint) GetCompartmentId() *string { return m.CompartmentId } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m resolverendpoint) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m resolverendpoint) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m resolverendpoint) GetLifecycleState() ResolverEndpointLifecycleStateEnum { return m.LifecycleState } -//GetSelf returns Self +// GetSelf returns Self func (m resolverendpoint) GetSelf() *string { return m.Self } -//GetForwardingAddress returns ForwardingAddress -func (m resolverendpoint) GetForwardingAddress() *string { - return m.ForwardingAddress -} - -//GetListeningAddress returns ListeningAddress -func (m resolverendpoint) GetListeningAddress() *string { - return m.ListeningAddress -} - func (m resolverendpoint) String() string { return common.PointerString(m) } diff --git a/dns/resolver_endpoint_summary.go b/dns/resolver_endpoint_summary.go index ebad10c38d..ee293a55c1 100644 --- a/dns/resolver_endpoint_summary.go +++ b/dns/resolver_endpoint_summary.go @@ -61,6 +61,8 @@ type ResolverEndpointSummary interface { type resolverendpointsummary struct { JsonData []byte + ForwardingAddress *string `mandatory:"false" json:"forwardingAddress"` + ListeningAddress *string `mandatory:"false" json:"listeningAddress"` Name *string `mandatory:"true" json:"name"` IsForwarding *bool `mandatory:"true" json:"isForwarding"` IsListening *bool `mandatory:"true" json:"isListening"` @@ -69,8 +71,6 @@ type resolverendpointsummary struct { TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` LifecycleState ResolverEndpointSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` Self *string `mandatory:"true" json:"self"` - ForwardingAddress *string `mandatory:"false" json:"forwardingAddress"` - ListeningAddress *string `mandatory:"false" json:"listeningAddress"` EndpointType string `json:"endpointType"` } @@ -119,56 +119,56 @@ func (m *resolverendpointsummary) UnmarshalPolymorphicJSON(data []byte) (interfa } } -//GetName returns Name +// GetForwardingAddress returns ForwardingAddress +func (m resolverendpointsummary) GetForwardingAddress() *string { + return m.ForwardingAddress +} + +// GetListeningAddress returns ListeningAddress +func (m resolverendpointsummary) GetListeningAddress() *string { + return m.ListeningAddress +} + +// GetName returns Name func (m resolverendpointsummary) GetName() *string { return m.Name } -//GetIsForwarding returns IsForwarding +// GetIsForwarding returns IsForwarding func (m resolverendpointsummary) GetIsForwarding() *bool { return m.IsForwarding } -//GetIsListening returns IsListening +// GetIsListening returns IsListening func (m resolverendpointsummary) GetIsListening() *bool { return m.IsListening } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m resolverendpointsummary) GetCompartmentId() *string { return m.CompartmentId } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m resolverendpointsummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m resolverendpointsummary) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m resolverendpointsummary) GetLifecycleState() ResolverEndpointSummaryLifecycleStateEnum { return m.LifecycleState } -//GetSelf returns Self +// GetSelf returns Self func (m resolverendpointsummary) GetSelf() *string { return m.Self } -//GetForwardingAddress returns ForwardingAddress -func (m resolverendpointsummary) GetForwardingAddress() *string { - return m.ForwardingAddress -} - -//GetListeningAddress returns ListeningAddress -func (m resolverendpointsummary) GetListeningAddress() *string { - return m.ListeningAddress -} - func (m resolverendpointsummary) String() string { return common.PointerString(m) } diff --git a/dns/resolver_rule.go b/dns/resolver_rule.go index 08d9b43179..197f05461d 100644 --- a/dns/resolver_rule.go +++ b/dns/resolver_rule.go @@ -73,12 +73,12 @@ func (m *resolverrule) UnmarshalPolymorphicJSON(data []byte) (interface{}, error } } -//GetClientAddressConditions returns ClientAddressConditions +// GetClientAddressConditions returns ClientAddressConditions func (m resolverrule) GetClientAddressConditions() []string { return m.ClientAddressConditions } -//GetQnameCoverConditions returns QnameCoverConditions +// GetQnameCoverConditions returns QnameCoverConditions func (m resolverrule) GetQnameCoverConditions() []string { return m.QnameCoverConditions } diff --git a/dns/resolver_rule_details.go b/dns/resolver_rule_details.go index c7addcac62..d2ef33c5d2 100644 --- a/dns/resolver_rule_details.go +++ b/dns/resolver_rule_details.go @@ -73,12 +73,12 @@ func (m *resolverruledetails) UnmarshalPolymorphicJSON(data []byte) (interface{} } } -//GetClientAddressConditions returns ClientAddressConditions +// GetClientAddressConditions returns ClientAddressConditions func (m resolverruledetails) GetClientAddressConditions() []string { return m.ClientAddressConditions } -//GetQnameCoverConditions returns QnameCoverConditions +// GetQnameCoverConditions returns QnameCoverConditions func (m resolverruledetails) GetQnameCoverConditions() []string { return m.QnameCoverConditions } diff --git a/dns/steering_policy.go b/dns/steering_policy.go index b98c82e913..ab0aad8969 100644 --- a/dns/steering_policy.go +++ b/dns/steering_policy.go @@ -172,10 +172,7 @@ func (m *SteeringPolicy) UnmarshalJSON(data []byte) (e error) { m.DefinedTags = model.DefinedTags m.Answers = make([]SteeringPolicyAnswer, len(model.Answers)) - for i, n := range model.Answers { - m.Answers[i] = n - } - + copy(m.Answers, model.Answers) m.Rules = make([]SteeringPolicyRule, len(model.Rules)) for i, n := range model.Rules { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -188,7 +185,6 @@ func (m *SteeringPolicy) UnmarshalJSON(data []byte) (e error) { m.Rules[i] = nil } } - m.Self = model.Self m.Id = model.Id diff --git a/dns/steering_policy_rule.go b/dns/steering_policy_rule.go index 3871cc1f61..d803fa5cd6 100644 --- a/dns/steering_policy_rule.go +++ b/dns/steering_policy_rule.go @@ -90,7 +90,7 @@ func (m *steeringpolicyrule) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetDescription returns Description +// GetDescription returns Description func (m steeringpolicyrule) GetDescription() *string { return m.Description } diff --git a/dns/update_resolver_details.go b/dns/update_resolver_details.go index 1acff53016..d4d0c77c20 100644 --- a/dns/update_resolver_details.go +++ b/dns/update_resolver_details.go @@ -81,10 +81,7 @@ func (m *UpdateResolverDetails) UnmarshalJSON(data []byte) (e error) { m.DefinedTags = model.DefinedTags m.AttachedViews = make([]AttachedViewDetails, len(model.AttachedViews)) - for i, n := range model.AttachedViews { - m.AttachedViews[i] = n - } - + copy(m.AttachedViews, model.AttachedViews) m.Rules = make([]ResolverRuleDetails, len(model.Rules)) for i, n := range model.Rules { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -97,6 +94,5 @@ func (m *UpdateResolverDetails) UnmarshalJSON(data []byte) (e error) { m.Rules[i] = nil } } - return } diff --git a/dns/update_steering_policy_details.go b/dns/update_steering_policy_details.go index dbac82dacb..81ddbbd53d 100644 --- a/dns/update_steering_policy_details.go +++ b/dns/update_steering_policy_details.go @@ -148,10 +148,7 @@ func (m *UpdateSteeringPolicyDetails) UnmarshalJSON(data []byte) (e error) { m.DefinedTags = model.DefinedTags m.Answers = make([]SteeringPolicyAnswer, len(model.Answers)) - for i, n := range model.Answers { - m.Answers[i] = n - } - + copy(m.Answers, model.Answers) m.Rules = make([]SteeringPolicyRule, len(model.Rules)) for i, n := range model.Rules { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -164,7 +161,6 @@ func (m *UpdateSteeringPolicyDetails) UnmarshalJSON(data []byte) (e error) { m.Rules[i] = nil } } - return } diff --git a/dts/dts_applianceexportjob_client.go b/dts/dts_applianceexportjob_client.go index 4e0ee26533..eb5c5c0e01 100644 --- a/dts/dts_applianceexportjob_client.go +++ b/dts/dts_applianceexportjob_client.go @@ -80,7 +80,7 @@ func (client *ApplianceExportJobClient) setConfigurationProvider(configProvider 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/dts/dts_shippingvendors_client.go b/dts/dts_shippingvendors_client.go index 16ef060ced..2258cdfde1 100644 --- a/dts/dts_shippingvendors_client.go +++ b/dts/dts_shippingvendors_client.go @@ -80,7 +80,7 @@ func (client *ShippingVendorsClient) setConfigurationProvider(configProvider com 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/dts/dts_transferappliance_client.go b/dts/dts_transferappliance_client.go index 580e08905e..b1f13c0e41 100644 --- a/dts/dts_transferappliance_client.go +++ b/dts/dts_transferappliance_client.go @@ -80,7 +80,7 @@ func (client *TransferApplianceClient) setConfigurationProvider(configProvider c 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/dts/dts_transferapplianceentitlement_client.go b/dts/dts_transferapplianceentitlement_client.go index e998689c95..495456802d 100644 --- a/dts/dts_transferapplianceentitlement_client.go +++ b/dts/dts_transferapplianceentitlement_client.go @@ -80,7 +80,7 @@ func (client *TransferApplianceEntitlementClient) setConfigurationProvider(confi 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/dts/dts_transferdevice_client.go b/dts/dts_transferdevice_client.go index 79ac0fbd46..054e2c429e 100644 --- a/dts/dts_transferdevice_client.go +++ b/dts/dts_transferdevice_client.go @@ -80,7 +80,7 @@ func (client *TransferDeviceClient) setConfigurationProvider(configProvider comm 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/dts/dts_transferjob_client.go b/dts/dts_transferjob_client.go index c83cbed833..4d3b70aaf8 100644 --- a/dts/dts_transferjob_client.go +++ b/dts/dts_transferjob_client.go @@ -80,7 +80,7 @@ func (client *TransferJobClient) setConfigurationProvider(configProvider common. 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/dts/dts_transferpackage_client.go b/dts/dts_transferpackage_client.go index c98441e75e..18c85ee735 100644 --- a/dts/dts_transferpackage_client.go +++ b/dts/dts_transferpackage_client.go @@ -80,7 +80,7 @@ func (client *TransferPackageClient) setConfigurationProvider(configProvider com 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/email/email_client.go b/email/email_client.go index 80e64539bf..7c8a5a6523 100644 --- a/email/email_client.go +++ b/email/email_client.go @@ -84,7 +84,7 @@ func (client *EmailClient) setConfigurationProvider(configProvider common.Config 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/emwarehouse/emwarehouse_client.go b/emwarehouse/emwarehouse_client.go index 1e95d3e694..a3b7721827 100644 --- a/emwarehouse/emwarehouse_client.go +++ b/emwarehouse/emwarehouse_client.go @@ -80,7 +80,7 @@ func (client *EmWarehouseClient) setConfigurationProvider(configProvider common. 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/events/action.go b/events/action.go index 89fa3b7bfb..bd2fcb5425 100644 --- a/events/action.go +++ b/events/action.go @@ -40,11 +40,11 @@ type Action interface { type action struct { JsonData []byte + IsEnabled *bool `mandatory:"false" json:"isEnabled"` + Description *string `mandatory:"false" json:"description"` Id *string `mandatory:"true" json:"id"` LifecycleMessage *string `mandatory:"true" json:"lifecycleMessage"` LifecycleState ActionLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - IsEnabled *bool `mandatory:"false" json:"isEnabled"` - Description *string `mandatory:"false" json:"description"` ActionType string `json:"actionType"` } @@ -96,31 +96,31 @@ func (m *action) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetId returns Id +// GetIsEnabled returns IsEnabled +func (m action) GetIsEnabled() *bool { + return m.IsEnabled +} + +// GetDescription returns Description +func (m action) GetDescription() *string { + return m.Description +} + +// GetId returns Id func (m action) GetId() *string { return m.Id } -//GetLifecycleMessage returns LifecycleMessage +// GetLifecycleMessage returns LifecycleMessage func (m action) GetLifecycleMessage() *string { return m.LifecycleMessage } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m action) GetLifecycleState() ActionLifecycleStateEnum { return m.LifecycleState } -//GetIsEnabled returns IsEnabled -func (m action) GetIsEnabled() *bool { - return m.IsEnabled -} - -//GetDescription returns Description -func (m action) GetDescription() *string { - return m.Description -} - func (m action) String() string { return common.PointerString(m) } diff --git a/events/action_details.go b/events/action_details.go index 906fdae27a..ffe1edadb2 100644 --- a/events/action_details.go +++ b/events/action_details.go @@ -31,8 +31,8 @@ type ActionDetails interface { type actiondetails struct { JsonData []byte - IsEnabled *bool `mandatory:"true" json:"isEnabled"` Description *string `mandatory:"false" json:"description"` + IsEnabled *bool `mandatory:"true" json:"isEnabled"` ActionType string `json:"actionType"` } @@ -81,16 +81,16 @@ func (m *actiondetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, erro } } -//GetIsEnabled returns IsEnabled -func (m actiondetails) GetIsEnabled() *bool { - return m.IsEnabled -} - -//GetDescription returns Description +// GetDescription returns Description func (m actiondetails) GetDescription() *string { return m.Description } +// GetIsEnabled returns IsEnabled +func (m actiondetails) GetIsEnabled() *bool { + return m.IsEnabled +} + func (m actiondetails) String() string { return common.PointerString(m) } diff --git a/events/action_details_list.go b/events/action_details_list.go index e6dc14d5ae..d5a1a224bc 100644 --- a/events/action_details_list.go +++ b/events/action_details_list.go @@ -63,6 +63,5 @@ func (m *ActionDetailsList) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - return } diff --git a/events/action_list.go b/events/action_list.go index c1811f21e2..437eea6a15 100644 --- a/events/action_list.go +++ b/events/action_list.go @@ -63,6 +63,5 @@ func (m *ActionList) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - return } diff --git a/events/events_client.go b/events/events_client.go index 8cb08018b4..b40da44edf 100644 --- a/events/events_client.go +++ b/events/events_client.go @@ -81,7 +81,7 @@ func (client *EventsClient) setConfigurationProvider(configProvider common.Confi 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/example/container_image_signing/utils.go b/example/container_image_signing/utils.go index 751ee0bca9..6bfbc54929 100644 --- a/example/container_image_signing/utils.go +++ b/example/container_image_signing/utils.go @@ -322,7 +322,7 @@ func verifySignature(ctx context.Context, client keymanagement.KmsCryptoClient, // buildVaultCryptoClient builds the KmsCryptoClient based on the vault extension OCID in the keyId func buildVaultCryptoClient(configProvider common.ConfigurationProvider, keyId string, region string) (client keymanagement.KmsCryptoClient, err error) { - re := regexp.MustCompile("ocid1\\.key\\.([\\w-]+)\\.([\\w-]+)\\.([\\w-]+)\\.([\\w]{60})") + re := regexp.MustCompile(`ocid1\.key\.([\w-]+)\.([\w-]+)\.([\w-]+)\.([\w]{60})`) vaultExt := re.FindStringSubmatch(keyId)[3] cryptoEndpointTemplate := common.StringToRegion(region).EndpointForTemplate("kms", "https://{vaultExt}-crypto.kms.{region}.{secondLevelDomain}") cryptoEndpoint := strings.Replace(cryptoEndpointTemplate, "{vaultExt}", vaultExt, 1) diff --git a/example/example_change_compartment_test.go b/example/example_change_compartment_test.go index eed1f7aa20..8237add6b4 100644 --- a/example/example_change_compartment_test.go +++ b/example/example_change_compartment_test.go @@ -235,7 +235,7 @@ func waitUnitlMoveCompletion(opcWorkRequestID *string) { if opcWorkRequestID != nil { log.Printf(" opc-work-request-id : %s", *opcWorkRequestID) log.Printf(" Querying the status of move operation using opc-work-request-id ") - wc, err := workrequests.NewWorkRequestClientWithConfigurationProvider(common.DefaultConfigProvider()) + wc, _ := workrequests.NewWorkRequestClientWithConfigurationProvider(common.DefaultConfigProvider()) retryPolicy = getRetryPolicy() // Apply wait until work complete retryPolicy diff --git a/example/example_databasetools_test.go b/example/example_databasetools_test.go index f5a7d9e3a8..8fab2e09e2 100644 --- a/example/example_databasetools_test.go +++ b/example/example_databasetools_test.go @@ -851,12 +851,15 @@ func (cfg config) getADBsWalletAsBase64String() *string { GenerateType: "SINGLE", }, }) - defer response.Content.Close() + if err != nil { log.Printf("error generating ADBs wallet: %v\n", err) + response.Content.Close() return nil } + defer response.Content.Close() + zipFileBytes, err := ioutil.ReadAll(response.Content) if err != nil { log.Printf("error reading ADBs wallet zip: %v\n", err) @@ -1118,11 +1121,14 @@ func (cfg config) getFileFromZip(zipFileBytes []byte, fileName string) ([]byte, for _, f := range zipReader.File { if f.Name == fileName { fileReader, err := f.Open() - defer fileReader.Close() + if err != nil { + fileReader.Close() return nil, err } + defer fileReader.Close() + fileBytes, err := ioutil.ReadAll(fileReader) if err != nil { return nil, err diff --git a/example/example_eventually_consistent_retry_behavior_test.go b/example/example_eventually_consistent_retry_behavior_test.go index 1dd51da8f2..6d6315cd37 100644 --- a/example/example_eventually_consistent_retry_behavior_test.go +++ b/example/example_eventually_consistent_retry_behavior_test.go @@ -137,7 +137,7 @@ func ExampleEventuallyConsistentRetryBehavior_UnlimitedAttempts() { common.ReplaceWithValuesFromRetryPolicy(common.DefaultRetryPolicyWithoutEventualConsistency()), common.WithUnlimitedAttempts(maximumCumulativeBackoff), common.WithShouldRetryOperation(func(r common.OCIOperationResponse) bool { - durationSinceInitialAttempt := time.Now().Sub(r.InitialAttemptTime) + durationSinceInitialAttempt := time.Since(r.InitialAttemptTime) tooLong := durationSinceInitialAttempt > maximumCumulativeBackoff return common.DefaultShouldRetryOperation(r) && !tooLong }), diff --git a/example/example_keymanagement_test.go b/example/example_keymanagement_test.go index b8e57e7777..fe31bf610c 100644 --- a/example/example_keymanagement_test.go +++ b/example/example_keymanagement_test.go @@ -32,7 +32,7 @@ func ExampleVaultOperations() { waitForStateVaultClient(ctx, vault.Id, vaultClient, keymanagement.VaultLifecycleStateActive) updatedVault := updateVault(ctx, vaultClient, &updatedVaultName, vault.Id) - fmt.Println(fmt.Sprintf("Updated vault display name %s", *updatedVault.DisplayName)) + fmt.Printf("Updated vault display name %s\n", *updatedVault.DisplayName) svdErr := scheduleVaultDeletion(ctx, vaultClient, vault.Id) helpers.FatalIfError(svdErr) @@ -199,7 +199,7 @@ func ExampleCryptoOperations() { generateDekResponse, err := vaultCryptoClient.GenerateDataEncryptionKey(ctx, generateDekRequest) helpers.FatalIfError(err) generatedKey := generateDekResponse.GeneratedKey - fmt.Println(fmt.Sprintf("Plaintext generated DEK: %s", *generatedKey.Plaintext)) + fmt.Printf("Plaintext generated DEK: %s\n", *generatedKey.Plaintext) fmt.Println("generate DEK") @@ -231,7 +231,7 @@ func ExampleCryptoOperations() { helpers.FatalIfError(decryptErr) plainText := decryptResponse.Plaintext - fmt.Println(fmt.Sprintf("Decrypted plaintext: %s", *plainText)) + fmt.Printf("Decrypted plaintext: %s\n", *plainText) fmt.Print("decrypt data") diff --git a/example/example_objectstorage_test.go b/example/example_objectstorage_test.go index 72c0a69e92..e4c4f8c9e3 100644 --- a/example/example_objectstorage_test.go +++ b/example/example_objectstorage_test.go @@ -40,8 +40,13 @@ func ExampleObjectStorage_UploadFile() { }() file, e := os.Open(fpath) - defer file.Close() - helpers.FatalIfError(e) + + if e != nil { + file.Close() + helpers.FatalIfError(e) + } else { + defer file.Close() + } e = putObject(ctx, c, namespace, bname, filename, filesize, file, nil) helpers.FatalIfError(e) diff --git a/example/example_retry_test.go b/example/example_retry_test.go index cc63052235..1d34e2187d 100644 --- a/example/example_retry_test.go +++ b/example/example_retry_test.go @@ -234,7 +234,7 @@ func ExampleUnlimitedAttemptsRetry() { customRetryPolicy := common.NewRetryPolicyWithOptions( common.WithUnlimitedAttempts(maximumCumulativeBackoff), common.WithShouldRetryOperation(func(r common.OCIOperationResponse) bool { - durationSinceInitialAttempt := time.Now().Sub(r.InitialAttemptTime) + durationSinceInitialAttempt := time.Since(r.InitialAttemptTime) tooLong := durationSinceInitialAttempt > maximumCumulativeBackoff return common.DefaultShouldRetryOperation(r) && !tooLong }), @@ -274,7 +274,7 @@ func ExampleUnlimitedAttemptsRetry() { common.ReplaceWithValuesFromRetryPolicy(common.DefaultRetryPolicyWithoutEventualConsistency()), common.WithUnlimitedAttempts(maximumCumulativeBackoff), common.WithShouldRetryOperation(func(r common.OCIOperationResponse) bool { - durationSinceInitialAttempt := time.Now().Sub(r.InitialAttemptTime) + durationSinceInitialAttempt := time.Since(r.InitialAttemptTime) tooLong := durationSinceInitialAttempt > maximumCumulativeBackoff return shouldRetry(r) && !tooLong }), diff --git a/filestorage/create_outbound_connector_details.go b/filestorage/create_outbound_connector_details.go index db50316651..8ed2bb4890 100644 --- a/filestorage/create_outbound_connector_details.go +++ b/filestorage/create_outbound_connector_details.go @@ -47,11 +47,11 @@ type CreateOutboundConnectorDetails interface { type createoutboundconnectordetails struct { JsonData []byte - AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` DisplayName *string `mandatory:"false" json:"displayName"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` ConnectorType string `json:"connectorType"` } @@ -95,31 +95,31 @@ func (m *createoutboundconnectordetails) UnmarshalPolymorphicJSON(data []byte) ( } } -//GetAvailabilityDomain returns AvailabilityDomain -func (m createoutboundconnectordetails) GetAvailabilityDomain() *string { - return m.AvailabilityDomain -} - -//GetCompartmentId returns CompartmentId -func (m createoutboundconnectordetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createoutboundconnectordetails) GetDisplayName() *string { return m.DisplayName } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createoutboundconnectordetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createoutboundconnectordetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetAvailabilityDomain returns AvailabilityDomain +func (m createoutboundconnectordetails) GetAvailabilityDomain() *string { + return m.AvailabilityDomain +} + +// GetCompartmentId returns CompartmentId +func (m createoutboundconnectordetails) GetCompartmentId() *string { + return m.CompartmentId +} + func (m createoutboundconnectordetails) String() string { return common.PointerString(m) } diff --git a/filestorage/filestorage_client.go b/filestorage/filestorage_client.go index b2599181ee..db9bf9da7e 100644 --- a/filestorage/filestorage_client.go +++ b/filestorage/filestorage_client.go @@ -81,7 +81,7 @@ func (client *FileStorageClient) setConfigurationProvider(configProvider common. 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/filestorage/outbound_connector.go b/filestorage/outbound_connector.go index de030b3543..aec7e505f1 100644 --- a/filestorage/outbound_connector.go +++ b/filestorage/outbound_connector.go @@ -59,14 +59,14 @@ type OutboundConnector interface { type outboundconnector struct { JsonData []byte + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` CompartmentId *string `mandatory:"true" json:"compartmentId"` Id *string `mandatory:"true" json:"id"` LifecycleState OutboundConnectorLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` DisplayName *string `mandatory:"true" json:"displayName"` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` ConnectorType string `json:"connectorType"` } @@ -113,46 +113,46 @@ func (m *outboundconnector) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetCompartmentId returns CompartmentId +// GetAvailabilityDomain returns AvailabilityDomain +func (m outboundconnector) GetAvailabilityDomain() *string { + return m.AvailabilityDomain +} + +// GetFreeformTags returns FreeformTags +func (m outboundconnector) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m outboundconnector) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetCompartmentId returns CompartmentId func (m outboundconnector) GetCompartmentId() *string { return m.CompartmentId } -//GetId returns Id +// GetId returns Id func (m outboundconnector) GetId() *string { return m.Id } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m outboundconnector) GetLifecycleState() OutboundConnectorLifecycleStateEnum { return m.LifecycleState } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m outboundconnector) GetDisplayName() *string { return m.DisplayName } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m outboundconnector) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetAvailabilityDomain returns AvailabilityDomain -func (m outboundconnector) GetAvailabilityDomain() *string { - return m.AvailabilityDomain -} - -//GetFreeformTags returns FreeformTags -func (m outboundconnector) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m outboundconnector) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - func (m outboundconnector) String() string { return common.PointerString(m) } diff --git a/filestorage/outbound_connector_summary.go b/filestorage/outbound_connector_summary.go index 2c3ba9d12b..4f35432a6b 100644 --- a/filestorage/outbound_connector_summary.go +++ b/filestorage/outbound_connector_summary.go @@ -58,14 +58,14 @@ type OutboundConnectorSummary interface { type outboundconnectorsummary struct { JsonData []byte + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` CompartmentId *string `mandatory:"true" json:"compartmentId"` Id *string `mandatory:"true" json:"id"` LifecycleState OutboundConnectorSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` DisplayName *string `mandatory:"true" json:"displayName"` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` ConnectorType string `json:"connectorType"` } @@ -112,46 +112,46 @@ func (m *outboundconnectorsummary) UnmarshalPolymorphicJSON(data []byte) (interf } } -//GetCompartmentId returns CompartmentId +// GetAvailabilityDomain returns AvailabilityDomain +func (m outboundconnectorsummary) GetAvailabilityDomain() *string { + return m.AvailabilityDomain +} + +// GetFreeformTags returns FreeformTags +func (m outboundconnectorsummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m outboundconnectorsummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetCompartmentId returns CompartmentId func (m outboundconnectorsummary) GetCompartmentId() *string { return m.CompartmentId } -//GetId returns Id +// GetId returns Id func (m outboundconnectorsummary) GetId() *string { return m.Id } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m outboundconnectorsummary) GetLifecycleState() OutboundConnectorSummaryLifecycleStateEnum { return m.LifecycleState } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m outboundconnectorsummary) GetDisplayName() *string { return m.DisplayName } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m outboundconnectorsummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetAvailabilityDomain returns AvailabilityDomain -func (m outboundconnectorsummary) GetAvailabilityDomain() *string { - return m.AvailabilityDomain -} - -//GetFreeformTags returns FreeformTags -func (m outboundconnectorsummary) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m outboundconnectorsummary) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - func (m outboundconnectorsummary) String() string { return common.PointerString(m) } diff --git a/fleetsoftwareupdate/create_fsu_action_details.go b/fleetsoftwareupdate/create_fsu_action_details.go index c198542cd7..008cd67d77 100644 --- a/fleetsoftwareupdate/create_fsu_action_details.go +++ b/fleetsoftwareupdate/create_fsu_action_details.go @@ -37,10 +37,10 @@ type CreateFsuActionDetails interface { type createfsuactiondetails struct { JsonData []byte - CompartmentId *string `mandatory:"true" json:"compartmentId"` DisplayName *string `mandatory:"false" json:"displayName"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` Type string `json:"type"` } @@ -99,26 +99,26 @@ func (m *createfsuactiondetails) UnmarshalPolymorphicJSON(data []byte) (interfac } } -//GetCompartmentId returns CompartmentId -func (m createfsuactiondetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createfsuactiondetails) GetDisplayName() *string { return m.DisplayName } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createfsuactiondetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createfsuactiondetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetCompartmentId returns CompartmentId +func (m createfsuactiondetails) GetCompartmentId() *string { + return m.CompartmentId +} + func (m createfsuactiondetails) String() string { return common.PointerString(m) } diff --git a/fleetsoftwareupdate/create_fsu_collection_details.go b/fleetsoftwareupdate/create_fsu_collection_details.go index 748d6911aa..01b840402d 100644 --- a/fleetsoftwareupdate/create_fsu_collection_details.go +++ b/fleetsoftwareupdate/create_fsu_collection_details.go @@ -40,11 +40,11 @@ type CreateFsuCollectionDetails interface { type createfsucollectiondetails struct { JsonData []byte - ServiceType CollectionServiceTypesEnum `mandatory:"true" json:"serviceType"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` DisplayName *string `mandatory:"false" json:"displayName"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + ServiceType CollectionServiceTypesEnum `mandatory:"true" json:"serviceType"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` Type string `json:"type"` } @@ -92,31 +92,31 @@ func (m *createfsucollectiondetails) UnmarshalPolymorphicJSON(data []byte) (inte } } -//GetServiceType returns ServiceType -func (m createfsucollectiondetails) GetServiceType() CollectionServiceTypesEnum { - return m.ServiceType -} - -//GetCompartmentId returns CompartmentId -func (m createfsucollectiondetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createfsucollectiondetails) GetDisplayName() *string { return m.DisplayName } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createfsucollectiondetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createfsucollectiondetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetServiceType returns ServiceType +func (m createfsucollectiondetails) GetServiceType() CollectionServiceTypesEnum { + return m.ServiceType +} + +// GetCompartmentId returns CompartmentId +func (m createfsucollectiondetails) GetCompartmentId() *string { + return m.CompartmentId +} + func (m createfsucollectiondetails) String() string { return common.PointerString(m) } diff --git a/fleetsoftwareupdate/create_fsu_cycle_details.go b/fleetsoftwareupdate/create_fsu_cycle_details.go index 1ee16f9f26..5c1e4647ee 100644 --- a/fleetsoftwareupdate/create_fsu_cycle_details.go +++ b/fleetsoftwareupdate/create_fsu_cycle_details.go @@ -48,15 +48,15 @@ type CreateFsuCycleDetails interface { type createfsucycledetails struct { JsonData []byte - CompartmentId *string `mandatory:"true" json:"compartmentId"` - FsuCollectionId *string `mandatory:"true" json:"fsuCollectionId"` - GoalVersionDetails FsuGoalVersionDetails `mandatory:"true" json:"goalVersionDetails"` DisplayName *string `mandatory:"false" json:"displayName"` - BatchingStrategy CreateBatchingStrategyDetails `mandatory:"false" json:"batchingStrategy"` - StageActionSchedule CreateScheduleDetails `mandatory:"false" json:"stageActionSchedule"` - ApplyActionSchedule CreateScheduleDetails `mandatory:"false" json:"applyActionSchedule"` + BatchingStrategy createbatchingstrategydetails `mandatory:"false" json:"batchingStrategy"` + StageActionSchedule createscheduledetails `mandatory:"false" json:"stageActionSchedule"` + ApplyActionSchedule createscheduledetails `mandatory:"false" json:"applyActionSchedule"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + FsuCollectionId *string `mandatory:"true" json:"fsuCollectionId"` + GoalVersionDetails fsugoalversiondetails `mandatory:"true" json:"goalVersionDetails"` Type string `json:"type"` } @@ -104,51 +104,51 @@ func (m *createfsucycledetails) UnmarshalPolymorphicJSON(data []byte) (interface } } -//GetCompartmentId returns CompartmentId -func (m createfsucycledetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetFsuCollectionId returns FsuCollectionId -func (m createfsucycledetails) GetFsuCollectionId() *string { - return m.FsuCollectionId -} - -//GetGoalVersionDetails returns GoalVersionDetails -func (m createfsucycledetails) GetGoalVersionDetails() FsuGoalVersionDetails { - return m.GoalVersionDetails -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createfsucycledetails) GetDisplayName() *string { return m.DisplayName } -//GetBatchingStrategy returns BatchingStrategy -func (m createfsucycledetails) GetBatchingStrategy() CreateBatchingStrategyDetails { +// GetBatchingStrategy returns BatchingStrategy +func (m createfsucycledetails) GetBatchingStrategy() createbatchingstrategydetails { return m.BatchingStrategy } -//GetStageActionSchedule returns StageActionSchedule -func (m createfsucycledetails) GetStageActionSchedule() CreateScheduleDetails { +// GetStageActionSchedule returns StageActionSchedule +func (m createfsucycledetails) GetStageActionSchedule() createscheduledetails { return m.StageActionSchedule } -//GetApplyActionSchedule returns ApplyActionSchedule -func (m createfsucycledetails) GetApplyActionSchedule() CreateScheduleDetails { +// GetApplyActionSchedule returns ApplyActionSchedule +func (m createfsucycledetails) GetApplyActionSchedule() createscheduledetails { return m.ApplyActionSchedule } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createfsucycledetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createfsucycledetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetCompartmentId returns CompartmentId +func (m createfsucycledetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetFsuCollectionId returns FsuCollectionId +func (m createfsucycledetails) GetFsuCollectionId() *string { + return m.FsuCollectionId +} + +// GetGoalVersionDetails returns GoalVersionDetails +func (m createfsucycledetails) GetGoalVersionDetails() fsugoalversiondetails { + return m.GoalVersionDetails +} + func (m createfsucycledetails) String() string { return common.PointerString(m) } diff --git a/fleetsoftwareupdate/create_patch_fsu_cycle.go b/fleetsoftwareupdate/create_patch_fsu_cycle.go index fd14952adb..af8b2a673e 100644 --- a/fleetsoftwareupdate/create_patch_fsu_cycle.go +++ b/fleetsoftwareupdate/create_patch_fsu_cycle.go @@ -196,10 +196,7 @@ func (m *CreatePatchFsuCycle) UnmarshalJSON(data []byte) (e error) { m.IsIgnorePatches = model.IsIgnorePatches m.IsIgnoreMissingPatches = make([]string, len(model.IsIgnoreMissingPatches)) - for i, n := range model.IsIgnoreMissingPatches { - m.IsIgnoreMissingPatches[i] = n - } - + copy(m.IsIgnoreMissingPatches, model.IsIgnoreMissingPatches) m.MaxDrainTimeoutInSeconds = model.MaxDrainTimeoutInSeconds m.IsKeepPlacement = model.IsKeepPlacement diff --git a/fleetsoftwareupdate/db_filters_discovery.go b/fleetsoftwareupdate/db_filters_discovery.go index 3e0f6afd81..491a475c14 100644 --- a/fleetsoftwareupdate/db_filters_discovery.go +++ b/fleetsoftwareupdate/db_filters_discovery.go @@ -77,6 +77,5 @@ func (m *DbFiltersDiscovery) UnmarshalJSON(data []byte) (e error) { m.Filters[i] = nil } } - return } diff --git a/fleetsoftwareupdate/db_fleet_discovery_filter.go b/fleetsoftwareupdate/db_fleet_discovery_filter.go index 7b158535ee..030a65a17c 100644 --- a/fleetsoftwareupdate/db_fleet_discovery_filter.go +++ b/fleetsoftwareupdate/db_fleet_discovery_filter.go @@ -95,7 +95,7 @@ func (m *dbfleetdiscoveryfilter) UnmarshalPolymorphicJSON(data []byte) (interfac } } -//GetMode returns Mode +// GetMode returns Mode func (m dbfleetdiscoveryfilter) GetMode() DbFleetDiscoveryFilterModeEnum { return m.Mode } diff --git a/fleetsoftwareupdate/discovery_details.go b/fleetsoftwareupdate/discovery_details.go index b3ff3b1175..6665e804a3 100644 --- a/fleetsoftwareupdate/discovery_details.go +++ b/fleetsoftwareupdate/discovery_details.go @@ -70,7 +70,7 @@ func (m *discoverydetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, e } } -//GetServiceType returns ServiceType +// GetServiceType returns ServiceType func (m discoverydetails) GetServiceType() DiscoveryServiceTypesEnum { return m.ServiceType } diff --git a/fleetsoftwareupdate/fleetsoftwareupdate_client.go b/fleetsoftwareupdate/fleetsoftwareupdate_client.go index 49f05b2010..2fb31af4a5 100644 --- a/fleetsoftwareupdate/fleetsoftwareupdate_client.go +++ b/fleetsoftwareupdate/fleetsoftwareupdate_client.go @@ -81,7 +81,7 @@ func (client *FleetSoftwareUpdateClient) setConfigurationProvider(configProvider 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/fleetsoftwareupdate/fsu_action.go b/fleetsoftwareupdate/fsu_action.go index ff03521c4a..29f365a703 100644 --- a/fleetsoftwareupdate/fsu_action.go +++ b/fleetsoftwareupdate/fsu_action.go @@ -68,10 +68,6 @@ type FsuAction interface { type fsuaction struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - LifecycleState ActionLifecycleStatesEnum `mandatory:"true" json:"lifecycleState"` DisplayName *string `mandatory:"false" json:"displayName"` TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` @@ -80,6 +76,10 @@ type fsuaction struct { 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"` + Id *string `mandatory:"true" json:"id"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + LifecycleState ActionLifecycleStatesEnum `mandatory:"true" json:"lifecycleState"` Type string `json:"type"` } @@ -146,66 +146,66 @@ func (m *fsuaction) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetId returns Id -func (m fsuaction) GetId() *string { - return m.Id -} - -//GetCompartmentId returns CompartmentId -func (m fsuaction) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetTimeCreated returns TimeCreated -func (m fsuaction) GetTimeCreated() *common.SDKTime { - return m.TimeCreated -} - -//GetLifecycleState returns LifecycleState -func (m fsuaction) GetLifecycleState() ActionLifecycleStatesEnum { - return m.LifecycleState -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m fsuaction) GetDisplayName() *string { return m.DisplayName } -//GetTimeStarted returns TimeStarted +// GetTimeStarted returns TimeStarted func (m fsuaction) GetTimeStarted() *common.SDKTime { return m.TimeStarted } -//GetTimeFinished returns TimeFinished +// GetTimeFinished returns TimeFinished func (m fsuaction) GetTimeFinished() *common.SDKTime { return m.TimeFinished } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m fsuaction) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m fsuaction) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m fsuaction) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m fsuaction) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m fsuaction) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetId returns Id +func (m fsuaction) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m fsuaction) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetTimeCreated returns TimeCreated +func (m fsuaction) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetLifecycleState returns LifecycleState +func (m fsuaction) GetLifecycleState() ActionLifecycleStatesEnum { + return m.LifecycleState +} + func (m fsuaction) String() string { return common.PointerString(m) } diff --git a/fleetsoftwareupdate/fsu_action_summary.go b/fleetsoftwareupdate/fsu_action_summary.go index 1ed501f8fd..f0e882b8ed 100644 --- a/fleetsoftwareupdate/fsu_action_summary.go +++ b/fleetsoftwareupdate/fsu_action_summary.go @@ -68,10 +68,6 @@ type FsuActionSummary interface { type fsuactionsummary struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - LifecycleState ActionLifecycleStatesEnum `mandatory:"true" json:"lifecycleState"` DisplayName *string `mandatory:"false" json:"displayName"` TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` @@ -80,6 +76,10 @@ type fsuactionsummary struct { 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"` + Id *string `mandatory:"true" json:"id"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + LifecycleState ActionLifecycleStatesEnum `mandatory:"true" json:"lifecycleState"` Type string `json:"type"` } @@ -146,66 +146,66 @@ func (m *fsuactionsummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, e } } -//GetId returns Id -func (m fsuactionsummary) GetId() *string { - return m.Id -} - -//GetCompartmentId returns CompartmentId -func (m fsuactionsummary) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetTimeCreated returns TimeCreated -func (m fsuactionsummary) GetTimeCreated() *common.SDKTime { - return m.TimeCreated -} - -//GetLifecycleState returns LifecycleState -func (m fsuactionsummary) GetLifecycleState() ActionLifecycleStatesEnum { - return m.LifecycleState -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m fsuactionsummary) GetDisplayName() *string { return m.DisplayName } -//GetTimeStarted returns TimeStarted +// GetTimeStarted returns TimeStarted func (m fsuactionsummary) GetTimeStarted() *common.SDKTime { return m.TimeStarted } -//GetTimeFinished returns TimeFinished +// GetTimeFinished returns TimeFinished func (m fsuactionsummary) GetTimeFinished() *common.SDKTime { return m.TimeFinished } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m fsuactionsummary) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m fsuactionsummary) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m fsuactionsummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m fsuactionsummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m fsuactionsummary) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetId returns Id +func (m fsuactionsummary) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m fsuactionsummary) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetTimeCreated returns TimeCreated +func (m fsuactionsummary) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetLifecycleState returns LifecycleState +func (m fsuactionsummary) GetLifecycleState() ActionLifecycleStatesEnum { + return m.LifecycleState +} + func (m fsuactionsummary) String() string { return common.PointerString(m) } diff --git a/fleetsoftwareupdate/fsu_action_summary_collection.go b/fleetsoftwareupdate/fsu_action_summary_collection.go index 73f0cd5dcd..fafab1f3d0 100644 --- a/fleetsoftwareupdate/fsu_action_summary_collection.go +++ b/fleetsoftwareupdate/fsu_action_summary_collection.go @@ -63,6 +63,5 @@ func (m *FsuActionSummaryCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/fleetsoftwareupdate/fsu_collection.go b/fleetsoftwareupdate/fsu_collection.go index 9691f03f58..6d1e12a566 100644 --- a/fleetsoftwareupdate/fsu_collection.go +++ b/fleetsoftwareupdate/fsu_collection.go @@ -65,12 +65,6 @@ type FsuCollection interface { type fsucollection struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - DisplayName *string `mandatory:"true" json:"displayName"` - ServiceType CollectionServiceTypesEnum `mandatory:"true" json:"serviceType"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - LifecycleState CollectionLifecycleStatesEnum `mandatory:"true" json:"lifecycleState"` ActiveFsuCycle *ActiveCycleDetails `mandatory:"false" json:"activeFsuCycle"` TargetCount *int `mandatory:"false" json:"targetCount"` TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` @@ -78,6 +72,12 @@ type fsucollection struct { 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"` + Id *string `mandatory:"true" json:"id"` + DisplayName *string `mandatory:"true" json:"displayName"` + ServiceType CollectionServiceTypesEnum `mandatory:"true" json:"serviceType"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + LifecycleState CollectionLifecycleStatesEnum `mandatory:"true" json:"lifecycleState"` Type string `json:"type"` } @@ -133,71 +133,71 @@ func (m *fsucollection) UnmarshalPolymorphicJSON(data []byte) (interface{}, erro } } -//GetId returns Id -func (m fsucollection) GetId() *string { - return m.Id -} - -//GetDisplayName returns DisplayName -func (m fsucollection) GetDisplayName() *string { - return m.DisplayName -} - -//GetServiceType returns ServiceType -func (m fsucollection) GetServiceType() CollectionServiceTypesEnum { - return m.ServiceType -} - -//GetCompartmentId returns CompartmentId -func (m fsucollection) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetTimeCreated returns TimeCreated -func (m fsucollection) GetTimeCreated() *common.SDKTime { - return m.TimeCreated -} - -//GetLifecycleState returns LifecycleState -func (m fsucollection) GetLifecycleState() CollectionLifecycleStatesEnum { - return m.LifecycleState -} - -//GetActiveFsuCycle returns ActiveFsuCycle +// GetActiveFsuCycle returns ActiveFsuCycle func (m fsucollection) GetActiveFsuCycle() *ActiveCycleDetails { return m.ActiveFsuCycle } -//GetTargetCount returns TargetCount +// GetTargetCount returns TargetCount func (m fsucollection) GetTargetCount() *int { return m.TargetCount } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m fsucollection) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m fsucollection) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m fsucollection) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m fsucollection) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m fsucollection) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetId returns Id +func (m fsucollection) GetId() *string { + return m.Id +} + +// GetDisplayName returns DisplayName +func (m fsucollection) GetDisplayName() *string { + return m.DisplayName +} + +// GetServiceType returns ServiceType +func (m fsucollection) GetServiceType() CollectionServiceTypesEnum { + return m.ServiceType +} + +// GetCompartmentId returns CompartmentId +func (m fsucollection) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetTimeCreated returns TimeCreated +func (m fsucollection) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetLifecycleState returns LifecycleState +func (m fsucollection) GetLifecycleState() CollectionLifecycleStatesEnum { + return m.LifecycleState +} + func (m fsucollection) String() string { return common.PointerString(m) } diff --git a/fleetsoftwareupdate/fsu_collection_summary.go b/fleetsoftwareupdate/fsu_collection_summary.go index f93faaa422..6d7ffa0977 100644 --- a/fleetsoftwareupdate/fsu_collection_summary.go +++ b/fleetsoftwareupdate/fsu_collection_summary.go @@ -65,12 +65,6 @@ type FsuCollectionSummary interface { type fsucollectionsummary struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - DisplayName *string `mandatory:"true" json:"displayName"` - ServiceType CollectionServiceTypesEnum `mandatory:"true" json:"serviceType"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - LifecycleState CollectionLifecycleStatesEnum `mandatory:"true" json:"lifecycleState"` ActiveFsuCycle *ActiveCycleDetails `mandatory:"false" json:"activeFsuCycle"` TargetCount *int `mandatory:"false" json:"targetCount"` TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` @@ -78,6 +72,12 @@ type fsucollectionsummary struct { 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"` + Id *string `mandatory:"true" json:"id"` + DisplayName *string `mandatory:"true" json:"displayName"` + ServiceType CollectionServiceTypesEnum `mandatory:"true" json:"serviceType"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + LifecycleState CollectionLifecycleStatesEnum `mandatory:"true" json:"lifecycleState"` Type string `json:"type"` } @@ -133,71 +133,71 @@ func (m *fsucollectionsummary) UnmarshalPolymorphicJSON(data []byte) (interface{ } } -//GetId returns Id -func (m fsucollectionsummary) GetId() *string { - return m.Id -} - -//GetDisplayName returns DisplayName -func (m fsucollectionsummary) GetDisplayName() *string { - return m.DisplayName -} - -//GetServiceType returns ServiceType -func (m fsucollectionsummary) GetServiceType() CollectionServiceTypesEnum { - return m.ServiceType -} - -//GetCompartmentId returns CompartmentId -func (m fsucollectionsummary) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetTimeCreated returns TimeCreated -func (m fsucollectionsummary) GetTimeCreated() *common.SDKTime { - return m.TimeCreated -} - -//GetLifecycleState returns LifecycleState -func (m fsucollectionsummary) GetLifecycleState() CollectionLifecycleStatesEnum { - return m.LifecycleState -} - -//GetActiveFsuCycle returns ActiveFsuCycle +// GetActiveFsuCycle returns ActiveFsuCycle func (m fsucollectionsummary) GetActiveFsuCycle() *ActiveCycleDetails { return m.ActiveFsuCycle } -//GetTargetCount returns TargetCount +// GetTargetCount returns TargetCount func (m fsucollectionsummary) GetTargetCount() *int { return m.TargetCount } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m fsucollectionsummary) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m fsucollectionsummary) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m fsucollectionsummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m fsucollectionsummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m fsucollectionsummary) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetId returns Id +func (m fsucollectionsummary) GetId() *string { + return m.Id +} + +// GetDisplayName returns DisplayName +func (m fsucollectionsummary) GetDisplayName() *string { + return m.DisplayName +} + +// GetServiceType returns ServiceType +func (m fsucollectionsummary) GetServiceType() CollectionServiceTypesEnum { + return m.ServiceType +} + +// GetCompartmentId returns CompartmentId +func (m fsucollectionsummary) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetTimeCreated returns TimeCreated +func (m fsucollectionsummary) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetLifecycleState returns LifecycleState +func (m fsucollectionsummary) GetLifecycleState() CollectionLifecycleStatesEnum { + return m.LifecycleState +} + func (m fsucollectionsummary) String() string { return common.PointerString(m) } diff --git a/fleetsoftwareupdate/fsu_collection_summary_collection.go b/fleetsoftwareupdate/fsu_collection_summary_collection.go index 6e78940a0d..76e39d33e1 100644 --- a/fleetsoftwareupdate/fsu_collection_summary_collection.go +++ b/fleetsoftwareupdate/fsu_collection_summary_collection.go @@ -63,6 +63,5 @@ func (m *FsuCollectionSummaryCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/fleetsoftwareupdate/fsu_cycle.go b/fleetsoftwareupdate/fsu_cycle.go index 91bd8b07e7..79be0bcf8f 100644 --- a/fleetsoftwareupdate/fsu_cycle.go +++ b/fleetsoftwareupdate/fsu_cycle.go @@ -88,26 +88,26 @@ type FsuCycle interface { type fsucycle struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` - FsuCollectionId *string `mandatory:"true" json:"fsuCollectionId"` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - LifecycleState CycleLifecycleStatesEnum `mandatory:"true" json:"lifecycleState"` DisplayName *string `mandatory:"false" json:"displayName"` CollectionType CollectionTypesEnum `mandatory:"false" json:"collectionType,omitempty"` ExecutingFsuActionId *string `mandatory:"false" json:"executingFsuActionId"` NextActionToExecute []NextActionToExecuteDetails `mandatory:"false" json:"nextActionToExecute"` LastCompletedAction DetailedActionTypesEnum `mandatory:"false" json:"lastCompletedAction,omitempty"` - GoalVersionDetails FsuGoalVersionDetails `mandatory:"false" json:"goalVersionDetails"` - BatchingStrategy BatchingStrategyDetails `mandatory:"false" json:"batchingStrategy"` - StageActionSchedule ScheduleDetails `mandatory:"false" json:"stageActionSchedule"` - ApplyActionSchedule ScheduleDetails `mandatory:"false" json:"applyActionSchedule"` + GoalVersionDetails fsugoalversiondetails `mandatory:"false" json:"goalVersionDetails"` + BatchingStrategy batchingstrategydetails `mandatory:"false" json:"batchingStrategy"` + StageActionSchedule scheduledetails `mandatory:"false" json:"stageActionSchedule"` + ApplyActionSchedule scheduledetails `mandatory:"false" json:"applyActionSchedule"` TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` 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"` + Id *string `mandatory:"true" json:"id"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + FsuCollectionId *string `mandatory:"true" json:"fsuCollectionId"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + LifecycleState CycleLifecycleStatesEnum `mandatory:"true" json:"lifecycleState"` Type string `json:"type"` } @@ -166,106 +166,106 @@ func (m *fsucycle) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetId returns Id -func (m fsucycle) GetId() *string { - return m.Id -} - -//GetCompartmentId returns CompartmentId -func (m fsucycle) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetFsuCollectionId returns FsuCollectionId -func (m fsucycle) GetFsuCollectionId() *string { - return m.FsuCollectionId -} - -//GetTimeCreated returns TimeCreated -func (m fsucycle) GetTimeCreated() *common.SDKTime { - return m.TimeCreated -} - -//GetLifecycleState returns LifecycleState -func (m fsucycle) GetLifecycleState() CycleLifecycleStatesEnum { - return m.LifecycleState -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m fsucycle) GetDisplayName() *string { return m.DisplayName } -//GetCollectionType returns CollectionType +// GetCollectionType returns CollectionType func (m fsucycle) GetCollectionType() CollectionTypesEnum { return m.CollectionType } -//GetExecutingFsuActionId returns ExecutingFsuActionId +// GetExecutingFsuActionId returns ExecutingFsuActionId func (m fsucycle) GetExecutingFsuActionId() *string { return m.ExecutingFsuActionId } -//GetNextActionToExecute returns NextActionToExecute +// GetNextActionToExecute returns NextActionToExecute func (m fsucycle) GetNextActionToExecute() []NextActionToExecuteDetails { return m.NextActionToExecute } -//GetLastCompletedAction returns LastCompletedAction +// GetLastCompletedAction returns LastCompletedAction func (m fsucycle) GetLastCompletedAction() DetailedActionTypesEnum { return m.LastCompletedAction } -//GetGoalVersionDetails returns GoalVersionDetails -func (m fsucycle) GetGoalVersionDetails() FsuGoalVersionDetails { +// GetGoalVersionDetails returns GoalVersionDetails +func (m fsucycle) GetGoalVersionDetails() fsugoalversiondetails { return m.GoalVersionDetails } -//GetBatchingStrategy returns BatchingStrategy -func (m fsucycle) GetBatchingStrategy() BatchingStrategyDetails { +// GetBatchingStrategy returns BatchingStrategy +func (m fsucycle) GetBatchingStrategy() batchingstrategydetails { return m.BatchingStrategy } -//GetStageActionSchedule returns StageActionSchedule -func (m fsucycle) GetStageActionSchedule() ScheduleDetails { +// GetStageActionSchedule returns StageActionSchedule +func (m fsucycle) GetStageActionSchedule() scheduledetails { return m.StageActionSchedule } -//GetApplyActionSchedule returns ApplyActionSchedule -func (m fsucycle) GetApplyActionSchedule() ScheduleDetails { +// GetApplyActionSchedule returns ApplyActionSchedule +func (m fsucycle) GetApplyActionSchedule() scheduledetails { return m.ApplyActionSchedule } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m fsucycle) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetTimeFinished returns TimeFinished +// GetTimeFinished returns TimeFinished func (m fsucycle) GetTimeFinished() *common.SDKTime { return m.TimeFinished } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m fsucycle) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m fsucycle) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m fsucycle) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m fsucycle) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetId returns Id +func (m fsucycle) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m fsucycle) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetFsuCollectionId returns FsuCollectionId +func (m fsucycle) GetFsuCollectionId() *string { + return m.FsuCollectionId +} + +// GetTimeCreated returns TimeCreated +func (m fsucycle) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetLifecycleState returns LifecycleState +func (m fsucycle) GetLifecycleState() CycleLifecycleStatesEnum { + return m.LifecycleState +} + func (m fsucycle) String() string { return common.PointerString(m) } diff --git a/fleetsoftwareupdate/fsu_cycle_summary.go b/fleetsoftwareupdate/fsu_cycle_summary.go index e29d9ea4f5..e96b2e8728 100644 --- a/fleetsoftwareupdate/fsu_cycle_summary.go +++ b/fleetsoftwareupdate/fsu_cycle_summary.go @@ -144,10 +144,7 @@ func (m *FsuCycleSummary) UnmarshalJSON(data []byte) (e error) { m.ExecutingFsuActionId = model.ExecutingFsuActionId m.NextActionToExecute = make([]NextActionToExecuteDetails, len(model.NextActionToExecute)) - for i, n := range model.NextActionToExecute { - m.NextActionToExecute[i] = n - } - + copy(m.NextActionToExecute, model.NextActionToExecute) m.LastCompletedAction = model.LastCompletedAction m.TimeUpdated = model.TimeUpdated diff --git a/fleetsoftwareupdate/fsu_goal_version_details.go b/fleetsoftwareupdate/fsu_goal_version_details.go index 9eb8d63321..90ca808c2b 100644 --- a/fleetsoftwareupdate/fsu_goal_version_details.go +++ b/fleetsoftwareupdate/fsu_goal_version_details.go @@ -82,12 +82,12 @@ func (m *fsugoalversiondetails) UnmarshalPolymorphicJSON(data []byte) (interface } } -//GetHomePolicy returns HomePolicy +// GetHomePolicy returns HomePolicy func (m fsugoalversiondetails) GetHomePolicy() FsuGoalVersionDetailsHomePolicyEnum { return m.HomePolicy } -//GetNewHomePrefix returns NewHomePrefix +// GetNewHomePrefix returns NewHomePrefix func (m fsugoalversiondetails) GetNewHomePrefix() *string { return m.NewHomePrefix } diff --git a/fleetsoftwareupdate/fsu_job.go b/fleetsoftwareupdate/fsu_job.go index d31d33ed1a..6b8f39979b 100644 --- a/fleetsoftwareupdate/fsu_job.go +++ b/fleetsoftwareupdate/fsu_job.go @@ -68,11 +68,6 @@ type FsuJob interface { type fsujob struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` - FsuActionId *string `mandatory:"true" json:"fsuActionId"` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - LifecycleState JobLifecycleStatesEnum `mandatory:"true" json:"lifecycleState"` DisplayName *string `mandatory:"false" json:"displayName"` Progress *JobProgressDetails `mandatory:"false" json:"progress"` TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` @@ -82,6 +77,11 @@ type fsujob struct { 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"` + Id *string `mandatory:"true" json:"id"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + FsuActionId *string `mandatory:"true" json:"fsuActionId"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + LifecycleState JobLifecycleStatesEnum `mandatory:"true" json:"lifecycleState"` Type string `json:"type"` } @@ -150,76 +150,76 @@ func (m *fsujob) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetId returns Id -func (m fsujob) GetId() *string { - return m.Id -} - -//GetCompartmentId returns CompartmentId -func (m fsujob) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetFsuActionId returns FsuActionId -func (m fsujob) GetFsuActionId() *string { - return m.FsuActionId -} - -//GetTimeCreated returns TimeCreated -func (m fsujob) GetTimeCreated() *common.SDKTime { - return m.TimeCreated -} - -//GetLifecycleState returns LifecycleState -func (m fsujob) GetLifecycleState() JobLifecycleStatesEnum { - return m.LifecycleState -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m fsujob) GetDisplayName() *string { return m.DisplayName } -//GetProgress returns Progress +// GetProgress returns Progress func (m fsujob) GetProgress() *JobProgressDetails { return m.Progress } -//GetTimeStarted returns TimeStarted +// GetTimeStarted returns TimeStarted func (m fsujob) GetTimeStarted() *common.SDKTime { return m.TimeStarted } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m fsujob) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetTimeFinished returns TimeFinished +// GetTimeFinished returns TimeFinished func (m fsujob) GetTimeFinished() *common.SDKTime { return m.TimeFinished } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m fsujob) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m fsujob) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m fsujob) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m fsujob) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetId returns Id +func (m fsujob) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m fsujob) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetFsuActionId returns FsuActionId +func (m fsujob) GetFsuActionId() *string { + return m.FsuActionId +} + +// GetTimeCreated returns TimeCreated +func (m fsujob) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetLifecycleState returns LifecycleState +func (m fsujob) GetLifecycleState() JobLifecycleStatesEnum { + return m.LifecycleState +} + func (m fsujob) String() string { return common.PointerString(m) } diff --git a/fleetsoftwareupdate/fsu_job_collection.go b/fleetsoftwareupdate/fsu_job_collection.go index 024ea2c47d..dc471f143a 100644 --- a/fleetsoftwareupdate/fsu_job_collection.go +++ b/fleetsoftwareupdate/fsu_job_collection.go @@ -63,6 +63,5 @@ func (m *FsuJobCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/fleetsoftwareupdate/fsu_job_summary.go b/fleetsoftwareupdate/fsu_job_summary.go index 88874bcacc..de736619de 100644 --- a/fleetsoftwareupdate/fsu_job_summary.go +++ b/fleetsoftwareupdate/fsu_job_summary.go @@ -149,72 +149,72 @@ func (m *fsujobsummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, erro } } -//GetId returns Id +// GetId returns Id func (m fsujobsummary) GetId() *string { return m.Id } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m fsujobsummary) GetDisplayName() *string { return m.DisplayName } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m fsujobsummary) GetCompartmentId() *string { return m.CompartmentId } -//GetFsuActionId returns FsuActionId +// GetFsuActionId returns FsuActionId func (m fsujobsummary) GetFsuActionId() *string { return m.FsuActionId } -//GetProgress returns Progress +// GetProgress returns Progress func (m fsujobsummary) GetProgress() *JobProgress { return m.Progress } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m fsujobsummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeStarted returns TimeStarted +// GetTimeStarted returns TimeStarted func (m fsujobsummary) GetTimeStarted() *common.SDKTime { return m.TimeStarted } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m fsujobsummary) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetTimeFinished returns TimeFinished +// GetTimeFinished returns TimeFinished func (m fsujobsummary) GetTimeFinished() *common.SDKTime { return m.TimeFinished } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m fsujobsummary) GetLifecycleState() JobLifecycleStatesEnum { return m.LifecycleState } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m fsujobsummary) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m fsujobsummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m fsujobsummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m fsujobsummary) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } diff --git a/fleetsoftwareupdate/gi_filters_discovery.go b/fleetsoftwareupdate/gi_filters_discovery.go index 5676255f01..dc98b2e683 100644 --- a/fleetsoftwareupdate/gi_filters_discovery.go +++ b/fleetsoftwareupdate/gi_filters_discovery.go @@ -77,6 +77,5 @@ func (m *GiFiltersDiscovery) UnmarshalJSON(data []byte) (e error) { m.Filters[i] = nil } } - return } diff --git a/fleetsoftwareupdate/gi_fleet_discovery_filter.go b/fleetsoftwareupdate/gi_fleet_discovery_filter.go index 7870b9e2f2..23a586ada8 100644 --- a/fleetsoftwareupdate/gi_fleet_discovery_filter.go +++ b/fleetsoftwareupdate/gi_fleet_discovery_filter.go @@ -83,7 +83,7 @@ func (m *gifleetdiscoveryfilter) UnmarshalPolymorphicJSON(data []byte) (interfac } } -//GetMode returns Mode +// GetMode returns Mode func (m gifleetdiscoveryfilter) GetMode() GiFleetDiscoveryFilterModeEnum { return m.Mode } diff --git a/fleetsoftwareupdate/patch_fsu_cycle.go b/fleetsoftwareupdate/patch_fsu_cycle.go index 487920dfe5..e744d840b3 100644 --- a/fleetsoftwareupdate/patch_fsu_cycle.go +++ b/fleetsoftwareupdate/patch_fsu_cycle.go @@ -279,10 +279,7 @@ func (m *PatchFsuCycle) UnmarshalJSON(data []byte) (e error) { m.ExecutingFsuActionId = model.ExecutingFsuActionId m.NextActionToExecute = make([]NextActionToExecuteDetails, len(model.NextActionToExecute)) - for i, n := range model.NextActionToExecute { - m.NextActionToExecute[i] = n - } - + copy(m.NextActionToExecute, model.NextActionToExecute) m.LastCompletedAction = model.LastCompletedAction nn, e = model.GoalVersionDetails.UnmarshalPolymorphicJSON(model.GoalVersionDetails.JsonData) @@ -340,10 +337,7 @@ func (m *PatchFsuCycle) UnmarshalJSON(data []byte) (e error) { m.IsIgnorePatches = model.IsIgnorePatches m.IsIgnoreMissingPatches = make([]string, len(model.IsIgnoreMissingPatches)) - for i, n := range model.IsIgnoreMissingPatches { - m.IsIgnoreMissingPatches[i] = n - } - + copy(m.IsIgnoreMissingPatches, model.IsIgnoreMissingPatches) m.MaxDrainTimeoutInSeconds = model.MaxDrainTimeoutInSeconds m.IsKeepPlacement = model.IsKeepPlacement diff --git a/fleetsoftwareupdate/target_details.go b/fleetsoftwareupdate/target_details.go index 7c80df3e26..16d3652a67 100644 --- a/fleetsoftwareupdate/target_details.go +++ b/fleetsoftwareupdate/target_details.go @@ -79,12 +79,12 @@ func (m *targetdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, erro } } -//GetId returns Id +// GetId returns Id func (m targetdetails) GetId() *string { return m.Id } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m targetdetails) GetCompartmentId() *string { return m.CompartmentId } diff --git a/fleetsoftwareupdate/update_fsu_action_details.go b/fleetsoftwareupdate/update_fsu_action_details.go index 2f929e1e40..2c4e38a521 100644 --- a/fleetsoftwareupdate/update_fsu_action_details.go +++ b/fleetsoftwareupdate/update_fsu_action_details.go @@ -94,17 +94,17 @@ func (m *updatefsuactiondetails) UnmarshalPolymorphicJSON(data []byte) (interfac } } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m updatefsuactiondetails) GetDisplayName() *string { return m.DisplayName } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updatefsuactiondetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updatefsuactiondetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/fleetsoftwareupdate/update_fsu_cycle_details.go b/fleetsoftwareupdate/update_fsu_cycle_details.go index 771de6d124..c932210034 100644 --- a/fleetsoftwareupdate/update_fsu_cycle_details.go +++ b/fleetsoftwareupdate/update_fsu_cycle_details.go @@ -39,8 +39,8 @@ type UpdateFsuCycleDetails interface { type updatefsucycledetails struct { JsonData []byte DisplayName *string `mandatory:"false" json:"displayName"` - GoalVersionDetails FsuGoalVersionDetails `mandatory:"false" json:"goalVersionDetails"` - BatchingStrategy UpdateBatchingStrategyDetails `mandatory:"false" json:"batchingStrategy"` + GoalVersionDetails fsugoalversiondetails `mandatory:"false" json:"goalVersionDetails"` + BatchingStrategy updatebatchingstrategydetails `mandatory:"false" json:"batchingStrategy"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` Type string `json:"type"` @@ -86,27 +86,27 @@ func (m *updatefsucycledetails) UnmarshalPolymorphicJSON(data []byte) (interface } } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m updatefsucycledetails) GetDisplayName() *string { return m.DisplayName } -//GetGoalVersionDetails returns GoalVersionDetails -func (m updatefsucycledetails) GetGoalVersionDetails() FsuGoalVersionDetails { +// GetGoalVersionDetails returns GoalVersionDetails +func (m updatefsucycledetails) GetGoalVersionDetails() fsugoalversiondetails { return m.GoalVersionDetails } -//GetBatchingStrategy returns BatchingStrategy -func (m updatefsucycledetails) GetBatchingStrategy() UpdateBatchingStrategyDetails { +// GetBatchingStrategy returns BatchingStrategy +func (m updatefsucycledetails) GetBatchingStrategy() updatebatchingstrategydetails { return m.BatchingStrategy } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updatefsucycledetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updatefsucycledetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/fleetsoftwareupdate/update_patch_fsu_cycle.go b/fleetsoftwareupdate/update_patch_fsu_cycle.go index e8dc0bb1ba..84ff10d847 100644 --- a/fleetsoftwareupdate/update_patch_fsu_cycle.go +++ b/fleetsoftwareupdate/update_patch_fsu_cycle.go @@ -153,10 +153,7 @@ func (m *UpdatePatchFsuCycle) UnmarshalJSON(data []byte) (e error) { m.IsIgnorePatches = model.IsIgnorePatches m.IsIgnoreMissingPatches = make([]string, len(model.IsIgnoreMissingPatches)) - for i, n := range model.IsIgnoreMissingPatches { - m.IsIgnoreMissingPatches[i] = n - } - + copy(m.IsIgnoreMissingPatches, model.IsIgnoreMissingPatches) m.MaxDrainTimeoutInSeconds = model.MaxDrainTimeoutInSeconds m.IsKeepPlacement = model.IsKeepPlacement diff --git a/functions/functions_functionsmanagement_client.go b/functions/functions_functionsmanagement_client.go index b85a480c44..7d5696605d 100644 --- a/functions/functions_functionsmanagement_client.go +++ b/functions/functions_functionsmanagement_client.go @@ -80,7 +80,7 @@ func (client *FunctionsManagementClient) setConfigurationProvider(configProvider 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/fusionapps/action.go b/fusionapps/action.go index 3c4835aa10..39a82d511b 100644 --- a/fusionapps/action.go +++ b/fusionapps/action.go @@ -31,9 +31,9 @@ type Action interface { type action struct { JsonData []byte - Description *string `mandatory:"true" json:"description"` ReferenceKey *string `mandatory:"false" json:"referenceKey"` State ActionStateEnum `mandatory:"false" json:"state,omitempty"` + Description *string `mandatory:"true" json:"description"` ActionType string `json:"actionType"` } @@ -83,21 +83,21 @@ func (m *action) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetDescription returns Description -func (m action) GetDescription() *string { - return m.Description -} - -//GetReferenceKey returns ReferenceKey +// GetReferenceKey returns ReferenceKey func (m action) GetReferenceKey() *string { return m.ReferenceKey } -//GetState returns State +// GetState returns State func (m action) GetState() ActionStateEnum { return m.State } +// GetDescription returns Description +func (m action) GetDescription() *string { + return m.Description +} + func (m action) String() string { return common.PointerString(m) } diff --git a/fusionapps/allow_rule.go b/fusionapps/allow_rule.go index 6f1bdffe1c..784eaba0a3 100644 --- a/fusionapps/allow_rule.go +++ b/fusionapps/allow_rule.go @@ -90,6 +90,5 @@ func (m *AllowRule) UnmarshalJSON(data []byte) (e error) { m.Conditions[i] = nil } } - return } diff --git a/fusionapps/create_fusion_environment_details.go b/fusionapps/create_fusion_environment_details.go index 3132059940..3122e01f21 100644 --- a/fusionapps/create_fusion_environment_details.go +++ b/fusionapps/create_fusion_environment_details.go @@ -104,10 +104,7 @@ func (m *CreateFusionEnvironmentDetails) UnmarshalJSON(data []byte) (e error) { m.DnsPrefix = model.DnsPrefix m.AdditionalLanguagePacks = make([]string, len(model.AdditionalLanguagePacks)) - for i, n := range model.AdditionalLanguagePacks { - m.AdditionalLanguagePacks[i] = n - } - + copy(m.AdditionalLanguagePacks, model.AdditionalLanguagePacks) m.Rules = make([]Rule, len(model.Rules)) for i, n := range model.Rules { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -120,7 +117,6 @@ func (m *CreateFusionEnvironmentDetails) UnmarshalJSON(data []byte) (e error) { m.Rules[i] = nil } } - m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/fusionapps/fusion_environment.go b/fusionapps/fusion_environment.go index 443344c937..aa31ec1cc7 100644 --- a/fusionapps/fusion_environment.go +++ b/fusionapps/fusion_environment.go @@ -174,10 +174,7 @@ func (m *FusionEnvironment) UnmarshalJSON(data []byte) (e error) { m.FusionEnvironmentFamilyId = model.FusionEnvironmentFamilyId m.SubscriptionIds = make([]string, len(model.SubscriptionIds)) - for i, n := range model.SubscriptionIds { - m.SubscriptionIds[i] = n - } - + copy(m.SubscriptionIds, model.SubscriptionIds) m.KmsKeyId = model.KmsKeyId m.KmsKeyInfo = model.KmsKeyInfo @@ -187,10 +184,7 @@ func (m *FusionEnvironment) UnmarshalJSON(data []byte) (e error) { m.IdcsDomainUrl = model.IdcsDomainUrl m.AppliedPatchBundles = make([]string, len(model.AppliedPatchBundles)) - for i, n := range model.AppliedPatchBundles { - m.AppliedPatchBundles[i] = n - } - + copy(m.AppliedPatchBundles, model.AppliedPatchBundles) m.Version = model.Version m.PublicUrl = model.PublicUrl @@ -198,10 +192,7 @@ func (m *FusionEnvironment) UnmarshalJSON(data []byte) (e error) { m.DnsPrefix = model.DnsPrefix m.AdditionalLanguagePacks = make([]string, len(model.AdditionalLanguagePacks)) - for i, n := range model.AdditionalLanguagePacks { - m.AdditionalLanguagePacks[i] = n - } - + copy(m.AdditionalLanguagePacks, model.AdditionalLanguagePacks) m.LockboxId = model.LockboxId m.IsBreakGlassEnabled = model.IsBreakGlassEnabled @@ -220,7 +211,6 @@ func (m *FusionEnvironment) UnmarshalJSON(data []byte) (e error) { m.Rules[i] = nil } } - m.TimeCreated = model.TimeCreated m.TimeUpdated = model.TimeUpdated diff --git a/fusionapps/fusionapps_fusionapplications_client.go b/fusionapps/fusionapps_fusionapplications_client.go index fa87b36a32..8cf1f08173 100644 --- a/fusionapps/fusionapps_fusionapplications_client.go +++ b/fusionapps/fusionapps_fusionapplications_client.go @@ -80,7 +80,7 @@ func (client *FusionApplicationsClient) setConfigurationProvider(configProvider 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/fusionapps/scheduled_activity.go b/fusionapps/scheduled_activity.go index 3c858ee986..ad34148dcb 100644 --- a/fusionapps/scheduled_activity.go +++ b/fusionapps/scheduled_activity.go @@ -137,7 +137,6 @@ func (m *ScheduledActivity) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - m.TimeFinished = model.TimeFinished m.DelayInHours = model.DelayInHours diff --git a/fusionapps/scheduled_activity_summary.go b/fusionapps/scheduled_activity_summary.go index 900d98f9ae..ffe4cd9133 100644 --- a/fusionapps/scheduled_activity_summary.go +++ b/fusionapps/scheduled_activity_summary.go @@ -144,7 +144,6 @@ func (m *ScheduledActivitySummary) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - m.TimeFinished = model.TimeFinished m.DelayInHours = model.DelayInHours diff --git a/fusionapps/update_fusion_environment_details.go b/fusionapps/update_fusion_environment_details.go index f1dfdd2048..e9e7564e27 100644 --- a/fusionapps/update_fusion_environment_details.go +++ b/fusionapps/update_fusion_environment_details.go @@ -82,10 +82,7 @@ func (m *UpdateFusionEnvironmentDetails) UnmarshalJSON(data []byte) (e error) { m.MaintenancePolicy = model.MaintenancePolicy m.AdditionalLanguagePacks = make([]string, len(model.AdditionalLanguagePacks)) - for i, n := range model.AdditionalLanguagePacks { - m.AdditionalLanguagePacks[i] = n - } - + copy(m.AdditionalLanguagePacks, model.AdditionalLanguagePacks) m.Rules = make([]Rule, len(model.Rules)) for i, n := range model.Rules { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -98,7 +95,6 @@ func (m *UpdateFusionEnvironmentDetails) UnmarshalJSON(data []byte) (e error) { m.Rules[i] = nil } } - m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/genericartifactscontent/genericartifactscontent_client.go b/genericartifactscontent/genericartifactscontent_client.go index 186cb109ba..a452354ce4 100644 --- a/genericartifactscontent/genericartifactscontent_client.go +++ b/genericartifactscontent/genericartifactscontent_client.go @@ -81,7 +81,7 @@ func (client *GenericArtifactsContentClient) setConfigurationProvider(configProv 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/goldengate/connection.go b/goldengate/connection.go index 555a92fb46..736fe0be9d 100644 --- a/goldengate/connection.go +++ b/goldengate/connection.go @@ -84,12 +84,6 @@ type Connection interface { type connection struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - DisplayName *string `mandatory:"true" json:"displayName"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` - LifecycleState ConnectionLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` Description *string `mandatory:"false" json:"description"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` @@ -100,6 +94,12 @@ type connection struct { SubnetId *string `mandatory:"false" json:"subnetId"` IngressIps []IngressIpDetails `mandatory:"false" json:"ingressIps"` NsgIds []string `mandatory:"false" json:"nsgIds"` + Id *string `mandatory:"true" json:"id"` + DisplayName *string `mandatory:"true" json:"displayName"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + LifecycleState ConnectionLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` ConnectionType string `json:"connectionType"` } @@ -214,86 +214,86 @@ func (m *connection) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) } } -//GetId returns Id -func (m connection) GetId() *string { - return m.Id -} - -//GetDisplayName returns DisplayName -func (m connection) GetDisplayName() *string { - return m.DisplayName -} - -//GetCompartmentId returns CompartmentId -func (m connection) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetLifecycleState returns LifecycleState -func (m connection) GetLifecycleState() ConnectionLifecycleStateEnum { - return m.LifecycleState -} - -//GetTimeCreated returns TimeCreated -func (m connection) GetTimeCreated() *common.SDKTime { - return m.TimeCreated -} - -//GetTimeUpdated returns TimeUpdated -func (m connection) GetTimeUpdated() *common.SDKTime { - return m.TimeUpdated -} - -//GetDescription returns Description +// GetDescription returns Description func (m connection) GetDescription() *string { return m.Description } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m connection) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m connection) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m connection) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m connection) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetVaultId returns VaultId +// GetVaultId returns VaultId func (m connection) GetVaultId() *string { return m.VaultId } -//GetKeyId returns KeyId +// GetKeyId returns KeyId func (m connection) GetKeyId() *string { return m.KeyId } -//GetSubnetId returns SubnetId +// GetSubnetId returns SubnetId func (m connection) GetSubnetId() *string { return m.SubnetId } -//GetIngressIps returns IngressIps +// GetIngressIps returns IngressIps func (m connection) GetIngressIps() []IngressIpDetails { return m.IngressIps } -//GetNsgIds returns NsgIds +// GetNsgIds returns NsgIds func (m connection) GetNsgIds() []string { return m.NsgIds } +// GetId returns Id +func (m connection) GetId() *string { + return m.Id +} + +// GetDisplayName returns DisplayName +func (m connection) GetDisplayName() *string { + return m.DisplayName +} + +// GetCompartmentId returns CompartmentId +func (m connection) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetLifecycleState returns LifecycleState +func (m connection) GetLifecycleState() ConnectionLifecycleStateEnum { + return m.LifecycleState +} + +// GetTimeCreated returns TimeCreated +func (m connection) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m connection) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + func (m connection) String() string { return common.PointerString(m) } diff --git a/goldengate/connection_collection.go b/goldengate/connection_collection.go index de9648a0fd..6b19baa417 100644 --- a/goldengate/connection_collection.go +++ b/goldengate/connection_collection.go @@ -62,6 +62,5 @@ func (m *ConnectionCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/goldengate/connection_summary.go b/goldengate/connection_summary.go index ddb4dc13de..619f95f327 100644 --- a/goldengate/connection_summary.go +++ b/goldengate/connection_summary.go @@ -84,12 +84,6 @@ type ConnectionSummary interface { type connectionsummary struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - DisplayName *string `mandatory:"true" json:"displayName"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` - LifecycleState ConnectionLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` Description *string `mandatory:"false" json:"description"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` @@ -100,6 +94,12 @@ type connectionsummary struct { SubnetId *string `mandatory:"false" json:"subnetId"` IngressIps []IngressIpDetails `mandatory:"false" json:"ingressIps"` NsgIds []string `mandatory:"false" json:"nsgIds"` + Id *string `mandatory:"true" json:"id"` + DisplayName *string `mandatory:"true" json:"displayName"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + LifecycleState ConnectionLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` ConnectionType string `json:"connectionType"` } @@ -214,86 +214,86 @@ func (m *connectionsummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetId returns Id -func (m connectionsummary) GetId() *string { - return m.Id -} - -//GetDisplayName returns DisplayName -func (m connectionsummary) GetDisplayName() *string { - return m.DisplayName -} - -//GetCompartmentId returns CompartmentId -func (m connectionsummary) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetLifecycleState returns LifecycleState -func (m connectionsummary) GetLifecycleState() ConnectionLifecycleStateEnum { - return m.LifecycleState -} - -//GetTimeCreated returns TimeCreated -func (m connectionsummary) GetTimeCreated() *common.SDKTime { - return m.TimeCreated -} - -//GetTimeUpdated returns TimeUpdated -func (m connectionsummary) GetTimeUpdated() *common.SDKTime { - return m.TimeUpdated -} - -//GetDescription returns Description +// GetDescription returns Description func (m connectionsummary) GetDescription() *string { return m.Description } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m connectionsummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m connectionsummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m connectionsummary) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m connectionsummary) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetVaultId returns VaultId +// GetVaultId returns VaultId func (m connectionsummary) GetVaultId() *string { return m.VaultId } -//GetKeyId returns KeyId +// GetKeyId returns KeyId func (m connectionsummary) GetKeyId() *string { return m.KeyId } -//GetSubnetId returns SubnetId +// GetSubnetId returns SubnetId func (m connectionsummary) GetSubnetId() *string { return m.SubnetId } -//GetIngressIps returns IngressIps +// GetIngressIps returns IngressIps func (m connectionsummary) GetIngressIps() []IngressIpDetails { return m.IngressIps } -//GetNsgIds returns NsgIds +// GetNsgIds returns NsgIds func (m connectionsummary) GetNsgIds() []string { return m.NsgIds } +// GetId returns Id +func (m connectionsummary) GetId() *string { + return m.Id +} + +// GetDisplayName returns DisplayName +func (m connectionsummary) GetDisplayName() *string { + return m.DisplayName +} + +// GetCompartmentId returns CompartmentId +func (m connectionsummary) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetLifecycleState returns LifecycleState +func (m connectionsummary) GetLifecycleState() ConnectionLifecycleStateEnum { + return m.LifecycleState +} + +// GetTimeCreated returns TimeCreated +func (m connectionsummary) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m connectionsummary) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + func (m connectionsummary) String() string { return common.PointerString(m) } diff --git a/goldengate/create_connection_details.go b/goldengate/create_connection_details.go index 68a62ebce6..99a45599e4 100644 --- a/goldengate/create_connection_details.go +++ b/goldengate/create_connection_details.go @@ -55,8 +55,6 @@ type CreateConnectionDetails interface { type createconnectiondetails struct { JsonData []byte - DisplayName *string `mandatory:"true" json:"displayName"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` Description *string `mandatory:"false" json:"description"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` @@ -64,6 +62,8 @@ type createconnectiondetails struct { KeyId *string `mandatory:"false" json:"keyId"` SubnetId *string `mandatory:"false" json:"subnetId"` NsgIds []string `mandatory:"false" json:"nsgIds"` + DisplayName *string `mandatory:"true" json:"displayName"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` ConnectionType string `json:"connectionType"` } @@ -171,51 +171,51 @@ func (m *createconnectiondetails) UnmarshalPolymorphicJSON(data []byte) (interfa } } -//GetDisplayName returns DisplayName -func (m createconnectiondetails) GetDisplayName() *string { - return m.DisplayName -} - -//GetCompartmentId returns CompartmentId -func (m createconnectiondetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetDescription returns Description +// GetDescription returns Description func (m createconnectiondetails) GetDescription() *string { return m.Description } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createconnectiondetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createconnectiondetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetVaultId returns VaultId +// GetVaultId returns VaultId func (m createconnectiondetails) GetVaultId() *string { return m.VaultId } -//GetKeyId returns KeyId +// GetKeyId returns KeyId func (m createconnectiondetails) GetKeyId() *string { return m.KeyId } -//GetSubnetId returns SubnetId +// GetSubnetId returns SubnetId func (m createconnectiondetails) GetSubnetId() *string { return m.SubnetId } -//GetNsgIds returns NsgIds +// GetNsgIds returns NsgIds func (m createconnectiondetails) GetNsgIds() []string { return m.NsgIds } +// GetDisplayName returns DisplayName +func (m createconnectiondetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetCompartmentId returns CompartmentId +func (m createconnectiondetails) GetCompartmentId() *string { + return m.CompartmentId +} + func (m createconnectiondetails) String() string { return common.PointerString(m) } diff --git a/goldengate/goldengate_client.go b/goldengate/goldengate_client.go index 6abc0c8eaa..de319db5ae 100644 --- a/goldengate/goldengate_client.go +++ b/goldengate/goldengate_client.go @@ -80,7 +80,7 @@ func (client *GoldenGateClient) setConfigurationProvider(configProvider common.C 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/goldengate/update_connection_details.go b/goldengate/update_connection_details.go index c53a0f9a55..c25b1f3908 100644 --- a/goldengate/update_connection_details.go +++ b/goldengate/update_connection_details.go @@ -161,37 +161,37 @@ func (m *updateconnectiondetails) UnmarshalPolymorphicJSON(data []byte) (interfa } } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m updateconnectiondetails) GetDisplayName() *string { return m.DisplayName } -//GetDescription returns Description +// GetDescription returns Description func (m updateconnectiondetails) GetDescription() *string { return m.Description } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updateconnectiondetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updateconnectiondetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetVaultId returns VaultId +// GetVaultId returns VaultId func (m updateconnectiondetails) GetVaultId() *string { return m.VaultId } -//GetKeyId returns KeyId +// GetKeyId returns KeyId func (m updateconnectiondetails) GetKeyId() *string { return m.KeyId } -//GetNsgIds returns NsgIds +// GetNsgIds returns NsgIds func (m updateconnectiondetails) GetNsgIds() []string { return m.NsgIds } diff --git a/governancerulescontrolplane/governancerulescontrolplane_governancerule_client.go b/governancerulescontrolplane/governancerulescontrolplane_governancerule_client.go index 6969745186..bd99639d0d 100644 --- a/governancerulescontrolplane/governancerulescontrolplane_governancerule_client.go +++ b/governancerulescontrolplane/governancerulescontrolplane_governancerule_client.go @@ -80,7 +80,7 @@ func (client *GovernanceRuleClient) setConfigurationProvider(configProvider comm 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/governancerulescontrolplane/governancerulescontrolplane_workrequest_client.go b/governancerulescontrolplane/governancerulescontrolplane_workrequest_client.go index ce20939936..0cf96deb6c 100644 --- a/governancerulescontrolplane/governancerulescontrolplane_workrequest_client.go +++ b/governancerulescontrolplane/governancerulescontrolplane_workrequest_client.go @@ -80,7 +80,7 @@ func (client *WorkRequestClient) setConfigurationProvider(configProvider common. 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/healthchecks/healthchecks_client.go b/healthchecks/healthchecks_client.go index b911cbbc42..b43c2ebe1e 100644 --- a/healthchecks/healthchecks_client.go +++ b/healthchecks/healthchecks_client.go @@ -82,7 +82,7 @@ func (client *HealthChecksClient) setConfigurationProvider(configProvider common 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/identity/create_identity_provider_details.go b/identity/create_identity_provider_details.go index 773f8bb565..59b3400a31 100644 --- a/identity/create_identity_provider_details.go +++ b/identity/create_identity_provider_details.go @@ -50,12 +50,12 @@ type CreateIdentityProviderDetails interface { type createidentityproviderdetails struct { JsonData []byte + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` CompartmentId *string `mandatory:"true" json:"compartmentId"` Name *string `mandatory:"true" json:"name"` Description *string `mandatory:"true" json:"description"` ProductType CreateIdentityProviderDetailsProductTypeEnum `mandatory:"true" json:"productType"` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` Protocol string `json:"protocol"` } @@ -100,36 +100,36 @@ func (m *createidentityproviderdetails) UnmarshalPolymorphicJSON(data []byte) (i } } -//GetCompartmentId returns CompartmentId +// GetFreeformTags returns FreeformTags +func (m createidentityproviderdetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m createidentityproviderdetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetCompartmentId returns CompartmentId func (m createidentityproviderdetails) GetCompartmentId() *string { return m.CompartmentId } -//GetName returns Name +// GetName returns Name func (m createidentityproviderdetails) GetName() *string { return m.Name } -//GetDescription returns Description +// GetDescription returns Description func (m createidentityproviderdetails) GetDescription() *string { return m.Description } -//GetProductType returns ProductType +// GetProductType returns ProductType func (m createidentityproviderdetails) GetProductType() CreateIdentityProviderDetailsProductTypeEnum { return m.ProductType } -//GetFreeformTags returns FreeformTags -func (m createidentityproviderdetails) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m createidentityproviderdetails) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - func (m createidentityproviderdetails) String() string { return common.PointerString(m) } diff --git a/identity/identity_client.go b/identity/identity_client.go index c56b0feae9..22b2418bce 100644 --- a/identity/identity_client.go +++ b/identity/identity_client.go @@ -81,7 +81,7 @@ func (client *IdentityClient) setConfigurationProvider(configProvider common.Con 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/identity/identity_provider.go b/identity/identity_provider.go index bb8f4c56f5..2737d6fc3f 100644 --- a/identity/identity_provider.go +++ b/identity/identity_provider.go @@ -78,6 +78,9 @@ type IdentityProvider interface { type identityprovider struct { JsonData []byte + InactiveStatus *int64 `mandatory:"false" json:"inactiveStatus"` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` Id *string `mandatory:"true" json:"id"` CompartmentId *string `mandatory:"true" json:"compartmentId"` Name *string `mandatory:"true" json:"name"` @@ -85,9 +88,6 @@ type identityprovider struct { ProductType *string `mandatory:"true" json:"productType"` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` LifecycleState IdentityProviderLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - InactiveStatus *int64 `mandatory:"false" json:"inactiveStatus"` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` Protocol string `json:"protocol"` } @@ -136,56 +136,56 @@ func (m *identityprovider) UnmarshalPolymorphicJSON(data []byte) (interface{}, e } } -//GetId returns Id +// GetInactiveStatus returns InactiveStatus +func (m identityprovider) GetInactiveStatus() *int64 { + return m.InactiveStatus +} + +// GetFreeformTags returns FreeformTags +func (m identityprovider) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m identityprovider) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetId returns Id func (m identityprovider) GetId() *string { return m.Id } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m identityprovider) GetCompartmentId() *string { return m.CompartmentId } -//GetName returns Name +// GetName returns Name func (m identityprovider) GetName() *string { return m.Name } -//GetDescription returns Description +// GetDescription returns Description func (m identityprovider) GetDescription() *string { return m.Description } -//GetProductType returns ProductType +// GetProductType returns ProductType func (m identityprovider) GetProductType() *string { return m.ProductType } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m identityprovider) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m identityprovider) GetLifecycleState() IdentityProviderLifecycleStateEnum { return m.LifecycleState } -//GetInactiveStatus returns InactiveStatus -func (m identityprovider) GetInactiveStatus() *int64 { - return m.InactiveStatus -} - -//GetFreeformTags returns FreeformTags -func (m identityprovider) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m identityprovider) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - func (m identityprovider) String() string { return common.PointerString(m) } diff --git a/identity/update_identity_provider_details.go b/identity/update_identity_provider_details.go index 11ca938f84..9c7ab66351 100644 --- a/identity/update_identity_provider_details.go +++ b/identity/update_identity_provider_details.go @@ -80,17 +80,17 @@ func (m *updateidentityproviderdetails) UnmarshalPolymorphicJSON(data []byte) (i } } -//GetDescription returns Description +// GetDescription returns Description func (m updateidentityproviderdetails) GetDescription() *string { return m.Description } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updateidentityproviderdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updateidentityproviderdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/identitydataplane/identitydataplane_dataplane_client.go b/identitydataplane/identitydataplane_dataplane_client.go index ceadf5d904..4afb3ed44d 100644 --- a/identitydataplane/identitydataplane_dataplane_client.go +++ b/identitydataplane/identitydataplane_dataplane_client.go @@ -80,7 +80,7 @@ func (client *DataplaneClient) setConfigurationProvider(configProvider common.Co 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/integration/create_integration_instance_details.go b/integration/create_integration_instance_details.go index 31130104cf..c6b9cc2c6e 100644 --- a/integration/create_integration_instance_details.go +++ b/integration/create_integration_instance_details.go @@ -134,10 +134,7 @@ func (m *CreateIntegrationInstanceDetails) UnmarshalJSON(data []byte) (e error) m.CustomEndpoint = model.CustomEndpoint m.AlternateCustomEndpoints = make([]CreateCustomEndpointDetails, len(model.AlternateCustomEndpoints)) - for i, n := range model.AlternateCustomEndpoints { - m.AlternateCustomEndpoints[i] = n - } - + copy(m.AlternateCustomEndpoints, model.AlternateCustomEndpoints) m.ConsumptionModel = model.ConsumptionModel m.IsFileServerEnabled = model.IsFileServerEnabled diff --git a/integration/integration_instance.go b/integration/integration_instance.go index 2ed0576a36..5e2f61d366 100644 --- a/integration/integration_instance.go +++ b/integration/integration_instance.go @@ -171,10 +171,7 @@ func (m *IntegrationInstance) UnmarshalJSON(data []byte) (e error) { m.CustomEndpoint = model.CustomEndpoint m.AlternateCustomEndpoints = make([]CustomEndpointDetails, len(model.AlternateCustomEndpoints)) - for i, n := range model.AlternateCustomEndpoints { - m.AlternateCustomEndpoints[i] = n - } - + copy(m.AlternateCustomEndpoints, model.AlternateCustomEndpoints) m.ConsumptionModel = model.ConsumptionModel nn, e = model.NetworkEndpointDetails.UnmarshalPolymorphicJSON(model.NetworkEndpointDetails.JsonData) @@ -190,10 +187,7 @@ func (m *IntegrationInstance) UnmarshalJSON(data []byte) (e error) { m.IdcsInfo = model.IdcsInfo m.Attachments = make([]AttachmentDetails, len(model.Attachments)) - for i, n := range model.Attachments { - m.Attachments[i] = n - } - + copy(m.Attachments, model.Attachments) m.Shape = model.Shape nn, e = model.PrivateEndpointOutboundConnection.UnmarshalPolymorphicJSON(model.PrivateEndpointOutboundConnection.JsonData) diff --git a/integration/integration_instance_summary.go b/integration/integration_instance_summary.go index 5cbf9338cc..f2bca25dd0 100644 --- a/integration/integration_instance_summary.go +++ b/integration/integration_instance_summary.go @@ -160,10 +160,7 @@ func (m *IntegrationInstanceSummary) UnmarshalJSON(data []byte) (e error) { m.CustomEndpoint = model.CustomEndpoint m.AlternateCustomEndpoints = make([]CustomEndpointDetails, len(model.AlternateCustomEndpoints)) - for i, n := range model.AlternateCustomEndpoints { - m.AlternateCustomEndpoints[i] = n - } - + copy(m.AlternateCustomEndpoints, model.AlternateCustomEndpoints) m.ConsumptionModel = model.ConsumptionModel nn, e = model.NetworkEndpointDetails.UnmarshalPolymorphicJSON(model.NetworkEndpointDetails.JsonData) diff --git a/integration/integration_integrationinstance_client.go b/integration/integration_integrationinstance_client.go index a590882ae7..944ff5325e 100644 --- a/integration/integration_integrationinstance_client.go +++ b/integration/integration_integrationinstance_client.go @@ -80,7 +80,7 @@ func (client *IntegrationInstanceClient) setConfigurationProvider(configProvider 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/jms/jms_javamanagementservice_client.go b/jms/jms_javamanagementservice_client.go index 2c9d43dfb5..7a3ef2ff5f 100644 --- a/jms/jms_javamanagementservice_client.go +++ b/jms/jms_javamanagementservice_client.go @@ -80,7 +80,7 @@ func (client *JavaManagementServiceClient) setConfigurationProvider(configProvid 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/jms/work_item_details.go b/jms/work_item_details.go index 020c599ed4..ad71136182 100644 --- a/jms/work_item_details.go +++ b/jms/work_item_details.go @@ -69,7 +69,7 @@ func (m *workitemdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, er } } -//GetWorkItemType returns WorkItemType +// GetWorkItemType returns WorkItemType func (m workitemdetails) GetWorkItemType() WorkItemTypeEnum { return m.WorkItemType } diff --git a/keymanagement/keymanagement_kmsvault_client.go b/keymanagement/keymanagement_kmsvault_client.go index 66edcfb2fe..b8669271e0 100644 --- a/keymanagement/keymanagement_kmsvault_client.go +++ b/keymanagement/keymanagement_kmsvault_client.go @@ -81,7 +81,7 @@ func (client *KmsVaultClient) setConfigurationProvider(configProvider common.Con 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/licensemanager/licensemanager_client.go b/licensemanager/licensemanager_client.go index 83bfae5b27..9e9009a285 100644 --- a/licensemanager/licensemanager_client.go +++ b/licensemanager/licensemanager_client.go @@ -80,7 +80,7 @@ func (client *LicenseManagerClient) setConfigurationProvider(configProvider comm 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/limits/limits_client.go b/limits/limits_client.go index 7d8955e852..24b482f4e7 100644 --- a/limits/limits_client.go +++ b/limits/limits_client.go @@ -80,7 +80,7 @@ func (client *LimitsClient) setConfigurationProvider(configProvider common.Confi 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/limits/limits_quotas_client.go b/limits/limits_quotas_client.go index a55b45667a..28375c8507 100644 --- a/limits/limits_quotas_client.go +++ b/limits/limits_quotas_client.go @@ -80,7 +80,7 @@ func (client *QuotasClient) setConfigurationProvider(configProvider common.Confi 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/loadbalancer/allow_rule.go b/loadbalancer/allow_rule.go index bae6d2b8a7..bb80f435c9 100644 --- a/loadbalancer/allow_rule.go +++ b/loadbalancer/allow_rule.go @@ -91,6 +91,5 @@ func (m *AllowRule) UnmarshalJSON(data []byte) (e error) { m.Conditions[i] = nil } } - return } diff --git a/loadbalancer/create_rule_set_details.go b/loadbalancer/create_rule_set_details.go index afa9860796..bf8c147b1e 100644 --- a/loadbalancer/create_rule_set_details.go +++ b/loadbalancer/create_rule_set_details.go @@ -71,6 +71,5 @@ func (m *CreateRuleSetDetails) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/loadbalancer/loadbalancer_client.go b/loadbalancer/loadbalancer_client.go index 5a35a1669c..a139e9fa78 100644 --- a/loadbalancer/loadbalancer_client.go +++ b/loadbalancer/loadbalancer_client.go @@ -81,7 +81,7 @@ func (client *LoadBalancerClient) setConfigurationProvider(configProvider common 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/loadbalancer/redirect_rule.go b/loadbalancer/redirect_rule.go index 8668c5e9d7..699cb5a347 100644 --- a/loadbalancer/redirect_rule.go +++ b/loadbalancer/redirect_rule.go @@ -104,6 +104,5 @@ func (m *RedirectRule) UnmarshalJSON(data []byte) (e error) { m.Conditions[i] = nil } } - return } diff --git a/loadbalancer/routing_rule.go b/loadbalancer/routing_rule.go index 2cf73d072d..de15b27853 100644 --- a/loadbalancer/routing_rule.go +++ b/loadbalancer/routing_rule.go @@ -76,6 +76,5 @@ func (m *RoutingRule) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - return } diff --git a/loadbalancer/rule_set.go b/loadbalancer/rule_set.go index abcd7a88f3..7943284cc0 100644 --- a/loadbalancer/rule_set.go +++ b/loadbalancer/rule_set.go @@ -73,6 +73,5 @@ func (m *RuleSet) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/loadbalancer/rule_set_details.go b/loadbalancer/rule_set_details.go index 8a9e365383..3dd2080a28 100644 --- a/loadbalancer/rule_set_details.go +++ b/loadbalancer/rule_set_details.go @@ -63,6 +63,5 @@ func (m *RuleSetDetails) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/loadbalancer/update_rule_set_details.go b/loadbalancer/update_rule_set_details.go index abc79560a3..dc5d907251 100644 --- a/loadbalancer/update_rule_set_details.go +++ b/loadbalancer/update_rule_set_details.go @@ -63,6 +63,5 @@ func (m *UpdateRuleSetDetails) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/lockbox/lockbox_client.go b/lockbox/lockbox_client.go index 61cdbcb03e..1a084ec011 100644 --- a/lockbox/lockbox_client.go +++ b/lockbox/lockbox_client.go @@ -81,7 +81,7 @@ func (client *LockboxClient) setConfigurationProvider(configProvider common.Conf 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/loganalytics/abstract_column.go b/loganalytics/abstract_column.go index abb1e87fdf..7cd076b1b7 100644 --- a/loganalytics/abstract_column.go +++ b/loganalytics/abstract_column.go @@ -155,57 +155,57 @@ func (m *abstractcolumn) UnmarshalPolymorphicJSON(data []byte) (interface{}, err } } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m abstractcolumn) GetDisplayName() *string { return m.DisplayName } -//GetSubSystem returns SubSystem +// GetSubSystem returns SubSystem func (m abstractcolumn) GetSubSystem() SubSystemNameEnum { return m.SubSystem } -//GetValues returns Values +// GetValues returns Values func (m abstractcolumn) GetValues() []FieldValue { return m.Values } -//GetIsListOfValues returns IsListOfValues +// GetIsListOfValues returns IsListOfValues func (m abstractcolumn) GetIsListOfValues() *bool { return m.IsListOfValues } -//GetIsMultiValued returns IsMultiValued +// GetIsMultiValued returns IsMultiValued func (m abstractcolumn) GetIsMultiValued() *bool { return m.IsMultiValued } -//GetIsCaseSensitive returns IsCaseSensitive +// GetIsCaseSensitive returns IsCaseSensitive func (m abstractcolumn) GetIsCaseSensitive() *bool { return m.IsCaseSensitive } -//GetIsGroupable returns IsGroupable +// GetIsGroupable returns IsGroupable func (m abstractcolumn) GetIsGroupable() *bool { return m.IsGroupable } -//GetIsEvaluable returns IsEvaluable +// GetIsEvaluable returns IsEvaluable func (m abstractcolumn) GetIsEvaluable() *bool { return m.IsEvaluable } -//GetValueType returns ValueType +// GetValueType returns ValueType func (m abstractcolumn) GetValueType() ValueTypeEnum { return m.ValueType } -//GetOriginalDisplayName returns OriginalDisplayName +// GetOriginalDisplayName returns OriginalDisplayName func (m abstractcolumn) GetOriginalDisplayName() *string { return m.OriginalDisplayName } -//GetInternalName returns InternalName +// GetInternalName returns InternalName func (m abstractcolumn) GetInternalName() *string { return m.InternalName } diff --git a/loganalytics/abstract_command_descriptor.go b/loganalytics/abstract_command_descriptor.go index 342a2556aa..7d5c963484 100644 --- a/loganalytics/abstract_command_descriptor.go +++ b/loganalytics/abstract_command_descriptor.go @@ -40,12 +40,12 @@ type AbstractCommandDescriptor interface { type abstractcommanddescriptor struct { JsonData []byte - DisplayQueryString *string `mandatory:"true" json:"displayQueryString"` - InternalQueryString *string `mandatory:"true" json:"internalQueryString"` Category *string `mandatory:"false" json:"category"` ReferencedFields json.RawMessage `mandatory:"false" json:"referencedFields"` DeclaredFields json.RawMessage `mandatory:"false" json:"declaredFields"` IsHidden *bool `mandatory:"false" json:"isHidden"` + DisplayQueryString *string `mandatory:"true" json:"displayQueryString"` + InternalQueryString *string `mandatory:"true" json:"internalQueryString"` Name string `json:"name"` } @@ -298,36 +298,36 @@ func (m *abstractcommanddescriptor) UnmarshalPolymorphicJSON(data []byte) (inter } } -//GetDisplayQueryString returns DisplayQueryString -func (m abstractcommanddescriptor) GetDisplayQueryString() *string { - return m.DisplayQueryString -} - -//GetInternalQueryString returns InternalQueryString -func (m abstractcommanddescriptor) GetInternalQueryString() *string { - return m.InternalQueryString -} - -//GetCategory returns Category +// GetCategory returns Category func (m abstractcommanddescriptor) GetCategory() *string { return m.Category } -//GetReferencedFields returns ReferencedFields +// GetReferencedFields returns ReferencedFields func (m abstractcommanddescriptor) GetReferencedFields() json.RawMessage { return m.ReferencedFields } -//GetDeclaredFields returns DeclaredFields +// GetDeclaredFields returns DeclaredFields func (m abstractcommanddescriptor) GetDeclaredFields() json.RawMessage { return m.DeclaredFields } -//GetIsHidden returns IsHidden +// GetIsHidden returns IsHidden func (m abstractcommanddescriptor) GetIsHidden() *bool { return m.IsHidden } +// GetDisplayQueryString returns DisplayQueryString +func (m abstractcommanddescriptor) GetDisplayQueryString() *string { + return m.DisplayQueryString +} + +// GetInternalQueryString returns InternalQueryString +func (m abstractcommanddescriptor) GetInternalQueryString() *string { + return m.InternalQueryString +} + func (m abstractcommanddescriptor) String() string { return common.PointerString(m) } diff --git a/loganalytics/abstract_field.go b/loganalytics/abstract_field.go index 3566f844ed..cb72ba5b12 100644 --- a/loganalytics/abstract_field.go +++ b/loganalytics/abstract_field.go @@ -123,52 +123,52 @@ func (m *abstractfield) UnmarshalPolymorphicJSON(data []byte) (interface{}, erro } } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m abstractfield) GetDisplayName() *string { return m.DisplayName } -//GetIsDeclared returns IsDeclared +// GetIsDeclared returns IsDeclared func (m abstractfield) GetIsDeclared() *bool { return m.IsDeclared } -//GetOriginalDisplayNames returns OriginalDisplayNames +// GetOriginalDisplayNames returns OriginalDisplayNames func (m abstractfield) GetOriginalDisplayNames() []string { return m.OriginalDisplayNames } -//GetInternalName returns InternalName +// GetInternalName returns InternalName func (m abstractfield) GetInternalName() *string { return m.InternalName } -//GetValueType returns ValueType +// GetValueType returns ValueType func (m abstractfield) GetValueType() ValueTypeEnum { return m.ValueType } -//GetIsGroupable returns IsGroupable +// GetIsGroupable returns IsGroupable func (m abstractfield) GetIsGroupable() *bool { return m.IsGroupable } -//GetIsDuration returns IsDuration +// GetIsDuration returns IsDuration func (m abstractfield) GetIsDuration() *bool { return m.IsDuration } -//GetAlias returns Alias +// GetAlias returns Alias func (m abstractfield) GetAlias() *string { return m.Alias } -//GetFilterQueryString returns FilterQueryString +// GetFilterQueryString returns FilterQueryString func (m abstractfield) GetFilterQueryString() *string { return m.FilterQueryString } -//GetUnitType returns UnitType +// GetUnitType returns UnitType func (m abstractfield) GetUnitType() *string { return m.UnitType } diff --git a/loganalytics/add_fields_command_descriptor.go b/loganalytics/add_fields_command_descriptor.go index 1d015d8eeb..e5c6f7cc0d 100644 --- a/loganalytics/add_fields_command_descriptor.go +++ b/loganalytics/add_fields_command_descriptor.go @@ -132,7 +132,6 @@ func (m *AddFieldsCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -145,14 +144,10 @@ func (m *AddFieldsCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.SubQueries = make([]ParseQueryOutput, len(model.SubQueries)) - for i, n := range model.SubQueries { - m.SubQueries[i] = n - } - + copy(m.SubQueries, model.SubQueries) m.DisplayQueryString = model.DisplayQueryString m.InternalQueryString = model.InternalQueryString diff --git a/loganalytics/add_insights_command_descriptor.go b/loganalytics/add_insights_command_descriptor.go index 6a629cbd0a..9015a8b233 100644 --- a/loganalytics/add_insights_command_descriptor.go +++ b/loganalytics/add_insights_command_descriptor.go @@ -128,7 +128,6 @@ func (m *AddInsightsCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *AddInsightsCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/anomaly_command_descriptor.go b/loganalytics/anomaly_command_descriptor.go index 2edbc0c8e6..689c45480d 100644 --- a/loganalytics/anomaly_command_descriptor.go +++ b/loganalytics/anomaly_command_descriptor.go @@ -128,7 +128,6 @@ func (m *AnomalyCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *AnomalyCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/bottom_command_descriptor.go b/loganalytics/bottom_command_descriptor.go index d2e9f2cfaa..943cd02b53 100644 --- a/loganalytics/bottom_command_descriptor.go +++ b/loganalytics/bottom_command_descriptor.go @@ -132,7 +132,6 @@ func (m *BottomCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -145,7 +144,6 @@ func (m *BottomCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.Limit = model.Limit diff --git a/loganalytics/bucket_command_descriptor.go b/loganalytics/bucket_command_descriptor.go index 315f801670..6eebe8c2e7 100644 --- a/loganalytics/bucket_command_descriptor.go +++ b/loganalytics/bucket_command_descriptor.go @@ -144,7 +144,6 @@ func (m *BucketCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -157,7 +156,6 @@ func (m *BucketCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.MaxBuckets = model.MaxBuckets @@ -165,10 +163,7 @@ func (m *BucketCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.Span = model.Span m.Ranges = make([]BucketRange, len(model.Ranges)) - for i, n := range model.Ranges { - m.Ranges[i] = n - } - + copy(m.Ranges, model.Ranges) m.DefaultValue = model.DefaultValue m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/classify_column.go b/loganalytics/classify_column.go index 87666460a0..fbf7a3c76b 100644 --- a/loganalytics/classify_column.go +++ b/loganalytics/classify_column.go @@ -198,10 +198,7 @@ func (m *ClassifyColumn) UnmarshalJSON(data []byte) (e error) { m.SubSystem = model.SubSystem m.Values = make([]FieldValue, len(model.Values)) - for i, n := range model.Values { - m.Values[i] = n - } - + copy(m.Values, model.Values) m.IsListOfValues = model.IsListOfValues m.IsMultiValued = model.IsMultiValued @@ -219,20 +216,11 @@ func (m *ClassifyColumn) UnmarshalJSON(data []byte) (e error) { m.InternalName = model.InternalName m.ClassifyFieldNames = make([]string, len(model.ClassifyFieldNames)) - for i, n := range model.ClassifyFieldNames { - m.ClassifyFieldNames[i] = n - } - + copy(m.ClassifyFieldNames, model.ClassifyFieldNames) m.ClassifyFieldNullCount = make([]int64, len(model.ClassifyFieldNullCount)) - for i, n := range model.ClassifyFieldNullCount { - m.ClassifyFieldNullCount[i] = n - } - + copy(m.ClassifyFieldNullCount, model.ClassifyFieldNullCount) m.ClassifyAnomalyIntervalCounts = make([]int64, len(model.ClassifyAnomalyIntervalCounts)) - for i, n := range model.ClassifyAnomalyIntervalCounts { - m.ClassifyAnomalyIntervalCounts[i] = n - } - + copy(m.ClassifyAnomalyIntervalCounts, model.ClassifyAnomalyIntervalCounts) m.ClassifyColumns = make([]AbstractColumn, len(model.ClassifyColumns)) for i, n := range model.ClassifyColumns { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -245,12 +233,8 @@ func (m *ClassifyColumn) UnmarshalJSON(data []byte) (e error) { m.ClassifyColumns[i] = nil } } - m.ClassifyResult = make([]map[string]interface{}, len(model.ClassifyResult)) - for i, n := range model.ClassifyResult { - m.ClassifyResult[i] = n - } - + copy(m.ClassifyResult, model.ClassifyResult) m.ClassifyCorrelateColumns = make([]AbstractColumn, len(model.ClassifyCorrelateColumns)) for i, n := range model.ClassifyCorrelateColumns { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -263,11 +247,7 @@ func (m *ClassifyColumn) UnmarshalJSON(data []byte) (e error) { m.ClassifyCorrelateColumns[i] = nil } } - m.ClassifyCorrelateResult = make([]map[string]interface{}, len(model.ClassifyCorrelateResult)) - for i, n := range model.ClassifyCorrelateResult { - m.ClassifyCorrelateResult[i] = n - } - + copy(m.ClassifyCorrelateResult, model.ClassifyCorrelateResult) return } diff --git a/loganalytics/classify_command_descriptor.go b/loganalytics/classify_command_descriptor.go index 0bfac54f8f..19bc6597fd 100644 --- a/loganalytics/classify_command_descriptor.go +++ b/loganalytics/classify_command_descriptor.go @@ -140,7 +140,6 @@ func (m *ClassifyCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -153,7 +152,6 @@ func (m *ClassifyCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.TopCount = model.TopCount @@ -161,10 +159,7 @@ func (m *ClassifyCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.BottomCount = model.BottomCount m.Correlate = make([]FieldsAddRemoveField, len(model.Correlate)) - for i, n := range model.Correlate { - m.Correlate[i] = n - } - + copy(m.Correlate, model.Correlate) m.DisplayQueryString = model.DisplayQueryString m.InternalQueryString = model.InternalQueryString diff --git a/loganalytics/cluster_command_descriptor.go b/loganalytics/cluster_command_descriptor.go index baeb9d3d8e..f2248daf8c 100644 --- a/loganalytics/cluster_command_descriptor.go +++ b/loganalytics/cluster_command_descriptor.go @@ -128,7 +128,6 @@ func (m *ClusterCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *ClusterCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/cluster_compare_command_descriptor.go b/loganalytics/cluster_compare_command_descriptor.go index 3627a1c375..b0189e30d0 100644 --- a/loganalytics/cluster_compare_command_descriptor.go +++ b/loganalytics/cluster_compare_command_descriptor.go @@ -152,7 +152,6 @@ func (m *ClusterCompareCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -165,7 +164,6 @@ func (m *ClusterCompareCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.TimeShift = model.TimeShift diff --git a/loganalytics/cluster_details_command_descriptor.go b/loganalytics/cluster_details_command_descriptor.go index f6cd0bdb67..2b713f3a92 100644 --- a/loganalytics/cluster_details_command_descriptor.go +++ b/loganalytics/cluster_details_command_descriptor.go @@ -128,7 +128,6 @@ func (m *ClusterDetailsCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *ClusterDetailsCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/cluster_split_command_descriptor.go b/loganalytics/cluster_split_command_descriptor.go index 1d1c4c2dfb..9f697035d6 100644 --- a/loganalytics/cluster_split_command_descriptor.go +++ b/loganalytics/cluster_split_command_descriptor.go @@ -128,7 +128,6 @@ func (m *ClusterSplitCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *ClusterSplitCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/command_descriptor.go b/loganalytics/command_descriptor.go index 595f1c8427..879dd5bbc8 100644 --- a/loganalytics/command_descriptor.go +++ b/loganalytics/command_descriptor.go @@ -128,7 +128,6 @@ func (m *CommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *CommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/compare_command_descriptor.go b/loganalytics/compare_command_descriptor.go index 44961c4f07..603fe16a18 100644 --- a/loganalytics/compare_command_descriptor.go +++ b/loganalytics/compare_command_descriptor.go @@ -128,7 +128,6 @@ func (m *CompareCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *CompareCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/create_ingest_time_rule_details.go b/loganalytics/create_ingest_time_rule_details.go index ca4eab28cc..27e816b3b7 100644 --- a/loganalytics/create_ingest_time_rule_details.go +++ b/loganalytics/create_ingest_time_rule_details.go @@ -107,6 +107,5 @@ func (m *CreateIngestTimeRuleDetails) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - return } diff --git a/loganalytics/create_scheduled_task_details.go b/loganalytics/create_scheduled_task_details.go index a0cc0cfce2..fcc3b7d255 100644 --- a/loganalytics/create_scheduled_task_details.go +++ b/loganalytics/create_scheduled_task_details.go @@ -39,10 +39,10 @@ type CreateScheduledTaskDetails interface { type createscheduledtaskdetails struct { JsonData []byte - CompartmentId *string `mandatory:"true" json:"compartmentId"` DisplayName *string `mandatory:"false" json:"displayName"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` Kind string `json:"kind"` } @@ -89,26 +89,26 @@ func (m *createscheduledtaskdetails) UnmarshalPolymorphicJSON(data []byte) (inte } } -//GetCompartmentId returns CompartmentId -func (m createscheduledtaskdetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createscheduledtaskdetails) GetDisplayName() *string { return m.DisplayName } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createscheduledtaskdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createscheduledtaskdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetCompartmentId returns CompartmentId +func (m createscheduledtaskdetails) GetCompartmentId() *string { + return m.CompartmentId +} + func (m createscheduledtaskdetails) String() string { return common.PointerString(m) } diff --git a/loganalytics/create_standard_task_details.go b/loganalytics/create_standard_task_details.go index 02db9af3ed..639d21f3bd 100644 --- a/loganalytics/create_standard_task_details.go +++ b/loganalytics/create_standard_task_details.go @@ -140,7 +140,6 @@ func (m *CreateStandardTaskDetails) UnmarshalJSON(data []byte) (e error) { m.Schedules[i] = nil } } - nn, e = model.Action.UnmarshalPolymorphicJSON(model.Action.JsonData) if e != nil { return diff --git a/loganalytics/create_view_command_descriptor.go b/loganalytics/create_view_command_descriptor.go index 1db928892b..99540e242b 100644 --- a/loganalytics/create_view_command_descriptor.go +++ b/loganalytics/create_view_command_descriptor.go @@ -128,7 +128,6 @@ func (m *CreateViewCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *CreateViewCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/dedup_command_descriptor.go b/loganalytics/dedup_command_descriptor.go index cb5264b2ec..a9a2851ed0 100644 --- a/loganalytics/dedup_command_descriptor.go +++ b/loganalytics/dedup_command_descriptor.go @@ -128,7 +128,6 @@ func (m *DedupCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *DedupCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/delete_command_descriptor.go b/loganalytics/delete_command_descriptor.go index bfacba92b5..89fb5b8019 100644 --- a/loganalytics/delete_command_descriptor.go +++ b/loganalytics/delete_command_descriptor.go @@ -132,7 +132,6 @@ func (m *DeleteCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -145,7 +144,6 @@ func (m *DeleteCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.IsDryRun = model.IsDryRun diff --git a/loganalytics/delta_command_descriptor.go b/loganalytics/delta_command_descriptor.go index 655c41ff74..9daededd73 100644 --- a/loganalytics/delta_command_descriptor.go +++ b/loganalytics/delta_command_descriptor.go @@ -132,7 +132,6 @@ func (m *DeltaCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -145,7 +144,6 @@ func (m *DeltaCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.Step = model.Step diff --git a/loganalytics/demo_mode_command_descriptor.go b/loganalytics/demo_mode_command_descriptor.go index b064fb739a..801c66e62e 100644 --- a/loganalytics/demo_mode_command_descriptor.go +++ b/loganalytics/demo_mode_command_descriptor.go @@ -128,7 +128,6 @@ func (m *DemoModeCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *DemoModeCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/distinct_command_descriptor.go b/loganalytics/distinct_command_descriptor.go index dbf868e80a..f7021dfbc8 100644 --- a/loganalytics/distinct_command_descriptor.go +++ b/loganalytics/distinct_command_descriptor.go @@ -128,7 +128,6 @@ func (m *DistinctCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *DistinctCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/eval_command_descriptor.go b/loganalytics/eval_command_descriptor.go index 8181f3ef79..4ff0d94907 100644 --- a/loganalytics/eval_command_descriptor.go +++ b/loganalytics/eval_command_descriptor.go @@ -128,7 +128,6 @@ func (m *EvalCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *EvalCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/event_stats_command_descriptor.go b/loganalytics/event_stats_command_descriptor.go index 643c0a52b0..77ed418f09 100644 --- a/loganalytics/event_stats_command_descriptor.go +++ b/loganalytics/event_stats_command_descriptor.go @@ -136,7 +136,6 @@ func (m *EventStatsCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -149,7 +148,6 @@ func (m *EventStatsCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.GroupByFields = make([]AbstractField, len(model.GroupByFields)) @@ -164,12 +162,8 @@ func (m *EventStatsCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.GroupByFields[i] = nil } } - m.Functions = make([]FunctionField, len(model.Functions)) - for i, n := range model.Functions { - m.Functions[i] = n - } - + copy(m.Functions, model.Functions) m.DisplayQueryString = model.DisplayQueryString m.InternalQueryString = model.InternalQueryString diff --git a/loganalytics/extract_command_descriptor.go b/loganalytics/extract_command_descriptor.go index b8a7b7cc5a..21ad6562af 100644 --- a/loganalytics/extract_command_descriptor.go +++ b/loganalytics/extract_command_descriptor.go @@ -128,7 +128,6 @@ func (m *ExtractCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *ExtractCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/field_summary_command_descriptor.go b/loganalytics/field_summary_command_descriptor.go index 3d68b7e7d9..1959b3a980 100644 --- a/loganalytics/field_summary_command_descriptor.go +++ b/loganalytics/field_summary_command_descriptor.go @@ -132,7 +132,6 @@ func (m *FieldSummaryCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -145,7 +144,6 @@ func (m *FieldSummaryCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.MaxValues = model.MaxValues diff --git a/loganalytics/fields_command_descriptor.go b/loganalytics/fields_command_descriptor.go index 0d557bb14f..632c8d6736 100644 --- a/loganalytics/fields_command_descriptor.go +++ b/loganalytics/fields_command_descriptor.go @@ -128,7 +128,6 @@ func (m *FieldsCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *FieldsCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/frequent_command_descriptor.go b/loganalytics/frequent_command_descriptor.go index deb5b052b2..c7220b15e8 100644 --- a/loganalytics/frequent_command_descriptor.go +++ b/loganalytics/frequent_command_descriptor.go @@ -128,7 +128,6 @@ func (m *FrequentCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *FrequentCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/function_field.go b/loganalytics/function_field.go index bb61c2b5f5..bf49d0d631 100644 --- a/loganalytics/function_field.go +++ b/loganalytics/function_field.go @@ -167,10 +167,7 @@ func (m *FunctionField) UnmarshalJSON(data []byte) (e error) { m.IsDeclared = model.IsDeclared m.OriginalDisplayNames = make([]string, len(model.OriginalDisplayNames)) - for i, n := range model.OriginalDisplayNames { - m.OriginalDisplayNames[i] = n - } - + copy(m.OriginalDisplayNames, model.OriginalDisplayNames) m.InternalName = model.InternalName m.ValueType = model.ValueType @@ -199,6 +196,5 @@ func (m *FunctionField) UnmarshalJSON(data []byte) (e error) { m.Arguments[i] = nil } } - return } diff --git a/loganalytics/geo_stats_command_descriptor.go b/loganalytics/geo_stats_command_descriptor.go index 9258adbd44..c266574ab7 100644 --- a/loganalytics/geo_stats_command_descriptor.go +++ b/loganalytics/geo_stats_command_descriptor.go @@ -163,7 +163,6 @@ func (m *GeoStatsCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -176,7 +175,6 @@ func (m *GeoStatsCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.Include = model.Include @@ -243,12 +241,8 @@ func (m *GeoStatsCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.GroupByFields[i] = nil } } - m.Functions = make([]FunctionField, len(model.Functions)) - for i, n := range model.Functions { - m.Functions[i] = n - } - + copy(m.Functions, model.Functions) m.DisplayQueryString = model.DisplayQueryString m.InternalQueryString = model.InternalQueryString diff --git a/loganalytics/head_command_descriptor.go b/loganalytics/head_command_descriptor.go index f296a94ab7..ce34c1a2a7 100644 --- a/loganalytics/head_command_descriptor.go +++ b/loganalytics/head_command_descriptor.go @@ -132,7 +132,6 @@ func (m *HeadCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -145,7 +144,6 @@ func (m *HeadCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.Limit = model.Limit diff --git a/loganalytics/highlight_command_descriptor.go b/loganalytics/highlight_command_descriptor.go index b6ca5584aa..853f7c9309 100644 --- a/loganalytics/highlight_command_descriptor.go +++ b/loganalytics/highlight_command_descriptor.go @@ -140,7 +140,6 @@ func (m *HighlightCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -153,21 +152,14 @@ func (m *HighlightCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.Color = model.Color m.Fields = make([]string, len(model.Fields)) - for i, n := range model.Fields { - m.Fields[i] = n - } - + copy(m.Fields, model.Fields) m.Keywords = make([]string, len(model.Keywords)) - for i, n := range model.Keywords { - m.Keywords[i] = n - } - + copy(m.Keywords, model.Keywords) m.DisplayQueryString = model.DisplayQueryString m.InternalQueryString = model.InternalQueryString diff --git a/loganalytics/highlight_groups_command_descriptor.go b/loganalytics/highlight_groups_command_descriptor.go index 00f05c68a0..f7de95d8ed 100644 --- a/loganalytics/highlight_groups_command_descriptor.go +++ b/loganalytics/highlight_groups_command_descriptor.go @@ -152,7 +152,6 @@ func (m *HighlightGroupsCommandDescriptor) UnmarshalJSON(data []byte) (e error) m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -165,7 +164,6 @@ func (m *HighlightGroupsCommandDescriptor) UnmarshalJSON(data []byte) (e error) m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.Color = model.Color @@ -173,25 +171,13 @@ func (m *HighlightGroupsCommandDescriptor) UnmarshalJSON(data []byte) (e error) m.Priority = model.Priority m.MatchOnly = make([]string, len(model.MatchOnly)) - for i, n := range model.MatchOnly { - m.MatchOnly[i] = n - } - + copy(m.MatchOnly, model.MatchOnly) m.Fields = make([]string, len(model.Fields)) - for i, n := range model.Fields { - m.Fields[i] = n - } - + copy(m.Fields, model.Fields) m.Keywords = make([]string, len(model.Keywords)) - for i, n := range model.Keywords { - m.Keywords[i] = n - } - + copy(m.Keywords, model.Keywords) m.SubQueries = make([]ParseQueryOutput, len(model.SubQueries)) - for i, n := range model.SubQueries { - m.SubQueries[i] = n - } - + copy(m.SubQueries, model.SubQueries) m.DisplayQueryString = model.DisplayQueryString m.InternalQueryString = model.InternalQueryString diff --git a/loganalytics/highlight_rows_command_descriptor.go b/loganalytics/highlight_rows_command_descriptor.go index b699b2b590..eac525a6b5 100644 --- a/loganalytics/highlight_rows_command_descriptor.go +++ b/loganalytics/highlight_rows_command_descriptor.go @@ -136,7 +136,6 @@ func (m *HighlightRowsCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -149,16 +148,12 @@ func (m *HighlightRowsCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.Color = model.Color m.Keywords = make([]string, len(model.Keywords)) - for i, n := range model.Keywords { - m.Keywords[i] = n - } - + copy(m.Keywords, model.Keywords) m.DisplayQueryString = model.DisplayQueryString m.InternalQueryString = model.InternalQueryString diff --git a/loganalytics/ingest_time_rule.go b/loganalytics/ingest_time_rule.go index 58a36f949e..8e7e254e35 100644 --- a/loganalytics/ingest_time_rule.go +++ b/loganalytics/ingest_time_rule.go @@ -135,7 +135,6 @@ func (m *IngestTimeRule) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - m.Id = model.Id m.CompartmentId = model.CompartmentId diff --git a/loganalytics/json_extract_command_descriptor.go b/loganalytics/json_extract_command_descriptor.go index b4adca529b..5c53546761 100644 --- a/loganalytics/json_extract_command_descriptor.go +++ b/loganalytics/json_extract_command_descriptor.go @@ -128,7 +128,6 @@ func (m *JsonExtractCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *JsonExtractCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/link_command_descriptor.go b/loganalytics/link_command_descriptor.go index e64a9a3c7d..bcdd43656d 100644 --- a/loganalytics/link_command_descriptor.go +++ b/loganalytics/link_command_descriptor.go @@ -140,7 +140,6 @@ func (m *LinkCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -153,7 +152,6 @@ func (m *LinkCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.ShouldIncludeNulls = model.ShouldIncludeNulls diff --git a/loganalytics/link_details_command_descriptor.go b/loganalytics/link_details_command_descriptor.go index 54c8ac640d..8d350a7ba1 100644 --- a/loganalytics/link_details_command_descriptor.go +++ b/loganalytics/link_details_command_descriptor.go @@ -128,7 +128,6 @@ func (m *LinkDetailsCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *LinkDetailsCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/log_analytics_source.go b/loganalytics/log_analytics_source.go index 46bea2b5e8..d260028dce 100644 --- a/loganalytics/log_analytics_source.go +++ b/loganalytics/log_analytics_source.go @@ -205,63 +205,33 @@ func (m *LogAnalyticsSource) UnmarshalJSON(data []byte) (e error) { } var nn interface{} m.LabelConditions = make([]LogAnalyticsSourceLabelCondition, len(model.LabelConditions)) - for i, n := range model.LabelConditions { - m.LabelConditions[i] = n - } - + copy(m.LabelConditions, model.LabelConditions) m.AssociationCount = model.AssociationCount m.AssociationEntity = make([]LogAnalyticsAssociation, len(model.AssociationEntity)) - for i, n := range model.AssociationEntity { - m.AssociationEntity[i] = n - } - + copy(m.AssociationEntity, model.AssociationEntity) m.DataFilterDefinitions = make([]LogAnalyticsSourceDataFilter, len(model.DataFilterDefinitions)) - for i, n := range model.DataFilterDefinitions { - m.DataFilterDefinitions[i] = n - } - + copy(m.DataFilterDefinitions, model.DataFilterDefinitions) m.DatabaseCredential = model.DatabaseCredential m.ExtendedFieldDefinitions = make([]LogAnalyticsSourceExtendedFieldDefinition, len(model.ExtendedFieldDefinitions)) - for i, n := range model.ExtendedFieldDefinitions { - m.ExtendedFieldDefinitions[i] = n - } - + copy(m.ExtendedFieldDefinitions, model.ExtendedFieldDefinitions) m.IsForCloud = model.IsForCloud m.Labels = make([]LogAnalyticsLabelView, len(model.Labels)) - for i, n := range model.Labels { - m.Labels[i] = n - } - + copy(m.Labels, model.Labels) m.MetricDefinitions = make([]LogAnalyticsMetric, len(model.MetricDefinitions)) - for i, n := range model.MetricDefinitions { - m.MetricDefinitions[i] = n - } - + copy(m.MetricDefinitions, model.MetricDefinitions) m.Metrics = make([]LogAnalyticsSourceMetric, len(model.Metrics)) - for i, n := range model.Metrics { - m.Metrics[i] = n - } - + copy(m.Metrics, model.Metrics) m.OobParsers = make([]LogAnalyticsParser, len(model.OobParsers)) - for i, n := range model.OobParsers { - m.OobParsers[i] = n - } - + copy(m.OobParsers, model.OobParsers) m.Parameters = make([]LogAnalyticsParameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.PatternCount = model.PatternCount m.Patterns = make([]LogAnalyticsSourcePattern, len(model.Patterns)) - for i, n := range model.Patterns { - m.Patterns[i] = n - } - + copy(m.Patterns, model.Patterns) m.Description = model.Description m.DisplayName = model.DisplayName @@ -269,10 +239,7 @@ func (m *LogAnalyticsSource) UnmarshalJSON(data []byte) (e error) { m.EditVersion = model.EditVersion m.Functions = make([]LogAnalyticsSourceFunction, len(model.Functions)) - for i, n := range model.Functions { - m.Functions[i] = n - } - + copy(m.Functions, model.Functions) m.SourceId = model.SourceId m.Name = model.Name @@ -282,10 +249,7 @@ func (m *LogAnalyticsSource) UnmarshalJSON(data []byte) (e error) { m.IsSystem = model.IsSystem m.Parsers = make([]LogAnalyticsParser, len(model.Parsers)) - for i, n := range model.Parsers { - m.Parsers[i] = n - } - + copy(m.Parsers, model.Parsers) m.IsAutoAssociationEnabled = model.IsAutoAssociationEnabled m.IsAutoAssociationOverride = model.IsAutoAssociationOverride @@ -299,39 +263,21 @@ func (m *LogAnalyticsSource) UnmarshalJSON(data []byte) (e error) { m.WarningConfig = model.WarningConfig m.MetadataFields = make([]LogAnalyticsSourceMetadataField, len(model.MetadataFields)) - for i, n := range model.MetadataFields { - m.MetadataFields[i] = n - } - + copy(m.MetadataFields, model.MetadataFields) m.LabelDefinitions = make([]LogAnalyticsLabelDefinition, len(model.LabelDefinitions)) - for i, n := range model.LabelDefinitions { - m.LabelDefinitions[i] = n - } - + copy(m.LabelDefinitions, model.LabelDefinitions) m.EntityTypes = make([]LogAnalyticsSourceEntityType, len(model.EntityTypes)) - for i, n := range model.EntityTypes { - m.EntityTypes[i] = n - } - + copy(m.EntityTypes, model.EntityTypes) m.IsTimezoneOverride = model.IsTimezoneOverride m.UserParsers = make([]LogAnalyticsParser, len(model.UserParsers)) - for i, n := range model.UserParsers { - m.UserParsers[i] = n - } - + copy(m.UserParsers, model.UserParsers) m.TimeUpdated = model.TimeUpdated m.EventTypes = make([]EventType, len(model.EventTypes)) - for i, n := range model.EventTypes { - m.EventTypes[i] = n - } - + copy(m.EventTypes, model.EventTypes) m.Categories = make([]LogAnalyticsCategory, len(model.Categories)) - for i, n := range model.Categories { - m.Categories[i] = n - } - + copy(m.Categories, model.Categories) m.Endpoints = make([]LogAnalyticsEndpoint, len(model.Endpoints)) for i, n := range model.Endpoints { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -344,11 +290,7 @@ func (m *LogAnalyticsSource) UnmarshalJSON(data []byte) (e error) { m.Endpoints[i] = nil } } - m.SourceProperties = make([]LogAnalyticsProperty, len(model.SourceProperties)) - for i, n := range model.SourceProperties { - m.SourceProperties[i] = n - } - + copy(m.SourceProperties, model.SourceProperties) return } diff --git a/loganalytics/log_analytics_source_summary.go b/loganalytics/log_analytics_source_summary.go index 905fcd7c13..fc5078385b 100644 --- a/loganalytics/log_analytics_source_summary.go +++ b/loganalytics/log_analytics_source_summary.go @@ -196,63 +196,33 @@ func (m *LogAnalyticsSourceSummary) UnmarshalJSON(data []byte) (e error) { } var nn interface{} m.LabelConditions = make([]LogAnalyticsSourceLabelCondition, len(model.LabelConditions)) - for i, n := range model.LabelConditions { - m.LabelConditions[i] = n - } - + copy(m.LabelConditions, model.LabelConditions) m.AssociationCount = model.AssociationCount m.AssociationEntity = make([]LogAnalyticsAssociation, len(model.AssociationEntity)) - for i, n := range model.AssociationEntity { - m.AssociationEntity[i] = n - } - + copy(m.AssociationEntity, model.AssociationEntity) m.DataFilterDefinitions = make([]LogAnalyticsSourceDataFilter, len(model.DataFilterDefinitions)) - for i, n := range model.DataFilterDefinitions { - m.DataFilterDefinitions[i] = n - } - + copy(m.DataFilterDefinitions, model.DataFilterDefinitions) m.DatabaseCredential = model.DatabaseCredential m.ExtendedFieldDefinitions = make([]LogAnalyticsSourceExtendedFieldDefinition, len(model.ExtendedFieldDefinitions)) - for i, n := range model.ExtendedFieldDefinitions { - m.ExtendedFieldDefinitions[i] = n - } - + copy(m.ExtendedFieldDefinitions, model.ExtendedFieldDefinitions) m.IsForCloud = model.IsForCloud m.Labels = make([]LogAnalyticsLabelView, len(model.Labels)) - for i, n := range model.Labels { - m.Labels[i] = n - } - + copy(m.Labels, model.Labels) m.MetricDefinitions = make([]LogAnalyticsMetric, len(model.MetricDefinitions)) - for i, n := range model.MetricDefinitions { - m.MetricDefinitions[i] = n - } - + copy(m.MetricDefinitions, model.MetricDefinitions) m.Metrics = make([]LogAnalyticsSourceMetric, len(model.Metrics)) - for i, n := range model.Metrics { - m.Metrics[i] = n - } - + copy(m.Metrics, model.Metrics) m.OobParsers = make([]LogAnalyticsParser, len(model.OobParsers)) - for i, n := range model.OobParsers { - m.OobParsers[i] = n - } - + copy(m.OobParsers, model.OobParsers) m.Parameters = make([]LogAnalyticsParameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.PatternCount = model.PatternCount m.Patterns = make([]LogAnalyticsSourcePattern, len(model.Patterns)) - for i, n := range model.Patterns { - m.Patterns[i] = n - } - + copy(m.Patterns, model.Patterns) m.Description = model.Description m.DisplayName = model.DisplayName @@ -260,10 +230,7 @@ func (m *LogAnalyticsSourceSummary) UnmarshalJSON(data []byte) (e error) { m.EditVersion = model.EditVersion m.Functions = make([]LogAnalyticsSourceFunction, len(model.Functions)) - for i, n := range model.Functions { - m.Functions[i] = n - } - + copy(m.Functions, model.Functions) m.SourceId = model.SourceId m.Name = model.Name @@ -273,10 +240,7 @@ func (m *LogAnalyticsSourceSummary) UnmarshalJSON(data []byte) (e error) { m.IsSystem = model.IsSystem m.Parsers = make([]LogAnalyticsParser, len(model.Parsers)) - for i, n := range model.Parsers { - m.Parsers[i] = n - } - + copy(m.Parsers, model.Parsers) m.IsAutoAssociationEnabled = model.IsAutoAssociationEnabled m.IsAutoAssociationOverride = model.IsAutoAssociationOverride @@ -290,27 +254,15 @@ func (m *LogAnalyticsSourceSummary) UnmarshalJSON(data []byte) (e error) { m.WarningConfig = model.WarningConfig m.MetadataFields = make([]LogAnalyticsSourceMetadataField, len(model.MetadataFields)) - for i, n := range model.MetadataFields { - m.MetadataFields[i] = n - } - + copy(m.MetadataFields, model.MetadataFields) m.LabelDefinitions = make([]LogAnalyticsLabelDefinition, len(model.LabelDefinitions)) - for i, n := range model.LabelDefinitions { - m.LabelDefinitions[i] = n - } - + copy(m.LabelDefinitions, model.LabelDefinitions) m.EntityTypes = make([]LogAnalyticsSourceEntityType, len(model.EntityTypes)) - for i, n := range model.EntityTypes { - m.EntityTypes[i] = n - } - + copy(m.EntityTypes, model.EntityTypes) m.IsTimezoneOverride = model.IsTimezoneOverride m.UserParsers = make([]LogAnalyticsParser, len(model.UserParsers)) - for i, n := range model.UserParsers { - m.UserParsers[i] = n - } - + copy(m.UserParsers, model.UserParsers) m.TimeUpdated = model.TimeUpdated m.Endpoints = make([]LogAnalyticsEndpoint, len(model.Endpoints)) @@ -325,11 +277,7 @@ func (m *LogAnalyticsSourceSummary) UnmarshalJSON(data []byte) (e error) { m.Endpoints[i] = nil } } - m.SourceProperties = make([]LogAnalyticsProperty, len(model.SourceProperties)) - for i, n := range model.SourceProperties { - m.SourceProperties[i] = n - } - + copy(m.SourceProperties, model.SourceProperties) return } diff --git a/loganalytics/loganalytics_client.go b/loganalytics/loganalytics_client.go index bb4b595c23..2669da5067 100644 --- a/loganalytics/loganalytics_client.go +++ b/loganalytics/loganalytics_client.go @@ -80,7 +80,7 @@ func (client *LogAnalyticsClient) setConfigurationProvider(configProvider common 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/loganalytics/lookup_command_descriptor.go b/loganalytics/lookup_command_descriptor.go index 608544c026..f3b6bf408f 100644 --- a/loganalytics/lookup_command_descriptor.go +++ b/loganalytics/lookup_command_descriptor.go @@ -128,7 +128,6 @@ func (m *LookupCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *LookupCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/macro_command_descriptor.go b/loganalytics/macro_command_descriptor.go index 13162e8641..1ae71e98e7 100644 --- a/loganalytics/macro_command_descriptor.go +++ b/loganalytics/macro_command_descriptor.go @@ -128,7 +128,6 @@ func (m *MacroCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *MacroCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/map_command_descriptor.go b/loganalytics/map_command_descriptor.go index 15be088e40..ca9f22aea3 100644 --- a/loganalytics/map_command_descriptor.go +++ b/loganalytics/map_command_descriptor.go @@ -128,7 +128,6 @@ func (m *MapCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *MapCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/module_command_descriptor.go b/loganalytics/module_command_descriptor.go index d643fe2a55..18c5a5c7a2 100644 --- a/loganalytics/module_command_descriptor.go +++ b/loganalytics/module_command_descriptor.go @@ -128,7 +128,6 @@ func (m *ModuleCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *ModuleCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/multi_search_command_descriptor.go b/loganalytics/multi_search_command_descriptor.go index eeeb9f0096..b714737dea 100644 --- a/loganalytics/multi_search_command_descriptor.go +++ b/loganalytics/multi_search_command_descriptor.go @@ -132,7 +132,6 @@ func (m *MultiSearchCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -145,14 +144,10 @@ func (m *MultiSearchCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.SubQueries = make([]ParseQueryOutput, len(model.SubQueries)) - for i, n := range model.SubQueries { - m.SubQueries[i] = n - } - + copy(m.SubQueries, model.SubQueries) m.DisplayQueryString = model.DisplayQueryString m.InternalQueryString = model.InternalQueryString diff --git a/loganalytics/nlp_command_descriptor.go b/loganalytics/nlp_command_descriptor.go index 240027326f..240ccf7efc 100644 --- a/loganalytics/nlp_command_descriptor.go +++ b/loganalytics/nlp_command_descriptor.go @@ -128,7 +128,6 @@ func (m *NlpCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *NlpCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/outlier_command_descriptor.go b/loganalytics/outlier_command_descriptor.go index f294f9770a..4683d7ff50 100644 --- a/loganalytics/outlier_command_descriptor.go +++ b/loganalytics/outlier_command_descriptor.go @@ -128,7 +128,6 @@ func (m *OutlierCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *OutlierCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/parse_query_output.go b/loganalytics/parse_query_output.go index d45c626a47..9773b44c4a 100644 --- a/loganalytics/parse_query_output.go +++ b/loganalytics/parse_query_output.go @@ -78,7 +78,6 @@ func (m *ParseQueryOutput) UnmarshalJSON(data []byte) (e error) { m.Columns[i] = nil } } - m.ResponseTimeInMs = model.ResponseTimeInMs m.Commands = make([]AbstractCommandDescriptor, len(model.Commands)) @@ -93,7 +92,6 @@ func (m *ParseQueryOutput) UnmarshalJSON(data []byte) (e error) { m.Commands[i] = nil } } - m.DisplayQueryString = model.DisplayQueryString m.InternalQueryString = model.InternalQueryString diff --git a/loganalytics/query_aggregation.go b/loganalytics/query_aggregation.go index a35ae7d1e0..3b9d098225 100644 --- a/loganalytics/query_aggregation.go +++ b/loganalytics/query_aggregation.go @@ -108,7 +108,6 @@ func (m *QueryAggregation) UnmarshalJSON(data []byte) (e error) { m.Columns[i] = nil } } - m.Fields = make([]AbstractColumn, len(model.Fields)) for i, n := range model.Fields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -121,12 +120,8 @@ func (m *QueryAggregation) UnmarshalJSON(data []byte) (e error) { m.Fields[i] = nil } } - m.Items = make([]map[string]interface{}, len(model.Items)) - for i, n := range model.Items { - m.Items[i] = n - } - + copy(m.Items, model.Items) m.QueryExecutionTimeInMs = model.QueryExecutionTimeInMs m.PercentComplete = model.PercentComplete diff --git a/loganalytics/rare_command_descriptor.go b/loganalytics/rare_command_descriptor.go index 536267e005..ecc7a4bcfd 100644 --- a/loganalytics/rare_command_descriptor.go +++ b/loganalytics/rare_command_descriptor.go @@ -128,7 +128,6 @@ func (m *RareCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *RareCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/regex_command_descriptor.go b/loganalytics/regex_command_descriptor.go index c30a546567..543f3bf046 100644 --- a/loganalytics/regex_command_descriptor.go +++ b/loganalytics/regex_command_descriptor.go @@ -128,7 +128,6 @@ func (m *RegexCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *RegexCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/rename_command_descriptor.go b/loganalytics/rename_command_descriptor.go index e16ffd2df2..85e9e48be5 100644 --- a/loganalytics/rename_command_descriptor.go +++ b/loganalytics/rename_command_descriptor.go @@ -128,7 +128,6 @@ func (m *RenameCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *RenameCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/schedule.go b/loganalytics/schedule.go index bb7276f61e..d7b04982d9 100644 --- a/loganalytics/schedule.go +++ b/loganalytics/schedule.go @@ -75,12 +75,12 @@ func (m *schedule) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetMisfirePolicy returns MisfirePolicy +// GetMisfirePolicy returns MisfirePolicy func (m schedule) GetMisfirePolicy() ScheduleMisfirePolicyEnum { return m.MisfirePolicy } -//GetTimeOfFirstExecution returns TimeOfFirstExecution +// GetTimeOfFirstExecution returns TimeOfFirstExecution func (m schedule) GetTimeOfFirstExecution() *common.SDKTime { return m.TimeOfFirstExecution } diff --git a/loganalytics/scheduled_task.go b/loganalytics/scheduled_task.go index 6e318f7ed0..3546728d6f 100644 --- a/loganalytics/scheduled_task.go +++ b/loganalytics/scheduled_task.go @@ -75,22 +75,22 @@ type ScheduledTask interface { type scheduledtask struct { JsonData []byte + TaskStatus ScheduledTaskTaskStatusEnum `mandatory:"false" json:"taskStatus,omitempty"` + PauseReason ScheduledTaskPauseReasonEnum `mandatory:"false" json:"pauseReason,omitempty"` + WorkRequestId *string `mandatory:"false" json:"workRequestId"` + NumOccurrences *int64 `mandatory:"false" json:"numOccurrences"` + TimeOfNextExecution *common.SDKTime `mandatory:"false" json:"timeOfNextExecution"` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` Id *string `mandatory:"true" json:"id"` DisplayName *string `mandatory:"true" json:"displayName"` TaskType TaskTypeEnum `mandatory:"true" json:"taskType"` Schedules json.RawMessage `mandatory:"true" json:"schedules"` - Action Action `mandatory:"true" json:"action"` + Action action `mandatory:"true" json:"action"` CompartmentId *string `mandatory:"true" json:"compartmentId"` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` LifecycleState ScheduledTaskLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - TaskStatus ScheduledTaskTaskStatusEnum `mandatory:"false" json:"taskStatus,omitempty"` - PauseReason ScheduledTaskPauseReasonEnum `mandatory:"false" json:"pauseReason,omitempty"` - WorkRequestId *string `mandatory:"false" json:"workRequestId"` - NumOccurrences *int64 `mandatory:"false" json:"numOccurrences"` - TimeOfNextExecution *common.SDKTime `mandatory:"false" json:"timeOfNextExecution"` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` Kind string `json:"kind"` } @@ -145,86 +145,86 @@ func (m *scheduledtask) UnmarshalPolymorphicJSON(data []byte) (interface{}, erro } } -//GetId returns Id +// GetTaskStatus returns TaskStatus +func (m scheduledtask) GetTaskStatus() ScheduledTaskTaskStatusEnum { + return m.TaskStatus +} + +// GetPauseReason returns PauseReason +func (m scheduledtask) GetPauseReason() ScheduledTaskPauseReasonEnum { + return m.PauseReason +} + +// GetWorkRequestId returns WorkRequestId +func (m scheduledtask) GetWorkRequestId() *string { + return m.WorkRequestId +} + +// GetNumOccurrences returns NumOccurrences +func (m scheduledtask) GetNumOccurrences() *int64 { + return m.NumOccurrences +} + +// GetTimeOfNextExecution returns TimeOfNextExecution +func (m scheduledtask) GetTimeOfNextExecution() *common.SDKTime { + return m.TimeOfNextExecution +} + +// GetFreeformTags returns FreeformTags +func (m scheduledtask) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m scheduledtask) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetId returns Id func (m scheduledtask) GetId() *string { return m.Id } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m scheduledtask) GetDisplayName() *string { return m.DisplayName } -//GetTaskType returns TaskType +// GetTaskType returns TaskType func (m scheduledtask) GetTaskType() TaskTypeEnum { return m.TaskType } -//GetSchedules returns Schedules +// GetSchedules returns Schedules func (m scheduledtask) GetSchedules() json.RawMessage { return m.Schedules } -//GetAction returns Action -func (m scheduledtask) GetAction() Action { +// GetAction returns Action +func (m scheduledtask) GetAction() action { return m.Action } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m scheduledtask) GetCompartmentId() *string { return m.CompartmentId } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m scheduledtask) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m scheduledtask) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m scheduledtask) GetLifecycleState() ScheduledTaskLifecycleStateEnum { return m.LifecycleState } -//GetTaskStatus returns TaskStatus -func (m scheduledtask) GetTaskStatus() ScheduledTaskTaskStatusEnum { - return m.TaskStatus -} - -//GetPauseReason returns PauseReason -func (m scheduledtask) GetPauseReason() ScheduledTaskPauseReasonEnum { - return m.PauseReason -} - -//GetWorkRequestId returns WorkRequestId -func (m scheduledtask) GetWorkRequestId() *string { - return m.WorkRequestId -} - -//GetNumOccurrences returns NumOccurrences -func (m scheduledtask) GetNumOccurrences() *int64 { - return m.NumOccurrences -} - -//GetTimeOfNextExecution returns TimeOfNextExecution -func (m scheduledtask) GetTimeOfNextExecution() *common.SDKTime { - return m.TimeOfNextExecution -} - -//GetFreeformTags returns FreeformTags -func (m scheduledtask) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m scheduledtask) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - func (m scheduledtask) String() string { return common.PointerString(m) } diff --git a/loganalytics/search_command_descriptor.go b/loganalytics/search_command_descriptor.go index e6ad231912..9f156a964a 100644 --- a/loganalytics/search_command_descriptor.go +++ b/loganalytics/search_command_descriptor.go @@ -132,7 +132,6 @@ func (m *SearchCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -145,14 +144,10 @@ func (m *SearchCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.SubQueries = make([]ParseQueryOutput, len(model.SubQueries)) - for i, n := range model.SubQueries { - m.SubQueries[i] = n - } - + copy(m.SubQueries, model.SubQueries) m.DisplayQueryString = model.DisplayQueryString m.InternalQueryString = model.InternalQueryString diff --git a/loganalytics/search_lookup_command_descriptor.go b/loganalytics/search_lookup_command_descriptor.go index 7d1d4fff45..1e95cb8084 100644 --- a/loganalytics/search_lookup_command_descriptor.go +++ b/loganalytics/search_lookup_command_descriptor.go @@ -128,7 +128,6 @@ func (m *SearchLookupCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *SearchLookupCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/sort_command_descriptor.go b/loganalytics/sort_command_descriptor.go index 1055de7da2..42e9f382ef 100644 --- a/loganalytics/sort_command_descriptor.go +++ b/loganalytics/sort_command_descriptor.go @@ -128,7 +128,6 @@ func (m *SortCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *SortCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/standard_task.go b/loganalytics/standard_task.go index cb2e0f6441..d16f6432f4 100644 --- a/loganalytics/standard_task.go +++ b/loganalytics/standard_task.go @@ -268,7 +268,6 @@ func (m *StandardTask) UnmarshalJSON(data []byte) (e error) { m.Schedules[i] = nil } } - nn, e = model.Action.UnmarshalPolymorphicJSON(model.Action.JsonData) if e != nil { return diff --git a/loganalytics/stats_command_descriptor.go b/loganalytics/stats_command_descriptor.go index c11685989d..7ea9d15b76 100644 --- a/loganalytics/stats_command_descriptor.go +++ b/loganalytics/stats_command_descriptor.go @@ -136,7 +136,6 @@ func (m *StatsCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -149,7 +148,6 @@ func (m *StatsCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.GroupByFields = make([]AbstractField, len(model.GroupByFields)) @@ -164,12 +162,8 @@ func (m *StatsCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.GroupByFields[i] = nil } } - m.Functions = make([]FunctionField, len(model.Functions)) - for i, n := range model.Functions { - m.Functions[i] = n - } - + copy(m.Functions, model.Functions) m.DisplayQueryString = model.DisplayQueryString m.InternalQueryString = model.InternalQueryString diff --git a/loganalytics/table_column.go b/loganalytics/table_column.go index 0a4b7f82d5..8500232e77 100644 --- a/loganalytics/table_column.go +++ b/loganalytics/table_column.go @@ -178,10 +178,7 @@ func (m *TableColumn) UnmarshalJSON(data []byte) (e error) { m.SubSystem = model.SubSystem m.Values = make([]FieldValue, len(model.Values)) - for i, n := range model.Values { - m.Values[i] = n - } - + copy(m.Values, model.Values) m.IsListOfValues = model.IsListOfValues m.IsMultiValued = model.IsMultiValued @@ -210,11 +207,7 @@ func (m *TableColumn) UnmarshalJSON(data []byte) (e error) { m.Columns[i] = nil } } - m.Result = make([]map[string]interface{}, len(model.Result)) - for i, n := range model.Result { - m.Result[i] = n - } - + copy(m.Result, model.Result) return } diff --git a/loganalytics/tail_command_descriptor.go b/loganalytics/tail_command_descriptor.go index 83bb8583bf..50b4a6ea9d 100644 --- a/loganalytics/tail_command_descriptor.go +++ b/loganalytics/tail_command_descriptor.go @@ -132,7 +132,6 @@ func (m *TailCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -145,7 +144,6 @@ func (m *TailCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.Limit = model.Limit diff --git a/loganalytics/time_cluster_column.go b/loganalytics/time_cluster_column.go index 38717fda97..be26b3bea6 100644 --- a/loganalytics/time_cluster_column.go +++ b/loganalytics/time_cluster_column.go @@ -190,10 +190,7 @@ func (m *TimeClusterColumn) UnmarshalJSON(data []byte) (e error) { m.SubSystem = model.SubSystem m.Values = make([]FieldValue, len(model.Values)) - for i, n := range model.Values { - m.Values[i] = n - } - + copy(m.Values, model.Values) m.IsListOfValues = model.IsListOfValues m.IsMultiValued = model.IsMultiValued @@ -213,10 +210,7 @@ func (m *TimeClusterColumn) UnmarshalJSON(data []byte) (e error) { m.IntervalGap = model.IntervalGap m.Intervals = make([]int64, len(model.Intervals)) - for i, n := range model.Intervals { - m.Intervals[i] = n - } - + copy(m.Intervals, model.Intervals) m.GroupByColumns = make([]AbstractColumn, len(model.GroupByColumns)) for i, n := range model.GroupByColumns { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -229,13 +223,9 @@ func (m *TimeClusterColumn) UnmarshalJSON(data []byte) (e error) { m.GroupByColumns[i] = nil } } - m.Clusters = model.Clusters m.Series = make([]TimeClusterDataColumn, len(model.Series)) - for i, n := range model.Series { - m.Series[i] = n - } - + copy(m.Series, model.Series) return } diff --git a/loganalytics/time_cluster_command_descriptor.go b/loganalytics/time_cluster_command_descriptor.go index a57a69fbe2..a8cd7d668b 100644 --- a/loganalytics/time_cluster_command_descriptor.go +++ b/loganalytics/time_cluster_command_descriptor.go @@ -144,7 +144,6 @@ func (m *TimeClusterCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -157,7 +156,6 @@ func (m *TimeClusterCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden nn, e = model.Time.UnmarshalPolymorphicJSON(model.Time.JsonData) @@ -184,12 +182,8 @@ func (m *TimeClusterCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.GroupByFields[i] = nil } } - m.Functions = make([]FunctionField, len(model.Functions)) - for i, n := range model.Functions { - m.Functions[i] = n - } - + copy(m.Functions, model.Functions) m.DisplayQueryString = model.DisplayQueryString m.InternalQueryString = model.InternalQueryString diff --git a/loganalytics/time_cluster_data_column.go b/loganalytics/time_cluster_data_column.go index 01e6b2e3ab..865bdcfbcd 100644 --- a/loganalytics/time_cluster_data_column.go +++ b/loganalytics/time_cluster_data_column.go @@ -178,10 +178,7 @@ func (m *TimeClusterDataColumn) UnmarshalJSON(data []byte) (e error) { m.SubSystem = model.SubSystem m.Values = make([]FieldValue, len(model.Values)) - for i, n := range model.Values { - m.Values[i] = n - } - + copy(m.Values, model.Values) m.IsListOfValues = model.IsListOfValues m.IsMultiValued = model.IsMultiValued @@ -210,11 +207,7 @@ func (m *TimeClusterDataColumn) UnmarshalJSON(data []byte) (e error) { m.Columns[i] = nil } } - m.Result = make([]map[string]interface{}, len(model.Result)) - for i, n := range model.Result { - m.Result[i] = n - } - + copy(m.Result, model.Result) return } diff --git a/loganalytics/time_compare_command_descriptor.go b/loganalytics/time_compare_command_descriptor.go index fa9d4bbe2d..1aa8d04582 100644 --- a/loganalytics/time_compare_command_descriptor.go +++ b/loganalytics/time_compare_command_descriptor.go @@ -128,7 +128,6 @@ func (m *TimeCompareCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *TimeCompareCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/time_stats_command_descriptor.go b/loganalytics/time_stats_command_descriptor.go index cb240b1d24..f4eb818458 100644 --- a/loganalytics/time_stats_command_descriptor.go +++ b/loganalytics/time_stats_command_descriptor.go @@ -144,7 +144,6 @@ func (m *TimeStatsCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -157,7 +156,6 @@ func (m *TimeStatsCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden nn, e = model.Time.UnmarshalPolymorphicJSON(model.Time.JsonData) @@ -184,12 +182,8 @@ func (m *TimeStatsCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.GroupByFields[i] = nil } } - m.Functions = make([]FunctionField, len(model.Functions)) - for i, n := range model.Functions { - m.Functions[i] = n - } - + copy(m.Functions, model.Functions) m.DisplayQueryString = model.DisplayQueryString m.InternalQueryString = model.InternalQueryString diff --git a/loganalytics/time_stats_data_column.go b/loganalytics/time_stats_data_column.go index 0fbc9410a0..3f74dd9b97 100644 --- a/loganalytics/time_stats_data_column.go +++ b/loganalytics/time_stats_data_column.go @@ -190,10 +190,7 @@ func (m *TimeStatsDataColumn) UnmarshalJSON(data []byte) (e error) { m.SubSystem = model.SubSystem m.Values = make([]FieldValue, len(model.Values)) - for i, n := range model.Values { - m.Values[i] = n - } - + copy(m.Values, model.Values) m.IsListOfValues = model.IsListOfValues m.IsMultiValued = model.IsMultiValued @@ -222,12 +219,8 @@ func (m *TimeStatsDataColumn) UnmarshalJSON(data []byte) (e error) { m.Columns[i] = nil } } - m.Result = make([]map[string]interface{}, len(model.Result)) - for i, n := range model.Result { - m.Result[i] = n - } - + copy(m.Result, model.Result) m.ResultCount = model.ResultCount m.TotalCount = model.TotalCount diff --git a/loganalytics/top_command_descriptor.go b/loganalytics/top_command_descriptor.go index 96204519c9..3fd0eeac47 100644 --- a/loganalytics/top_command_descriptor.go +++ b/loganalytics/top_command_descriptor.go @@ -132,7 +132,6 @@ func (m *TopCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -145,7 +144,6 @@ func (m *TopCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.Limit = model.Limit diff --git a/loganalytics/update_scheduled_task_details.go b/loganalytics/update_scheduled_task_details.go index 4ac4da23ea..6bc9e03cab 100644 --- a/loganalytics/update_scheduled_task_details.go +++ b/loganalytics/update_scheduled_task_details.go @@ -86,22 +86,22 @@ func (m *updatescheduledtaskdetails) UnmarshalPolymorphicJSON(data []byte) (inte } } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m updatescheduledtaskdetails) GetDisplayName() *string { return m.DisplayName } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updatescheduledtaskdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updatescheduledtaskdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSchedules returns Schedules +// GetSchedules returns Schedules func (m updatescheduledtaskdetails) GetSchedules() json.RawMessage { return m.Schedules } diff --git a/loganalytics/update_standard_task_details.go b/loganalytics/update_standard_task_details.go index ca09a0e1c6..0d16152b34 100644 --- a/loganalytics/update_standard_task_details.go +++ b/loganalytics/update_standard_task_details.go @@ -123,7 +123,6 @@ func (m *UpdateStandardTaskDetails) UnmarshalJSON(data []byte) (e error) { m.Schedules[i] = nil } } - nn, e = model.Action.UnmarshalPolymorphicJSON(model.Action.JsonData) if e != nil { return diff --git a/loganalytics/upsert_log_analytics_source_details.go b/loganalytics/upsert_log_analytics_source_details.go index f267ddb6de..0cb371fdb9 100644 --- a/loganalytics/upsert_log_analytics_source_details.go +++ b/loganalytics/upsert_log_analytics_source_details.go @@ -173,54 +173,27 @@ func (m *UpsertLogAnalyticsSourceDetails) UnmarshalJSON(data []byte) (e error) { } var nn interface{} m.LabelConditions = make([]LogAnalyticsSourceLabelCondition, len(model.LabelConditions)) - for i, n := range model.LabelConditions { - m.LabelConditions[i] = n - } - + copy(m.LabelConditions, model.LabelConditions) m.DataFilterDefinitions = make([]LogAnalyticsSourceDataFilter, len(model.DataFilterDefinitions)) - for i, n := range model.DataFilterDefinitions { - m.DataFilterDefinitions[i] = n - } - + copy(m.DataFilterDefinitions, model.DataFilterDefinitions) m.DatabaseCredential = model.DatabaseCredential m.ExtendedFieldDefinitions = make([]LogAnalyticsSourceExtendedFieldDefinition, len(model.ExtendedFieldDefinitions)) - for i, n := range model.ExtendedFieldDefinitions { - m.ExtendedFieldDefinitions[i] = n - } - + copy(m.ExtendedFieldDefinitions, model.ExtendedFieldDefinitions) m.IsForCloud = model.IsForCloud m.Labels = make([]LogAnalyticsLabelView, len(model.Labels)) - for i, n := range model.Labels { - m.Labels[i] = n - } - + copy(m.Labels, model.Labels) m.MetricDefinitions = make([]LogAnalyticsMetric, len(model.MetricDefinitions)) - for i, n := range model.MetricDefinitions { - m.MetricDefinitions[i] = n - } - + copy(m.MetricDefinitions, model.MetricDefinitions) m.Metrics = make([]LogAnalyticsSourceMetric, len(model.Metrics)) - for i, n := range model.Metrics { - m.Metrics[i] = n - } - + copy(m.Metrics, model.Metrics) m.OobParsers = make([]LogAnalyticsParser, len(model.OobParsers)) - for i, n := range model.OobParsers { - m.OobParsers[i] = n - } - + copy(m.OobParsers, model.OobParsers) m.Parameters = make([]LogAnalyticsParameter, len(model.Parameters)) - for i, n := range model.Parameters { - m.Parameters[i] = n - } - + copy(m.Parameters, model.Parameters) m.Patterns = make([]LogAnalyticsSourcePattern, len(model.Patterns)) - for i, n := range model.Patterns { - m.Patterns[i] = n - } - + copy(m.Patterns, model.Patterns) m.Description = model.Description m.DisplayName = model.DisplayName @@ -228,10 +201,7 @@ func (m *UpsertLogAnalyticsSourceDetails) UnmarshalJSON(data []byte) (e error) { m.EditVersion = model.EditVersion m.Functions = make([]LogAnalyticsSourceFunction, len(model.Functions)) - for i, n := range model.Functions { - m.Functions[i] = n - } - + copy(m.Functions, model.Functions) m.SourceId = model.SourceId m.Name = model.Name @@ -241,10 +211,7 @@ func (m *UpsertLogAnalyticsSourceDetails) UnmarshalJSON(data []byte) (e error) { m.IsSystem = model.IsSystem m.Parsers = make([]LogAnalyticsParser, len(model.Parsers)) - for i, n := range model.Parsers { - m.Parsers[i] = n - } - + copy(m.Parsers, model.Parsers) m.RuleId = model.RuleId m.TypeName = model.TypeName @@ -252,32 +219,17 @@ func (m *UpsertLogAnalyticsSourceDetails) UnmarshalJSON(data []byte) (e error) { m.WarningConfig = model.WarningConfig m.MetadataFields = make([]LogAnalyticsSourceMetadataField, len(model.MetadataFields)) - for i, n := range model.MetadataFields { - m.MetadataFields[i] = n - } - + copy(m.MetadataFields, model.MetadataFields) m.LabelDefinitions = make([]LogAnalyticsLabelDefinition, len(model.LabelDefinitions)) - for i, n := range model.LabelDefinitions { - m.LabelDefinitions[i] = n - } - + copy(m.LabelDefinitions, model.LabelDefinitions) m.EntityTypes = make([]LogAnalyticsSourceEntityType, len(model.EntityTypes)) - for i, n := range model.EntityTypes { - m.EntityTypes[i] = n - } - + copy(m.EntityTypes, model.EntityTypes) m.IsTimezoneOverride = model.IsTimezoneOverride m.UserParsers = make([]LogAnalyticsParser, len(model.UserParsers)) - for i, n := range model.UserParsers { - m.UserParsers[i] = n - } - + copy(m.UserParsers, model.UserParsers) m.Categories = make([]LogAnalyticsCategory, len(model.Categories)) - for i, n := range model.Categories { - m.Categories[i] = n - } - + copy(m.Categories, model.Categories) m.Endpoints = make([]LogAnalyticsEndpoint, len(model.Endpoints)) for i, n := range model.Endpoints { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -290,11 +242,7 @@ func (m *UpsertLogAnalyticsSourceDetails) UnmarshalJSON(data []byte) (e error) { m.Endpoints[i] = nil } } - m.SourceProperties = make([]LogAnalyticsProperty, len(model.SourceProperties)) - for i, n := range model.SourceProperties { - m.SourceProperties[i] = n - } - + copy(m.SourceProperties, model.SourceProperties) return } diff --git a/loganalytics/where_command_descriptor.go b/loganalytics/where_command_descriptor.go index 689630bcbe..9ec22bdf53 100644 --- a/loganalytics/where_command_descriptor.go +++ b/loganalytics/where_command_descriptor.go @@ -128,7 +128,6 @@ func (m *WhereCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *WhereCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/loganalytics/xml_extract_command_descriptor.go b/loganalytics/xml_extract_command_descriptor.go index b66580e48c..2b80526fa6 100644 --- a/loganalytics/xml_extract_command_descriptor.go +++ b/loganalytics/xml_extract_command_descriptor.go @@ -128,7 +128,6 @@ func (m *XmlExtractCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.ReferencedFields[i] = nil } } - m.DeclaredFields = make([]AbstractField, len(model.DeclaredFields)) for i, n := range model.DeclaredFields { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -141,7 +140,6 @@ func (m *XmlExtractCommandDescriptor) UnmarshalJSON(data []byte) (e error) { m.DeclaredFields[i] = nil } } - m.IsHidden = model.IsHidden m.DisplayQueryString = model.DisplayQueryString diff --git a/logging/logging_loggingmanagement_client.go b/logging/logging_loggingmanagement_client.go index aef0dbe45d..76847b4653 100644 --- a/logging/logging_loggingmanagement_client.go +++ b/logging/logging_loggingmanagement_client.go @@ -83,7 +83,7 @@ func (client *LoggingManagementClient) setConfigurationProvider(configProvider c 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/logging/unified_agent_logging_configuration.go b/logging/unified_agent_logging_configuration.go index 0d3ee60bce..3b458bb77a 100644 --- a/logging/unified_agent_logging_configuration.go +++ b/logging/unified_agent_logging_configuration.go @@ -82,7 +82,6 @@ func (m *UnifiedAgentLoggingConfiguration) UnmarshalJSON(data []byte) (e error) m.Sources[i] = nil } } - m.Destination = model.Destination return diff --git a/logging/unified_agent_logging_source.go b/logging/unified_agent_logging_source.go index 64abb9b364..fee85bde38 100644 --- a/logging/unified_agent_logging_source.go +++ b/logging/unified_agent_logging_source.go @@ -72,7 +72,7 @@ func (m *unifiedagentloggingsource) UnmarshalPolymorphicJSON(data []byte) (inter } } -//GetName returns Name +// GetName returns Name func (m unifiedagentloggingsource) GetName() *string { return m.Name } diff --git a/logging/unified_agent_parser.go b/logging/unified_agent_parser.go index 659a6091d7..6811ae58cf 100644 --- a/logging/unified_agent_parser.go +++ b/logging/unified_agent_parser.go @@ -167,37 +167,37 @@ func (m *unifiedagentparser) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetFieldTimeKey returns FieldTimeKey +// GetFieldTimeKey returns FieldTimeKey func (m unifiedagentparser) GetFieldTimeKey() *string { return m.FieldTimeKey } -//GetTypes returns Types +// GetTypes returns Types func (m unifiedagentparser) GetTypes() map[string]string { return m.Types } -//GetNullValuePattern returns NullValuePattern +// GetNullValuePattern returns NullValuePattern func (m unifiedagentparser) GetNullValuePattern() *string { return m.NullValuePattern } -//GetIsNullEmptyString returns IsNullEmptyString +// GetIsNullEmptyString returns IsNullEmptyString func (m unifiedagentparser) GetIsNullEmptyString() *bool { return m.IsNullEmptyString } -//GetIsEstimateCurrentEvent returns IsEstimateCurrentEvent +// GetIsEstimateCurrentEvent returns IsEstimateCurrentEvent func (m unifiedagentparser) GetIsEstimateCurrentEvent() *bool { return m.IsEstimateCurrentEvent } -//GetIsKeepTimeKey returns IsKeepTimeKey +// GetIsKeepTimeKey returns IsKeepTimeKey func (m unifiedagentparser) GetIsKeepTimeKey() *bool { return m.IsKeepTimeKey } -//GetTimeoutInMilliseconds returns TimeoutInMilliseconds +// GetTimeoutInMilliseconds returns TimeoutInMilliseconds func (m unifiedagentparser) GetTimeoutInMilliseconds() *int { return m.TimeoutInMilliseconds } diff --git a/logging/unified_agent_tail_log_source.go b/logging/unified_agent_tail_log_source.go index ac3b7d1c2f..0df1245085 100644 --- a/logging/unified_agent_tail_log_source.go +++ b/logging/unified_agent_tail_log_source.go @@ -92,9 +92,6 @@ func (m *UnifiedAgentTailLogSource) UnmarshalJSON(data []byte) (e error) { m.Name = model.Name m.Paths = make([]string, len(model.Paths)) - for i, n := range model.Paths { - m.Paths[i] = n - } - + copy(m.Paths, model.Paths) return } diff --git a/loggingingestion/loggingingestion_logging_client.go b/loggingingestion/loggingingestion_logging_client.go index 5ad90a8c46..6d8461b606 100644 --- a/loggingingestion/loggingingestion_logging_client.go +++ b/loggingingestion/loggingingestion_logging_client.go @@ -80,7 +80,7 @@ func (client *LoggingClient) setConfigurationProvider(configProvider common.Conf 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/loggingsearch/loggingsearch_logsearch_client.go b/loggingsearch/loggingsearch_logsearch_client.go index 32ecd31e49..57dc4fef62 100644 --- a/loggingsearch/loggingsearch_logsearch_client.go +++ b/loggingsearch/loggingsearch_logsearch_client.go @@ -80,7 +80,7 @@ func (client *LogSearchClient) setConfigurationProvider(configProvider common.Co 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/managementagent/managementagent_client.go b/managementagent/managementagent_client.go index 609452d2f9..805ecb542f 100644 --- a/managementagent/managementagent_client.go +++ b/managementagent/managementagent_client.go @@ -81,7 +81,7 @@ func (client *ManagementAgentClient) setConfigurationProvider(configProvider com 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/managementdashboard/managementdashboard_dashxapis_client.go b/managementdashboard/managementdashboard_dashxapis_client.go index b13ac8386b..8d4115033d 100644 --- a/managementdashboard/managementdashboard_dashxapis_client.go +++ b/managementdashboard/managementdashboard_dashxapis_client.go @@ -81,7 +81,7 @@ func (client *DashxApisClient) setConfigurationProvider(configProvider common.Co 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/marketplace/create_image_publication_package.go b/marketplace/create_image_publication_package.go index d121319fd0..35d0f7a067 100644 --- a/marketplace/create_image_publication_package.go +++ b/marketplace/create_image_publication_package.go @@ -108,6 +108,5 @@ func (m *CreateImagePublicationPackage) UnmarshalJSON(data []byte) (e error) { m.Eula[i] = nil } } - return } diff --git a/marketplace/create_publication_details.go b/marketplace/create_publication_details.go index 516ac705dd..7daeb3e3e2 100644 --- a/marketplace/create_publication_details.go +++ b/marketplace/create_publication_details.go @@ -105,10 +105,7 @@ func (m *CreatePublicationDetails) UnmarshalJSON(data []byte) (e error) { m.ShortDescription = model.ShortDescription m.SupportContacts = make([]SupportContact, len(model.SupportContacts)) - for i, n := range model.SupportContacts { - m.SupportContacts[i] = n - } - + copy(m.SupportContacts, model.SupportContacts) m.CompartmentId = model.CompartmentId nn, e = model.PackageDetails.UnmarshalPolymorphicJSON(model.PackageDetails.JsonData) diff --git a/marketplace/create_publication_package.go b/marketplace/create_publication_package.go index 7c59e58b0b..a10095ef88 100644 --- a/marketplace/create_publication_package.go +++ b/marketplace/create_publication_package.go @@ -74,17 +74,17 @@ func (m *createpublicationpackage) UnmarshalPolymorphicJSON(data []byte) (interf } } -//GetPackageVersion returns PackageVersion +// GetPackageVersion returns PackageVersion func (m createpublicationpackage) GetPackageVersion() *string { return m.PackageVersion } -//GetOperatingSystem returns OperatingSystem +// GetOperatingSystem returns OperatingSystem func (m createpublicationpackage) GetOperatingSystem() *OperatingSystem { return m.OperatingSystem } -//GetEula returns Eula +// GetEula returns Eula func (m createpublicationpackage) GetEula() json.RawMessage { return m.Eula } diff --git a/marketplace/listing_package.go b/marketplace/listing_package.go index f8cfd28af1..768a5cf8eb 100644 --- a/marketplace/listing_package.go +++ b/marketplace/listing_package.go @@ -46,14 +46,14 @@ type ListingPackage interface { type listingpackage struct { JsonData []byte - ListingId *string `mandatory:"true" json:"listingId"` - Version *string `mandatory:"true" json:"version"` Description *string `mandatory:"false" json:"description"` Pricing *PricingModel `mandatory:"false" json:"pricing"` ResourceId *string `mandatory:"false" json:"resourceId"` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` OperatingSystem *OperatingSystem `mandatory:"false" json:"operatingSystem"` Regions []Region `mandatory:"false" json:"regions"` + ListingId *string `mandatory:"true" json:"listingId"` + Version *string `mandatory:"true" json:"version"` PackageType string `json:"packageType"` } @@ -104,46 +104,46 @@ func (m *listingpackage) UnmarshalPolymorphicJSON(data []byte) (interface{}, err } } -//GetListingId returns ListingId -func (m listingpackage) GetListingId() *string { - return m.ListingId -} - -//GetVersion returns Version -func (m listingpackage) GetVersion() *string { - return m.Version -} - -//GetDescription returns Description +// GetDescription returns Description func (m listingpackage) GetDescription() *string { return m.Description } -//GetPricing returns Pricing +// GetPricing returns Pricing func (m listingpackage) GetPricing() *PricingModel { return m.Pricing } -//GetResourceId returns ResourceId +// GetResourceId returns ResourceId func (m listingpackage) GetResourceId() *string { return m.ResourceId } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m listingpackage) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetOperatingSystem returns OperatingSystem +// GetOperatingSystem returns OperatingSystem func (m listingpackage) GetOperatingSystem() *OperatingSystem { return m.OperatingSystem } -//GetRegions returns Regions +// GetRegions returns Regions func (m listingpackage) GetRegions() []Region { return m.Regions } +// GetListingId returns ListingId +func (m listingpackage) GetListingId() *string { + return m.ListingId +} + +// GetVersion returns Version +func (m listingpackage) GetVersion() *string { + return m.Version +} + func (m listingpackage) String() string { return common.PointerString(m) } diff --git a/marketplace/marketplace_account_client.go b/marketplace/marketplace_account_client.go index b73ac5c548..75d9a513fb 100644 --- a/marketplace/marketplace_account_client.go +++ b/marketplace/marketplace_account_client.go @@ -80,7 +80,7 @@ func (client *AccountClient) setConfigurationProvider(configProvider common.Conf 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/marketplace/marketplace_client.go b/marketplace/marketplace_client.go index bb4087e3a0..67e62c193c 100644 --- a/marketplace/marketplace_client.go +++ b/marketplace/marketplace_client.go @@ -80,7 +80,7 @@ func (client *MarketplaceClient) setConfigurationProvider(configProvider common. 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/marketplace/publication_package.go b/marketplace/publication_package.go index 58ac81579f..b01e911b9e 100644 --- a/marketplace/publication_package.go +++ b/marketplace/publication_package.go @@ -41,12 +41,12 @@ type PublicationPackage interface { type publicationpackage struct { JsonData []byte - ListingId *string `mandatory:"true" json:"listingId"` - Version *string `mandatory:"true" json:"version"` Description *string `mandatory:"false" json:"description"` ResourceId *string `mandatory:"false" json:"resourceId"` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` OperatingSystem *OperatingSystem `mandatory:"false" json:"operatingSystem"` + ListingId *string `mandatory:"true" json:"listingId"` + Version *string `mandatory:"true" json:"version"` PackageType string `json:"packageType"` } @@ -95,36 +95,36 @@ func (m *publicationpackage) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetListingId returns ListingId -func (m publicationpackage) GetListingId() *string { - return m.ListingId -} - -//GetVersion returns Version -func (m publicationpackage) GetVersion() *string { - return m.Version -} - -//GetDescription returns Description +// GetDescription returns Description func (m publicationpackage) GetDescription() *string { return m.Description } -//GetResourceId returns ResourceId +// GetResourceId returns ResourceId func (m publicationpackage) GetResourceId() *string { return m.ResourceId } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m publicationpackage) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetOperatingSystem returns OperatingSystem +// GetOperatingSystem returns OperatingSystem func (m publicationpackage) GetOperatingSystem() *OperatingSystem { return m.OperatingSystem } +// GetListingId returns ListingId +func (m publicationpackage) GetListingId() *string { + return m.ListingId +} + +// GetVersion returns Version +func (m publicationpackage) GetVersion() *string { + return m.Version +} + func (m publicationpackage) String() string { return common.PointerString(m) } diff --git a/marketplace/search_listings_details.go b/marketplace/search_listings_details.go index c2ff25bd86..870d4045d0 100644 --- a/marketplace/search_listings_details.go +++ b/marketplace/search_listings_details.go @@ -69,7 +69,7 @@ func (m *searchlistingsdetails) UnmarshalPolymorphicJSON(data []byte) (interface } } -//GetMatchingContextType returns MatchingContextType +// GetMatchingContextType returns MatchingContextType func (m searchlistingsdetails) GetMatchingContextType() MatchingContextTypeEnumEnum { return m.MatchingContextType } diff --git a/mediaservices/create_media_workflow_job_details.go b/mediaservices/create_media_workflow_job_details.go index c72bb1e2c4..98fd0d902c 100644 --- a/mediaservices/create_media_workflow_job_details.go +++ b/mediaservices/create_media_workflow_job_details.go @@ -47,12 +47,12 @@ type CreateMediaWorkflowJobDetails interface { type createmediaworkflowjobdetails struct { JsonData []byte - CompartmentId *string `mandatory:"true" json:"compartmentId"` MediaWorkflowConfigurationIds []string `mandatory:"false" json:"mediaWorkflowConfigurationIds"` DisplayName *string `mandatory:"false" json:"displayName"` Parameters map[string]interface{} `mandatory:"false" json:"parameters"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` WorkflowIdentifierType string `json:"workflowIdentifierType"` } @@ -101,36 +101,36 @@ func (m *createmediaworkflowjobdetails) UnmarshalPolymorphicJSON(data []byte) (i } } -//GetCompartmentId returns CompartmentId -func (m createmediaworkflowjobdetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetMediaWorkflowConfigurationIds returns MediaWorkflowConfigurationIds +// GetMediaWorkflowConfigurationIds returns MediaWorkflowConfigurationIds func (m createmediaworkflowjobdetails) GetMediaWorkflowConfigurationIds() []string { return m.MediaWorkflowConfigurationIds } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createmediaworkflowjobdetails) GetDisplayName() *string { return m.DisplayName } -//GetParameters returns Parameters +// GetParameters returns Parameters func (m createmediaworkflowjobdetails) GetParameters() map[string]interface{} { return m.Parameters } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createmediaworkflowjobdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createmediaworkflowjobdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetCompartmentId returns CompartmentId +func (m createmediaworkflowjobdetails) GetCompartmentId() *string { + return m.CompartmentId +} + func (m createmediaworkflowjobdetails) String() string { return common.PointerString(m) } diff --git a/mediaservices/mediaservices_client.go b/mediaservices/mediaservices_client.go index d1373212a0..2292a0d231 100644 --- a/mediaservices/mediaservices_client.go +++ b/mediaservices/mediaservices_client.go @@ -81,7 +81,7 @@ func (client *MediaServicesClient) setConfigurationProvider(configProvider commo 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/mediaservices/mediaservices_mediastream_client.go b/mediaservices/mediaservices_mediastream_client.go index e407748e0b..4a49a3b6ad 100644 --- a/mediaservices/mediaservices_mediastream_client.go +++ b/mediaservices/mediaservices_mediastream_client.go @@ -81,7 +81,7 @@ func (client *MediaStreamClient) setConfigurationProvider(configProvider common. 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/mediaservices/stream_packaging_config.go b/mediaservices/stream_packaging_config.go index 7632433591..3a836f1f33 100644 --- a/mediaservices/stream_packaging_config.go +++ b/mediaservices/stream_packaging_config.go @@ -61,18 +61,18 @@ type StreamPackagingConfig interface { type streampackagingconfig struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` - DistributionChannelId *string `mandatory:"true" json:"distributionChannelId"` - DisplayName *string `mandatory:"true" json:"displayName"` - SegmentTimeInSeconds *int `mandatory:"true" json:"segmentTimeInSeconds"` - Encryption StreamPackagingConfigEncryption `mandatory:"false" json:"encryption"` + Encryption streampackagingconfigencryption `mandatory:"false" json:"encryption"` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` LifecycleState StreamPackagingConfigLifecycleStateEnum `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"` + Id *string `mandatory:"true" json:"id"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + DistributionChannelId *string `mandatory:"true" json:"distributionChannelId"` + DisplayName *string `mandatory:"true" json:"displayName"` + SegmentTimeInSeconds *int `mandatory:"true" json:"segmentTimeInSeconds"` StreamPackagingFormat string `json:"streamPackagingFormat"` } @@ -127,66 +127,66 @@ func (m *streampackagingconfig) UnmarshalPolymorphicJSON(data []byte) (interface } } -//GetId returns Id -func (m streampackagingconfig) GetId() *string { - return m.Id -} - -//GetCompartmentId returns CompartmentId -func (m streampackagingconfig) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetDistributionChannelId returns DistributionChannelId -func (m streampackagingconfig) GetDistributionChannelId() *string { - return m.DistributionChannelId -} - -//GetDisplayName returns DisplayName -func (m streampackagingconfig) GetDisplayName() *string { - return m.DisplayName -} - -//GetSegmentTimeInSeconds returns SegmentTimeInSeconds -func (m streampackagingconfig) GetSegmentTimeInSeconds() *int { - return m.SegmentTimeInSeconds -} - -//GetEncryption returns Encryption -func (m streampackagingconfig) GetEncryption() StreamPackagingConfigEncryption { +// GetEncryption returns Encryption +func (m streampackagingconfig) GetEncryption() streampackagingconfigencryption { return m.Encryption } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m streampackagingconfig) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m streampackagingconfig) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m streampackagingconfig) GetLifecycleState() StreamPackagingConfigLifecycleStateEnum { return m.LifecycleState } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m streampackagingconfig) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m streampackagingconfig) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m streampackagingconfig) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetId returns Id +func (m streampackagingconfig) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m streampackagingconfig) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetDistributionChannelId returns DistributionChannelId +func (m streampackagingconfig) GetDistributionChannelId() *string { + return m.DistributionChannelId +} + +// GetDisplayName returns DisplayName +func (m streampackagingconfig) GetDisplayName() *string { + return m.DisplayName +} + +// GetSegmentTimeInSeconds returns SegmentTimeInSeconds +func (m streampackagingconfig) GetSegmentTimeInSeconds() *int { + return m.SegmentTimeInSeconds +} + func (m streampackagingconfig) String() string { return common.PointerString(m) } diff --git a/monitoring/monitoring_client.go b/monitoring/monitoring_client.go index ae1c3c81d0..70f96681ee 100644 --- a/monitoring/monitoring_client.go +++ b/monitoring/monitoring_client.go @@ -82,7 +82,7 @@ func (client *MonitoringClient) setConfigurationProvider(configProvider common.C 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/mysql/add_analytics_cluster_request_response.go b/mysql/add_analytics_cluster_request_response.go deleted file mode 100644 index d56b5ce689..0000000000 --- a/mysql/add_analytics_cluster_request_response.go +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. -// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -// Code generated. DO NOT EDIT. - -package mysql - -import ( - "fmt" - "github.com/oracle/oci-go-sdk/v65/common" - "net/http" - "strings" -) - -// AddAnalyticsClusterRequest wrapper for the AddAnalyticsCluster operation -// -// # See also -// -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/mysql/AddAnalyticsCluster.go.html to see an example of how to use AddAnalyticsClusterRequest. -type AddAnalyticsClusterRequest struct { - - // The DB System OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). - DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` - - // Request to add an Analytics Cluster. - AddAnalyticsClusterDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call for a - // resource, set the `If-Match` header to the value of the etag from a - // previous GET or POST response for that resource. The resource will be - // updated or deleted only if the etag you provide matches the resource's - // current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Customer-defined unique identifier for the request. If you need to - // contact Oracle about a specific request, please provide the request - // ID that you supplied in this header with the request. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // A token that uniquely identifies a request so it can be retried in case - // of a timeout or server error without risk of executing that same action - // again. Retry tokens expire after 24 hours, but can be invalidated before - // then due to conflicting operations (for example, if a resource has been - // deleted and purged from the system, then a retry of the original - // creation request may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request AddAnalyticsClusterRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request AddAnalyticsClusterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { - - _, err := request.ValidateEnumValue() - if err != nil { - return http.Request{}, err - } - return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) -} - -// BinaryRequestBody implements the OCIRequest interface -func (request AddAnalyticsClusterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { - - return nil, false - -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request AddAnalyticsClusterRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ValidateEnumValue returns an error when providing an unsupported enum value -// This function is being called during constructing API request process -// Not recommended for calling this function directly -func (request AddAnalyticsClusterRequest) ValidateEnumValue() (bool, error) { - errMessage := []string{} - if len(errMessage) > 0 { - return true, fmt.Errorf(strings.Join(errMessage, "\n")) - } - return false, nil -} - -// AddAnalyticsClusterResponse wrapper for the AddAnalyticsCluster operation -type AddAnalyticsClusterResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The AnalyticsCluster instance - AnalyticsCluster `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // 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"` -} - -func (response AddAnalyticsClusterResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response AddAnalyticsClusterResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/mysql/analytics_cluster.go b/mysql/analytics_cluster.go deleted file mode 100644 index 428b592f40..0000000000 --- a/mysql/analytics_cluster.go +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. -// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -// Code generated. DO NOT EDIT. - -// MySQL Database Service API -// -// The API for the MySQL Database Service -// - -package mysql - -import ( - "fmt" - "github.com/oracle/oci-go-sdk/v65/common" - "strings" -) - -// AnalyticsCluster DEPRECATED -- please use HeatWave API instead. -// An Analytics Cluster is a database accelerator for a DB System. -type AnalyticsCluster struct { - - // The OCID of the parent DB System this Analytics Cluster is attached to. - DbSystemId *string `mandatory:"true" json:"dbSystemId"` - - // The shape determines resources to allocate to the Analytics - // Cluster nodes - CPU cores, memory. - ShapeName *string `mandatory:"true" json:"shapeName"` - - // The number of analytics-processing compute instances, of the - // specified shape, in the Analytics Cluster. - ClusterSize *int `mandatory:"true" json:"clusterSize"` - - // An Analytics Cluster Node is a compute host that is part of an Analytics Cluster. - ClusterNodes []AnalyticsClusterNode `mandatory:"true" json:"clusterNodes"` - - // The current state of the Analytics Cluster. - LifecycleState AnalyticsClusterLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The date and time the Analytics Cluster was created, as described by RFC 3339 (https://tools.ietf.org/rfc/rfc3339). - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // The time the Analytics Cluster was last updated, as described by RFC 3339 (https://tools.ietf.org/rfc/rfc3339). - TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` - - // Additional information about the current lifecycleState. - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` -} - -func (m AnalyticsCluster) String() string { - return common.PointerString(m) -} - -// ValidateEnumValue returns an error when providing an unsupported enum value -// This function is being called during constructing API request process -// Not recommended for calling this function directly -func (m AnalyticsCluster) ValidateEnumValue() (bool, error) { - errMessage := []string{} - if _, ok := GetMappingAnalyticsClusterLifecycleStateEnum(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(GetAnalyticsClusterLifecycleStateEnumStringValues(), ","))) - } - - if len(errMessage) > 0 { - return true, fmt.Errorf(strings.Join(errMessage, "\n")) - } - return false, nil -} - -// AnalyticsClusterLifecycleStateEnum Enum with underlying type: string -type AnalyticsClusterLifecycleStateEnum string - -// Set of constants representing the allowable values for AnalyticsClusterLifecycleStateEnum -const ( - AnalyticsClusterLifecycleStateCreating AnalyticsClusterLifecycleStateEnum = "CREATING" - AnalyticsClusterLifecycleStateActive AnalyticsClusterLifecycleStateEnum = "ACTIVE" - AnalyticsClusterLifecycleStateInactive AnalyticsClusterLifecycleStateEnum = "INACTIVE" - AnalyticsClusterLifecycleStateUpdating AnalyticsClusterLifecycleStateEnum = "UPDATING" - AnalyticsClusterLifecycleStateDeleting AnalyticsClusterLifecycleStateEnum = "DELETING" - AnalyticsClusterLifecycleStateDeleted AnalyticsClusterLifecycleStateEnum = "DELETED" - AnalyticsClusterLifecycleStateFailed AnalyticsClusterLifecycleStateEnum = "FAILED" -) - -var mappingAnalyticsClusterLifecycleStateEnum = map[string]AnalyticsClusterLifecycleStateEnum{ - "CREATING": AnalyticsClusterLifecycleStateCreating, - "ACTIVE": AnalyticsClusterLifecycleStateActive, - "INACTIVE": AnalyticsClusterLifecycleStateInactive, - "UPDATING": AnalyticsClusterLifecycleStateUpdating, - "DELETING": AnalyticsClusterLifecycleStateDeleting, - "DELETED": AnalyticsClusterLifecycleStateDeleted, - "FAILED": AnalyticsClusterLifecycleStateFailed, -} - -var mappingAnalyticsClusterLifecycleStateEnumLowerCase = map[string]AnalyticsClusterLifecycleStateEnum{ - "creating": AnalyticsClusterLifecycleStateCreating, - "active": AnalyticsClusterLifecycleStateActive, - "inactive": AnalyticsClusterLifecycleStateInactive, - "updating": AnalyticsClusterLifecycleStateUpdating, - "deleting": AnalyticsClusterLifecycleStateDeleting, - "deleted": AnalyticsClusterLifecycleStateDeleted, - "failed": AnalyticsClusterLifecycleStateFailed, -} - -// GetAnalyticsClusterLifecycleStateEnumValues Enumerates the set of values for AnalyticsClusterLifecycleStateEnum -func GetAnalyticsClusterLifecycleStateEnumValues() []AnalyticsClusterLifecycleStateEnum { - values := make([]AnalyticsClusterLifecycleStateEnum, 0) - for _, v := range mappingAnalyticsClusterLifecycleStateEnum { - values = append(values, v) - } - return values -} - -// GetAnalyticsClusterLifecycleStateEnumStringValues Enumerates the set of values in String for AnalyticsClusterLifecycleStateEnum -func GetAnalyticsClusterLifecycleStateEnumStringValues() []string { - return []string{ - "CREATING", - "ACTIVE", - "INACTIVE", - "UPDATING", - "DELETING", - "DELETED", - "FAILED", - } -} - -// GetMappingAnalyticsClusterLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum -func GetMappingAnalyticsClusterLifecycleStateEnum(val string) (AnalyticsClusterLifecycleStateEnum, bool) { - enum, ok := mappingAnalyticsClusterLifecycleStateEnumLowerCase[strings.ToLower(val)] - return enum, ok -} diff --git a/mysql/analytics_cluster_memory_estimate.go b/mysql/analytics_cluster_memory_estimate.go deleted file mode 100644 index 32040f7c67..0000000000 --- a/mysql/analytics_cluster_memory_estimate.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. -// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -// Code generated. DO NOT EDIT. - -// MySQL Database Service API -// -// The API for the MySQL Database Service -// - -package mysql - -import ( - "fmt" - "github.com/oracle/oci-go-sdk/v65/common" - "strings" -) - -// AnalyticsClusterMemoryEstimate DEPRECATED -- please use HeatWave API instead. -// Analytics Cluster memory estimate -// that can be used to determine a suitable Analytics Cluster size. For each MySQL user table the estimated memory -// footprint when the table is loaded to the Analytics Cluster memory is returned. -type AnalyticsClusterMemoryEstimate struct { - - // The OCID of the DB System the Analytics Cluster memory estimate is associated with. - DbSystemId *string `mandatory:"true" json:"dbSystemId"` - - // Current status of the Work Request generating the Analytics Cluster memory estimate. - Status AnalyticsClusterMemoryEstimateStatusEnum `mandatory:"true" json:"status"` - - // The date and time that the Work Request to generate the Analytics Cluster memory estimate was issued, as described by RFC 3339 (https://tools.ietf.org/rfc/rfc333). - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // The date and time that the Analytics Cluster memory estimate was generated, as described by RFC 3339 (https://tools.ietf.org/rfc/rfc333). - TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` - - // Collection of schemas with estimated memory footprints for MySQL user tables of each schema - // when loaded to Analytics Cluster memory. - TableSchemas []AnalyticsClusterSchemaMemoryEstimate `mandatory:"true" json:"tableSchemas"` -} - -func (m AnalyticsClusterMemoryEstimate) String() string { - return common.PointerString(m) -} - -// ValidateEnumValue returns an error when providing an unsupported enum value -// This function is being called during constructing API request process -// Not recommended for calling this function directly -func (m AnalyticsClusterMemoryEstimate) ValidateEnumValue() (bool, error) { - errMessage := []string{} - if _, ok := GetMappingAnalyticsClusterMemoryEstimateStatusEnum(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(GetAnalyticsClusterMemoryEstimateStatusEnumStringValues(), ","))) - } - - if len(errMessage) > 0 { - return true, fmt.Errorf(strings.Join(errMessage, "\n")) - } - return false, nil -} diff --git a/mysql/analytics_cluster_memory_estimate_status.go b/mysql/analytics_cluster_memory_estimate_status.go deleted file mode 100644 index 26d2736513..0000000000 --- a/mysql/analytics_cluster_memory_estimate_status.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. -// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -// Code generated. DO NOT EDIT. - -// MySQL Database Service API -// -// The API for the MySQL Database Service -// - -package mysql - -import ( - "strings" -) - -// AnalyticsClusterMemoryEstimateStatusEnum Enum with underlying type: string -type AnalyticsClusterMemoryEstimateStatusEnum string - -// Set of constants representing the allowable values for AnalyticsClusterMemoryEstimateStatusEnum -const ( - AnalyticsClusterMemoryEstimateStatusAccepted AnalyticsClusterMemoryEstimateStatusEnum = "ACCEPTED" - AnalyticsClusterMemoryEstimateStatusInProgress AnalyticsClusterMemoryEstimateStatusEnum = "IN_PROGRESS" - AnalyticsClusterMemoryEstimateStatusFailed AnalyticsClusterMemoryEstimateStatusEnum = "FAILED" - AnalyticsClusterMemoryEstimateStatusSucceeded AnalyticsClusterMemoryEstimateStatusEnum = "SUCCEEDED" - AnalyticsClusterMemoryEstimateStatusCanceling AnalyticsClusterMemoryEstimateStatusEnum = "CANCELING" - AnalyticsClusterMemoryEstimateStatusCanceled AnalyticsClusterMemoryEstimateStatusEnum = "CANCELED" -) - -var mappingAnalyticsClusterMemoryEstimateStatusEnum = map[string]AnalyticsClusterMemoryEstimateStatusEnum{ - "ACCEPTED": AnalyticsClusterMemoryEstimateStatusAccepted, - "IN_PROGRESS": AnalyticsClusterMemoryEstimateStatusInProgress, - "FAILED": AnalyticsClusterMemoryEstimateStatusFailed, - "SUCCEEDED": AnalyticsClusterMemoryEstimateStatusSucceeded, - "CANCELING": AnalyticsClusterMemoryEstimateStatusCanceling, - "CANCELED": AnalyticsClusterMemoryEstimateStatusCanceled, -} - -var mappingAnalyticsClusterMemoryEstimateStatusEnumLowerCase = map[string]AnalyticsClusterMemoryEstimateStatusEnum{ - "accepted": AnalyticsClusterMemoryEstimateStatusAccepted, - "in_progress": AnalyticsClusterMemoryEstimateStatusInProgress, - "failed": AnalyticsClusterMemoryEstimateStatusFailed, - "succeeded": AnalyticsClusterMemoryEstimateStatusSucceeded, - "canceling": AnalyticsClusterMemoryEstimateStatusCanceling, - "canceled": AnalyticsClusterMemoryEstimateStatusCanceled, -} - -// GetAnalyticsClusterMemoryEstimateStatusEnumValues Enumerates the set of values for AnalyticsClusterMemoryEstimateStatusEnum -func GetAnalyticsClusterMemoryEstimateStatusEnumValues() []AnalyticsClusterMemoryEstimateStatusEnum { - values := make([]AnalyticsClusterMemoryEstimateStatusEnum, 0) - for _, v := range mappingAnalyticsClusterMemoryEstimateStatusEnum { - values = append(values, v) - } - return values -} - -// GetAnalyticsClusterMemoryEstimateStatusEnumStringValues Enumerates the set of values in String for AnalyticsClusterMemoryEstimateStatusEnum -func GetAnalyticsClusterMemoryEstimateStatusEnumStringValues() []string { - return []string{ - "ACCEPTED", - "IN_PROGRESS", - "FAILED", - "SUCCEEDED", - "CANCELING", - "CANCELED", - } -} - -// GetMappingAnalyticsClusterMemoryEstimateStatusEnum performs case Insensitive comparison on enum value and return the desired enum -func GetMappingAnalyticsClusterMemoryEstimateStatusEnum(val string) (AnalyticsClusterMemoryEstimateStatusEnum, bool) { - enum, ok := mappingAnalyticsClusterMemoryEstimateStatusEnumLowerCase[strings.ToLower(val)] - return enum, ok -} diff --git a/mysql/analytics_cluster_node.go b/mysql/analytics_cluster_node.go deleted file mode 100644 index 111e4bfe36..0000000000 --- a/mysql/analytics_cluster_node.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. -// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -// Code generated. DO NOT EDIT. - -// MySQL Database Service API -// -// The API for the MySQL Database Service -// - -package mysql - -import ( - "fmt" - "github.com/oracle/oci-go-sdk/v65/common" - "strings" -) - -// AnalyticsClusterNode DEPRECATED -- please use HeatWave API instead. -// An Analytics Cluster Node is a compute host that is part of an Analytics Cluster. -type AnalyticsClusterNode struct { - - // The ID of the node within MySQL Analytics Cluster. - NodeId *string `mandatory:"true" json:"nodeId"` - - // The current state of the MySQL Analytics Cluster node. - LifecycleState AnalyticsClusterNodeLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The date and time the MySQL Analytics Cluster node was created, as described by RFC 3339 (https://tools.ietf.org/rfc/rfc3339). - TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - - // The date and time the MySQL Analytics Cluster node was updated, as described by RFC 3339 (https://tools.ietf.org/rfc/rfc3339). - TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` -} - -func (m AnalyticsClusterNode) String() string { - return common.PointerString(m) -} - -// ValidateEnumValue returns an error when providing an unsupported enum value -// This function is being called during constructing API request process -// Not recommended for calling this function directly -func (m AnalyticsClusterNode) ValidateEnumValue() (bool, error) { - errMessage := []string{} - if _, ok := GetMappingAnalyticsClusterNodeLifecycleStateEnum(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(GetAnalyticsClusterNodeLifecycleStateEnumStringValues(), ","))) - } - - if len(errMessage) > 0 { - return true, fmt.Errorf(strings.Join(errMessage, "\n")) - } - return false, nil -} - -// AnalyticsClusterNodeLifecycleStateEnum Enum with underlying type: string -type AnalyticsClusterNodeLifecycleStateEnum string - -// Set of constants representing the allowable values for AnalyticsClusterNodeLifecycleStateEnum -const ( - AnalyticsClusterNodeLifecycleStateCreating AnalyticsClusterNodeLifecycleStateEnum = "CREATING" - AnalyticsClusterNodeLifecycleStateActive AnalyticsClusterNodeLifecycleStateEnum = "ACTIVE" - AnalyticsClusterNodeLifecycleStateInactive AnalyticsClusterNodeLifecycleStateEnum = "INACTIVE" - AnalyticsClusterNodeLifecycleStateUpdating AnalyticsClusterNodeLifecycleStateEnum = "UPDATING" - AnalyticsClusterNodeLifecycleStateDeleting AnalyticsClusterNodeLifecycleStateEnum = "DELETING" - AnalyticsClusterNodeLifecycleStateDeleted AnalyticsClusterNodeLifecycleStateEnum = "DELETED" - AnalyticsClusterNodeLifecycleStateFailed AnalyticsClusterNodeLifecycleStateEnum = "FAILED" -) - -var mappingAnalyticsClusterNodeLifecycleStateEnum = map[string]AnalyticsClusterNodeLifecycleStateEnum{ - "CREATING": AnalyticsClusterNodeLifecycleStateCreating, - "ACTIVE": AnalyticsClusterNodeLifecycleStateActive, - "INACTIVE": AnalyticsClusterNodeLifecycleStateInactive, - "UPDATING": AnalyticsClusterNodeLifecycleStateUpdating, - "DELETING": AnalyticsClusterNodeLifecycleStateDeleting, - "DELETED": AnalyticsClusterNodeLifecycleStateDeleted, - "FAILED": AnalyticsClusterNodeLifecycleStateFailed, -} - -var mappingAnalyticsClusterNodeLifecycleStateEnumLowerCase = map[string]AnalyticsClusterNodeLifecycleStateEnum{ - "creating": AnalyticsClusterNodeLifecycleStateCreating, - "active": AnalyticsClusterNodeLifecycleStateActive, - "inactive": AnalyticsClusterNodeLifecycleStateInactive, - "updating": AnalyticsClusterNodeLifecycleStateUpdating, - "deleting": AnalyticsClusterNodeLifecycleStateDeleting, - "deleted": AnalyticsClusterNodeLifecycleStateDeleted, - "failed": AnalyticsClusterNodeLifecycleStateFailed, -} - -// GetAnalyticsClusterNodeLifecycleStateEnumValues Enumerates the set of values for AnalyticsClusterNodeLifecycleStateEnum -func GetAnalyticsClusterNodeLifecycleStateEnumValues() []AnalyticsClusterNodeLifecycleStateEnum { - values := make([]AnalyticsClusterNodeLifecycleStateEnum, 0) - for _, v := range mappingAnalyticsClusterNodeLifecycleStateEnum { - values = append(values, v) - } - return values -} - -// GetAnalyticsClusterNodeLifecycleStateEnumStringValues Enumerates the set of values in String for AnalyticsClusterNodeLifecycleStateEnum -func GetAnalyticsClusterNodeLifecycleStateEnumStringValues() []string { - return []string{ - "CREATING", - "ACTIVE", - "INACTIVE", - "UPDATING", - "DELETING", - "DELETED", - "FAILED", - } -} - -// GetMappingAnalyticsClusterNodeLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum -func GetMappingAnalyticsClusterNodeLifecycleStateEnum(val string) (AnalyticsClusterNodeLifecycleStateEnum, bool) { - enum, ok := mappingAnalyticsClusterNodeLifecycleStateEnumLowerCase[strings.ToLower(val)] - return enum, ok -} diff --git a/mysql/analytics_cluster_summary.go b/mysql/analytics_cluster_summary.go deleted file mode 100644 index 0a6b0c97c9..0000000000 --- a/mysql/analytics_cluster_summary.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. -// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -// Code generated. DO NOT EDIT. - -// MySQL Database Service API -// -// The API for the MySQL Database Service -// - -package mysql - -import ( - "fmt" - "github.com/oracle/oci-go-sdk/v65/common" - "strings" -) - -// AnalyticsClusterSummary DEPRECATED -- please use HeatWave API instead. -// A summary of an Analytics Cluster. -type AnalyticsClusterSummary struct { - - // The shape determines resources to allocate to the Analytics - // Cluster nodes - CPU cores, memory. - ShapeName *string `mandatory:"true" json:"shapeName"` - - // The number of analytics-processing compute instances, of the - // specified shape, in the Analytics Cluster. - ClusterSize *int `mandatory:"true" json:"clusterSize"` - - // The current state of the MySQL Analytics Cluster. - LifecycleState AnalyticsClusterLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - - // The date and time the Analytics Cluster was created, as described by RFC 3339 (https://tools.ietf.org/rfc/rfc3339). - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - - // The time the Analytics Cluster was last updated, as described by RFC 3339 (https://tools.ietf.org/rfc/rfc3339). - TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` -} - -func (m AnalyticsClusterSummary) String() string { - return common.PointerString(m) -} - -// ValidateEnumValue returns an error when providing an unsupported enum value -// This function is being called during constructing API request process -// Not recommended for calling this function directly -func (m AnalyticsClusterSummary) ValidateEnumValue() (bool, error) { - errMessage := []string{} - if _, ok := GetMappingAnalyticsClusterLifecycleStateEnum(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(GetAnalyticsClusterLifecycleStateEnumStringValues(), ","))) - } - - if len(errMessage) > 0 { - return true, fmt.Errorf(strings.Join(errMessage, "\n")) - } - return false, nil -} diff --git a/mysql/analytics_cluster_table_memory_estimate.go b/mysql/analytics_cluster_table_memory_estimate.go deleted file mode 100644 index 1b04b13401..0000000000 --- a/mysql/analytics_cluster_table_memory_estimate.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. -// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -// Code generated. DO NOT EDIT. - -// MySQL Database Service API -// -// The API for the MySQL Database Service -// - -package mysql - -import ( - "fmt" - "github.com/oracle/oci-go-sdk/v65/common" - "strings" -) - -// AnalyticsClusterTableMemoryEstimate DEPRECATED -- please use HeatWave API instead. -// Estimated memory footprint for a MySQL user table -// when loaded to the Analytics Cluster memory. -type AnalyticsClusterTableMemoryEstimate struct { - - // The table name. - TableName *string `mandatory:"true" json:"tableName"` - - // The number of columns to be loaded to Analytics Cluster memory. - // These columns contribute to the analytical memory footprint. - ToLoadColumnCount *int `mandatory:"true" json:"toLoadColumnCount"` - - // The number of variable-length columns to be loaded to Analytics Cluster memory. - // These columns contribute to the analytical memory footprint. - VarlenColumnCount *int `mandatory:"true" json:"varlenColumnCount"` - - // The estimated number of rows in the table. This number was used to - // derive the analytical memory footprint. - EstimatedRowCount *int64 `mandatory:"true" json:"estimatedRowCount"` - - // The estimated memory footprint of the table in MBs when loaded to - // Analytics Cluster memory (null if the table cannot be loaded to the - // Analytics Cluster). - AnalyticalFootprintInMbs *int64 `mandatory:"true" json:"analyticalFootprintInMbs"` - - // Error comment (empty string if no errors occured). - ErrorComment *string `mandatory:"true" json:"errorComment"` -} - -func (m AnalyticsClusterTableMemoryEstimate) String() string { - return common.PointerString(m) -} - -// ValidateEnumValue returns an error when providing an unsupported enum value -// This function is being called during constructing API request process -// Not recommended for calling this function directly -func (m AnalyticsClusterTableMemoryEstimate) ValidateEnumValue() (bool, error) { - errMessage := []string{} - - if len(errMessage) > 0 { - return true, fmt.Errorf(strings.Join(errMessage, "\n")) - } - return false, nil -} diff --git a/mysql/db_system.go b/mysql/db_system.go index de88b6e093..2a70f3ae3b 100644 --- a/mysql/db_system.go +++ b/mysql/db_system.go @@ -58,12 +58,6 @@ type DbSystem struct { CurrentPlacement *DbSystemPlacement `mandatory:"false" json:"currentPlacement"` - // DEPRECATED -- please use `isHeatWaveClusterAttached` instead. - // If the DB System has an Analytics Cluster attached. - IsAnalyticsClusterAttached *bool `mandatory:"false" json:"isAnalyticsClusterAttached"` - - AnalyticsCluster *AnalyticsClusterSummary `mandatory:"false" json:"analyticsCluster"` - // If the DB System has a HeatWave Cluster attached. IsHeatWaveClusterAttached *bool `mandatory:"false" json:"isHeatWaveClusterAttached"` @@ -167,8 +161,6 @@ func (m *DbSystem) UnmarshalJSON(data []byte) (e error) { Description *string `json:"description"` IsHighlyAvailable *bool `json:"isHighlyAvailable"` CurrentPlacement *DbSystemPlacement `json:"currentPlacement"` - IsAnalyticsClusterAttached *bool `json:"isAnalyticsClusterAttached"` - AnalyticsCluster *AnalyticsClusterSummary `json:"analyticsCluster"` IsHeatWaveClusterAttached *bool `json:"isHeatWaveClusterAttached"` HeatWaveCluster *HeatWaveClusterSummary `json:"heatWaveCluster"` AvailabilityDomain *string `json:"availabilityDomain"` @@ -212,10 +204,6 @@ func (m *DbSystem) UnmarshalJSON(data []byte) (e error) { m.CurrentPlacement = model.CurrentPlacement - m.IsAnalyticsClusterAttached = model.IsAnalyticsClusterAttached - - m.AnalyticsCluster = model.AnalyticsCluster - m.IsHeatWaveClusterAttached = model.IsHeatWaveClusterAttached m.HeatWaveCluster = model.HeatWaveCluster @@ -249,15 +237,9 @@ func (m *DbSystem) UnmarshalJSON(data []byte) (e error) { m.PortX = model.PortX m.Endpoints = make([]DbSystemEndpoint, len(model.Endpoints)) - for i, n := range model.Endpoints { - m.Endpoints[i] = n - } - + copy(m.Endpoints, model.Endpoints) m.Channels = make([]ChannelSummary, len(model.Channels)) - for i, n := range model.Channels { - m.Channels[i] = n - } - + copy(m.Channels, model.Channels) m.LifecycleDetails = model.LifecycleDetails m.FreeformTags = model.FreeformTags diff --git a/mysql/db_system_summary.go b/mysql/db_system_summary.go index c7185f2898..c6461bd5ea 100644 --- a/mysql/db_system_summary.go +++ b/mysql/db_system_summary.go @@ -47,12 +47,6 @@ type DbSystemSummary struct { CurrentPlacement *DbSystemPlacement `mandatory:"false" json:"currentPlacement"` - // DEPRECATED -- please use `isHeatWaveClusterAttached` instead. - // If the DB System has an Analytics Cluster attached. - IsAnalyticsClusterAttached *bool `mandatory:"false" json:"isAnalyticsClusterAttached"` - - AnalyticsCluster *AnalyticsClusterSummary `mandatory:"false" json:"analyticsCluster"` - // If the DB System has a HeatWave Cluster attached. IsHeatWaveClusterAttached *bool `mandatory:"false" json:"isHeatWaveClusterAttached"` diff --git a/mysql/delete_analytics_cluster_request_response.go b/mysql/delete_analytics_cluster_request_response.go deleted file mode 100644 index 30140bb4e7..0000000000 --- a/mysql/delete_analytics_cluster_request_response.go +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. -// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -// Code generated. DO NOT EDIT. - -package mysql - -import ( - "fmt" - "github.com/oracle/oci-go-sdk/v65/common" - "net/http" - "strings" -) - -// DeleteAnalyticsClusterRequest wrapper for the DeleteAnalyticsCluster operation -// -// # See also -// -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/mysql/DeleteAnalyticsCluster.go.html to see an example of how to use DeleteAnalyticsClusterRequest. -type DeleteAnalyticsClusterRequest struct { - - // The DB System OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). - DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` - - // For optimistic concurrency control. In the PUT or DELETE call for a - // resource, set the `If-Match` header to the value of the etag from a - // previous GET or POST response for that resource. The resource will be - // updated or deleted only if the etag you provide matches the resource's - // current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Customer-defined unique identifier for the request. If you need to - // contact Oracle about a specific request, please provide the request - // ID that you supplied in this header with the request. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request DeleteAnalyticsClusterRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request DeleteAnalyticsClusterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { - - _, err := request.ValidateEnumValue() - if err != nil { - return http.Request{}, err - } - return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) -} - -// BinaryRequestBody implements the OCIRequest interface -func (request DeleteAnalyticsClusterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { - - return nil, false - -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request DeleteAnalyticsClusterRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ValidateEnumValue returns an error when providing an unsupported enum value -// This function is being called during constructing API request process -// Not recommended for calling this function directly -func (request DeleteAnalyticsClusterRequest) ValidateEnumValue() (bool, error) { - errMessage := []string{} - if len(errMessage) > 0 { - return true, fmt.Errorf(strings.Join(errMessage, "\n")) - } - return false, nil -} - -// DeleteAnalyticsClusterResponse wrapper for the DeleteAnalyticsCluster operation -type DeleteAnalyticsClusterResponse 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"` - - // 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"` -} - -func (response DeleteAnalyticsClusterResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response DeleteAnalyticsClusterResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/mysql/generate_analytics_cluster_memory_estimate_request_response.go b/mysql/generate_analytics_cluster_memory_estimate_request_response.go deleted file mode 100644 index b39e06b1fa..0000000000 --- a/mysql/generate_analytics_cluster_memory_estimate_request_response.go +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. -// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -// Code generated. DO NOT EDIT. - -package mysql - -import ( - "fmt" - "github.com/oracle/oci-go-sdk/v65/common" - "net/http" - "strings" -) - -// GenerateAnalyticsClusterMemoryEstimateRequest wrapper for the GenerateAnalyticsClusterMemoryEstimate operation -// -// # See also -// -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/mysql/GenerateAnalyticsClusterMemoryEstimate.go.html to see an example of how to use GenerateAnalyticsClusterMemoryEstimateRequest. -type GenerateAnalyticsClusterMemoryEstimateRequest struct { - - // The DB System OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). - DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` - - // Customer-defined unique identifier for the request. If you need to - // contact Oracle about a specific request, please provide the request - // ID that you supplied in this header with the request. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // A token that uniquely identifies a request so it can be retried in case - // of a timeout or server error without risk of executing that same action - // again. Retry tokens expire after 24 hours, but can be invalidated before - // then due to conflicting operations (for example, if a resource has been - // deleted and purged from the system, then a retry of the original - // creation request may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GenerateAnalyticsClusterMemoryEstimateRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GenerateAnalyticsClusterMemoryEstimateRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { - - _, err := request.ValidateEnumValue() - if err != nil { - return http.Request{}, err - } - return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) -} - -// BinaryRequestBody implements the OCIRequest interface -func (request GenerateAnalyticsClusterMemoryEstimateRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { - - return nil, false - -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GenerateAnalyticsClusterMemoryEstimateRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ValidateEnumValue returns an error when providing an unsupported enum value -// This function is being called during constructing API request process -// Not recommended for calling this function directly -func (request GenerateAnalyticsClusterMemoryEstimateRequest) ValidateEnumValue() (bool, error) { - errMessage := []string{} - if len(errMessage) > 0 { - return true, fmt.Errorf(strings.Join(errMessage, "\n")) - } - return false, nil -} - -// GenerateAnalyticsClusterMemoryEstimateResponse wrapper for the GenerateAnalyticsClusterMemoryEstimate operation -type GenerateAnalyticsClusterMemoryEstimateResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The AnalyticsClusterMemoryEstimate instance - AnalyticsClusterMemoryEstimate `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"` - - // 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"` -} - -func (response GenerateAnalyticsClusterMemoryEstimateResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GenerateAnalyticsClusterMemoryEstimateResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/mysql/get_analytics_cluster_request_response.go b/mysql/get_analytics_cluster_request_response.go deleted file mode 100644 index ad5a9f507a..0000000000 --- a/mysql/get_analytics_cluster_request_response.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. -// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -// Code generated. DO NOT EDIT. - -package mysql - -import ( - "fmt" - "github.com/oracle/oci-go-sdk/v65/common" - "net/http" - "strings" -) - -// GetAnalyticsClusterRequest wrapper for the GetAnalyticsCluster operation -// -// # See also -// -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/mysql/GetAnalyticsCluster.go.html to see an example of how to use GetAnalyticsClusterRequest. -type GetAnalyticsClusterRequest struct { - - // The DB System OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). - DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` - - // Customer-defined unique identifier for the request. If you need to - // contact Oracle about a specific request, please provide the request - // ID that you supplied in this header with the request. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // For conditional requests. In the GET call for a resource, set the - // `If-None-Match` header to the value of the ETag from a previous GET (or - // POST or PUT) response for that resource. The server will return with - // either a 304 Not Modified response if the resource has not changed, or a - // 200 OK response with the updated representation. - IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request GetAnalyticsClusterRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request GetAnalyticsClusterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { - - _, err := request.ValidateEnumValue() - if err != nil { - return http.Request{}, err - } - return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) -} - -// BinaryRequestBody implements the OCIRequest interface -func (request GetAnalyticsClusterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { - - return nil, false - -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request GetAnalyticsClusterRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ValidateEnumValue returns an error when providing an unsupported enum value -// This function is being called during constructing API request process -// Not recommended for calling this function directly -func (request GetAnalyticsClusterRequest) ValidateEnumValue() (bool, error) { - errMessage := []string{} - if len(errMessage) > 0 { - return true, fmt.Errorf(strings.Join(errMessage, "\n")) - } - return false, nil -} - -// GetAnalyticsClusterResponse wrapper for the GetAnalyticsCluster operation -type GetAnalyticsClusterResponse struct { - - // The underlying http response - RawResponse *http.Response - - // The AnalyticsCluster instance - AnalyticsCluster `presentIn:"body"` - - // For optimistic concurrency control. See `if-match`. - Etag *string `presentIn:"header" name:"etag"` - - // Unique Oracle-assigned identifier for the request. If you need to contact - // Oracle about a particular request, please provide the request ID. - OpcRequestId *string `presentIn:"header" name:"opc-request-id"` - - // Flag to indicate whether or not the object was modified. If this is true, - // the getter for the object itself will return null. Callers should check this - // if they specified one of the request params that might result in a conditional - // response (like 'if-match'/'if-none-match'). - IsNotModified bool -} - -func (response GetAnalyticsClusterResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response GetAnalyticsClusterResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/mysql/list_db_systems_request_response.go b/mysql/list_db_systems_request_response.go index 438b480a1e..e47ac4cc4f 100644 --- a/mysql/list_db_systems_request_response.go +++ b/mysql/list_db_systems_request_response.go @@ -26,12 +26,6 @@ type ListDbSystemsRequest struct { // ID that you supplied in this header with the request. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - // DEPRECATED -- please use HeatWave API instead. - // If true, return only DB Systems with an Analytics Cluster attached, if false - // return only DB Systems with no Analytics Cluster attached. If not - // present, return all DB Systems. - IsAnalyticsClusterAttached *bool `mandatory:"false" contributesTo:"query" name:"isAnalyticsClusterAttached"` - // If true, return only DB Systems with a HeatWave cluster attached, if false // return only DB Systems with no HeatWave cluster attached. If not // present, return all DB Systems. diff --git a/mysql/list_shapes_request_response.go b/mysql/list_shapes_request_response.go index bcc3116159..8a14b3627a 100644 --- a/mysql/list_shapes_request_response.go +++ b/mysql/list_shapes_request_response.go @@ -111,21 +111,18 @@ type ListShapesIsSupportedForEnum string // Set of constants representing the allowable values for ListShapesIsSupportedForEnum const ( - ListShapesIsSupportedForDbsystem ListShapesIsSupportedForEnum = "DBSYSTEM" - ListShapesIsSupportedForAnalyticscluster ListShapesIsSupportedForEnum = "ANALYTICSCLUSTER" - ListShapesIsSupportedForHeatwavecluster ListShapesIsSupportedForEnum = "HEATWAVECLUSTER" + ListShapesIsSupportedForDbsystem ListShapesIsSupportedForEnum = "DBSYSTEM" + ListShapesIsSupportedForHeatwavecluster ListShapesIsSupportedForEnum = "HEATWAVECLUSTER" ) var mappingListShapesIsSupportedForEnum = map[string]ListShapesIsSupportedForEnum{ - "DBSYSTEM": ListShapesIsSupportedForDbsystem, - "ANALYTICSCLUSTER": ListShapesIsSupportedForAnalyticscluster, - "HEATWAVECLUSTER": ListShapesIsSupportedForHeatwavecluster, + "DBSYSTEM": ListShapesIsSupportedForDbsystem, + "HEATWAVECLUSTER": ListShapesIsSupportedForHeatwavecluster, } var mappingListShapesIsSupportedForEnumLowerCase = map[string]ListShapesIsSupportedForEnum{ - "dbsystem": ListShapesIsSupportedForDbsystem, - "analyticscluster": ListShapesIsSupportedForAnalyticscluster, - "heatwavecluster": ListShapesIsSupportedForHeatwavecluster, + "dbsystem": ListShapesIsSupportedForDbsystem, + "heatwavecluster": ListShapesIsSupportedForHeatwavecluster, } // GetListShapesIsSupportedForEnumValues Enumerates the set of values for ListShapesIsSupportedForEnum @@ -141,7 +138,6 @@ func GetListShapesIsSupportedForEnumValues() []ListShapesIsSupportedForEnum { func GetListShapesIsSupportedForEnumStringValues() []string { return []string{ "DBSYSTEM", - "ANALYTICSCLUSTER", "HEATWAVECLUSTER", } } diff --git a/mysql/mysql_channels_client.go b/mysql/mysql_channels_client.go index 1f2e8bdf2c..1c66d0f3a5 100644 --- a/mysql/mysql_channels_client.go +++ b/mysql/mysql_channels_client.go @@ -80,7 +80,7 @@ func (client *ChannelsClient) setConfigurationProvider(configProvider common.Con 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/mysql/mysql_dbbackups_client.go b/mysql/mysql_dbbackups_client.go index 510e4b8d53..51454d4b20 100644 --- a/mysql/mysql_dbbackups_client.go +++ b/mysql/mysql_dbbackups_client.go @@ -80,7 +80,7 @@ func (client *DbBackupsClient) setConfigurationProvider(configProvider common.Co 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/mysql/mysql_dbsystem_client.go b/mysql/mysql_dbsystem_client.go index f161a5ee41..0c044a1d25 100644 --- a/mysql/mysql_dbsystem_client.go +++ b/mysql/mysql_dbsystem_client.go @@ -80,7 +80,7 @@ func (client *DbSystemClient) setConfigurationProvider(configProvider common.Con 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil @@ -91,70 +91,6 @@ func (client *DbSystemClient) ConfigurationProvider() *common.ConfigurationProvi return client.config } -// AddAnalyticsCluster DEPRECATED -- please use HeatWave API instead. -// Adds an Analytics Cluster to the DB System. -// -// See also -// -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/mysql/AddAnalyticsCluster.go.html to see an example of how to use AddAnalyticsCluster API. -// A default retry strategy applies to this operation AddAnalyticsCluster() -func (client DbSystemClient) AddAnalyticsCluster(ctx context.Context, request AddAnalyticsClusterRequest) (response AddAnalyticsClusterResponse, 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.addAnalyticsCluster, policy) - if err != nil { - if ociResponse != nil { - if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { - opcRequestId := httpResponse.Header.Get("opc-request-id") - response = AddAnalyticsClusterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} - } else { - response = AddAnalyticsClusterResponse{} - } - } - return - } - if convertedResponse, ok := ociResponse.(AddAnalyticsClusterResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into AddAnalyticsClusterResponse") - } - return -} - -// addAnalyticsCluster implements the OCIOperation interface (enables retrying operations) -func (client DbSystemClient) addAnalyticsCluster(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - - httpRequest, err := request.HTTPRequest(http.MethodPost, "/dbSystems/{dbSystemId}/analyticsCluster/actions/add", binaryReqBody, extraHeaders) - if err != nil { - return nil, err - } - - var response AddAnalyticsClusterResponse - 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/mysql/20190415/AnalyticsCluster/AddAnalyticsCluster" - err = common.PostProcessServiceError(err, "DbSystem", "AddAnalyticsCluster", apiReferenceLink) - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - // AddHeatWaveCluster Adds a HeatWave cluster to the DB System. // // See also @@ -281,66 +217,6 @@ func (client DbSystemClient) createDbSystem(ctx context.Context, request common. return response, err } -// DeleteAnalyticsCluster DEPRECATED -- please use HeatWave API instead. -// Deletes the Analytics Cluster including terminating, detaching, removing, finalizing and -// otherwise deleting all related resources. -// -// See also -// -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/mysql/DeleteAnalyticsCluster.go.html to see an example of how to use DeleteAnalyticsCluster API. -// A default retry strategy applies to this operation DeleteAnalyticsCluster() -func (client DbSystemClient) DeleteAnalyticsCluster(ctx context.Context, request DeleteAnalyticsClusterRequest) (response DeleteAnalyticsClusterResponse, 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.deleteAnalyticsCluster, policy) - if err != nil { - if ociResponse != nil { - if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { - opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteAnalyticsClusterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} - } else { - response = DeleteAnalyticsClusterResponse{} - } - } - return - } - if convertedResponse, ok := ociResponse.(DeleteAnalyticsClusterResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteAnalyticsClusterResponse") - } - return -} - -// deleteAnalyticsCluster implements the OCIOperation interface (enables retrying operations) -func (client DbSystemClient) deleteAnalyticsCluster(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/dbSystems/{dbSystemId}/analyticsCluster", binaryReqBody, extraHeaders) - if err != nil { - return nil, err - } - - var response DeleteAnalyticsClusterResponse - 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/mysql/20190415/AnalyticsCluster/DeleteAnalyticsCluster" - err = common.PostProcessServiceError(err, "DbSystem", "DeleteAnalyticsCluster", apiReferenceLink) - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - // DeleteDbSystem Delete a DB System, including terminating, detaching, // removing, finalizing and otherwise deleting all related resources. // @@ -459,70 +335,6 @@ func (client DbSystemClient) deleteHeatWaveCluster(ctx context.Context, request return response, err } -// GenerateAnalyticsClusterMemoryEstimate DEPRECATED -- please use HeatWave API instead. -// Sends a request to estimate the memory footprints of user tables when loaded to Analytics Cluster memory. -// -// See also -// -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/mysql/GenerateAnalyticsClusterMemoryEstimate.go.html to see an example of how to use GenerateAnalyticsClusterMemoryEstimate API. -// A default retry strategy applies to this operation GenerateAnalyticsClusterMemoryEstimate() -func (client DbSystemClient) GenerateAnalyticsClusterMemoryEstimate(ctx context.Context, request GenerateAnalyticsClusterMemoryEstimateRequest) (response GenerateAnalyticsClusterMemoryEstimateResponse, 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.generateAnalyticsClusterMemoryEstimate, policy) - if err != nil { - if ociResponse != nil { - if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { - opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GenerateAnalyticsClusterMemoryEstimateResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} - } else { - response = GenerateAnalyticsClusterMemoryEstimateResponse{} - } - } - return - } - if convertedResponse, ok := ociResponse.(GenerateAnalyticsClusterMemoryEstimateResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GenerateAnalyticsClusterMemoryEstimateResponse") - } - return -} - -// generateAnalyticsClusterMemoryEstimate implements the OCIOperation interface (enables retrying operations) -func (client DbSystemClient) generateAnalyticsClusterMemoryEstimate(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - - httpRequest, err := request.HTTPRequest(http.MethodPost, "/dbSystems/{dbSystemId}/analyticsClusterMemoryEstimate/actions/generate", binaryReqBody, extraHeaders) - if err != nil { - return nil, err - } - - var response GenerateAnalyticsClusterMemoryEstimateResponse - 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/mysql/20190415/AnalyticsClusterMemoryEstimate/GenerateAnalyticsClusterMemoryEstimate" - err = common.PostProcessServiceError(err, "DbSystem", "GenerateAnalyticsClusterMemoryEstimate", apiReferenceLink) - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - // GenerateHeatWaveClusterMemoryEstimate Sends a request to estimate the memory footprints of user tables when loaded to HeatWave cluster memory. // // See also @@ -586,125 +398,6 @@ func (client DbSystemClient) generateHeatWaveClusterMemoryEstimate(ctx context.C return response, err } -// GetAnalyticsCluster DEPRECATED -- please use HeatWave API instead. -// Gets information about the Analytics Cluster. -// -// See also -// -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/mysql/GetAnalyticsCluster.go.html to see an example of how to use GetAnalyticsCluster API. -// A default retry strategy applies to this operation GetAnalyticsCluster() -func (client DbSystemClient) GetAnalyticsCluster(ctx context.Context, request GetAnalyticsClusterRequest) (response GetAnalyticsClusterResponse, 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.getAnalyticsCluster, policy) - if err != nil { - if ociResponse != nil { - if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { - opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetAnalyticsClusterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} - } else { - response = GetAnalyticsClusterResponse{} - } - } - return - } - if convertedResponse, ok := ociResponse.(GetAnalyticsClusterResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetAnalyticsClusterResponse") - } - return -} - -// getAnalyticsCluster implements the OCIOperation interface (enables retrying operations) -func (client DbSystemClient) getAnalyticsCluster(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - - httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbSystems/{dbSystemId}/analyticsCluster", binaryReqBody, extraHeaders) - if err != nil { - return nil, err - } - - var response GetAnalyticsClusterResponse - 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/mysql/20190415/AnalyticsCluster/GetAnalyticsCluster" - err = common.PostProcessServiceError(err, "DbSystem", "GetAnalyticsCluster", apiReferenceLink) - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - -// GetAnalyticsClusterMemoryEstimate DEPRECATED -- please use HeatWave API instead. -// Gets the most recent Analytics Cluster memory estimate that can be used to determine a suitable -// Analytics Cluster size. -// -// See also -// -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/mysql/GetAnalyticsClusterMemoryEstimate.go.html to see an example of how to use GetAnalyticsClusterMemoryEstimate API. -// A default retry strategy applies to this operation GetAnalyticsClusterMemoryEstimate() -func (client DbSystemClient) GetAnalyticsClusterMemoryEstimate(ctx context.Context, request GetAnalyticsClusterMemoryEstimateRequest) (response GetAnalyticsClusterMemoryEstimateResponse, 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.getAnalyticsClusterMemoryEstimate, policy) - if err != nil { - if ociResponse != nil { - if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { - opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetAnalyticsClusterMemoryEstimateResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} - } else { - response = GetAnalyticsClusterMemoryEstimateResponse{} - } - } - return - } - if convertedResponse, ok := ociResponse.(GetAnalyticsClusterMemoryEstimateResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into GetAnalyticsClusterMemoryEstimateResponse") - } - return -} - -// getAnalyticsClusterMemoryEstimate implements the OCIOperation interface (enables retrying operations) -func (client DbSystemClient) getAnalyticsClusterMemoryEstimate(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - - httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbSystems/{dbSystemId}/analyticsClusterMemoryEstimate", binaryReqBody, extraHeaders) - if err != nil { - return nil, err - } - - var response GetAnalyticsClusterMemoryEstimateResponse - 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/mysql/20190415/AnalyticsClusterMemoryEstimate/GetAnalyticsClusterMemoryEstimate" - err = common.PostProcessServiceError(err, "DbSystem", "GetAnalyticsClusterMemoryEstimate", apiReferenceLink) - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - // GetDbSystem Get information about the specified DB System. // // See also @@ -939,70 +632,6 @@ func (client DbSystemClient) listDbSystems(ctx context.Context, request common.O return response, err } -// RestartAnalyticsCluster DEPRECATED -- please use HeatWave API instead. -// Restarts the Analytics Cluster. -// -// See also -// -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/mysql/RestartAnalyticsCluster.go.html to see an example of how to use RestartAnalyticsCluster API. -// A default retry strategy applies to this operation RestartAnalyticsCluster() -func (client DbSystemClient) RestartAnalyticsCluster(ctx context.Context, request RestartAnalyticsClusterRequest) (response RestartAnalyticsClusterResponse, 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.restartAnalyticsCluster, policy) - if err != nil { - if ociResponse != nil { - if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { - opcRequestId := httpResponse.Header.Get("opc-request-id") - response = RestartAnalyticsClusterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} - } else { - response = RestartAnalyticsClusterResponse{} - } - } - return - } - if convertedResponse, ok := ociResponse.(RestartAnalyticsClusterResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into RestartAnalyticsClusterResponse") - } - return -} - -// restartAnalyticsCluster implements the OCIOperation interface (enables retrying operations) -func (client DbSystemClient) restartAnalyticsCluster(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - - httpRequest, err := request.HTTPRequest(http.MethodPost, "/dbSystems/{dbSystemId}/analyticsCluster/actions/restart", binaryReqBody, extraHeaders) - if err != nil { - return nil, err - } - - var response RestartAnalyticsClusterResponse - 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/mysql/20190415/AnalyticsCluster/RestartAnalyticsCluster" - err = common.PostProcessServiceError(err, "DbSystem", "RestartAnalyticsCluster", apiReferenceLink) - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - // RestartDbSystem Restarts the specified DB System. // // See also @@ -1129,70 +758,6 @@ func (client DbSystemClient) restartHeatWaveCluster(ctx context.Context, request return response, err } -// StartAnalyticsCluster DEPRECATED -- please use HeatWave API instead. -// Starts the Analytics Cluster. -// -// See also -// -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/mysql/StartAnalyticsCluster.go.html to see an example of how to use StartAnalyticsCluster API. -// A default retry strategy applies to this operation StartAnalyticsCluster() -func (client DbSystemClient) StartAnalyticsCluster(ctx context.Context, request StartAnalyticsClusterRequest) (response StartAnalyticsClusterResponse, 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.startAnalyticsCluster, policy) - if err != nil { - if ociResponse != nil { - if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { - opcRequestId := httpResponse.Header.Get("opc-request-id") - response = StartAnalyticsClusterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} - } else { - response = StartAnalyticsClusterResponse{} - } - } - return - } - if convertedResponse, ok := ociResponse.(StartAnalyticsClusterResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into StartAnalyticsClusterResponse") - } - return -} - -// startAnalyticsCluster implements the OCIOperation interface (enables retrying operations) -func (client DbSystemClient) startAnalyticsCluster(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - - httpRequest, err := request.HTTPRequest(http.MethodPost, "/dbSystems/{dbSystemId}/analyticsCluster/actions/start", binaryReqBody, extraHeaders) - if err != nil { - return nil, err - } - - var response StartAnalyticsClusterResponse - 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/mysql/20190415/AnalyticsCluster/StartAnalyticsCluster" - err = common.PostProcessServiceError(err, "DbSystem", "StartAnalyticsCluster", apiReferenceLink) - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - // StartDbSystem Start the specified DB System. // // See also @@ -1319,70 +884,6 @@ func (client DbSystemClient) startHeatWaveCluster(ctx context.Context, request c return response, err } -// StopAnalyticsCluster DEPRECATED -- please use HeatWave API instead. -// Stops the Analytics Cluster. -// -// See also -// -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/mysql/StopAnalyticsCluster.go.html to see an example of how to use StopAnalyticsCluster API. -// A default retry strategy applies to this operation StopAnalyticsCluster() -func (client DbSystemClient) StopAnalyticsCluster(ctx context.Context, request StopAnalyticsClusterRequest) (response StopAnalyticsClusterResponse, 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.stopAnalyticsCluster, policy) - if err != nil { - if ociResponse != nil { - if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { - opcRequestId := httpResponse.Header.Get("opc-request-id") - response = StopAnalyticsClusterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} - } else { - response = StopAnalyticsClusterResponse{} - } - } - return - } - if convertedResponse, ok := ociResponse.(StopAnalyticsClusterResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into StopAnalyticsClusterResponse") - } - return -} - -// stopAnalyticsCluster implements the OCIOperation interface (enables retrying operations) -func (client DbSystemClient) stopAnalyticsCluster(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - - httpRequest, err := request.HTTPRequest(http.MethodPost, "/dbSystems/{dbSystemId}/analyticsCluster/actions/stop", binaryReqBody, extraHeaders) - if err != nil { - return nil, err - } - - var response StopAnalyticsClusterResponse - 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/mysql/20190415/AnalyticsCluster/StopAnalyticsCluster" - err = common.PostProcessServiceError(err, "DbSystem", "StopAnalyticsCluster", apiReferenceLink) - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - // StopDbSystem Stops the specified DB System. // A stopped DB System is not billed. // @@ -1510,65 +1011,6 @@ func (client DbSystemClient) stopHeatWaveCluster(ctx context.Context, request co return response, err } -// UpdateAnalyticsCluster DEPRECATED -- please use HeatWave API instead. -// Updates the Analytics Cluster. -// -// See also -// -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/mysql/UpdateAnalyticsCluster.go.html to see an example of how to use UpdateAnalyticsCluster API. -// A default retry strategy applies to this operation UpdateAnalyticsCluster() -func (client DbSystemClient) UpdateAnalyticsCluster(ctx context.Context, request UpdateAnalyticsClusterRequest) (response UpdateAnalyticsClusterResponse, 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.updateAnalyticsCluster, policy) - if err != nil { - if ociResponse != nil { - if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { - opcRequestId := httpResponse.Header.Get("opc-request-id") - response = UpdateAnalyticsClusterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} - } else { - response = UpdateAnalyticsClusterResponse{} - } - } - return - } - if convertedResponse, ok := ociResponse.(UpdateAnalyticsClusterResponse); ok { - response = convertedResponse - } else { - err = fmt.Errorf("failed to convert OCIResponse into UpdateAnalyticsClusterResponse") - } - return -} - -// updateAnalyticsCluster implements the OCIOperation interface (enables retrying operations) -func (client DbSystemClient) updateAnalyticsCluster(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - - httpRequest, err := request.HTTPRequest(http.MethodPut, "/dbSystems/{dbSystemId}/analyticsCluster", binaryReqBody, extraHeaders) - if err != nil { - return nil, err - } - - var response UpdateAnalyticsClusterResponse - 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/mysql/20190415/AnalyticsCluster/UpdateAnalyticsCluster" - err = common.PostProcessServiceError(err, "DbSystem", "UpdateAnalyticsCluster", apiReferenceLink) - return response, err - } - - err = common.UnmarshalResponse(httpResponse, &response) - return response, err -} - // UpdateDbSystem Update the configuration of a DB System. // Updating different fields in the DB System will have different results // on the uptime of the DB System. For example, changing the displayName of diff --git a/mysql/mysql_mysqlaas_client.go b/mysql/mysql_mysqlaas_client.go index 31dd55ea2f..2aefbf5e59 100644 --- a/mysql/mysql_mysqlaas_client.go +++ b/mysql/mysql_mysqlaas_client.go @@ -80,7 +80,7 @@ func (client *MysqlaasClient) setConfigurationProvider(configProvider common.Con 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/mysql/mysql_replicas_client.go b/mysql/mysql_replicas_client.go index 0d53f00ca7..05a79ad540 100644 --- a/mysql/mysql_replicas_client.go +++ b/mysql/mysql_replicas_client.go @@ -80,7 +80,7 @@ func (client *ReplicasClient) setConfigurationProvider(configProvider common.Con 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/mysql/mysql_workrequests_client.go b/mysql/mysql_workrequests_client.go index 934a31950b..d39365ae45 100644 --- a/mysql/mysql_workrequests_client.go +++ b/mysql/mysql_workrequests_client.go @@ -80,7 +80,7 @@ func (client *WorkRequestsClient) setConfigurationProvider(configProvider common 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/mysql/restart_analytics_cluster_request_response.go b/mysql/restart_analytics_cluster_request_response.go deleted file mode 100644 index 83f4c2a3e5..0000000000 --- a/mysql/restart_analytics_cluster_request_response.go +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. -// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -// Code generated. DO NOT EDIT. - -package mysql - -import ( - "fmt" - "github.com/oracle/oci-go-sdk/v65/common" - "net/http" - "strings" -) - -// RestartAnalyticsClusterRequest wrapper for the RestartAnalyticsCluster operation -// -// # See also -// -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/mysql/RestartAnalyticsCluster.go.html to see an example of how to use RestartAnalyticsClusterRequest. -type RestartAnalyticsClusterRequest struct { - - // The DB System OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). - DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` - - // For optimistic concurrency control. In the PUT or DELETE call for a - // resource, set the `If-Match` header to the value of the etag from a - // previous GET or POST response for that resource. The resource will be - // updated or deleted only if the etag you provide matches the resource's - // current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Customer-defined unique identifier for the request. If you need to - // contact Oracle about a specific request, please provide the request - // ID that you supplied in this header with the request. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // A token that uniquely identifies a request so it can be retried in case - // of a timeout or server error without risk of executing that same action - // again. Retry tokens expire after 24 hours, but can be invalidated before - // then due to conflicting operations (for example, if a resource has been - // deleted and purged from the system, then a retry of the original - // creation request may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request RestartAnalyticsClusterRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request RestartAnalyticsClusterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { - - _, err := request.ValidateEnumValue() - if err != nil { - return http.Request{}, err - } - return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) -} - -// BinaryRequestBody implements the OCIRequest interface -func (request RestartAnalyticsClusterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { - - return nil, false - -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request RestartAnalyticsClusterRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ValidateEnumValue returns an error when providing an unsupported enum value -// This function is being called during constructing API request process -// Not recommended for calling this function directly -func (request RestartAnalyticsClusterRequest) ValidateEnumValue() (bool, error) { - errMessage := []string{} - if len(errMessage) > 0 { - return true, fmt.Errorf(strings.Join(errMessage, "\n")) - } - return false, nil -} - -// RestartAnalyticsClusterResponse wrapper for the RestartAnalyticsCluster operation -type RestartAnalyticsClusterResponse 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"` - - // 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"` -} - -func (response RestartAnalyticsClusterResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response RestartAnalyticsClusterResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/mysql/shape_summary.go b/mysql/shape_summary.go index bcdc6262f8..c08fe6ec9a 100644 --- a/mysql/shape_summary.go +++ b/mysql/shape_summary.go @@ -61,21 +61,18 @@ type ShapeSummaryIsSupportedForEnum string // Set of constants representing the allowable values for ShapeSummaryIsSupportedForEnum const ( - ShapeSummaryIsSupportedForDbsystem ShapeSummaryIsSupportedForEnum = "DBSYSTEM" - ShapeSummaryIsSupportedForAnalyticscluster ShapeSummaryIsSupportedForEnum = "ANALYTICSCLUSTER" - ShapeSummaryIsSupportedForHeatwavecluster ShapeSummaryIsSupportedForEnum = "HEATWAVECLUSTER" + ShapeSummaryIsSupportedForDbsystem ShapeSummaryIsSupportedForEnum = "DBSYSTEM" + ShapeSummaryIsSupportedForHeatwavecluster ShapeSummaryIsSupportedForEnum = "HEATWAVECLUSTER" ) var mappingShapeSummaryIsSupportedForEnum = map[string]ShapeSummaryIsSupportedForEnum{ - "DBSYSTEM": ShapeSummaryIsSupportedForDbsystem, - "ANALYTICSCLUSTER": ShapeSummaryIsSupportedForAnalyticscluster, - "HEATWAVECLUSTER": ShapeSummaryIsSupportedForHeatwavecluster, + "DBSYSTEM": ShapeSummaryIsSupportedForDbsystem, + "HEATWAVECLUSTER": ShapeSummaryIsSupportedForHeatwavecluster, } var mappingShapeSummaryIsSupportedForEnumLowerCase = map[string]ShapeSummaryIsSupportedForEnum{ - "dbsystem": ShapeSummaryIsSupportedForDbsystem, - "analyticscluster": ShapeSummaryIsSupportedForAnalyticscluster, - "heatwavecluster": ShapeSummaryIsSupportedForHeatwavecluster, + "dbsystem": ShapeSummaryIsSupportedForDbsystem, + "heatwavecluster": ShapeSummaryIsSupportedForHeatwavecluster, } // GetShapeSummaryIsSupportedForEnumValues Enumerates the set of values for ShapeSummaryIsSupportedForEnum @@ -91,7 +88,6 @@ func GetShapeSummaryIsSupportedForEnumValues() []ShapeSummaryIsSupportedForEnum func GetShapeSummaryIsSupportedForEnumStringValues() []string { return []string{ "DBSYSTEM", - "ANALYTICSCLUSTER", "HEATWAVECLUSTER", } } diff --git a/mysql/start_analytics_cluster_request_response.go b/mysql/start_analytics_cluster_request_response.go deleted file mode 100644 index 6bf25e8220..0000000000 --- a/mysql/start_analytics_cluster_request_response.go +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. -// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -// Code generated. DO NOT EDIT. - -package mysql - -import ( - "fmt" - "github.com/oracle/oci-go-sdk/v65/common" - "net/http" - "strings" -) - -// StartAnalyticsClusterRequest wrapper for the StartAnalyticsCluster operation -// -// # See also -// -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/mysql/StartAnalyticsCluster.go.html to see an example of how to use StartAnalyticsClusterRequest. -type StartAnalyticsClusterRequest struct { - - // The DB System OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). - DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` - - // For optimistic concurrency control. In the PUT or DELETE call for a - // resource, set the `If-Match` header to the value of the etag from a - // previous GET or POST response for that resource. The resource will be - // updated or deleted only if the etag you provide matches the resource's - // current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Customer-defined unique identifier for the request. If you need to - // contact Oracle about a specific request, please provide the request - // ID that you supplied in this header with the request. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // A token that uniquely identifies a request so it can be retried in case - // of a timeout or server error without risk of executing that same action - // again. Retry tokens expire after 24 hours, but can be invalidated before - // then due to conflicting operations (for example, if a resource has been - // deleted and purged from the system, then a retry of the original - // creation request may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request StartAnalyticsClusterRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request StartAnalyticsClusterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { - - _, err := request.ValidateEnumValue() - if err != nil { - return http.Request{}, err - } - return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) -} - -// BinaryRequestBody implements the OCIRequest interface -func (request StartAnalyticsClusterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { - - return nil, false - -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request StartAnalyticsClusterRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ValidateEnumValue returns an error when providing an unsupported enum value -// This function is being called during constructing API request process -// Not recommended for calling this function directly -func (request StartAnalyticsClusterRequest) ValidateEnumValue() (bool, error) { - errMessage := []string{} - if len(errMessage) > 0 { - return true, fmt.Errorf(strings.Join(errMessage, "\n")) - } - return false, nil -} - -// StartAnalyticsClusterResponse wrapper for the StartAnalyticsCluster operation -type StartAnalyticsClusterResponse 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"` - - // 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"` -} - -func (response StartAnalyticsClusterResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response StartAnalyticsClusterResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/mysql/stop_analytics_cluster_request_response.go b/mysql/stop_analytics_cluster_request_response.go deleted file mode 100644 index 7ccee1e68b..0000000000 --- a/mysql/stop_analytics_cluster_request_response.go +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. -// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -// Code generated. DO NOT EDIT. - -package mysql - -import ( - "fmt" - "github.com/oracle/oci-go-sdk/v65/common" - "net/http" - "strings" -) - -// StopAnalyticsClusterRequest wrapper for the StopAnalyticsCluster operation -// -// # See also -// -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/mysql/StopAnalyticsCluster.go.html to see an example of how to use StopAnalyticsClusterRequest. -type StopAnalyticsClusterRequest struct { - - // The DB System OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). - DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` - - // For optimistic concurrency control. In the PUT or DELETE call for a - // resource, set the `If-Match` header to the value of the etag from a - // previous GET or POST response for that resource. The resource will be - // updated or deleted only if the etag you provide matches the resource's - // current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Customer-defined unique identifier for the request. If you need to - // contact Oracle about a specific request, please provide the request - // ID that you supplied in this header with the request. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // A token that uniquely identifies a request so it can be retried in case - // of a timeout or server error without risk of executing that same action - // again. Retry tokens expire after 24 hours, but can be invalidated before - // then due to conflicting operations (for example, if a resource has been - // deleted and purged from the system, then a retry of the original - // creation request may be rejected). - OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request StopAnalyticsClusterRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request StopAnalyticsClusterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { - - _, err := request.ValidateEnumValue() - if err != nil { - return http.Request{}, err - } - return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) -} - -// BinaryRequestBody implements the OCIRequest interface -func (request StopAnalyticsClusterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { - - return nil, false - -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request StopAnalyticsClusterRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ValidateEnumValue returns an error when providing an unsupported enum value -// This function is being called during constructing API request process -// Not recommended for calling this function directly -func (request StopAnalyticsClusterRequest) ValidateEnumValue() (bool, error) { - errMessage := []string{} - if len(errMessage) > 0 { - return true, fmt.Errorf(strings.Join(errMessage, "\n")) - } - return false, nil -} - -// StopAnalyticsClusterResponse wrapper for the StopAnalyticsCluster operation -type StopAnalyticsClusterResponse 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"` - - // 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"` -} - -func (response StopAnalyticsClusterResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response StopAnalyticsClusterResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/mysql/update_analytics_cluster_details.go b/mysql/update_analytics_cluster_details.go deleted file mode 100644 index 2d02efd4df..0000000000 --- a/mysql/update_analytics_cluster_details.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. -// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -// Code generated. DO NOT EDIT. - -// MySQL Database Service API -// -// The API for the MySQL Database Service -// - -package mysql - -import ( - "fmt" - "github.com/oracle/oci-go-sdk/v65/common" - "strings" -) - -// UpdateAnalyticsClusterDetails DEPRECATED -- please use HeatWave API instead. -// Details about the Analytics Cluster properties to be updated. -type UpdateAnalyticsClusterDetails struct { - - // A change to the shape of the nodes in the Analytics Cluster will - // result in the entire cluster being torn down and re-created with - // Compute instances of the new Shape. This may result in significant - // downtime for the analytics capability while the Analytics Cluster is - // re-provisioned. - ShapeName *string `mandatory:"false" json:"shapeName"` - - // A change to the number of nodes in the Analytics Cluster will result - // in the entire cluster being torn down and re-created with the new - // cluster of nodes. This may result in a significant downtime for the - // analytics capability while the Analytics Cluster is - // re-provisioned. - ClusterSize *int `mandatory:"false" json:"clusterSize"` -} - -func (m UpdateAnalyticsClusterDetails) String() string { - return common.PointerString(m) -} - -// ValidateEnumValue returns an error when providing an unsupported enum value -// This function is being called during constructing API request process -// Not recommended for calling this function directly -func (m UpdateAnalyticsClusterDetails) ValidateEnumValue() (bool, error) { - errMessage := []string{} - - if len(errMessage) > 0 { - return true, fmt.Errorf(strings.Join(errMessage, "\n")) - } - return false, nil -} diff --git a/mysql/update_analytics_cluster_request_response.go b/mysql/update_analytics_cluster_request_response.go deleted file mode 100644 index 3d5085e85e..0000000000 --- a/mysql/update_analytics_cluster_request_response.go +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. -// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -// Code generated. DO NOT EDIT. - -package mysql - -import ( - "fmt" - "github.com/oracle/oci-go-sdk/v65/common" - "net/http" - "strings" -) - -// UpdateAnalyticsClusterRequest wrapper for the UpdateAnalyticsCluster operation -// -// # See also -// -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/mysql/UpdateAnalyticsCluster.go.html to see an example of how to use UpdateAnalyticsClusterRequest. -type UpdateAnalyticsClusterRequest struct { - - // The DB System OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). - DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` - - // Request to update an Analytics Cluster. - UpdateAnalyticsClusterDetails `contributesTo:"body"` - - // For optimistic concurrency control. In the PUT or DELETE call for a - // resource, set the `If-Match` header to the value of the etag from a - // previous GET or POST response for that resource. The resource will be - // updated or deleted only if the etag you provide matches the resource's - // current etag value. - IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` - - // Customer-defined unique identifier for the request. If you need to - // contact Oracle about a specific request, please provide the request - // ID that you supplied in this header with the request. - OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` - - // Metadata about the request. This information will not be transmitted to the service, but - // represents information that the SDK will consume to drive retry behavior. - RequestMetadata common.RequestMetadata -} - -func (request UpdateAnalyticsClusterRequest) String() string { - return common.PointerString(request) -} - -// HTTPRequest implements the OCIRequest interface -func (request UpdateAnalyticsClusterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { - - _, err := request.ValidateEnumValue() - if err != nil { - return http.Request{}, err - } - return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) -} - -// BinaryRequestBody implements the OCIRequest interface -func (request UpdateAnalyticsClusterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { - - return nil, false - -} - -// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. -func (request UpdateAnalyticsClusterRequest) RetryPolicy() *common.RetryPolicy { - return request.RequestMetadata.RetryPolicy -} - -// ValidateEnumValue returns an error when providing an unsupported enum value -// This function is being called during constructing API request process -// Not recommended for calling this function directly -func (request UpdateAnalyticsClusterRequest) ValidateEnumValue() (bool, error) { - errMessage := []string{} - if len(errMessage) > 0 { - return true, fmt.Errorf(strings.Join(errMessage, "\n")) - } - return false, nil -} - -// UpdateAnalyticsClusterResponse wrapper for the UpdateAnalyticsCluster operation -type UpdateAnalyticsClusterResponse 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"` - - // 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"` -} - -func (response UpdateAnalyticsClusterResponse) String() string { - return common.PointerString(response) -} - -// HTTPResponse implements the OCIResponse interface -func (response UpdateAnalyticsClusterResponse) HTTPResponse() *http.Response { - return response.RawResponse -} diff --git a/mysql/work_request_operation_type.go b/mysql/work_request_operation_type.go index ca8857129f..1f05e871e0 100644 --- a/mysql/work_request_operation_type.go +++ b/mysql/work_request_operation_type.go @@ -18,96 +18,75 @@ type WorkRequestOperationTypeEnum string // Set of constants representing the allowable values for WorkRequestOperationTypeEnum const ( - WorkRequestOperationTypeCreateDbsystem WorkRequestOperationTypeEnum = "CREATE_DBSYSTEM" - WorkRequestOperationTypeUpdateDbsystem WorkRequestOperationTypeEnum = "UPDATE_DBSYSTEM" - WorkRequestOperationTypeDeleteDbsystem WorkRequestOperationTypeEnum = "DELETE_DBSYSTEM" - WorkRequestOperationTypeStartDbsystem WorkRequestOperationTypeEnum = "START_DBSYSTEM" - WorkRequestOperationTypeStopDbsystem WorkRequestOperationTypeEnum = "STOP_DBSYSTEM" - WorkRequestOperationTypeRestartDbsystem WorkRequestOperationTypeEnum = "RESTART_DBSYSTEM" - WorkRequestOperationTypeAddAnalyticsCluster WorkRequestOperationTypeEnum = "ADD_ANALYTICS_CLUSTER" - WorkRequestOperationTypeUpdateAnalyticsCluster WorkRequestOperationTypeEnum = "UPDATE_ANALYTICS_CLUSTER" - WorkRequestOperationTypeDeleteAnalyticsCluster WorkRequestOperationTypeEnum = "DELETE_ANALYTICS_CLUSTER" - WorkRequestOperationTypeStartAnalyticsCluster WorkRequestOperationTypeEnum = "START_ANALYTICS_CLUSTER" - WorkRequestOperationTypeStopAnalyticsCluster WorkRequestOperationTypeEnum = "STOP_ANALYTICS_CLUSTER" - WorkRequestOperationTypeRestartAnalyticsCluster WorkRequestOperationTypeEnum = "RESTART_ANALYTICS_CLUSTER" - WorkRequestOperationTypeGenerateAnalyticsClusterMemoryEstimate WorkRequestOperationTypeEnum = "GENERATE_ANALYTICS_CLUSTER_MEMORY_ESTIMATE" - WorkRequestOperationTypeAddHeatwaveCluster WorkRequestOperationTypeEnum = "ADD_HEATWAVE_CLUSTER" - WorkRequestOperationTypeUpdateHeatwaveCluster WorkRequestOperationTypeEnum = "UPDATE_HEATWAVE_CLUSTER" - WorkRequestOperationTypeDeleteHeatwaveCluster WorkRequestOperationTypeEnum = "DELETE_HEATWAVE_CLUSTER" - WorkRequestOperationTypeStartHeatwaveCluster WorkRequestOperationTypeEnum = "START_HEATWAVE_CLUSTER" - WorkRequestOperationTypeStopHeatwaveCluster WorkRequestOperationTypeEnum = "STOP_HEATWAVE_CLUSTER" - WorkRequestOperationTypeRestartHeatwaveCluster WorkRequestOperationTypeEnum = "RESTART_HEATWAVE_CLUSTER" - WorkRequestOperationTypeGenerateHeatwaveClusterMemoryEstimate WorkRequestOperationTypeEnum = "GENERATE_HEATWAVE_CLUSTER_MEMORY_ESTIMATE" - WorkRequestOperationTypeCreateReplica WorkRequestOperationTypeEnum = "CREATE_REPLICA" - WorkRequestOperationTypeUpdateReplica WorkRequestOperationTypeEnum = "UPDATE_REPLICA" - WorkRequestOperationTypeDeleteReplica WorkRequestOperationTypeEnum = "DELETE_REPLICA" - WorkRequestOperationTypeCreateChannel WorkRequestOperationTypeEnum = "CREATE_CHANNEL" - WorkRequestOperationTypeUpdateChannel WorkRequestOperationTypeEnum = "UPDATE_CHANNEL" - WorkRequestOperationTypeResumeChannel WorkRequestOperationTypeEnum = "RESUME_CHANNEL" - WorkRequestOperationTypeResetChannel WorkRequestOperationTypeEnum = "RESET_CHANNEL" - WorkRequestOperationTypeDeleteChannel WorkRequestOperationTypeEnum = "DELETE_CHANNEL" + WorkRequestOperationTypeCreateDbsystem WorkRequestOperationTypeEnum = "CREATE_DBSYSTEM" + WorkRequestOperationTypeUpdateDbsystem WorkRequestOperationTypeEnum = "UPDATE_DBSYSTEM" + WorkRequestOperationTypeDeleteDbsystem WorkRequestOperationTypeEnum = "DELETE_DBSYSTEM" + WorkRequestOperationTypeStartDbsystem WorkRequestOperationTypeEnum = "START_DBSYSTEM" + WorkRequestOperationTypeStopDbsystem WorkRequestOperationTypeEnum = "STOP_DBSYSTEM" + WorkRequestOperationTypeRestartDbsystem WorkRequestOperationTypeEnum = "RESTART_DBSYSTEM" + WorkRequestOperationTypeAddHeatwaveCluster WorkRequestOperationTypeEnum = "ADD_HEATWAVE_CLUSTER" + WorkRequestOperationTypeUpdateHeatwaveCluster WorkRequestOperationTypeEnum = "UPDATE_HEATWAVE_CLUSTER" + WorkRequestOperationTypeDeleteHeatwaveCluster WorkRequestOperationTypeEnum = "DELETE_HEATWAVE_CLUSTER" + WorkRequestOperationTypeStartHeatwaveCluster WorkRequestOperationTypeEnum = "START_HEATWAVE_CLUSTER" + WorkRequestOperationTypeStopHeatwaveCluster WorkRequestOperationTypeEnum = "STOP_HEATWAVE_CLUSTER" + WorkRequestOperationTypeRestartHeatwaveCluster WorkRequestOperationTypeEnum = "RESTART_HEATWAVE_CLUSTER" + WorkRequestOperationTypeGenerateHeatwaveClusterMemoryEstimate WorkRequestOperationTypeEnum = "GENERATE_HEATWAVE_CLUSTER_MEMORY_ESTIMATE" + WorkRequestOperationTypeCreateReplica WorkRequestOperationTypeEnum = "CREATE_REPLICA" + WorkRequestOperationTypeUpdateReplica WorkRequestOperationTypeEnum = "UPDATE_REPLICA" + WorkRequestOperationTypeDeleteReplica WorkRequestOperationTypeEnum = "DELETE_REPLICA" + WorkRequestOperationTypeCreateChannel WorkRequestOperationTypeEnum = "CREATE_CHANNEL" + WorkRequestOperationTypeUpdateChannel WorkRequestOperationTypeEnum = "UPDATE_CHANNEL" + WorkRequestOperationTypeResumeChannel WorkRequestOperationTypeEnum = "RESUME_CHANNEL" + WorkRequestOperationTypeResetChannel WorkRequestOperationTypeEnum = "RESET_CHANNEL" + WorkRequestOperationTypeDeleteChannel WorkRequestOperationTypeEnum = "DELETE_CHANNEL" ) var mappingWorkRequestOperationTypeEnum = map[string]WorkRequestOperationTypeEnum{ - "CREATE_DBSYSTEM": WorkRequestOperationTypeCreateDbsystem, - "UPDATE_DBSYSTEM": WorkRequestOperationTypeUpdateDbsystem, - "DELETE_DBSYSTEM": WorkRequestOperationTypeDeleteDbsystem, - "START_DBSYSTEM": WorkRequestOperationTypeStartDbsystem, - "STOP_DBSYSTEM": WorkRequestOperationTypeStopDbsystem, - "RESTART_DBSYSTEM": WorkRequestOperationTypeRestartDbsystem, - "ADD_ANALYTICS_CLUSTER": WorkRequestOperationTypeAddAnalyticsCluster, - "UPDATE_ANALYTICS_CLUSTER": WorkRequestOperationTypeUpdateAnalyticsCluster, - "DELETE_ANALYTICS_CLUSTER": WorkRequestOperationTypeDeleteAnalyticsCluster, - "START_ANALYTICS_CLUSTER": WorkRequestOperationTypeStartAnalyticsCluster, - "STOP_ANALYTICS_CLUSTER": WorkRequestOperationTypeStopAnalyticsCluster, - "RESTART_ANALYTICS_CLUSTER": WorkRequestOperationTypeRestartAnalyticsCluster, - "GENERATE_ANALYTICS_CLUSTER_MEMORY_ESTIMATE": WorkRequestOperationTypeGenerateAnalyticsClusterMemoryEstimate, - "ADD_HEATWAVE_CLUSTER": WorkRequestOperationTypeAddHeatwaveCluster, - "UPDATE_HEATWAVE_CLUSTER": WorkRequestOperationTypeUpdateHeatwaveCluster, - "DELETE_HEATWAVE_CLUSTER": WorkRequestOperationTypeDeleteHeatwaveCluster, - "START_HEATWAVE_CLUSTER": WorkRequestOperationTypeStartHeatwaveCluster, - "STOP_HEATWAVE_CLUSTER": WorkRequestOperationTypeStopHeatwaveCluster, - "RESTART_HEATWAVE_CLUSTER": WorkRequestOperationTypeRestartHeatwaveCluster, - "GENERATE_HEATWAVE_CLUSTER_MEMORY_ESTIMATE": WorkRequestOperationTypeGenerateHeatwaveClusterMemoryEstimate, - "CREATE_REPLICA": WorkRequestOperationTypeCreateReplica, - "UPDATE_REPLICA": WorkRequestOperationTypeUpdateReplica, - "DELETE_REPLICA": WorkRequestOperationTypeDeleteReplica, - "CREATE_CHANNEL": WorkRequestOperationTypeCreateChannel, - "UPDATE_CHANNEL": WorkRequestOperationTypeUpdateChannel, - "RESUME_CHANNEL": WorkRequestOperationTypeResumeChannel, - "RESET_CHANNEL": WorkRequestOperationTypeResetChannel, - "DELETE_CHANNEL": WorkRequestOperationTypeDeleteChannel, + "CREATE_DBSYSTEM": WorkRequestOperationTypeCreateDbsystem, + "UPDATE_DBSYSTEM": WorkRequestOperationTypeUpdateDbsystem, + "DELETE_DBSYSTEM": WorkRequestOperationTypeDeleteDbsystem, + "START_DBSYSTEM": WorkRequestOperationTypeStartDbsystem, + "STOP_DBSYSTEM": WorkRequestOperationTypeStopDbsystem, + "RESTART_DBSYSTEM": WorkRequestOperationTypeRestartDbsystem, + "ADD_HEATWAVE_CLUSTER": WorkRequestOperationTypeAddHeatwaveCluster, + "UPDATE_HEATWAVE_CLUSTER": WorkRequestOperationTypeUpdateHeatwaveCluster, + "DELETE_HEATWAVE_CLUSTER": WorkRequestOperationTypeDeleteHeatwaveCluster, + "START_HEATWAVE_CLUSTER": WorkRequestOperationTypeStartHeatwaveCluster, + "STOP_HEATWAVE_CLUSTER": WorkRequestOperationTypeStopHeatwaveCluster, + "RESTART_HEATWAVE_CLUSTER": WorkRequestOperationTypeRestartHeatwaveCluster, + "GENERATE_HEATWAVE_CLUSTER_MEMORY_ESTIMATE": WorkRequestOperationTypeGenerateHeatwaveClusterMemoryEstimate, + "CREATE_REPLICA": WorkRequestOperationTypeCreateReplica, + "UPDATE_REPLICA": WorkRequestOperationTypeUpdateReplica, + "DELETE_REPLICA": WorkRequestOperationTypeDeleteReplica, + "CREATE_CHANNEL": WorkRequestOperationTypeCreateChannel, + "UPDATE_CHANNEL": WorkRequestOperationTypeUpdateChannel, + "RESUME_CHANNEL": WorkRequestOperationTypeResumeChannel, + "RESET_CHANNEL": WorkRequestOperationTypeResetChannel, + "DELETE_CHANNEL": WorkRequestOperationTypeDeleteChannel, } var mappingWorkRequestOperationTypeEnumLowerCase = map[string]WorkRequestOperationTypeEnum{ - "create_dbsystem": WorkRequestOperationTypeCreateDbsystem, - "update_dbsystem": WorkRequestOperationTypeUpdateDbsystem, - "delete_dbsystem": WorkRequestOperationTypeDeleteDbsystem, - "start_dbsystem": WorkRequestOperationTypeStartDbsystem, - "stop_dbsystem": WorkRequestOperationTypeStopDbsystem, - "restart_dbsystem": WorkRequestOperationTypeRestartDbsystem, - "add_analytics_cluster": WorkRequestOperationTypeAddAnalyticsCluster, - "update_analytics_cluster": WorkRequestOperationTypeUpdateAnalyticsCluster, - "delete_analytics_cluster": WorkRequestOperationTypeDeleteAnalyticsCluster, - "start_analytics_cluster": WorkRequestOperationTypeStartAnalyticsCluster, - "stop_analytics_cluster": WorkRequestOperationTypeStopAnalyticsCluster, - "restart_analytics_cluster": WorkRequestOperationTypeRestartAnalyticsCluster, - "generate_analytics_cluster_memory_estimate": WorkRequestOperationTypeGenerateAnalyticsClusterMemoryEstimate, - "add_heatwave_cluster": WorkRequestOperationTypeAddHeatwaveCluster, - "update_heatwave_cluster": WorkRequestOperationTypeUpdateHeatwaveCluster, - "delete_heatwave_cluster": WorkRequestOperationTypeDeleteHeatwaveCluster, - "start_heatwave_cluster": WorkRequestOperationTypeStartHeatwaveCluster, - "stop_heatwave_cluster": WorkRequestOperationTypeStopHeatwaveCluster, - "restart_heatwave_cluster": WorkRequestOperationTypeRestartHeatwaveCluster, - "generate_heatwave_cluster_memory_estimate": WorkRequestOperationTypeGenerateHeatwaveClusterMemoryEstimate, - "create_replica": WorkRequestOperationTypeCreateReplica, - "update_replica": WorkRequestOperationTypeUpdateReplica, - "delete_replica": WorkRequestOperationTypeDeleteReplica, - "create_channel": WorkRequestOperationTypeCreateChannel, - "update_channel": WorkRequestOperationTypeUpdateChannel, - "resume_channel": WorkRequestOperationTypeResumeChannel, - "reset_channel": WorkRequestOperationTypeResetChannel, - "delete_channel": WorkRequestOperationTypeDeleteChannel, + "create_dbsystem": WorkRequestOperationTypeCreateDbsystem, + "update_dbsystem": WorkRequestOperationTypeUpdateDbsystem, + "delete_dbsystem": WorkRequestOperationTypeDeleteDbsystem, + "start_dbsystem": WorkRequestOperationTypeStartDbsystem, + "stop_dbsystem": WorkRequestOperationTypeStopDbsystem, + "restart_dbsystem": WorkRequestOperationTypeRestartDbsystem, + "add_heatwave_cluster": WorkRequestOperationTypeAddHeatwaveCluster, + "update_heatwave_cluster": WorkRequestOperationTypeUpdateHeatwaveCluster, + "delete_heatwave_cluster": WorkRequestOperationTypeDeleteHeatwaveCluster, + "start_heatwave_cluster": WorkRequestOperationTypeStartHeatwaveCluster, + "stop_heatwave_cluster": WorkRequestOperationTypeStopHeatwaveCluster, + "restart_heatwave_cluster": WorkRequestOperationTypeRestartHeatwaveCluster, + "generate_heatwave_cluster_memory_estimate": WorkRequestOperationTypeGenerateHeatwaveClusterMemoryEstimate, + "create_replica": WorkRequestOperationTypeCreateReplica, + "update_replica": WorkRequestOperationTypeUpdateReplica, + "delete_replica": WorkRequestOperationTypeDeleteReplica, + "create_channel": WorkRequestOperationTypeCreateChannel, + "update_channel": WorkRequestOperationTypeUpdateChannel, + "resume_channel": WorkRequestOperationTypeResumeChannel, + "reset_channel": WorkRequestOperationTypeResetChannel, + "delete_channel": WorkRequestOperationTypeDeleteChannel, } // GetWorkRequestOperationTypeEnumValues Enumerates the set of values for WorkRequestOperationTypeEnum @@ -128,13 +107,6 @@ func GetWorkRequestOperationTypeEnumStringValues() []string { "START_DBSYSTEM", "STOP_DBSYSTEM", "RESTART_DBSYSTEM", - "ADD_ANALYTICS_CLUSTER", - "UPDATE_ANALYTICS_CLUSTER", - "DELETE_ANALYTICS_CLUSTER", - "START_ANALYTICS_CLUSTER", - "STOP_ANALYTICS_CLUSTER", - "RESTART_ANALYTICS_CLUSTER", - "GENERATE_ANALYTICS_CLUSTER_MEMORY_ESTIMATE", "ADD_HEATWAVE_CLUSTER", "UPDATE_HEATWAVE_CLUSTER", "DELETE_HEATWAVE_CLUSTER", diff --git a/networkfirewall/create_network_firewall_policy_details.go b/networkfirewall/create_network_firewall_policy_details.go index 0dd12a4e1b..3a1dc6dafd 100644 --- a/networkfirewall/create_network_firewall_policy_details.go +++ b/networkfirewall/create_network_firewall_policy_details.go @@ -126,15 +126,9 @@ func (m *CreateNetworkFirewallPolicyDetails) UnmarshalJSON(data []byte) (e error m.IpAddressLists = model.IpAddressLists m.SecurityRules = make([]SecurityRule, len(model.SecurityRules)) - for i, n := range model.SecurityRules { - m.SecurityRules[i] = n - } - + copy(m.SecurityRules, model.SecurityRules) m.DecryptionRules = make([]DecryptionRule, len(model.DecryptionRules)) - for i, n := range model.DecryptionRules { - m.DecryptionRules[i] = n - } - + copy(m.DecryptionRules, model.DecryptionRules) m.DecryptionProfiles = make(map[string]DecryptionProfile) for k, v := range model.DecryptionProfiles { nn, e = v.UnmarshalPolymorphicJSON(v.JsonData) diff --git a/networkfirewall/mapped_secret.go b/networkfirewall/mapped_secret.go index 650b828a8e..8884a35b21 100644 --- a/networkfirewall/mapped_secret.go +++ b/networkfirewall/mapped_secret.go @@ -67,7 +67,7 @@ func (m *mappedsecret) UnmarshalPolymorphicJSON(data []byte) (interface{}, error } } -//GetType returns Type +// GetType returns Type func (m mappedsecret) GetType() MappedSecretTypeEnum { return m.Type } diff --git a/networkfirewall/network_firewall_policy.go b/networkfirewall/network_firewall_policy.go index c4030e87af..4aa334e705 100644 --- a/networkfirewall/network_firewall_policy.go +++ b/networkfirewall/network_firewall_policy.go @@ -160,15 +160,9 @@ func (m *NetworkFirewallPolicy) UnmarshalJSON(data []byte) (e error) { m.IpAddressLists = model.IpAddressLists m.SecurityRules = make([]SecurityRule, len(model.SecurityRules)) - for i, n := range model.SecurityRules { - m.SecurityRules[i] = n - } - + copy(m.SecurityRules, model.SecurityRules) m.DecryptionRules = make([]DecryptionRule, len(model.DecryptionRules)) - for i, n := range model.DecryptionRules { - m.DecryptionRules[i] = n - } - + copy(m.DecryptionRules, model.DecryptionRules) m.DecryptionProfiles = make(map[string]DecryptionProfile) for k, v := range model.DecryptionProfiles { nn, e = v.UnmarshalPolymorphicJSON(v.JsonData) diff --git a/networkfirewall/networkfirewall_client.go b/networkfirewall/networkfirewall_client.go index c6cc3d4f2d..8a0221066f 100644 --- a/networkfirewall/networkfirewall_client.go +++ b/networkfirewall/networkfirewall_client.go @@ -80,7 +80,7 @@ func (client *NetworkFirewallClient) setConfigurationProvider(configProvider com 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/networkfirewall/update_network_firewall_policy_details.go b/networkfirewall/update_network_firewall_policy_details.go index 113d101df3..0699d0aab0 100644 --- a/networkfirewall/update_network_firewall_policy_details.go +++ b/networkfirewall/update_network_firewall_policy_details.go @@ -122,15 +122,9 @@ func (m *UpdateNetworkFirewallPolicyDetails) UnmarshalJSON(data []byte) (e error m.IpAddressLists = model.IpAddressLists m.SecurityRules = make([]SecurityRule, len(model.SecurityRules)) - for i, n := range model.SecurityRules { - m.SecurityRules[i] = n - } - + copy(m.SecurityRules, model.SecurityRules) m.DecryptionRules = make([]DecryptionRule, len(model.DecryptionRules)) - for i, n := range model.DecryptionRules { - m.DecryptionRules[i] = n - } - + copy(m.DecryptionRules, model.DecryptionRules) m.DecryptionProfiles = make(map[string]DecryptionProfile) for k, v := range model.DecryptionProfiles { nn, e = v.UnmarshalPolymorphicJSON(v.JsonData) diff --git a/networkloadbalancer/networkloadbalancer_client.go b/networkloadbalancer/networkloadbalancer_client.go index e14f53c15e..531e5221ad 100644 --- a/networkloadbalancer/networkloadbalancer_client.go +++ b/networkloadbalancer/networkloadbalancer_client.go @@ -80,7 +80,7 @@ func (client *NetworkLoadBalancerClient) setConfigurationProvider(configProvider 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/nosql/nosql_client.go b/nosql/nosql_client.go index fc346918a6..08a830ca22 100644 --- a/nosql/nosql_client.go +++ b/nosql/nosql_client.go @@ -83,7 +83,7 @@ func (client *NosqlClient) setConfigurationProvider(configProvider common.Config 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/objectstorage/objectstorage_client.go b/objectstorage/objectstorage_client.go index 5bcb43f600..1d56f9c9cb 100644 --- a/objectstorage/objectstorage_client.go +++ b/objectstorage/objectstorage_client.go @@ -85,7 +85,7 @@ func (client *ObjectStorageClient) setConfigurationProvider(configProvider commo 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/objectstorage/transfer/file_uploader.go b/objectstorage/transfer/file_uploader.go index 79f4b00a71..04fcb6d556 100644 --- a/objectstorage/transfer/file_uploader.go +++ b/objectstorage/transfer/file_uploader.go @@ -36,11 +36,14 @@ type fileUpload struct { func (fileUpload *fileUpload) UploadFileMultiparts(ctx context.Context, request UploadFileRequest) (response UploadResponse, err error) { file, err := os.Open(request.FilePath) - defer file.Close() + if err != nil { + file.Close() return } + defer file.Close() + fi, err := file.Stat() if err != nil { return @@ -77,11 +80,14 @@ func (fileUpload *fileUpload) UploadFileMultiparts(ctx context.Context, request func (fileUpload *fileUpload) UploadFilePutObject(ctx context.Context, request UploadFileRequest) (UploadResponse, error) { response := UploadResponse{Type: SinglepartUpload} file, err := os.Open(request.FilePath) - defer file.Close() + if err != nil { + file.Close() return response, err } + defer file.Close() + fi, err := file.Stat() if err != nil { return response, err diff --git a/objectstorage/transfer/stream_uploader_test.go b/objectstorage/transfer/stream_uploader_test.go index 1c24e210a1..9aa31af53a 100644 --- a/objectstorage/transfer/stream_uploader_test.go +++ b/objectstorage/transfer/stream_uploader_test.go @@ -49,6 +49,12 @@ func TestUploadStreamMultiparts(t *testing.T) { filePath, _ := helpers.WriteTempFileOfSize(fileSize) file, err := os.Open(filePath) + + if err != nil { + file.Close() + return + } + defer file.Close() assert.NoError(t, err) diff --git a/objectstorage/transfer/upload_manager.go b/objectstorage/transfer/upload_manager.go index aa1d750b56..400a9729f7 100644 --- a/objectstorage/transfer/upload_manager.go +++ b/objectstorage/transfer/upload_manager.go @@ -62,12 +62,14 @@ func (uploadManager *UploadManager) UploadFile(ctx context.Context, request Uplo } file, err := os.Open(request.FilePath) - defer file.Close() if err != nil { + file.Close() return } + defer file.Close() + fi, err := file.Stat() if err != nil { return diff --git a/oce/oce_oceinstance_client.go b/oce/oce_oceinstance_client.go index 5293c4fc93..e6220e4438 100644 --- a/oce/oce_oceinstance_client.go +++ b/oce/oce_oceinstance_client.go @@ -80,7 +80,7 @@ func (client *OceInstanceClient) setConfigurationProvider(configProvider common. 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/ocicontrolcenter/ocicontrolcenter_occmetrics_client.go b/ocicontrolcenter/ocicontrolcenter_occmetrics_client.go index dc051013c6..1bf8c3c7f1 100644 --- a/ocicontrolcenter/ocicontrolcenter_occmetrics_client.go +++ b/ocicontrolcenter/ocicontrolcenter_occmetrics_client.go @@ -80,7 +80,7 @@ func (client *OccMetricsClient) setConfigurationProvider(configProvider common.C 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/ocvp/ocvp_esxihost_client.go b/ocvp/ocvp_esxihost_client.go index b08abdf299..d58b39ec83 100644 --- a/ocvp/ocvp_esxihost_client.go +++ b/ocvp/ocvp_esxihost_client.go @@ -81,7 +81,7 @@ func (client *EsxiHostClient) setConfigurationProvider(configProvider common.Con 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/ocvp/ocvp_sddc_client.go b/ocvp/ocvp_sddc_client.go index e1ea5f3592..a522aedb1b 100644 --- a/ocvp/ocvp_sddc_client.go +++ b/ocvp/ocvp_sddc_client.go @@ -81,7 +81,7 @@ func (client *SddcClient) setConfigurationProvider(configProvider common.Configu 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/ocvp/ocvp_workrequest_client.go b/ocvp/ocvp_workrequest_client.go index c88fbfe7a9..b22c77986f 100644 --- a/ocvp/ocvp_workrequest_client.go +++ b/ocvp/ocvp_workrequest_client.go @@ -81,7 +81,7 @@ func (client *WorkRequestClient) setConfigurationProvider(configProvider common. 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/oda/channel.go b/oda/channel.go index dc04f711a4..7f8d21717a 100644 --- a/oda/channel.go +++ b/oda/channel.go @@ -54,16 +54,16 @@ type Channel interface { type channel struct { JsonData []byte + Description *string `mandatory:"false" json:"description"` + SessionExpiryDurationInMilliseconds *int64 `mandatory:"false" json:"sessionExpiryDurationInMilliseconds"` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` Id *string `mandatory:"true" json:"id"` Name *string `mandatory:"true" json:"name"` Category ChannelCategoryEnum `mandatory:"true" json:"category"` LifecycleState LifecycleStateEnum `mandatory:"true" json:"lifecycleState"` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` - Description *string `mandatory:"false" json:"description"` - SessionExpiryDurationInMilliseconds *int64 `mandatory:"false" json:"sessionExpiryDurationInMilliseconds"` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` Type string `json:"type"` } @@ -168,56 +168,56 @@ func (m *channel) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetId returns Id +// GetDescription returns Description +func (m channel) GetDescription() *string { + return m.Description +} + +// GetSessionExpiryDurationInMilliseconds returns SessionExpiryDurationInMilliseconds +func (m channel) GetSessionExpiryDurationInMilliseconds() *int64 { + return m.SessionExpiryDurationInMilliseconds +} + +// GetFreeformTags returns FreeformTags +func (m channel) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m channel) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetId returns Id func (m channel) GetId() *string { return m.Id } -//GetName returns Name +// GetName returns Name func (m channel) GetName() *string { return m.Name } -//GetCategory returns Category +// GetCategory returns Category func (m channel) GetCategory() ChannelCategoryEnum { return m.Category } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m channel) GetLifecycleState() LifecycleStateEnum { return m.LifecycleState } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m channel) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m channel) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetDescription returns Description -func (m channel) GetDescription() *string { - return m.Description -} - -//GetSessionExpiryDurationInMilliseconds returns SessionExpiryDurationInMilliseconds -func (m channel) GetSessionExpiryDurationInMilliseconds() *int64 { - return m.SessionExpiryDurationInMilliseconds -} - -//GetFreeformTags returns FreeformTags -func (m channel) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m channel) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - func (m channel) String() string { return common.PointerString(m) } diff --git a/oda/create_channel_details.go b/oda/create_channel_details.go index 8b7bffcb74..5fbaed9afd 100644 --- a/oda/create_channel_details.go +++ b/oda/create_channel_details.go @@ -39,11 +39,11 @@ type CreateChannelDetails interface { type createchanneldetails struct { JsonData []byte - Name *string `mandatory:"true" json:"name"` Description *string `mandatory:"false" json:"description"` SessionExpiryDurationInMilliseconds *int64 `mandatory:"false" json:"sessionExpiryDurationInMilliseconds"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + Name *string `mandatory:"true" json:"name"` Type string `json:"type"` } @@ -139,31 +139,31 @@ func (m *createchanneldetails) UnmarshalPolymorphicJSON(data []byte) (interface{ } } -//GetName returns Name -func (m createchanneldetails) GetName() *string { - return m.Name -} - -//GetDescription returns Description +// GetDescription returns Description func (m createchanneldetails) GetDescription() *string { return m.Description } -//GetSessionExpiryDurationInMilliseconds returns SessionExpiryDurationInMilliseconds +// GetSessionExpiryDurationInMilliseconds returns SessionExpiryDurationInMilliseconds func (m createchanneldetails) GetSessionExpiryDurationInMilliseconds() *int64 { return m.SessionExpiryDurationInMilliseconds } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createchanneldetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createchanneldetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetName returns Name +func (m createchanneldetails) GetName() *string { + return m.Name +} + func (m createchanneldetails) String() string { return common.PointerString(m) } diff --git a/oda/create_channel_result.go b/oda/create_channel_result.go index 0088fd8393..c6678d0be3 100644 --- a/oda/create_channel_result.go +++ b/oda/create_channel_result.go @@ -54,16 +54,16 @@ type CreateChannelResult interface { type createchannelresult struct { JsonData []byte + Description *string `mandatory:"false" json:"description"` + SessionExpiryDurationInMilliseconds *int64 `mandatory:"false" json:"sessionExpiryDurationInMilliseconds"` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` Id *string `mandatory:"true" json:"id"` Name *string `mandatory:"true" json:"name"` Category ChannelCategoryEnum `mandatory:"true" json:"category"` LifecycleState LifecycleStateEnum `mandatory:"true" json:"lifecycleState"` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` - Description *string `mandatory:"false" json:"description"` - SessionExpiryDurationInMilliseconds *int64 `mandatory:"false" json:"sessionExpiryDurationInMilliseconds"` - FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` Type string `json:"type"` } @@ -168,56 +168,56 @@ func (m *createchannelresult) UnmarshalPolymorphicJSON(data []byte) (interface{} } } -//GetId returns Id +// GetDescription returns Description +func (m createchannelresult) GetDescription() *string { + return m.Description +} + +// GetSessionExpiryDurationInMilliseconds returns SessionExpiryDurationInMilliseconds +func (m createchannelresult) GetSessionExpiryDurationInMilliseconds() *int64 { + return m.SessionExpiryDurationInMilliseconds +} + +// GetFreeformTags returns FreeformTags +func (m createchannelresult) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m createchannelresult) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetId returns Id func (m createchannelresult) GetId() *string { return m.Id } -//GetName returns Name +// GetName returns Name func (m createchannelresult) GetName() *string { return m.Name } -//GetCategory returns Category +// GetCategory returns Category func (m createchannelresult) GetCategory() ChannelCategoryEnum { return m.Category } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m createchannelresult) GetLifecycleState() LifecycleStateEnum { return m.LifecycleState } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m createchannelresult) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m createchannelresult) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetDescription returns Description -func (m createchannelresult) GetDescription() *string { - return m.Description -} - -//GetSessionExpiryDurationInMilliseconds returns SessionExpiryDurationInMilliseconds -func (m createchannelresult) GetSessionExpiryDurationInMilliseconds() *int64 { - return m.SessionExpiryDurationInMilliseconds -} - -//GetFreeformTags returns FreeformTags -func (m createchannelresult) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m createchannelresult) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - func (m createchannelresult) String() string { return common.PointerString(m) } diff --git a/oda/create_digital_assistant_details.go b/oda/create_digital_assistant_details.go index 66fce216e5..5eed8fc613 100644 --- a/oda/create_digital_assistant_details.go +++ b/oda/create_digital_assistant_details.go @@ -109,37 +109,37 @@ func (m *createdigitalassistantdetails) UnmarshalPolymorphicJSON(data []byte) (i } } -//GetCategory returns Category +// GetCategory returns Category func (m createdigitalassistantdetails) GetCategory() *string { return m.Category } -//GetDescription returns Description +// GetDescription returns Description func (m createdigitalassistantdetails) GetDescription() *string { return m.Description } -//GetPlatformVersion returns PlatformVersion +// GetPlatformVersion returns PlatformVersion func (m createdigitalassistantdetails) GetPlatformVersion() *string { return m.PlatformVersion } -//GetMultilingualMode returns MultilingualMode +// GetMultilingualMode returns MultilingualMode func (m createdigitalassistantdetails) GetMultilingualMode() BotMultilingualModeEnum { return m.MultilingualMode } -//GetPrimaryLanguageTag returns PrimaryLanguageTag +// GetPrimaryLanguageTag returns PrimaryLanguageTag func (m createdigitalassistantdetails) GetPrimaryLanguageTag() *string { return m.PrimaryLanguageTag } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createdigitalassistantdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createdigitalassistantdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/oda/create_skill_details.go b/oda/create_skill_details.go index f06cb8ea4c..78c6f3a654 100644 --- a/oda/create_skill_details.go +++ b/oda/create_skill_details.go @@ -109,37 +109,37 @@ func (m *createskilldetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetCategory returns Category +// GetCategory returns Category func (m createskilldetails) GetCategory() *string { return m.Category } -//GetDescription returns Description +// GetDescription returns Description func (m createskilldetails) GetDescription() *string { return m.Description } -//GetPlatformVersion returns PlatformVersion +// GetPlatformVersion returns PlatformVersion func (m createskilldetails) GetPlatformVersion() *string { return m.PlatformVersion } -//GetMultilingualMode returns MultilingualMode +// GetMultilingualMode returns MultilingualMode func (m createskilldetails) GetMultilingualMode() BotMultilingualModeEnum { return m.MultilingualMode } -//GetPrimaryLanguageTag returns PrimaryLanguageTag +// GetPrimaryLanguageTag returns PrimaryLanguageTag func (m createskilldetails) GetPrimaryLanguageTag() *string { return m.PrimaryLanguageTag } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createskilldetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createskilldetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/oda/oda_client.go b/oda/oda_client.go index 195d97577f..52b6ee7cae 100644 --- a/oda/oda_client.go +++ b/oda/oda_client.go @@ -80,7 +80,7 @@ func (client *OdaClient) setConfigurationProvider(configProvider common.Configur 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/oda/oda_management_client.go b/oda/oda_management_client.go index 6511ff7896..a31a6ba2d8 100644 --- a/oda/oda_management_client.go +++ b/oda/oda_management_client.go @@ -80,7 +80,7 @@ func (client *ManagementClient) setConfigurationProvider(configProvider common.C 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/oda/oda_odapackage_client.go b/oda/oda_odapackage_client.go index 04beb6b43c..b454bfad4c 100644 --- a/oda/oda_odapackage_client.go +++ b/oda/oda_odapackage_client.go @@ -80,7 +80,7 @@ func (client *OdapackageClient) setConfigurationProvider(configProvider common.C 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/oda/update_channel_details.go b/oda/update_channel_details.go index c69cdb2a4f..856c4e2b3e 100644 --- a/oda/update_channel_details.go +++ b/oda/update_channel_details.go @@ -139,27 +139,27 @@ func (m *updatechanneldetails) UnmarshalPolymorphicJSON(data []byte) (interface{ } } -//GetName returns Name +// GetName returns Name func (m updatechanneldetails) GetName() *string { return m.Name } -//GetDescription returns Description +// GetDescription returns Description func (m updatechanneldetails) GetDescription() *string { return m.Description } -//GetSessionExpiryDurationInMilliseconds returns SessionExpiryDurationInMilliseconds +// GetSessionExpiryDurationInMilliseconds returns SessionExpiryDurationInMilliseconds func (m updatechanneldetails) GetSessionExpiryDurationInMilliseconds() *int64 { return m.SessionExpiryDurationInMilliseconds } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updatechanneldetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updatechanneldetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/onesubscription/onesubscription_billingschedule_client.go b/onesubscription/onesubscription_billingschedule_client.go index d5f9bd6672..8bad4fef8e 100644 --- a/onesubscription/onesubscription_billingschedule_client.go +++ b/onesubscription/onesubscription_billingschedule_client.go @@ -80,7 +80,7 @@ func (client *BillingScheduleClient) setConfigurationProvider(configProvider com 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/onesubscription/onesubscription_commitment_client.go b/onesubscription/onesubscription_commitment_client.go index 48a9b981dd..5ebb246dd7 100644 --- a/onesubscription/onesubscription_commitment_client.go +++ b/onesubscription/onesubscription_commitment_client.go @@ -80,7 +80,7 @@ func (client *CommitmentClient) setConfigurationProvider(configProvider common.C 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/onesubscription/onesubscription_computedusage_client.go b/onesubscription/onesubscription_computedusage_client.go index 339ccdb553..3404d2bfab 100644 --- a/onesubscription/onesubscription_computedusage_client.go +++ b/onesubscription/onesubscription_computedusage_client.go @@ -80,7 +80,7 @@ func (client *ComputedUsageClient) setConfigurationProvider(configProvider commo 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/onesubscription/onesubscription_invoicesummary_client.go b/onesubscription/onesubscription_invoicesummary_client.go index 2c3618c0e2..ef4b4e9d3e 100644 --- a/onesubscription/onesubscription_invoicesummary_client.go +++ b/onesubscription/onesubscription_invoicesummary_client.go @@ -80,7 +80,7 @@ func (client *InvoiceSummaryClient) setConfigurationProvider(configProvider comm 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/onesubscription/onesubscription_organizationsubscription_client.go b/onesubscription/onesubscription_organizationsubscription_client.go index ded04c5f37..b4e108eabd 100644 --- a/onesubscription/onesubscription_organizationsubscription_client.go +++ b/onesubscription/onesubscription_organizationsubscription_client.go @@ -80,7 +80,7 @@ func (client *OrganizationSubscriptionClient) setConfigurationProvider(configPro 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/onesubscription/onesubscription_ratecard_client.go b/onesubscription/onesubscription_ratecard_client.go index be51662163..9f9ceffc2b 100644 --- a/onesubscription/onesubscription_ratecard_client.go +++ b/onesubscription/onesubscription_ratecard_client.go @@ -80,7 +80,7 @@ func (client *RatecardClient) setConfigurationProvider(configProvider common.Con 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/onesubscription/onesubscription_subscribedservice_client.go b/onesubscription/onesubscription_subscribedservice_client.go index 67916abee1..7d214b0423 100644 --- a/onesubscription/onesubscription_subscribedservice_client.go +++ b/onesubscription/onesubscription_subscribedservice_client.go @@ -80,7 +80,7 @@ func (client *SubscribedServiceClient) setConfigurationProvider(configProvider c 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/onesubscription/onesubscription_subscription_client.go b/onesubscription/onesubscription_subscription_client.go index 0d9e583716..9d8ef9a856 100644 --- a/onesubscription/onesubscription_subscription_client.go +++ b/onesubscription/onesubscription_subscription_client.go @@ -80,7 +80,7 @@ func (client *SubscriptionClient) setConfigurationProvider(configProvider common 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/ons/ons_notificationcontrolplane_client.go b/ons/ons_notificationcontrolplane_client.go index 31320a7772..47abce3779 100644 --- a/ons/ons_notificationcontrolplane_client.go +++ b/ons/ons_notificationcontrolplane_client.go @@ -81,7 +81,7 @@ func (client *NotificationControlPlaneClient) setConfigurationProvider(configPro 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/ons/ons_notificationdataplane_client.go b/ons/ons_notificationdataplane_client.go index 779ac2e295..93e69105d4 100644 --- a/ons/ons_notificationdataplane_client.go +++ b/ons/ons_notificationdataplane_client.go @@ -81,7 +81,7 @@ func (client *NotificationDataPlaneClient) setConfigurationProvider(configProvid 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/opa/opa_opainstance_client.go b/opa/opa_opainstance_client.go index 8333db5e9e..e6d51dab93 100644 --- a/opa/opa_opainstance_client.go +++ b/opa/opa_opainstance_client.go @@ -80,7 +80,7 @@ func (client *OpaInstanceClient) setConfigurationProvider(configProvider common. 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/opensearch/opensearch_opensearchcluster_client.go b/opensearch/opensearch_opensearchcluster_client.go index 97471a0dc6..66c2f44206 100644 --- a/opensearch/opensearch_opensearchcluster_client.go +++ b/opensearch/opensearch_opensearchcluster_client.go @@ -80,7 +80,7 @@ func (client *OpensearchClusterClient) setConfigurationProvider(configProvider c 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/opensearch/opensearch_opensearchclusterbackup_client.go b/opensearch/opensearch_opensearchclusterbackup_client.go index 774bdf82f5..705e43c588 100644 --- a/opensearch/opensearch_opensearchclusterbackup_client.go +++ b/opensearch/opensearch_opensearchclusterbackup_client.go @@ -80,7 +80,7 @@ func (client *OpensearchClusterBackupClient) setConfigurationProvider(configProv 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/operatoraccesscontrol/operatoraccesscontrol_accessrequests_client.go b/operatoraccesscontrol/operatoraccesscontrol_accessrequests_client.go index b14240bf78..c144bd62d4 100644 --- a/operatoraccesscontrol/operatoraccesscontrol_accessrequests_client.go +++ b/operatoraccesscontrol/operatoraccesscontrol_accessrequests_client.go @@ -82,7 +82,7 @@ func (client *AccessRequestsClient) setConfigurationProvider(configProvider comm 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/operatoraccesscontrol/operatoraccesscontrol_operatoractions_client.go b/operatoraccesscontrol/operatoraccesscontrol_operatoractions_client.go index 857eaacb7b..cf71460efc 100644 --- a/operatoraccesscontrol/operatoraccesscontrol_operatoractions_client.go +++ b/operatoraccesscontrol/operatoraccesscontrol_operatoractions_client.go @@ -82,7 +82,7 @@ func (client *OperatorActionsClient) setConfigurationProvider(configProvider com 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/operatoraccesscontrol/operatoraccesscontrol_operatorcontrol_client.go b/operatoraccesscontrol/operatoraccesscontrol_operatorcontrol_client.go index 0a3d6e9a55..675a902c2b 100644 --- a/operatoraccesscontrol/operatoraccesscontrol_operatorcontrol_client.go +++ b/operatoraccesscontrol/operatoraccesscontrol_operatorcontrol_client.go @@ -82,7 +82,7 @@ func (client *OperatorControlClient) setConfigurationProvider(configProvider com 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/operatoraccesscontrol/operatoraccesscontrol_operatorcontrolassignment_client.go b/operatoraccesscontrol/operatoraccesscontrol_operatorcontrolassignment_client.go index 2beb262ef3..262a4b3a6f 100644 --- a/operatoraccesscontrol/operatoraccesscontrol_operatorcontrolassignment_client.go +++ b/operatoraccesscontrol/operatoraccesscontrol_operatorcontrolassignment_client.go @@ -82,7 +82,7 @@ func (client *OperatorControlAssignmentClient) setConfigurationProvider(configPr 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/opsi/addm_db_recommendation_aggregation.go b/opsi/addm_db_recommendation_aggregation.go index 849a0b0c6d..36805255d0 100644 --- a/opsi/addm_db_recommendation_aggregation.go +++ b/opsi/addm_db_recommendation_aggregation.go @@ -98,10 +98,7 @@ func (m *AddmDbRecommendationAggregation) UnmarshalJSON(data []byte) (e error) { m.RequiresDbRestart = model.RequiresDbRestart m.ImplementActions = make([]string, len(model.ImplementActions)) - for i, n := range model.ImplementActions { - m.ImplementActions[i] = n - } - + copy(m.ImplementActions, model.ImplementActions) m.Rationale = model.Rationale m.MaxBenefitPercent = model.MaxBenefitPercent diff --git a/opsi/awr_query_result.go b/opsi/awr_query_result.go index 1699c388d0..a5dae7b217 100644 --- a/opsi/awr_query_result.go +++ b/opsi/awr_query_result.go @@ -33,9 +33,9 @@ type AwrQueryResult interface { type awrqueryresult struct { JsonData []byte - Name *string `mandatory:"true" json:"name"` Version *string `mandatory:"false" json:"version"` DbQueryTimeInSecs *float64 `mandatory:"false" json:"dbQueryTimeInSecs"` + Name *string `mandatory:"true" json:"name"` AwrResultType string `json:"awrResultType"` } @@ -125,21 +125,21 @@ func (m *awrqueryresult) UnmarshalPolymorphicJSON(data []byte) (interface{}, err } } -//GetName returns Name -func (m awrqueryresult) GetName() *string { - return m.Name -} - -//GetVersion returns Version +// GetVersion returns Version func (m awrqueryresult) GetVersion() *string { return m.Version } -//GetDbQueryTimeInSecs returns DbQueryTimeInSecs +// GetDbQueryTimeInSecs returns DbQueryTimeInSecs func (m awrqueryresult) GetDbQueryTimeInSecs() *float64 { return m.DbQueryTimeInSecs } +// GetName returns Name +func (m awrqueryresult) GetName() *string { + return m.Name +} + func (m awrqueryresult) String() string { return common.PointerString(m) } diff --git a/opsi/basic_configuration_item_summary.go b/opsi/basic_configuration_item_summary.go index 457cbce64d..1ea27b8f07 100644 --- a/opsi/basic_configuration_item_summary.go +++ b/opsi/basic_configuration_item_summary.go @@ -99,10 +99,7 @@ func (m *BasicConfigurationItemSummary) UnmarshalJSON(data []byte) (e error) { m.DefaultValue = model.DefaultValue m.ApplicableContexts = make([]string, len(model.ApplicableContexts)) - for i, n := range model.ApplicableContexts { - m.ApplicableContexts[i] = n - } - + copy(m.ApplicableContexts, model.ApplicableContexts) nn, e = model.Metadata.UnmarshalPolymorphicJSON(model.Metadata.JsonData) if e != nil { return diff --git a/opsi/configuration_items_collection.go b/opsi/configuration_items_collection.go index 02d2de4bd2..383548e661 100644 --- a/opsi/configuration_items_collection.go +++ b/opsi/configuration_items_collection.go @@ -67,7 +67,7 @@ func (m *configurationitemscollection) UnmarshalPolymorphicJSON(data []byte) (in } } -//GetConfigItems returns ConfigItems +// GetConfigItems returns ConfigItems func (m configurationitemscollection) GetConfigItems() json.RawMessage { return m.ConfigItems } diff --git a/opsi/create_database_insight_details.go b/opsi/create_database_insight_details.go index bee15ebac1..4f0995e63e 100644 --- a/opsi/create_database_insight_details.go +++ b/opsi/create_database_insight_details.go @@ -35,9 +35,9 @@ type CreateDatabaseInsightDetails interface { type createdatabaseinsightdetails struct { JsonData []byte - CompartmentId *string `mandatory:"true" json:"compartmentId"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` EntitySource string `json:"entitySource"` } @@ -83,21 +83,21 @@ func (m *createdatabaseinsightdetails) UnmarshalPolymorphicJSON(data []byte) (in } } -//GetCompartmentId returns CompartmentId -func (m createdatabaseinsightdetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createdatabaseinsightdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createdatabaseinsightdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetCompartmentId returns CompartmentId +func (m createdatabaseinsightdetails) GetCompartmentId() *string { + return m.CompartmentId +} + func (m createdatabaseinsightdetails) String() string { return common.PointerString(m) } diff --git a/opsi/create_exadata_insight_details.go b/opsi/create_exadata_insight_details.go index 7ef39f1a35..5dcef9b58e 100644 --- a/opsi/create_exadata_insight_details.go +++ b/opsi/create_exadata_insight_details.go @@ -35,9 +35,9 @@ type CreateExadataInsightDetails interface { type createexadatainsightdetails struct { JsonData []byte - CompartmentId *string `mandatory:"true" json:"compartmentId"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` EntitySource string `json:"entitySource"` } @@ -83,21 +83,21 @@ func (m *createexadatainsightdetails) UnmarshalPolymorphicJSON(data []byte) (int } } -//GetCompartmentId returns CompartmentId -func (m createexadatainsightdetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createexadatainsightdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createexadatainsightdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetCompartmentId returns CompartmentId +func (m createexadatainsightdetails) GetCompartmentId() *string { + return m.CompartmentId +} + func (m createexadatainsightdetails) String() string { return common.PointerString(m) } diff --git a/opsi/create_host_insight_details.go b/opsi/create_host_insight_details.go index 16648fb4d7..7b3d42a1f6 100644 --- a/opsi/create_host_insight_details.go +++ b/opsi/create_host_insight_details.go @@ -35,9 +35,9 @@ type CreateHostInsightDetails interface { type createhostinsightdetails struct { JsonData []byte - CompartmentId *string `mandatory:"true" json:"compartmentId"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` EntitySource string `json:"entitySource"` } @@ -87,21 +87,21 @@ func (m *createhostinsightdetails) UnmarshalPolymorphicJSON(data []byte) (interf } } -//GetCompartmentId returns CompartmentId -func (m createhostinsightdetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createhostinsightdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createhostinsightdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetCompartmentId returns CompartmentId +func (m createhostinsightdetails) GetCompartmentId() *string { + return m.CompartmentId +} + func (m createhostinsightdetails) String() string { return common.PointerString(m) } diff --git a/opsi/create_opsi_configuration_details.go b/opsi/create_opsi_configuration_details.go index c84d46fc57..a0758a1f8d 100644 --- a/opsi/create_opsi_configuration_details.go +++ b/opsi/create_opsi_configuration_details.go @@ -100,37 +100,37 @@ func (m *createopsiconfigurationdetails) UnmarshalPolymorphicJSON(data []byte) ( } } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m createopsiconfigurationdetails) GetCompartmentId() *string { return m.CompartmentId } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createopsiconfigurationdetails) GetDisplayName() *string { return m.DisplayName } -//GetDescription returns Description +// GetDescription returns Description func (m createopsiconfigurationdetails) GetDescription() *string { return m.Description } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createopsiconfigurationdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createopsiconfigurationdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m createopsiconfigurationdetails) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } -//GetConfigItems returns ConfigItems +// GetConfigItems returns ConfigItems func (m createopsiconfigurationdetails) GetConfigItems() json.RawMessage { return m.ConfigItems } diff --git a/opsi/create_opsi_ux_configuration_details.go b/opsi/create_opsi_ux_configuration_details.go index da71265a9e..f30f2dd80b 100644 --- a/opsi/create_opsi_ux_configuration_details.go +++ b/opsi/create_opsi_ux_configuration_details.go @@ -152,6 +152,5 @@ func (m *CreateOpsiUxConfigurationDetails) UnmarshalJSON(data []byte) (e error) m.ConfigItems[i] = nil } } - return } diff --git a/opsi/credential_details.go b/opsi/credential_details.go index 9c7673faca..085ef5209a 100644 --- a/opsi/credential_details.go +++ b/opsi/credential_details.go @@ -71,7 +71,7 @@ func (m *credentialdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetCredentialSourceName returns CredentialSourceName +// GetCredentialSourceName returns CredentialSourceName func (m credentialdetails) GetCredentialSourceName() *string { return m.CredentialSourceName } diff --git a/opsi/data_object_column_unit.go b/opsi/data_object_column_unit.go index a6b9feb4fa..b34c05e8ba 100644 --- a/opsi/data_object_column_unit.go +++ b/opsi/data_object_column_unit.go @@ -99,7 +99,7 @@ func (m *dataobjectcolumnunit) UnmarshalPolymorphicJSON(data []byte) (interface{ } } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m dataobjectcolumnunit) GetDisplayName() *string { return m.DisplayName } diff --git a/opsi/data_object_query.go b/opsi/data_object_query.go index 7c20eb7b11..3874bf106e 100644 --- a/opsi/data_object_query.go +++ b/opsi/data_object_query.go @@ -76,12 +76,12 @@ func (m *dataobjectquery) UnmarshalPolymorphicJSON(data []byte) (interface{}, er } } -//GetBindParams returns BindParams +// GetBindParams returns BindParams func (m dataobjectquery) GetBindParams() []DataObjectBindParameter { return m.BindParams } -//GetQueryExecutionTimeoutInSeconds returns QueryExecutionTimeoutInSeconds +// GetQueryExecutionTimeoutInSeconds returns QueryExecutionTimeoutInSeconds func (m dataobjectquery) GetQueryExecutionTimeoutInSeconds() *float64 { return m.QueryExecutionTimeoutInSeconds } diff --git a/opsi/database_configuration_collection.go b/opsi/database_configuration_collection.go index 0ab9111c47..b506177dbf 100644 --- a/opsi/database_configuration_collection.go +++ b/opsi/database_configuration_collection.go @@ -64,6 +64,5 @@ func (m *DatabaseConfigurationCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/opsi/database_configuration_metric_group.go b/opsi/database_configuration_metric_group.go index c592edf51d..d3ca48ce48 100644 --- a/opsi/database_configuration_metric_group.go +++ b/opsi/database_configuration_metric_group.go @@ -80,7 +80,7 @@ func (m *databaseconfigurationmetricgroup) UnmarshalPolymorphicJSON(data []byte) } } -//GetTimeCollected returns TimeCollected +// GetTimeCollected returns TimeCollected func (m databaseconfigurationmetricgroup) GetTimeCollected() *common.SDKTime { return m.TimeCollected } diff --git a/opsi/database_configuration_summary.go b/opsi/database_configuration_summary.go index 779854001f..f02edd3c3d 100644 --- a/opsi/database_configuration_summary.go +++ b/opsi/database_configuration_summary.go @@ -56,6 +56,7 @@ type DatabaseConfigurationSummary interface { type databaseconfigurationsummary struct { JsonData []byte + ProcessorCount *int `mandatory:"false" json:"processorCount"` DatabaseInsightId *string `mandatory:"true" json:"databaseInsightId"` CompartmentId *string `mandatory:"true" json:"compartmentId"` DatabaseName *string `mandatory:"true" json:"databaseName"` @@ -65,7 +66,6 @@ type databaseconfigurationsummary struct { CdbName *string `mandatory:"true" json:"cdbName"` DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` FreeformTags map[string]string `mandatory:"true" json:"freeformTags"` - ProcessorCount *int `mandatory:"false" json:"processorCount"` EntitySource string `json:"entitySource"` } @@ -126,56 +126,56 @@ func (m *databaseconfigurationsummary) UnmarshalPolymorphicJSON(data []byte) (in } } -//GetDatabaseInsightId returns DatabaseInsightId +// GetProcessorCount returns ProcessorCount +func (m databaseconfigurationsummary) GetProcessorCount() *int { + return m.ProcessorCount +} + +// GetDatabaseInsightId returns DatabaseInsightId func (m databaseconfigurationsummary) GetDatabaseInsightId() *string { return m.DatabaseInsightId } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m databaseconfigurationsummary) GetCompartmentId() *string { return m.CompartmentId } -//GetDatabaseName returns DatabaseName +// GetDatabaseName returns DatabaseName func (m databaseconfigurationsummary) GetDatabaseName() *string { return m.DatabaseName } -//GetDatabaseDisplayName returns DatabaseDisplayName +// GetDatabaseDisplayName returns DatabaseDisplayName func (m databaseconfigurationsummary) GetDatabaseDisplayName() *string { return m.DatabaseDisplayName } -//GetDatabaseType returns DatabaseType +// GetDatabaseType returns DatabaseType func (m databaseconfigurationsummary) GetDatabaseType() *string { return m.DatabaseType } -//GetDatabaseVersion returns DatabaseVersion +// GetDatabaseVersion returns DatabaseVersion func (m databaseconfigurationsummary) GetDatabaseVersion() *string { return m.DatabaseVersion } -//GetCdbName returns CdbName +// GetCdbName returns CdbName func (m databaseconfigurationsummary) GetCdbName() *string { return m.CdbName } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m databaseconfigurationsummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m databaseconfigurationsummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetProcessorCount returns ProcessorCount -func (m databaseconfigurationsummary) GetProcessorCount() *int { - return m.ProcessorCount -} - func (m databaseconfigurationsummary) String() string { return common.PointerString(m) } diff --git a/opsi/database_insight.go b/opsi/database_insight.go index 28c6f53576..9d9a394a6d 100644 --- a/opsi/database_insight.go +++ b/opsi/database_insight.go @@ -69,13 +69,6 @@ type DatabaseInsight interface { type databaseinsight struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` - Status ResourceStatusEnum `mandatory:"true" json:"status"` - FreeformTags map[string]string `mandatory:"true" json:"freeformTags"` - DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - LifecycleState LifecycleStateEnum `mandatory:"true" json:"lifecycleState"` DatabaseType *string `mandatory:"false" json:"databaseType"` DatabaseVersion *string `mandatory:"false" json:"databaseVersion"` ProcessorCount *int `mandatory:"false" json:"processorCount"` @@ -83,6 +76,13 @@ type databaseinsight struct { TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` DatabaseConnectionStatusDetails *string `mandatory:"false" json:"databaseConnectionStatusDetails"` + Id *string `mandatory:"true" json:"id"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + Status ResourceStatusEnum `mandatory:"true" json:"status"` + FreeformTags map[string]string `mandatory:"true" json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + LifecycleState LifecycleStateEnum `mandatory:"true" json:"lifecycleState"` EntitySource string `json:"entitySource"` } @@ -147,76 +147,76 @@ func (m *databaseinsight) UnmarshalPolymorphicJSON(data []byte) (interface{}, er } } -//GetId returns Id -func (m databaseinsight) GetId() *string { - return m.Id -} - -//GetCompartmentId returns CompartmentId -func (m databaseinsight) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetStatus returns Status -func (m databaseinsight) GetStatus() ResourceStatusEnum { - return m.Status -} - -//GetFreeformTags returns FreeformTags -func (m databaseinsight) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m databaseinsight) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - -//GetTimeCreated returns TimeCreated -func (m databaseinsight) GetTimeCreated() *common.SDKTime { - return m.TimeCreated -} - -//GetLifecycleState returns LifecycleState -func (m databaseinsight) GetLifecycleState() LifecycleStateEnum { - return m.LifecycleState -} - -//GetDatabaseType returns DatabaseType +// GetDatabaseType returns DatabaseType func (m databaseinsight) GetDatabaseType() *string { return m.DatabaseType } -//GetDatabaseVersion returns DatabaseVersion +// GetDatabaseVersion returns DatabaseVersion func (m databaseinsight) GetDatabaseVersion() *string { return m.DatabaseVersion } -//GetProcessorCount returns ProcessorCount +// GetProcessorCount returns ProcessorCount func (m databaseinsight) GetProcessorCount() *int { return m.ProcessorCount } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m databaseinsight) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m databaseinsight) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m databaseinsight) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetDatabaseConnectionStatusDetails returns DatabaseConnectionStatusDetails +// GetDatabaseConnectionStatusDetails returns DatabaseConnectionStatusDetails func (m databaseinsight) GetDatabaseConnectionStatusDetails() *string { return m.DatabaseConnectionStatusDetails } +// GetId returns Id +func (m databaseinsight) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m databaseinsight) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetStatus returns Status +func (m databaseinsight) GetStatus() ResourceStatusEnum { + return m.Status +} + +// GetFreeformTags returns FreeformTags +func (m databaseinsight) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m databaseinsight) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetTimeCreated returns TimeCreated +func (m databaseinsight) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetLifecycleState returns LifecycleState +func (m databaseinsight) GetLifecycleState() LifecycleStateEnum { + return m.LifecycleState +} + func (m databaseinsight) String() string { return common.PointerString(m) } diff --git a/opsi/database_insight_summary.go b/opsi/database_insight_summary.go index 3d4bbda19a..8fcc9c86cc 100644 --- a/opsi/database_insight_summary.go +++ b/opsi/database_insight_summary.go @@ -81,8 +81,6 @@ type DatabaseInsightSummary interface { type databaseinsightsummary struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - DatabaseId *string `mandatory:"true" json:"databaseId"` CompartmentId *string `mandatory:"false" json:"compartmentId"` DatabaseName *string `mandatory:"false" json:"databaseName"` DatabaseDisplayName *string `mandatory:"false" json:"databaseDisplayName"` @@ -99,6 +97,8 @@ type databaseinsightsummary struct { LifecycleState LifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` DatabaseConnectionStatusDetails *string `mandatory:"false" json:"databaseConnectionStatusDetails"` + Id *string `mandatory:"true" json:"id"` + DatabaseId *string `mandatory:"true" json:"databaseId"` EntitySource string `json:"entitySource"` } @@ -167,96 +167,96 @@ func (m *databaseinsightsummary) UnmarshalPolymorphicJSON(data []byte) (interfac } } -//GetId returns Id -func (m databaseinsightsummary) GetId() *string { - return m.Id -} - -//GetDatabaseId returns DatabaseId -func (m databaseinsightsummary) GetDatabaseId() *string { - return m.DatabaseId -} - -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m databaseinsightsummary) GetCompartmentId() *string { return m.CompartmentId } -//GetDatabaseName returns DatabaseName +// GetDatabaseName returns DatabaseName func (m databaseinsightsummary) GetDatabaseName() *string { return m.DatabaseName } -//GetDatabaseDisplayName returns DatabaseDisplayName +// GetDatabaseDisplayName returns DatabaseDisplayName func (m databaseinsightsummary) GetDatabaseDisplayName() *string { return m.DatabaseDisplayName } -//GetDatabaseType returns DatabaseType +// GetDatabaseType returns DatabaseType func (m databaseinsightsummary) GetDatabaseType() *string { return m.DatabaseType } -//GetDatabaseVersion returns DatabaseVersion +// GetDatabaseVersion returns DatabaseVersion func (m databaseinsightsummary) GetDatabaseVersion() *string { return m.DatabaseVersion } -//GetDatabaseHostNames returns DatabaseHostNames +// GetDatabaseHostNames returns DatabaseHostNames func (m databaseinsightsummary) GetDatabaseHostNames() []string { return m.DatabaseHostNames } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m databaseinsightsummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m databaseinsightsummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m databaseinsightsummary) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } -//GetProcessorCount returns ProcessorCount +// GetProcessorCount returns ProcessorCount func (m databaseinsightsummary) GetProcessorCount() *int { return m.ProcessorCount } -//GetStatus returns Status +// GetStatus returns Status func (m databaseinsightsummary) GetStatus() ResourceStatusEnum { return m.Status } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m databaseinsightsummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m databaseinsightsummary) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m databaseinsightsummary) GetLifecycleState() LifecycleStateEnum { return m.LifecycleState } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m databaseinsightsummary) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetDatabaseConnectionStatusDetails returns DatabaseConnectionStatusDetails +// GetDatabaseConnectionStatusDetails returns DatabaseConnectionStatusDetails func (m databaseinsightsummary) GetDatabaseConnectionStatusDetails() *string { return m.DatabaseConnectionStatusDetails } +// GetId returns Id +func (m databaseinsightsummary) GetId() *string { + return m.Id +} + +// GetDatabaseId returns DatabaseId +func (m databaseinsightsummary) GetDatabaseId() *string { + return m.DatabaseId +} + func (m databaseinsightsummary) String() string { return common.PointerString(m) } diff --git a/opsi/database_insights_collection.go b/opsi/database_insights_collection.go index a4bcefdd20..600a070f0a 100644 --- a/opsi/database_insights_collection.go +++ b/opsi/database_insights_collection.go @@ -64,6 +64,5 @@ func (m *DatabaseInsightsCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/opsi/exadata_configuration_collection.go b/opsi/exadata_configuration_collection.go index 6b02403f55..c52b63420a 100644 --- a/opsi/exadata_configuration_collection.go +++ b/opsi/exadata_configuration_collection.go @@ -64,6 +64,5 @@ func (m *ExadataConfigurationCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/opsi/exadata_configuration_summary.go b/opsi/exadata_configuration_summary.go index 83d3857b99..d8b1051767 100644 --- a/opsi/exadata_configuration_summary.go +++ b/opsi/exadata_configuration_summary.go @@ -53,6 +53,7 @@ type ExadataConfigurationSummary interface { type exadataconfigurationsummary struct { JsonData []byte + VmclusterDetails []VmClusterSummary `mandatory:"false" json:"vmclusterDetails"` ExadataInsightId *string `mandatory:"true" json:"exadataInsightId"` CompartmentId *string `mandatory:"true" json:"compartmentId"` ExadataName *string `mandatory:"true" json:"exadataName"` @@ -61,7 +62,6 @@ type exadataconfigurationsummary struct { ExadataRackType ExadataRackTypeEnum `mandatory:"true" json:"exadataRackType"` DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` FreeformTags map[string]string `mandatory:"true" json:"freeformTags"` - VmclusterDetails []VmClusterSummary `mandatory:"false" json:"vmclusterDetails"` EntitySource string `json:"entitySource"` } @@ -113,51 +113,51 @@ func (m *exadataconfigurationsummary) UnmarshalPolymorphicJSON(data []byte) (int } } -//GetExadataInsightId returns ExadataInsightId +// GetVmclusterDetails returns VmclusterDetails +func (m exadataconfigurationsummary) GetVmclusterDetails() []VmClusterSummary { + return m.VmclusterDetails +} + +// GetExadataInsightId returns ExadataInsightId func (m exadataconfigurationsummary) GetExadataInsightId() *string { return m.ExadataInsightId } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m exadataconfigurationsummary) GetCompartmentId() *string { return m.CompartmentId } -//GetExadataName returns ExadataName +// GetExadataName returns ExadataName func (m exadataconfigurationsummary) GetExadataName() *string { return m.ExadataName } -//GetExadataDisplayName returns ExadataDisplayName +// GetExadataDisplayName returns ExadataDisplayName func (m exadataconfigurationsummary) GetExadataDisplayName() *string { return m.ExadataDisplayName } -//GetExadataType returns ExadataType +// GetExadataType returns ExadataType func (m exadataconfigurationsummary) GetExadataType() ExadataTypeEnum { return m.ExadataType } -//GetExadataRackType returns ExadataRackType +// GetExadataRackType returns ExadataRackType func (m exadataconfigurationsummary) GetExadataRackType() ExadataRackTypeEnum { return m.ExadataRackType } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m exadataconfigurationsummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m exadataconfigurationsummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetVmclusterDetails returns VmclusterDetails -func (m exadataconfigurationsummary) GetVmclusterDetails() []VmClusterSummary { - return m.VmclusterDetails -} - func (m exadataconfigurationsummary) String() string { return common.PointerString(m) } diff --git a/opsi/exadata_insight.go b/opsi/exadata_insight.go index 1b365da9ca..f13bf3a703 100644 --- a/opsi/exadata_insight.go +++ b/opsi/exadata_insight.go @@ -72,6 +72,13 @@ type ExadataInsight interface { type exadatainsight struct { JsonData []byte + ExadataDisplayName *string `mandatory:"false" json:"exadataDisplayName"` + ExadataType ExadataTypeEnum `mandatory:"false" json:"exadataType,omitempty"` + ExadataRackType ExadataRackTypeEnum `mandatory:"false" json:"exadataRackType,omitempty"` + IsVirtualizedExadata *bool `mandatory:"false" json:"isVirtualizedExadata"` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` Id *string `mandatory:"true" json:"id"` CompartmentId *string `mandatory:"true" json:"compartmentId"` ExadataName *string `mandatory:"true" json:"exadataName"` @@ -80,13 +87,6 @@ type exadatainsight struct { DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` LifecycleState ExadataInsightLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - ExadataDisplayName *string `mandatory:"false" json:"exadataDisplayName"` - ExadataType ExadataTypeEnum `mandatory:"false" json:"exadataType,omitempty"` - ExadataRackType ExadataRackTypeEnum `mandatory:"false" json:"exadataRackType,omitempty"` - IsVirtualizedExadata *bool `mandatory:"false" json:"isVirtualizedExadata"` - SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` - TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` EntitySource string `json:"entitySource"` } @@ -144,81 +144,81 @@ func (m *exadatainsight) UnmarshalPolymorphicJSON(data []byte) (interface{}, err } } -//GetId returns Id +// GetExadataDisplayName returns ExadataDisplayName +func (m exadatainsight) GetExadataDisplayName() *string { + return m.ExadataDisplayName +} + +// GetExadataType returns ExadataType +func (m exadatainsight) GetExadataType() ExadataTypeEnum { + return m.ExadataType +} + +// GetExadataRackType returns ExadataRackType +func (m exadatainsight) GetExadataRackType() ExadataRackTypeEnum { + return m.ExadataRackType +} + +// GetIsVirtualizedExadata returns IsVirtualizedExadata +func (m exadatainsight) GetIsVirtualizedExadata() *bool { + return m.IsVirtualizedExadata +} + +// GetSystemTags returns SystemTags +func (m exadatainsight) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetTimeUpdated returns TimeUpdated +func (m exadatainsight) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetLifecycleDetails returns LifecycleDetails +func (m exadatainsight) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetId returns Id func (m exadatainsight) GetId() *string { return m.Id } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m exadatainsight) GetCompartmentId() *string { return m.CompartmentId } -//GetExadataName returns ExadataName +// GetExadataName returns ExadataName func (m exadatainsight) GetExadataName() *string { return m.ExadataName } -//GetStatus returns Status +// GetStatus returns Status func (m exadatainsight) GetStatus() ResourceStatusEnum { return m.Status } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m exadatainsight) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m exadatainsight) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m exadatainsight) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m exadatainsight) GetLifecycleState() ExadataInsightLifecycleStateEnum { return m.LifecycleState } -//GetExadataDisplayName returns ExadataDisplayName -func (m exadatainsight) GetExadataDisplayName() *string { - return m.ExadataDisplayName -} - -//GetExadataType returns ExadataType -func (m exadatainsight) GetExadataType() ExadataTypeEnum { - return m.ExadataType -} - -//GetExadataRackType returns ExadataRackType -func (m exadatainsight) GetExadataRackType() ExadataRackTypeEnum { - return m.ExadataRackType -} - -//GetIsVirtualizedExadata returns IsVirtualizedExadata -func (m exadatainsight) GetIsVirtualizedExadata() *bool { - return m.IsVirtualizedExadata -} - -//GetSystemTags returns SystemTags -func (m exadatainsight) GetSystemTags() map[string]map[string]interface{} { - return m.SystemTags -} - -//GetTimeUpdated returns TimeUpdated -func (m exadatainsight) GetTimeUpdated() *common.SDKTime { - return m.TimeUpdated -} - -//GetLifecycleDetails returns LifecycleDetails -func (m exadatainsight) GetLifecycleDetails() *string { - return m.LifecycleDetails -} - func (m exadatainsight) String() string { return common.PointerString(m) } diff --git a/opsi/exadata_insight_summary.go b/opsi/exadata_insight_summary.go index b815f88230..1c500d4674 100644 --- a/opsi/exadata_insight_summary.go +++ b/opsi/exadata_insight_summary.go @@ -69,6 +69,12 @@ type ExadataInsightSummary interface { type exadatainsightsummary struct { JsonData []byte + ExadataDisplayName *string `mandatory:"false" json:"exadataDisplayName"` + ExadataType ExadataTypeEnum `mandatory:"false" json:"exadataType,omitempty"` + ExadataRackType ExadataRackTypeEnum `mandatory:"false" json:"exadataRackType,omitempty"` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` Id *string `mandatory:"true" json:"id"` CompartmentId *string `mandatory:"true" json:"compartmentId"` ExadataName *string `mandatory:"true" json:"exadataName"` @@ -77,12 +83,6 @@ type exadatainsightsummary struct { Status ResourceStatusEnum `mandatory:"true" json:"status"` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` LifecycleState ExadataInsightLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - ExadataDisplayName *string `mandatory:"false" json:"exadataDisplayName"` - ExadataType ExadataTypeEnum `mandatory:"false" json:"exadataType,omitempty"` - ExadataRackType ExadataRackTypeEnum `mandatory:"false" json:"exadataRackType,omitempty"` - SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` - TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` EntitySource string `json:"entitySource"` } @@ -139,76 +139,76 @@ func (m *exadatainsightsummary) UnmarshalPolymorphicJSON(data []byte) (interface } } -//GetId returns Id +// GetExadataDisplayName returns ExadataDisplayName +func (m exadatainsightsummary) GetExadataDisplayName() *string { + return m.ExadataDisplayName +} + +// GetExadataType returns ExadataType +func (m exadatainsightsummary) GetExadataType() ExadataTypeEnum { + return m.ExadataType +} + +// GetExadataRackType returns ExadataRackType +func (m exadatainsightsummary) GetExadataRackType() ExadataRackTypeEnum { + return m.ExadataRackType +} + +// GetSystemTags returns SystemTags +func (m exadatainsightsummary) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetTimeUpdated returns TimeUpdated +func (m exadatainsightsummary) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetLifecycleDetails returns LifecycleDetails +func (m exadatainsightsummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetId returns Id func (m exadatainsightsummary) GetId() *string { return m.Id } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m exadatainsightsummary) GetCompartmentId() *string { return m.CompartmentId } -//GetExadataName returns ExadataName +// GetExadataName returns ExadataName func (m exadatainsightsummary) GetExadataName() *string { return m.ExadataName } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m exadatainsightsummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m exadatainsightsummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetStatus returns Status +// GetStatus returns Status func (m exadatainsightsummary) GetStatus() ResourceStatusEnum { return m.Status } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m exadatainsightsummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m exadatainsightsummary) GetLifecycleState() ExadataInsightLifecycleStateEnum { return m.LifecycleState } -//GetExadataDisplayName returns ExadataDisplayName -func (m exadatainsightsummary) GetExadataDisplayName() *string { - return m.ExadataDisplayName -} - -//GetExadataType returns ExadataType -func (m exadatainsightsummary) GetExadataType() ExadataTypeEnum { - return m.ExadataType -} - -//GetExadataRackType returns ExadataRackType -func (m exadatainsightsummary) GetExadataRackType() ExadataRackTypeEnum { - return m.ExadataRackType -} - -//GetSystemTags returns SystemTags -func (m exadatainsightsummary) GetSystemTags() map[string]map[string]interface{} { - return m.SystemTags -} - -//GetTimeUpdated returns TimeUpdated -func (m exadatainsightsummary) GetTimeUpdated() *common.SDKTime { - return m.TimeUpdated -} - -//GetLifecycleDetails returns LifecycleDetails -func (m exadatainsightsummary) GetLifecycleDetails() *string { - return m.LifecycleDetails -} - func (m exadatainsightsummary) String() string { return common.PointerString(m) } diff --git a/opsi/exadata_insight_summary_collection.go b/opsi/exadata_insight_summary_collection.go index 7696c5df18..70e93ae035 100644 --- a/opsi/exadata_insight_summary_collection.go +++ b/opsi/exadata_insight_summary_collection.go @@ -64,6 +64,5 @@ func (m *ExadataInsightSummaryCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/opsi/host_configuration_collection.go b/opsi/host_configuration_collection.go index 217a358fe5..8e69d1f3ff 100644 --- a/opsi/host_configuration_collection.go +++ b/opsi/host_configuration_collection.go @@ -64,6 +64,5 @@ func (m *HostConfigurationCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/opsi/host_configuration_metric_group.go b/opsi/host_configuration_metric_group.go index 0842154aa9..2646d14caa 100644 --- a/opsi/host_configuration_metric_group.go +++ b/opsi/host_configuration_metric_group.go @@ -96,7 +96,7 @@ func (m *hostconfigurationmetricgroup) UnmarshalPolymorphicJSON(data []byte) (in } } -//GetTimeCollected returns TimeCollected +// GetTimeCollected returns TimeCollected func (m hostconfigurationmetricgroup) GetTimeCollected() *common.SDKTime { return m.TimeCollected } diff --git a/opsi/host_configuration_summary.go b/opsi/host_configuration_summary.go index 615472bac1..6225fd3e40 100644 --- a/opsi/host_configuration_summary.go +++ b/opsi/host_configuration_summary.go @@ -174,97 +174,97 @@ func (m *hostconfigurationsummary) UnmarshalPolymorphicJSON(data []byte) (interf } } -//GetHostInsightId returns HostInsightId +// GetHostInsightId returns HostInsightId func (m hostconfigurationsummary) GetHostInsightId() *string { return m.HostInsightId } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m hostconfigurationsummary) GetCompartmentId() *string { return m.CompartmentId } -//GetHostName returns HostName +// GetHostName returns HostName func (m hostconfigurationsummary) GetHostName() *string { return m.HostName } -//GetPlatformType returns PlatformType +// GetPlatformType returns PlatformType func (m hostconfigurationsummary) GetPlatformType() HostConfigurationSummaryPlatformTypeEnum { return m.PlatformType } -//GetPlatformVersion returns PlatformVersion +// GetPlatformVersion returns PlatformVersion func (m hostconfigurationsummary) GetPlatformVersion() *string { return m.PlatformVersion } -//GetPlatformVendor returns PlatformVendor +// GetPlatformVendor returns PlatformVendor func (m hostconfigurationsummary) GetPlatformVendor() *string { return m.PlatformVendor } -//GetTotalCpus returns TotalCpus +// GetTotalCpus returns TotalCpus func (m hostconfigurationsummary) GetTotalCpus() *int { return m.TotalCpus } -//GetTotalMemoryInGBs returns TotalMemoryInGBs +// GetTotalMemoryInGBs returns TotalMemoryInGBs func (m hostconfigurationsummary) GetTotalMemoryInGBs() *float64 { return m.TotalMemoryInGBs } -//GetCpuArchitecture returns CpuArchitecture +// GetCpuArchitecture returns CpuArchitecture func (m hostconfigurationsummary) GetCpuArchitecture() *string { return m.CpuArchitecture } -//GetCpuCacheInMBs returns CpuCacheInMBs +// GetCpuCacheInMBs returns CpuCacheInMBs func (m hostconfigurationsummary) GetCpuCacheInMBs() *float64 { return m.CpuCacheInMBs } -//GetCpuVendor returns CpuVendor +// GetCpuVendor returns CpuVendor func (m hostconfigurationsummary) GetCpuVendor() *string { return m.CpuVendor } -//GetCpuFrequencyInMhz returns CpuFrequencyInMhz +// GetCpuFrequencyInMhz returns CpuFrequencyInMhz func (m hostconfigurationsummary) GetCpuFrequencyInMhz() *float64 { return m.CpuFrequencyInMhz } -//GetCpuImplementation returns CpuImplementation +// GetCpuImplementation returns CpuImplementation func (m hostconfigurationsummary) GetCpuImplementation() *string { return m.CpuImplementation } -//GetCoresPerSocket returns CoresPerSocket +// GetCoresPerSocket returns CoresPerSocket func (m hostconfigurationsummary) GetCoresPerSocket() *int { return m.CoresPerSocket } -//GetTotalSockets returns TotalSockets +// GetTotalSockets returns TotalSockets func (m hostconfigurationsummary) GetTotalSockets() *int { return m.TotalSockets } -//GetThreadsPerSocket returns ThreadsPerSocket +// GetThreadsPerSocket returns ThreadsPerSocket func (m hostconfigurationsummary) GetThreadsPerSocket() *int { return m.ThreadsPerSocket } -//GetIsHyperThreadingEnabled returns IsHyperThreadingEnabled +// GetIsHyperThreadingEnabled returns IsHyperThreadingEnabled func (m hostconfigurationsummary) GetIsHyperThreadingEnabled() *bool { return m.IsHyperThreadingEnabled } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m hostconfigurationsummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m hostconfigurationsummary) GetFreeformTags() map[string]string { return m.FreeformTags } diff --git a/opsi/host_insight.go b/opsi/host_insight.go index 9c4a5a2bf8..9bf5a868de 100644 --- a/opsi/host_insight.go +++ b/opsi/host_insight.go @@ -69,6 +69,12 @@ type HostInsight interface { type hostinsight struct { JsonData []byte + HostDisplayName *string `mandatory:"false" json:"hostDisplayName"` + HostType *string `mandatory:"false" json:"hostType"` + ProcessorCount *int `mandatory:"false" json:"processorCount"` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` Id *string `mandatory:"true" json:"id"` CompartmentId *string `mandatory:"true" json:"compartmentId"` HostName *string `mandatory:"true" json:"hostName"` @@ -77,12 +83,6 @@ type hostinsight struct { Status ResourceStatusEnum `mandatory:"true" json:"status"` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` LifecycleState LifecycleStateEnum `mandatory:"true" json:"lifecycleState"` - HostDisplayName *string `mandatory:"false" json:"hostDisplayName"` - HostType *string `mandatory:"false" json:"hostType"` - ProcessorCount *int `mandatory:"false" json:"processorCount"` - SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` - TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` EntitySource string `json:"entitySource"` } @@ -147,76 +147,76 @@ func (m *hostinsight) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) } } -//GetId returns Id +// GetHostDisplayName returns HostDisplayName +func (m hostinsight) GetHostDisplayName() *string { + return m.HostDisplayName +} + +// GetHostType returns HostType +func (m hostinsight) GetHostType() *string { + return m.HostType +} + +// GetProcessorCount returns ProcessorCount +func (m hostinsight) GetProcessorCount() *int { + return m.ProcessorCount +} + +// GetSystemTags returns SystemTags +func (m hostinsight) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetTimeUpdated returns TimeUpdated +func (m hostinsight) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetLifecycleDetails returns LifecycleDetails +func (m hostinsight) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetId returns Id func (m hostinsight) GetId() *string { return m.Id } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m hostinsight) GetCompartmentId() *string { return m.CompartmentId } -//GetHostName returns HostName +// GetHostName returns HostName func (m hostinsight) GetHostName() *string { return m.HostName } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m hostinsight) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m hostinsight) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetStatus returns Status +// GetStatus returns Status func (m hostinsight) GetStatus() ResourceStatusEnum { return m.Status } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m hostinsight) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m hostinsight) GetLifecycleState() LifecycleStateEnum { return m.LifecycleState } -//GetHostDisplayName returns HostDisplayName -func (m hostinsight) GetHostDisplayName() *string { - return m.HostDisplayName -} - -//GetHostType returns HostType -func (m hostinsight) GetHostType() *string { - return m.HostType -} - -//GetProcessorCount returns ProcessorCount -func (m hostinsight) GetProcessorCount() *int { - return m.ProcessorCount -} - -//GetSystemTags returns SystemTags -func (m hostinsight) GetSystemTags() map[string]map[string]interface{} { - return m.SystemTags -} - -//GetTimeUpdated returns TimeUpdated -func (m hostinsight) GetTimeUpdated() *common.SDKTime { - return m.TimeUpdated -} - -//GetLifecycleDetails returns LifecycleDetails -func (m hostinsight) GetLifecycleDetails() *string { - return m.LifecycleDetails -} - func (m hostinsight) String() string { return common.PointerString(m) } diff --git a/opsi/host_insight_summary.go b/opsi/host_insight_summary.go index 6856a85c4b..1f064ced45 100644 --- a/opsi/host_insight_summary.go +++ b/opsi/host_insight_summary.go @@ -72,9 +72,6 @@ type HostInsightSummary interface { type hostinsightsummary struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` - HostName *string `mandatory:"true" json:"hostName"` HostDisplayName *string `mandatory:"false" json:"hostDisplayName"` HostType *string `mandatory:"false" json:"hostType"` ProcessorCount *int `mandatory:"false" json:"processorCount"` @@ -87,6 +84,9 @@ type hostinsightsummary struct { TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` LifecycleState LifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + Id *string `mandatory:"true" json:"id"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + HostName *string `mandatory:"true" json:"hostName"` EntitySource string `json:"entitySource"` } @@ -152,81 +152,81 @@ func (m *hostinsightsummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetId returns Id -func (m hostinsightsummary) GetId() *string { - return m.Id -} - -//GetCompartmentId returns CompartmentId -func (m hostinsightsummary) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetHostName returns HostName -func (m hostinsightsummary) GetHostName() *string { - return m.HostName -} - -//GetHostDisplayName returns HostDisplayName +// GetHostDisplayName returns HostDisplayName func (m hostinsightsummary) GetHostDisplayName() *string { return m.HostDisplayName } -//GetHostType returns HostType +// GetHostType returns HostType func (m hostinsightsummary) GetHostType() *string { return m.HostType } -//GetProcessorCount returns ProcessorCount +// GetProcessorCount returns ProcessorCount func (m hostinsightsummary) GetProcessorCount() *int { return m.ProcessorCount } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m hostinsightsummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m hostinsightsummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m hostinsightsummary) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } -//GetOpsiPrivateEndpointId returns OpsiPrivateEndpointId +// GetOpsiPrivateEndpointId returns OpsiPrivateEndpointId func (m hostinsightsummary) GetOpsiPrivateEndpointId() *string { return m.OpsiPrivateEndpointId } -//GetStatus returns Status +// GetStatus returns Status func (m hostinsightsummary) GetStatus() ResourceStatusEnum { return m.Status } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m hostinsightsummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m hostinsightsummary) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m hostinsightsummary) GetLifecycleState() LifecycleStateEnum { return m.LifecycleState } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m hostinsightsummary) GetLifecycleDetails() *string { return m.LifecycleDetails } +// GetId returns Id +func (m hostinsightsummary) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m hostinsightsummary) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetHostName returns HostName +func (m hostinsightsummary) GetHostName() *string { + return m.HostName +} + func (m hostinsightsummary) String() string { return common.PointerString(m) } diff --git a/opsi/host_insight_summary_collection.go b/opsi/host_insight_summary_collection.go index 91a47c281c..1d550c376c 100644 --- a/opsi/host_insight_summary_collection.go +++ b/opsi/host_insight_summary_collection.go @@ -64,6 +64,5 @@ func (m *HostInsightSummaryCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/opsi/host_performance_metric_group.go b/opsi/host_performance_metric_group.go index 7d7efc11fb..c0d71aa0b6 100644 --- a/opsi/host_performance_metric_group.go +++ b/opsi/host_performance_metric_group.go @@ -84,7 +84,7 @@ func (m *hostperformancemetricgroup) UnmarshalPolymorphicJSON(data []byte) (inte } } -//GetTimeCollected returns TimeCollected +// GetTimeCollected returns TimeCollected func (m hostperformancemetricgroup) GetTimeCollected() *common.SDKTime { return m.TimeCollected } diff --git a/opsi/host_resource_statistics.go b/opsi/host_resource_statistics.go index d800b84aed..8c4e3a2b6a 100644 --- a/opsi/host_resource_statistics.go +++ b/opsi/host_resource_statistics.go @@ -94,22 +94,22 @@ func (m *hostresourcestatistics) UnmarshalPolymorphicJSON(data []byte) (interfac } } -//GetUsage returns Usage +// GetUsage returns Usage func (m hostresourcestatistics) GetUsage() *float64 { return m.Usage } -//GetCapacity returns Capacity +// GetCapacity returns Capacity func (m hostresourcestatistics) GetCapacity() *float64 { return m.Capacity } -//GetUtilizationPercent returns UtilizationPercent +// GetUtilizationPercent returns UtilizationPercent func (m hostresourcestatistics) GetUtilizationPercent() *float64 { return m.UtilizationPercent } -//GetUsageChangePercent returns UsageChangePercent +// GetUsageChangePercent returns UsageChangePercent func (m hostresourcestatistics) GetUsageChangePercent() *float64 { return m.UsageChangePercent } diff --git a/opsi/importable_agent_entity_summary.go b/opsi/importable_agent_entity_summary.go index 15aedf576d..7916b6ce3b 100644 --- a/opsi/importable_agent_entity_summary.go +++ b/opsi/importable_agent_entity_summary.go @@ -72,12 +72,12 @@ func (m *importableagententitysummary) UnmarshalPolymorphicJSON(data []byte) (in } } -//GetManagementAgentId returns ManagementAgentId +// GetManagementAgentId returns ManagementAgentId func (m importableagententitysummary) GetManagementAgentId() *string { return m.ManagementAgentId } -//GetManagementAgentDisplayName returns ManagementAgentDisplayName +// GetManagementAgentDisplayName returns ManagementAgentDisplayName func (m importableagententitysummary) GetManagementAgentDisplayName() *string { return m.ManagementAgentDisplayName } diff --git a/opsi/importable_agent_entity_summary_collection.go b/opsi/importable_agent_entity_summary_collection.go index cd6d17dffd..08210e1f94 100644 --- a/opsi/importable_agent_entity_summary_collection.go +++ b/opsi/importable_agent_entity_summary_collection.go @@ -64,6 +64,5 @@ func (m *ImportableAgentEntitySummaryCollection) UnmarshalJSON(data []byte) (e e m.Items[i] = nil } } - return } diff --git a/opsi/importable_compute_entity_summary.go b/opsi/importable_compute_entity_summary.go index e95adeab08..4d8e12e9e0 100644 --- a/opsi/importable_compute_entity_summary.go +++ b/opsi/importable_compute_entity_summary.go @@ -77,17 +77,17 @@ func (m *importablecomputeentitysummary) UnmarshalPolymorphicJSON(data []byte) ( } } -//GetComputeId returns ComputeId +// GetComputeId returns ComputeId func (m importablecomputeentitysummary) GetComputeId() *string { return m.ComputeId } -//GetComputeDisplayName returns ComputeDisplayName +// GetComputeDisplayName returns ComputeDisplayName func (m importablecomputeentitysummary) GetComputeDisplayName() *string { return m.ComputeDisplayName } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m importablecomputeentitysummary) GetCompartmentId() *string { return m.CompartmentId } diff --git a/opsi/importable_compute_entity_summary_collection.go b/opsi/importable_compute_entity_summary_collection.go index f45d212602..77daa00cb3 100644 --- a/opsi/importable_compute_entity_summary_collection.go +++ b/opsi/importable_compute_entity_summary_collection.go @@ -64,6 +64,5 @@ func (m *ImportableComputeEntitySummaryCollection) UnmarshalJSON(data []byte) (e m.Items[i] = nil } } - return } diff --git a/opsi/ingest_database_configuration_details.go b/opsi/ingest_database_configuration_details.go index 75ea719554..cdd2381535 100644 --- a/opsi/ingest_database_configuration_details.go +++ b/opsi/ingest_database_configuration_details.go @@ -64,6 +64,5 @@ func (m *IngestDatabaseConfigurationDetails) UnmarshalJSON(data []byte) (e error m.Items[i] = nil } } - return } diff --git a/opsi/ingest_host_configuration_details.go b/opsi/ingest_host_configuration_details.go index 0261eca616..711698e2d0 100644 --- a/opsi/ingest_host_configuration_details.go +++ b/opsi/ingest_host_configuration_details.go @@ -64,6 +64,5 @@ func (m *IngestHostConfigurationDetails) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/opsi/ingest_host_metrics_details.go b/opsi/ingest_host_metrics_details.go index fb442efd08..8865c6b66c 100644 --- a/opsi/ingest_host_metrics_details.go +++ b/opsi/ingest_host_metrics_details.go @@ -64,6 +64,5 @@ func (m *IngestHostMetricsDetails) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/opsi/opsi_configuration.go b/opsi/opsi_configuration.go index 68926e7b0d..6d691664b2 100644 --- a/opsi/opsi_configuration.go +++ b/opsi/opsi_configuration.go @@ -125,62 +125,62 @@ func (m *opsiconfiguration) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetId returns Id +// GetId returns Id func (m opsiconfiguration) GetId() *string { return m.Id } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m opsiconfiguration) GetCompartmentId() *string { return m.CompartmentId } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m opsiconfiguration) GetDisplayName() *string { return m.DisplayName } -//GetDescription returns Description +// GetDescription returns Description func (m opsiconfiguration) GetDescription() *string { return m.Description } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m opsiconfiguration) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m opsiconfiguration) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m opsiconfiguration) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m opsiconfiguration) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m opsiconfiguration) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m opsiconfiguration) GetLifecycleState() OpsiConfigurationLifecycleStateEnum { return m.LifecycleState } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m opsiconfiguration) GetLifecycleDetails() *string { return m.LifecycleDetails } -//GetConfigItems returns ConfigItems +// GetConfigItems returns ConfigItems func (m opsiconfiguration) GetConfigItems() json.RawMessage { return m.ConfigItems } diff --git a/opsi/opsi_configuration_basic_configuration_item_summary.go b/opsi/opsi_configuration_basic_configuration_item_summary.go index 4e44e8a0ce..8ea78c1131 100644 --- a/opsi/opsi_configuration_basic_configuration_item_summary.go +++ b/opsi/opsi_configuration_basic_configuration_item_summary.go @@ -88,10 +88,7 @@ func (m *OpsiConfigurationBasicConfigurationItemSummary) UnmarshalJSON(data []by m.DefaultValue = model.DefaultValue m.ApplicableContexts = make([]string, len(model.ApplicableContexts)) - for i, n := range model.ApplicableContexts { - m.ApplicableContexts[i] = n - } - + copy(m.ApplicableContexts, model.ApplicableContexts) nn, e = model.Metadata.UnmarshalPolymorphicJSON(model.Metadata.JsonData) if e != nil { return diff --git a/opsi/opsi_configuration_summary.go b/opsi/opsi_configuration_summary.go index 6fb512a211..08e2da59b3 100644 --- a/opsi/opsi_configuration_summary.go +++ b/opsi/opsi_configuration_summary.go @@ -120,57 +120,57 @@ func (m *opsiconfigurationsummary) UnmarshalPolymorphicJSON(data []byte) (interf } } -//GetId returns Id +// GetId returns Id func (m opsiconfigurationsummary) GetId() *string { return m.Id } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m opsiconfigurationsummary) GetCompartmentId() *string { return m.CompartmentId } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m opsiconfigurationsummary) GetDisplayName() *string { return m.DisplayName } -//GetDescription returns Description +// GetDescription returns Description func (m opsiconfigurationsummary) GetDescription() *string { return m.Description } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m opsiconfigurationsummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m opsiconfigurationsummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m opsiconfigurationsummary) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m opsiconfigurationsummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m opsiconfigurationsummary) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m opsiconfigurationsummary) GetLifecycleState() OpsiConfigurationLifecycleStateEnum { return m.LifecycleState } -//GetLifecycleDetails returns LifecycleDetails +// GetLifecycleDetails returns LifecycleDetails func (m opsiconfigurationsummary) GetLifecycleDetails() *string { return m.LifecycleDetails } diff --git a/opsi/opsi_configurations_collection.go b/opsi/opsi_configurations_collection.go index 27e1ad309c..a7ed9c6244 100644 --- a/opsi/opsi_configurations_collection.go +++ b/opsi/opsi_configurations_collection.go @@ -64,6 +64,5 @@ func (m *OpsiConfigurationsCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/opsi/opsi_data_object.go b/opsi/opsi_data_object.go index 143c13145d..9dafffae8f 100644 --- a/opsi/opsi_data_object.go +++ b/opsi/opsi_data_object.go @@ -50,14 +50,14 @@ type OpsiDataObject interface { type opsidataobject struct { JsonData []byte - Identifier *string `mandatory:"true" json:"identifier"` - DisplayName *string `mandatory:"true" json:"displayName"` - ColumnsMetadata []DataObjectColumnMetadata `mandatory:"true" json:"columnsMetadata"` Description *string `mandatory:"false" json:"description"` Name *string `mandatory:"false" json:"name"` GroupNames []string `mandatory:"false" json:"groupNames"` SupportedQueryTimePeriod *string `mandatory:"false" json:"supportedQueryTimePeriod"` SupportedQueryParams []OpsiDataObjectSupportedQueryParam `mandatory:"false" json:"supportedQueryParams"` + Identifier *string `mandatory:"true" json:"identifier"` + DisplayName *string `mandatory:"true" json:"displayName"` + ColumnsMetadata []DataObjectColumnMetadata `mandatory:"true" json:"columnsMetadata"` DataObjectType string `json:"dataObjectType"` } @@ -112,46 +112,46 @@ func (m *opsidataobject) UnmarshalPolymorphicJSON(data []byte) (interface{}, err } } -//GetIdentifier returns Identifier -func (m opsidataobject) GetIdentifier() *string { - return m.Identifier -} - -//GetDisplayName returns DisplayName -func (m opsidataobject) GetDisplayName() *string { - return m.DisplayName -} - -//GetColumnsMetadata returns ColumnsMetadata -func (m opsidataobject) GetColumnsMetadata() []DataObjectColumnMetadata { - return m.ColumnsMetadata -} - -//GetDescription returns Description +// GetDescription returns Description func (m opsidataobject) GetDescription() *string { return m.Description } -//GetName returns Name +// GetName returns Name func (m opsidataobject) GetName() *string { return m.Name } -//GetGroupNames returns GroupNames +// GetGroupNames returns GroupNames func (m opsidataobject) GetGroupNames() []string { return m.GroupNames } -//GetSupportedQueryTimePeriod returns SupportedQueryTimePeriod +// GetSupportedQueryTimePeriod returns SupportedQueryTimePeriod func (m opsidataobject) GetSupportedQueryTimePeriod() *string { return m.SupportedQueryTimePeriod } -//GetSupportedQueryParams returns SupportedQueryParams +// GetSupportedQueryParams returns SupportedQueryParams func (m opsidataobject) GetSupportedQueryParams() []OpsiDataObjectSupportedQueryParam { return m.SupportedQueryParams } +// GetIdentifier returns Identifier +func (m opsidataobject) GetIdentifier() *string { + return m.Identifier +} + +// GetDisplayName returns DisplayName +func (m opsidataobject) GetDisplayName() *string { + return m.DisplayName +} + +// GetColumnsMetadata returns ColumnsMetadata +func (m opsidataobject) GetColumnsMetadata() []DataObjectColumnMetadata { + return m.ColumnsMetadata +} + func (m opsidataobject) String() string { return common.PointerString(m) } diff --git a/opsi/opsi_data_object_details_in_query.go b/opsi/opsi_data_object_details_in_query.go index 73dc38b1ad..a0898e619b 100644 --- a/opsi/opsi_data_object_details_in_query.go +++ b/opsi/opsi_data_object_details_in_query.go @@ -72,7 +72,7 @@ func (m *opsidataobjectdetailsinquery) UnmarshalPolymorphicJSON(data []byte) (in } } -//GetQueryParams returns QueryParams +// GetQueryParams returns QueryParams func (m opsidataobjectdetailsinquery) GetQueryParams() []OpsiDataObjectQueryParam { return m.QueryParams } diff --git a/opsi/opsi_data_object_summary.go b/opsi/opsi_data_object_summary.go index 21e6b8fc73..c2ee1aa4e9 100644 --- a/opsi/opsi_data_object_summary.go +++ b/opsi/opsi_data_object_summary.go @@ -39,11 +39,11 @@ type OpsiDataObjectSummary interface { type opsidataobjectsummary struct { JsonData []byte - Identifier *string `mandatory:"true" json:"identifier"` - DisplayName *string `mandatory:"true" json:"displayName"` Description *string `mandatory:"false" json:"description"` Name *string `mandatory:"false" json:"name"` GroupNames []string `mandatory:"false" json:"groupNames"` + Identifier *string `mandatory:"true" json:"identifier"` + DisplayName *string `mandatory:"true" json:"displayName"` DataObjectType string `json:"dataObjectType"` } @@ -95,31 +95,31 @@ func (m *opsidataobjectsummary) UnmarshalPolymorphicJSON(data []byte) (interface } } -//GetIdentifier returns Identifier -func (m opsidataobjectsummary) GetIdentifier() *string { - return m.Identifier -} - -//GetDisplayName returns DisplayName -func (m opsidataobjectsummary) GetDisplayName() *string { - return m.DisplayName -} - -//GetDescription returns Description +// GetDescription returns Description func (m opsidataobjectsummary) GetDescription() *string { return m.Description } -//GetName returns Name +// GetName returns Name func (m opsidataobjectsummary) GetName() *string { return m.Name } -//GetGroupNames returns GroupNames +// GetGroupNames returns GroupNames func (m opsidataobjectsummary) GetGroupNames() []string { return m.GroupNames } +// GetIdentifier returns Identifier +func (m opsidataobjectsummary) GetIdentifier() *string { + return m.Identifier +} + +// GetDisplayName returns DisplayName +func (m opsidataobjectsummary) GetDisplayName() *string { + return m.DisplayName +} + func (m opsidataobjectsummary) String() string { return common.PointerString(m) } diff --git a/opsi/opsi_data_objects_collection.go b/opsi/opsi_data_objects_collection.go index e83d41b5b4..afb785dc6d 100644 --- a/opsi/opsi_data_objects_collection.go +++ b/opsi/opsi_data_objects_collection.go @@ -64,6 +64,5 @@ func (m *OpsiDataObjectsCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/opsi/opsi_operationsinsights_client.go b/opsi/opsi_operationsinsights_client.go index a4b2f771d2..90bed8aa59 100644 --- a/opsi/opsi_operationsinsights_client.go +++ b/opsi/opsi_operationsinsights_client.go @@ -82,7 +82,7 @@ func (client *OperationsInsightsClient) setConfigurationProvider(configProvider 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/opsi/opsi_ux_configuration.go b/opsi/opsi_ux_configuration.go index ddca958174..a3a0f0f7e4 100644 --- a/opsi/opsi_ux_configuration.go +++ b/opsi/opsi_ux_configuration.go @@ -210,6 +210,5 @@ func (m *OpsiUxConfiguration) UnmarshalJSON(data []byte) (e error) { m.ConfigItems[i] = nil } } - return } diff --git a/opsi/query_opsi_data_object_data_details.go b/opsi/query_opsi_data_object_data_details.go index 69ca4f5d0c..d0b39fbad0 100644 --- a/opsi/query_opsi_data_object_data_details.go +++ b/opsi/query_opsi_data_object_data_details.go @@ -75,7 +75,6 @@ func (m *QueryOpsiDataObjectDataDetails) UnmarshalJSON(data []byte) (e error) { m.DataObjects[i] = nil } } - m.ResourceFilters = model.ResourceFilters nn, e = model.Query.UnmarshalPolymorphicJSON(model.Query.JsonData) diff --git a/opsi/summarize_exadata_insight_resource_statistics_aggregation_collection.go b/opsi/summarize_exadata_insight_resource_statistics_aggregation_collection.go index ef3ad2c90f..cdce39f707 100644 --- a/opsi/summarize_exadata_insight_resource_statistics_aggregation_collection.go +++ b/opsi/summarize_exadata_insight_resource_statistics_aggregation_collection.go @@ -100,7 +100,6 @@ func (m *SummarizeExadataInsightResourceStatisticsAggregationCollection) Unmarsh m.Items[i] = nil } } - m.UsageUnit = model.UsageUnit m.ExadataResourceMetric = model.ExadataResourceMetric diff --git a/opsi/update_database_insight_details.go b/opsi/update_database_insight_details.go index c257009d38..28e3575018 100644 --- a/opsi/update_database_insight_details.go +++ b/opsi/update_database_insight_details.go @@ -86,12 +86,12 @@ func (m *updatedatabaseinsightdetails) UnmarshalPolymorphicJSON(data []byte) (in } } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updatedatabaseinsightdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updatedatabaseinsightdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/opsi/update_exadata_insight_details.go b/opsi/update_exadata_insight_details.go index 199ea87a42..56439bf77c 100644 --- a/opsi/update_exadata_insight_details.go +++ b/opsi/update_exadata_insight_details.go @@ -78,12 +78,12 @@ func (m *updateexadatainsightdetails) UnmarshalPolymorphicJSON(data []byte) (int } } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updateexadatainsightdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updateexadatainsightdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/opsi/update_host_insight_details.go b/opsi/update_host_insight_details.go index e27d4eeec6..1fd33dd5b2 100644 --- a/opsi/update_host_insight_details.go +++ b/opsi/update_host_insight_details.go @@ -82,12 +82,12 @@ func (m *updatehostinsightdetails) UnmarshalPolymorphicJSON(data []byte) (interf } } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updatehostinsightdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updatehostinsightdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/opsi/update_opsi_configuration_details.go b/opsi/update_opsi_configuration_details.go index ad54f4cd5a..fde8c5c913 100644 --- a/opsi/update_opsi_configuration_details.go +++ b/opsi/update_opsi_configuration_details.go @@ -96,32 +96,32 @@ func (m *updateopsiconfigurationdetails) UnmarshalPolymorphicJSON(data []byte) ( } } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m updateopsiconfigurationdetails) GetDisplayName() *string { return m.DisplayName } -//GetDescription returns Description +// GetDescription returns Description func (m updateopsiconfigurationdetails) GetDescription() *string { return m.Description } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updateopsiconfigurationdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updateopsiconfigurationdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m updateopsiconfigurationdetails) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } -//GetConfigItems returns ConfigItems +// GetConfigItems returns ConfigItems func (m updateopsiconfigurationdetails) GetConfigItems() json.RawMessage { return m.ConfigItems } diff --git a/opsi/update_opsi_ux_configuration_details.go b/opsi/update_opsi_ux_configuration_details.go index 938b6128ca..83faefcb15 100644 --- a/opsi/update_opsi_ux_configuration_details.go +++ b/opsi/update_opsi_ux_configuration_details.go @@ -142,6 +142,5 @@ func (m *UpdateOpsiUxConfigurationDetails) UnmarshalJSON(data []byte) (e error) m.ConfigItems[i] = nil } } - return } diff --git a/opsi/ux_configuration_items_collection.go b/opsi/ux_configuration_items_collection.go index fc21ef7603..b25cc3d0b0 100644 --- a/opsi/ux_configuration_items_collection.go +++ b/opsi/ux_configuration_items_collection.go @@ -83,6 +83,5 @@ func (m *UxConfigurationItemsCollection) UnmarshalJSON(data []byte) (e error) { m.ConfigItems[i] = nil } } - return } diff --git a/optimizer/optimizer_client.go b/optimizer/optimizer_client.go index 0341055d1c..878be56d40 100644 --- a/optimizer/optimizer_client.go +++ b/optimizer/optimizer_client.go @@ -82,7 +82,7 @@ func (client *OptimizerClient) setConfigurationProvider(configProvider common.Co 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/osmanagement/event.go b/osmanagement/event.go index e6d6fd6a0e..016a375e2b 100644 --- a/osmanagement/event.go +++ b/osmanagement/event.go @@ -60,7 +60,6 @@ type Event interface { type event struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` InstanceId *string `mandatory:"false" json:"instanceId"` CompartmentId *string `mandatory:"false" json:"compartmentId"` TenancyId *string `mandatory:"false" json:"tenancyId"` @@ -71,6 +70,7 @@ type event struct { 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"` + Id *string `mandatory:"true" json:"id"` EventType string `json:"eventType"` } @@ -124,61 +124,61 @@ func (m *event) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetId returns Id -func (m event) GetId() *string { - return m.Id -} - -//GetInstanceId returns InstanceId +// GetInstanceId returns InstanceId func (m event) GetInstanceId() *string { return m.InstanceId } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m event) GetCompartmentId() *string { return m.CompartmentId } -//GetTenancyId returns TenancyId +// GetTenancyId returns TenancyId func (m event) GetTenancyId() *string { return m.TenancyId } -//GetSummary returns Summary +// GetSummary returns Summary func (m event) GetSummary() *string { return m.Summary } -//GetTimestamp returns Timestamp +// GetTimestamp returns Timestamp func (m event) GetTimestamp() *common.SDKTime { return m.Timestamp } -//GetEventFingerprint returns EventFingerprint +// GetEventFingerprint returns EventFingerprint func (m event) GetEventFingerprint() *string { return m.EventFingerprint } -//GetCount returns Count +// GetCount returns Count func (m event) GetCount() *int { return m.Count } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m event) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m event) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m event) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetId returns Id +func (m event) GetId() *string { + return m.Id +} + func (m event) String() string { return common.PointerString(m) } diff --git a/osmanagement/osmanagement_client.go b/osmanagement/osmanagement_client.go index 91de588fd9..05392aa937 100644 --- a/osmanagement/osmanagement_client.go +++ b/osmanagement/osmanagement_client.go @@ -81,7 +81,7 @@ func (client *OsManagementClient) setConfigurationProvider(configProvider common 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/osmanagement/osmanagement_event_client.go b/osmanagement/osmanagement_event_client.go index bf65b3596f..19fcdf874f 100644 --- a/osmanagement/osmanagement_event_client.go +++ b/osmanagement/osmanagement_event_client.go @@ -81,7 +81,7 @@ func (client *EventClient) setConfigurationProvider(configProvider common.Config 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/osmanagementhub/create_profile_details.go b/osmanagementhub/create_profile_details.go index e0dc150e35..0d3647f638 100644 --- a/osmanagementhub/create_profile_details.go +++ b/osmanagementhub/create_profile_details.go @@ -45,12 +45,12 @@ type CreateProfileDetails interface { type createprofiledetails struct { JsonData []byte - DisplayName *string `mandatory:"true" json:"displayName"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` Description *string `mandatory:"false" json:"description"` ManagementStationId *string `mandatory:"false" json:"managementStationId"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + DisplayName *string `mandatory:"true" json:"displayName"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` ProfileType string `json:"profileType"` } @@ -107,36 +107,36 @@ func (m *createprofiledetails) UnmarshalPolymorphicJSON(data []byte) (interface{ } } -//GetDisplayName returns DisplayName -func (m createprofiledetails) GetDisplayName() *string { - return m.DisplayName -} - -//GetCompartmentId returns CompartmentId -func (m createprofiledetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetDescription returns Description +// GetDescription returns Description func (m createprofiledetails) GetDescription() *string { return m.Description } -//GetManagementStationId returns ManagementStationId +// GetManagementStationId returns ManagementStationId func (m createprofiledetails) GetManagementStationId() *string { return m.ManagementStationId } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createprofiledetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createprofiledetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetDisplayName returns DisplayName +func (m createprofiledetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetCompartmentId returns CompartmentId +func (m createprofiledetails) GetCompartmentId() *string { + return m.CompartmentId +} + func (m createprofiledetails) String() string { return common.PointerString(m) } diff --git a/osmanagementhub/create_software_source_details.go b/osmanagementhub/create_software_source_details.go index e40e97f33a..4126558544 100644 --- a/osmanagementhub/create_software_source_details.go +++ b/osmanagementhub/create_software_source_details.go @@ -42,11 +42,11 @@ type CreateSoftwareSourceDetails interface { type createsoftwaresourcedetails struct { JsonData []byte - CompartmentId *string `mandatory:"true" json:"compartmentId"` - DisplayName *string `mandatory:"true" json:"displayName"` Description *string `mandatory:"false" json:"description"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + DisplayName *string `mandatory:"true" json:"displayName"` SoftwareSourceType string `json:"softwareSourceType"` } @@ -94,31 +94,31 @@ func (m *createsoftwaresourcedetails) UnmarshalPolymorphicJSON(data []byte) (int } } -//GetCompartmentId returns CompartmentId -func (m createsoftwaresourcedetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetDisplayName returns DisplayName -func (m createsoftwaresourcedetails) GetDisplayName() *string { - return m.DisplayName -} - -//GetDescription returns Description +// GetDescription returns Description func (m createsoftwaresourcedetails) GetDescription() *string { return m.Description } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createsoftwaresourcedetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createsoftwaresourcedetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } +// GetCompartmentId returns CompartmentId +func (m createsoftwaresourcedetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetDisplayName returns DisplayName +func (m createsoftwaresourcedetails) GetDisplayName() *string { + return m.DisplayName +} + func (m createsoftwaresourcedetails) String() string { return common.PointerString(m) } diff --git a/osmanagementhub/osmanagementhub_lifecycleenvironment_client.go b/osmanagementhub/osmanagementhub_lifecycleenvironment_client.go index 502d91b514..bc7ed89a1b 100644 --- a/osmanagementhub/osmanagementhub_lifecycleenvironment_client.go +++ b/osmanagementhub/osmanagementhub_lifecycleenvironment_client.go @@ -81,7 +81,7 @@ func (client *LifecycleEnvironmentClient) setConfigurationProvider(configProvide 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/osmanagementhub/osmanagementhub_managedinstance_client.go b/osmanagementhub/osmanagementhub_managedinstance_client.go index cae3b01077..1a301a6776 100644 --- a/osmanagementhub/osmanagementhub_managedinstance_client.go +++ b/osmanagementhub/osmanagementhub_managedinstance_client.go @@ -81,7 +81,7 @@ func (client *ManagedInstanceClient) setConfigurationProvider(configProvider com 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/osmanagementhub/osmanagementhub_managedinstancegroup_client.go b/osmanagementhub/osmanagementhub_managedinstancegroup_client.go index 23821d7366..f4dd202f1b 100644 --- a/osmanagementhub/osmanagementhub_managedinstancegroup_client.go +++ b/osmanagementhub/osmanagementhub_managedinstancegroup_client.go @@ -81,7 +81,7 @@ func (client *ManagedInstanceGroupClient) setConfigurationProvider(configProvide 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/osmanagementhub/osmanagementhub_managementstation_client.go b/osmanagementhub/osmanagementhub_managementstation_client.go index 578e89778f..fc302187a6 100644 --- a/osmanagementhub/osmanagementhub_managementstation_client.go +++ b/osmanagementhub/osmanagementhub_managementstation_client.go @@ -81,7 +81,7 @@ func (client *ManagementStationClient) setConfigurationProvider(configProvider c 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/osmanagementhub/osmanagementhub_onboarding_client.go b/osmanagementhub/osmanagementhub_onboarding_client.go index 874b482385..4771102bf5 100644 --- a/osmanagementhub/osmanagementhub_onboarding_client.go +++ b/osmanagementhub/osmanagementhub_onboarding_client.go @@ -81,7 +81,7 @@ func (client *OnboardingClient) setConfigurationProvider(configProvider common.C 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/osmanagementhub/osmanagementhub_reportingmanagedinstance_client.go b/osmanagementhub/osmanagementhub_reportingmanagedinstance_client.go index 791f83298f..7b29ef32d8 100644 --- a/osmanagementhub/osmanagementhub_reportingmanagedinstance_client.go +++ b/osmanagementhub/osmanagementhub_reportingmanagedinstance_client.go @@ -81,7 +81,7 @@ func (client *ReportingManagedInstanceClient) setConfigurationProvider(configPro 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/osmanagementhub/osmanagementhub_scheduledjob_client.go b/osmanagementhub/osmanagementhub_scheduledjob_client.go index df7348e15a..1aae71103c 100644 --- a/osmanagementhub/osmanagementhub_scheduledjob_client.go +++ b/osmanagementhub/osmanagementhub_scheduledjob_client.go @@ -81,7 +81,7 @@ func (client *ScheduledJobClient) setConfigurationProvider(configProvider common 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/osmanagementhub/osmanagementhub_softwaresource_client.go b/osmanagementhub/osmanagementhub_softwaresource_client.go index 0b9e8e543a..d573acc32a 100644 --- a/osmanagementhub/osmanagementhub_softwaresource_client.go +++ b/osmanagementhub/osmanagementhub_softwaresource_client.go @@ -81,7 +81,7 @@ func (client *SoftwareSourceClient) setConfigurationProvider(configProvider comm 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/osmanagementhub/osmanagementhub_workrequest_client.go b/osmanagementhub/osmanagementhub_workrequest_client.go index 0e59e72340..f9e27ce322 100644 --- a/osmanagementhub/osmanagementhub_workrequest_client.go +++ b/osmanagementhub/osmanagementhub_workrequest_client.go @@ -81,7 +81,7 @@ func (client *WorkRequestClient) setConfigurationProvider(configProvider common. 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/osmanagementhub/package_summary.go b/osmanagementhub/package_summary.go index d396917ff7..a00b964081 100644 --- a/osmanagementhub/package_summary.go +++ b/osmanagementhub/package_summary.go @@ -41,12 +41,12 @@ type PackageSummary interface { type packagesummary struct { JsonData []byte + Architecture ArchTypeEnum `mandatory:"false" json:"architecture,omitempty"` + SoftwareSources []SoftwareSourceDetails `mandatory:"false" json:"softwareSources"` DisplayName *string `mandatory:"true" json:"displayName"` Name *string `mandatory:"true" json:"name"` Type *string `mandatory:"true" json:"type"` Version *string `mandatory:"true" json:"version"` - Architecture ArchTypeEnum `mandatory:"false" json:"architecture,omitempty"` - SoftwareSources []SoftwareSourceDetails `mandatory:"false" json:"softwareSources"` PackageClassification string `json:"packageClassification"` } @@ -99,36 +99,36 @@ func (m *packagesummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, err } } -//GetDisplayName returns DisplayName +// GetArchitecture returns Architecture +func (m packagesummary) GetArchitecture() ArchTypeEnum { + return m.Architecture +} + +// GetSoftwareSources returns SoftwareSources +func (m packagesummary) GetSoftwareSources() []SoftwareSourceDetails { + return m.SoftwareSources +} + +// GetDisplayName returns DisplayName func (m packagesummary) GetDisplayName() *string { return m.DisplayName } -//GetName returns Name +// GetName returns Name func (m packagesummary) GetName() *string { return m.Name } -//GetType returns Type +// GetType returns Type func (m packagesummary) GetType() *string { return m.Type } -//GetVersion returns Version +// GetVersion returns Version func (m packagesummary) GetVersion() *string { return m.Version } -//GetArchitecture returns Architecture -func (m packagesummary) GetArchitecture() ArchTypeEnum { - return m.Architecture -} - -//GetSoftwareSources returns SoftwareSources -func (m packagesummary) GetSoftwareSources() []SoftwareSourceDetails { - return m.SoftwareSources -} - func (m packagesummary) String() string { return common.PointerString(m) } diff --git a/osmanagementhub/profile.go b/osmanagementhub/profile.go index ab25081f30..7350554331 100644 --- a/osmanagementhub/profile.go +++ b/osmanagementhub/profile.go @@ -67,12 +67,6 @@ type Profile interface { type profile struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` - DisplayName *string `mandatory:"true" json:"displayName"` - VendorName VendorNameEnum `mandatory:"true" json:"vendorName"` - OsFamily OsFamilyEnum `mandatory:"true" json:"osFamily"` - ArchType ArchTypeEnum `mandatory:"true" json:"archType"` Description *string `mandatory:"false" json:"description"` ManagementStationId *string `mandatory:"false" json:"managementStationId"` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` @@ -80,6 +74,12 @@ type profile struct { 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"` + Id *string `mandatory:"true" json:"id"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + DisplayName *string `mandatory:"true" json:"displayName"` + VendorName VendorNameEnum `mandatory:"true" json:"vendorName"` + OsFamily OsFamilyEnum `mandatory:"true" json:"osFamily"` + ArchType ArchTypeEnum `mandatory:"true" json:"archType"` ProfileType string `json:"profileType"` } @@ -143,71 +143,71 @@ func (m *profile) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetId returns Id -func (m profile) GetId() *string { - return m.Id -} - -//GetCompartmentId returns CompartmentId -func (m profile) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetDisplayName returns DisplayName -func (m profile) GetDisplayName() *string { - return m.DisplayName -} - -//GetVendorName returns VendorName -func (m profile) GetVendorName() VendorNameEnum { - return m.VendorName -} - -//GetOsFamily returns OsFamily -func (m profile) GetOsFamily() OsFamilyEnum { - return m.OsFamily -} - -//GetArchType returns ArchType -func (m profile) GetArchType() ArchTypeEnum { - return m.ArchType -} - -//GetDescription returns Description +// GetDescription returns Description func (m profile) GetDescription() *string { return m.Description } -//GetManagementStationId returns ManagementStationId +// GetManagementStationId returns ManagementStationId func (m profile) GetManagementStationId() *string { return m.ManagementStationId } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m profile) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m profile) GetLifecycleState() ProfileLifecycleStateEnum { return m.LifecycleState } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m profile) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m profile) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m profile) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetId returns Id +func (m profile) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m profile) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetDisplayName returns DisplayName +func (m profile) GetDisplayName() *string { + return m.DisplayName +} + +// GetVendorName returns VendorName +func (m profile) GetVendorName() VendorNameEnum { + return m.VendorName +} + +// GetOsFamily returns OsFamily +func (m profile) GetOsFamily() OsFamilyEnum { + return m.OsFamily +} + +// GetArchType returns ArchType +func (m profile) GetArchType() ArchTypeEnum { + return m.ArchType +} + func (m profile) String() string { return common.PointerString(m) } diff --git a/osmanagementhub/software_source.go b/osmanagementhub/software_source.go index f5fbb71c50..20d041f133 100644 --- a/osmanagementhub/software_source.go +++ b/osmanagementhub/software_source.go @@ -86,15 +86,6 @@ type SoftwareSource interface { type softwaresource struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` - CompartmentId *string `mandatory:"true" json:"compartmentId"` - DisplayName *string `mandatory:"true" json:"displayName"` - TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - Availability AvailabilityEnum `mandatory:"true" json:"availability"` - RepoId *string `mandatory:"true" json:"repoId"` - OsFamily OsFamilyEnum `mandatory:"true" json:"osFamily"` - ArchType ArchTypeEnum `mandatory:"true" json:"archType"` - Url *string `mandatory:"true" json:"url"` Description *string `mandatory:"false" json:"description"` LifecycleState SoftwareSourceLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` PackageCount *int64 `mandatory:"false" json:"packageCount"` @@ -105,6 +96,15 @@ type softwaresource struct { 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"` + Id *string `mandatory:"true" json:"id"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + DisplayName *string `mandatory:"true" json:"displayName"` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + Availability AvailabilityEnum `mandatory:"true" json:"availability"` + RepoId *string `mandatory:"true" json:"repoId"` + OsFamily OsFamilyEnum `mandatory:"true" json:"osFamily"` + ArchType ArchTypeEnum `mandatory:"true" json:"archType"` + Url *string `mandatory:"true" json:"url"` SoftwareSourceType string `json:"softwareSourceType"` } @@ -170,101 +170,101 @@ func (m *softwaresource) UnmarshalPolymorphicJSON(data []byte) (interface{}, err } } -//GetId returns Id -func (m softwaresource) GetId() *string { - return m.Id -} - -//GetCompartmentId returns CompartmentId -func (m softwaresource) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetDisplayName returns DisplayName -func (m softwaresource) GetDisplayName() *string { - return m.DisplayName -} - -//GetTimeCreated returns TimeCreated -func (m softwaresource) GetTimeCreated() *common.SDKTime { - return m.TimeCreated -} - -//GetAvailability returns Availability -func (m softwaresource) GetAvailability() AvailabilityEnum { - return m.Availability -} - -//GetRepoId returns RepoId -func (m softwaresource) GetRepoId() *string { - return m.RepoId -} - -//GetOsFamily returns OsFamily -func (m softwaresource) GetOsFamily() OsFamilyEnum { - return m.OsFamily -} - -//GetArchType returns ArchType -func (m softwaresource) GetArchType() ArchTypeEnum { - return m.ArchType -} - -//GetUrl returns Url -func (m softwaresource) GetUrl() *string { - return m.Url -} - -//GetDescription returns Description +// GetDescription returns Description func (m softwaresource) GetDescription() *string { return m.Description } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m softwaresource) GetLifecycleState() SoftwareSourceLifecycleStateEnum { return m.LifecycleState } -//GetPackageCount returns PackageCount +// GetPackageCount returns PackageCount func (m softwaresource) GetPackageCount() *int64 { return m.PackageCount } -//GetChecksumType returns ChecksumType +// GetChecksumType returns ChecksumType func (m softwaresource) GetChecksumType() ChecksumTypeEnum { return m.ChecksumType } -//GetGpgKeyUrl returns GpgKeyUrl +// GetGpgKeyUrl returns GpgKeyUrl func (m softwaresource) GetGpgKeyUrl() *string { return m.GpgKeyUrl } -//GetGpgKeyId returns GpgKeyId +// GetGpgKeyId returns GpgKeyId func (m softwaresource) GetGpgKeyId() *string { return m.GpgKeyId } -//GetGpgKeyFingerprint returns GpgKeyFingerprint +// GetGpgKeyFingerprint returns GpgKeyFingerprint func (m softwaresource) GetGpgKeyFingerprint() *string { return m.GpgKeyFingerprint } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m softwaresource) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m softwaresource) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m softwaresource) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetId returns Id +func (m softwaresource) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m softwaresource) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetDisplayName returns DisplayName +func (m softwaresource) GetDisplayName() *string { + return m.DisplayName +} + +// GetTimeCreated returns TimeCreated +func (m softwaresource) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetAvailability returns Availability +func (m softwaresource) GetAvailability() AvailabilityEnum { + return m.Availability +} + +// GetRepoId returns RepoId +func (m softwaresource) GetRepoId() *string { + return m.RepoId +} + +// GetOsFamily returns OsFamily +func (m softwaresource) GetOsFamily() OsFamilyEnum { + return m.OsFamily +} + +// GetArchType returns ArchType +func (m softwaresource) GetArchType() ArchTypeEnum { + return m.ArchType +} + +// GetUrl returns Url +func (m softwaresource) GetUrl() *string { + return m.Url +} + func (m softwaresource) String() string { return common.PointerString(m) } diff --git a/osmanagementhub/software_source_collection.go b/osmanagementhub/software_source_collection.go index 570580f01d..56352327eb 100644 --- a/osmanagementhub/software_source_collection.go +++ b/osmanagementhub/software_source_collection.go @@ -63,6 +63,5 @@ func (m *SoftwareSourceCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/osmanagementhub/software_source_summary.go b/osmanagementhub/software_source_summary.go index d65760d972..c9dfe41e8a 100644 --- a/osmanagementhub/software_source_summary.go +++ b/osmanagementhub/software_source_summary.go @@ -78,6 +78,12 @@ type SoftwareSourceSummary interface { type softwaresourcesummary struct { JsonData []byte + Description *string `mandatory:"false" json:"description"` + PackageCount *int64 `mandatory:"false" json:"packageCount"` + LifecycleState SoftwareSourceLifecycleStateEnum `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"` Id *string `mandatory:"true" json:"id"` CompartmentId *string `mandatory:"true" json:"compartmentId"` DisplayName *string `mandatory:"true" json:"displayName"` @@ -88,12 +94,6 @@ type softwaresourcesummary struct { Availability AvailabilityEnum `mandatory:"true" json:"availability"` OsFamily OsFamilyEnum `mandatory:"true" json:"osFamily"` ArchType ArchTypeEnum `mandatory:"true" json:"archType"` - Description *string `mandatory:"false" json:"description"` - PackageCount *int64 `mandatory:"false" json:"packageCount"` - LifecycleState SoftwareSourceLifecycleStateEnum `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"` SoftwareSourceType string `json:"softwareSourceType"` } @@ -156,86 +156,86 @@ func (m *softwaresourcesummary) UnmarshalPolymorphicJSON(data []byte) (interface } } -//GetId returns Id +// GetDescription returns Description +func (m softwaresourcesummary) GetDescription() *string { + return m.Description +} + +// GetPackageCount returns PackageCount +func (m softwaresourcesummary) GetPackageCount() *int64 { + return m.PackageCount +} + +// GetLifecycleState returns LifecycleState +func (m softwaresourcesummary) GetLifecycleState() SoftwareSourceLifecycleStateEnum { + return m.LifecycleState +} + +// GetFreeformTags returns FreeformTags +func (m softwaresourcesummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m softwaresourcesummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m softwaresourcesummary) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +// GetId returns Id func (m softwaresourcesummary) GetId() *string { return m.Id } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m softwaresourcesummary) GetCompartmentId() *string { return m.CompartmentId } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m softwaresourcesummary) GetDisplayName() *string { return m.DisplayName } -//GetRepoId returns RepoId +// GetRepoId returns RepoId func (m softwaresourcesummary) GetRepoId() *string { return m.RepoId } -//GetUrl returns Url +// GetUrl returns Url func (m softwaresourcesummary) GetUrl() *string { return m.Url } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m softwaresourcesummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m softwaresourcesummary) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetAvailability returns Availability +// GetAvailability returns Availability func (m softwaresourcesummary) GetAvailability() AvailabilityEnum { return m.Availability } -//GetOsFamily returns OsFamily +// GetOsFamily returns OsFamily func (m softwaresourcesummary) GetOsFamily() OsFamilyEnum { return m.OsFamily } -//GetArchType returns ArchType +// GetArchType returns ArchType func (m softwaresourcesummary) GetArchType() ArchTypeEnum { return m.ArchType } -//GetDescription returns Description -func (m softwaresourcesummary) GetDescription() *string { - return m.Description -} - -//GetPackageCount returns PackageCount -func (m softwaresourcesummary) GetPackageCount() *int64 { - return m.PackageCount -} - -//GetLifecycleState returns LifecycleState -func (m softwaresourcesummary) GetLifecycleState() SoftwareSourceLifecycleStateEnum { - return m.LifecycleState -} - -//GetFreeformTags returns FreeformTags -func (m softwaresourcesummary) GetFreeformTags() map[string]string { - return m.FreeformTags -} - -//GetDefinedTags returns DefinedTags -func (m softwaresourcesummary) GetDefinedTags() map[string]map[string]interface{} { - return m.DefinedTags -} - -//GetSystemTags returns SystemTags -func (m softwaresourcesummary) GetSystemTags() map[string]map[string]interface{} { - return m.SystemTags -} - func (m softwaresourcesummary) String() string { return common.PointerString(m) } diff --git a/osmanagementhub/update_software_source_details.go b/osmanagementhub/update_software_source_details.go index 4158f21738..204632e8c6 100644 --- a/osmanagementhub/update_software_source_details.go +++ b/osmanagementhub/update_software_source_details.go @@ -94,27 +94,27 @@ func (m *updatesoftwaresourcedetails) UnmarshalPolymorphicJSON(data []byte) (int } } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m updatesoftwaresourcedetails) GetCompartmentId() *string { return m.CompartmentId } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m updatesoftwaresourcedetails) GetDisplayName() *string { return m.DisplayName } -//GetDescription returns Description +// GetDescription returns Description func (m updatesoftwaresourcedetails) GetDescription() *string { return m.Description } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updatesoftwaresourcedetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updatesoftwaresourcedetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/ospgateway/invoice.go b/ospgateway/invoice.go index 2692df35f1..02e4bc4012 100644 --- a/ospgateway/invoice.go +++ b/ospgateway/invoice.go @@ -204,10 +204,7 @@ func (m *Invoice) UnmarshalJSON(data []byte) (e error) { m.BillToAddress = model.BillToAddress m.SubscriptionIds = make([]string, len(model.SubscriptionIds)) - for i, n := range model.SubscriptionIds { - m.SubscriptionIds[i] = n - } - + copy(m.SubscriptionIds, model.SubscriptionIds) m.InvoiceId = model.InvoiceId return diff --git a/ospgateway/invoice_summary.go b/ospgateway/invoice_summary.go index 90ea094e4b..2e70e3f437 100644 --- a/ospgateway/invoice_summary.go +++ b/ospgateway/invoice_summary.go @@ -211,10 +211,7 @@ func (m *InvoiceSummary) UnmarshalJSON(data []byte) (e error) { m.PartyName = model.PartyName m.SubscriptionIds = make([]string, len(model.SubscriptionIds)) - for i, n := range model.SubscriptionIds { - m.SubscriptionIds[i] = n - } - + copy(m.SubscriptionIds, model.SubscriptionIds) m.InvoiceId = model.InvoiceId return diff --git a/ospgateway/ospgateway_addressruleservice_client.go b/ospgateway/ospgateway_addressruleservice_client.go index 3d6b9b332a..4fb2ca7610 100644 --- a/ospgateway/ospgateway_addressruleservice_client.go +++ b/ospgateway/ospgateway_addressruleservice_client.go @@ -80,7 +80,7 @@ func (client *AddressRuleServiceClient) setConfigurationProvider(configProvider 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/ospgateway/ospgateway_addressservice_client.go b/ospgateway/ospgateway_addressservice_client.go index e11bb87422..dd9557859f 100644 --- a/ospgateway/ospgateway_addressservice_client.go +++ b/ospgateway/ospgateway_addressservice_client.go @@ -80,7 +80,7 @@ func (client *AddressServiceClient) setConfigurationProvider(configProvider comm 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/ospgateway/ospgateway_invoiceservice_client.go b/ospgateway/ospgateway_invoiceservice_client.go index baf0a65aa6..1d7c6111c3 100644 --- a/ospgateway/ospgateway_invoiceservice_client.go +++ b/ospgateway/ospgateway_invoiceservice_client.go @@ -80,7 +80,7 @@ func (client *InvoiceServiceClient) setConfigurationProvider(configProvider comm 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/ospgateway/ospgateway_subscriptionservice_client.go b/ospgateway/ospgateway_subscriptionservice_client.go index 5a78d8947b..fdff0026ac 100644 --- a/ospgateway/ospgateway_subscriptionservice_client.go +++ b/ospgateway/ospgateway_subscriptionservice_client.go @@ -80,7 +80,7 @@ func (client *SubscriptionServiceClient) setConfigurationProvider(configProvider 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/ospgateway/payment_detail.go b/ospgateway/payment_detail.go index 0b4d409b37..932d3f57ab 100644 --- a/ospgateway/payment_detail.go +++ b/ospgateway/payment_detail.go @@ -87,17 +87,17 @@ func (m *paymentdetail) UnmarshalPolymorphicJSON(data []byte) (interface{}, erro } } -//GetTimePaidOn returns TimePaidOn +// GetTimePaidOn returns TimePaidOn func (m paymentdetail) GetTimePaidOn() *common.SDKTime { return m.TimePaidOn } -//GetPaidBy returns PaidBy +// GetPaidBy returns PaidBy func (m paymentdetail) GetPaidBy() *string { return m.PaidBy } -//GetAmountPaid returns AmountPaid +// GetAmountPaid returns AmountPaid func (m paymentdetail) GetAmountPaid() *float32 { return m.AmountPaid } diff --git a/ospgateway/payment_option.go b/ospgateway/payment_option.go index e5bb4b8fda..13b1708465 100644 --- a/ospgateway/payment_option.go +++ b/ospgateway/payment_option.go @@ -74,12 +74,12 @@ func (m *paymentoption) UnmarshalPolymorphicJSON(data []byte) (interface{}, erro } } -//GetWalletInstrumentId returns WalletInstrumentId +// GetWalletInstrumentId returns WalletInstrumentId func (m paymentoption) GetWalletInstrumentId() *string { return m.WalletInstrumentId } -//GetWalletTransactionId returns WalletTransactionId +// GetWalletTransactionId returns WalletTransactionId func (m paymentoption) GetWalletTransactionId() *string { return m.WalletTransactionId } diff --git a/ospgateway/subscription.go b/ospgateway/subscription.go index cd0cdb27d8..edd067cf56 100644 --- a/ospgateway/subscription.go +++ b/ospgateway/subscription.go @@ -181,7 +181,6 @@ func (m *Subscription) UnmarshalJSON(data []byte) (e error) { m.PaymentOptions[i] = nil } } - m.PaymentGateway = model.PaymentGateway m.BillingAddress = model.BillingAddress diff --git a/ospgateway/subscription_summary.go b/ospgateway/subscription_summary.go index 3209c7eef9..8b257b4b7c 100644 --- a/ospgateway/subscription_summary.go +++ b/ospgateway/subscription_summary.go @@ -181,7 +181,6 @@ func (m *SubscriptionSummary) UnmarshalJSON(data []byte) (e error) { m.PaymentOptions[i] = nil } } - m.PaymentGateway = model.PaymentGateway m.BillingAddress = model.BillingAddress diff --git a/osubbillingschedule/osubbillingschedule_billingschedule_client.go b/osubbillingschedule/osubbillingschedule_billingschedule_client.go index 198b0989b5..10dcd2f717 100644 --- a/osubbillingschedule/osubbillingschedule_billingschedule_client.go +++ b/osubbillingschedule/osubbillingschedule_billingschedule_client.go @@ -80,7 +80,7 @@ func (client *BillingScheduleClient) setConfigurationProvider(configProvider com 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/osuborganizationsubscription/osuborganizationsubscription_organizationsubscription_client.go b/osuborganizationsubscription/osuborganizationsubscription_organizationsubscription_client.go index 045f1fc0c5..f17b3f9e50 100644 --- a/osuborganizationsubscription/osuborganizationsubscription_organizationsubscription_client.go +++ b/osuborganizationsubscription/osuborganizationsubscription_organizationsubscription_client.go @@ -80,7 +80,7 @@ func (client *OrganizationSubscriptionClient) setConfigurationProvider(configPro 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/osubsubscription/osubsubscription_commitment_client.go b/osubsubscription/osubsubscription_commitment_client.go index 639f595f7d..c20ef93479 100644 --- a/osubsubscription/osubsubscription_commitment_client.go +++ b/osubsubscription/osubsubscription_commitment_client.go @@ -80,7 +80,7 @@ func (client *CommitmentClient) setConfigurationProvider(configProvider common.C 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/osubsubscription/osubsubscription_ratecard_client.go b/osubsubscription/osubsubscription_ratecard_client.go index fb2e16b4f2..033fc7e58d 100644 --- a/osubsubscription/osubsubscription_ratecard_client.go +++ b/osubsubscription/osubsubscription_ratecard_client.go @@ -80,7 +80,7 @@ func (client *RatecardClient) setConfigurationProvider(configProvider common.Con 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/osubsubscription/osubsubscription_subscription_client.go b/osubsubscription/osubsubscription_subscription_client.go index 0fcf60d173..87b4523eb0 100644 --- a/osubsubscription/osubsubscription_subscription_client.go +++ b/osubsubscription/osubsubscription_subscription_client.go @@ -80,7 +80,7 @@ func (client *SubscriptionClient) setConfigurationProvider(configProvider common 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/osubusage/osubusage_computedusage_client.go b/osubusage/osubusage_computedusage_client.go index 55e3ec6112..89aee5ab9d 100644 --- a/osubusage/osubusage_computedusage_client.go +++ b/osubusage/osubusage_computedusage_client.go @@ -80,7 +80,7 @@ func (client *ComputedUsageClient) setConfigurationProvider(configProvider commo 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/queue/queue_client.go b/queue/queue_client.go index 9597bb1a52..e95dd48009 100644 --- a/queue/queue_client.go +++ b/queue/queue_client.go @@ -80,7 +80,7 @@ func (client *QueueClient) setConfigurationProvider(configProvider common.Config 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/queue/queue_queueadmin_client.go b/queue/queue_queueadmin_client.go index 74d25dafe9..5c8681b4f7 100644 --- a/queue/queue_queueadmin_client.go +++ b/queue/queue_queueadmin_client.go @@ -80,7 +80,7 @@ func (client *QueueAdminClient) setConfigurationProvider(configProvider common.C 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/recovery/recovery_databaserecovery_client.go b/recovery/recovery_databaserecovery_client.go index 5c6fbb997b..5053536487 100644 --- a/recovery/recovery_databaserecovery_client.go +++ b/recovery/recovery_databaserecovery_client.go @@ -80,7 +80,7 @@ func (client *DatabaseRecoveryClient) setConfigurationProvider(configProvider co 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/resourcemanager/config_source.go b/resourcemanager/config_source.go index b4cd4b9e40..98f986258f 100644 --- a/resourcemanager/config_source.go +++ b/resourcemanager/config_source.go @@ -97,7 +97,7 @@ func (m *configsource) UnmarshalPolymorphicJSON(data []byte) (interface{}, error } } -//GetWorkingDirectory returns WorkingDirectory +// GetWorkingDirectory returns WorkingDirectory func (m configsource) GetWorkingDirectory() *string { return m.WorkingDirectory } diff --git a/resourcemanager/configuration_source_provider.go b/resourcemanager/configuration_source_provider.go index b302ecbf62..541cd2152d 100644 --- a/resourcemanager/configuration_source_provider.go +++ b/resourcemanager/configuration_source_provider.go @@ -139,57 +139,57 @@ func (m *configurationsourceprovider) UnmarshalPolymorphicJSON(data []byte) (int } } -//GetId returns Id +// GetId returns Id func (m configurationsourceprovider) GetId() *string { return m.Id } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m configurationsourceprovider) GetCompartmentId() *string { return m.CompartmentId } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m configurationsourceprovider) GetDisplayName() *string { return m.DisplayName } -//GetDescription returns Description +// GetDescription returns Description func (m configurationsourceprovider) GetDescription() *string { return m.Description } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m configurationsourceprovider) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m configurationsourceprovider) GetLifecycleState() ConfigurationSourceProviderLifecycleStateEnum { return m.LifecycleState } -//GetPrivateServerConfigDetails returns PrivateServerConfigDetails +// GetPrivateServerConfigDetails returns PrivateServerConfigDetails func (m configurationsourceprovider) GetPrivateServerConfigDetails() *PrivateServerConfigDetails { return m.PrivateServerConfigDetails } -//GetUsername returns Username +// GetUsername returns Username func (m configurationsourceprovider) GetUsername() *string { return m.Username } -//GetSecretId returns SecretId +// GetSecretId returns SecretId func (m configurationsourceprovider) GetSecretId() *string { return m.SecretId } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m configurationsourceprovider) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m configurationsourceprovider) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/resourcemanager/configuration_source_provider_collection.go b/resourcemanager/configuration_source_provider_collection.go index 99fa382a36..719459a577 100644 --- a/resourcemanager/configuration_source_provider_collection.go +++ b/resourcemanager/configuration_source_provider_collection.go @@ -65,6 +65,5 @@ func (m *ConfigurationSourceProviderCollection) UnmarshalJSON(data []byte) (e er m.Items[i] = nil } } - return } diff --git a/resourcemanager/configuration_source_provider_summary.go b/resourcemanager/configuration_source_provider_summary.go index 189789e092..b10fa54662 100644 --- a/resourcemanager/configuration_source_provider_summary.go +++ b/resourcemanager/configuration_source_provider_summary.go @@ -129,47 +129,47 @@ func (m *configurationsourceprovidersummary) UnmarshalPolymorphicJSON(data []byt } } -//GetId returns Id +// GetId returns Id func (m configurationsourceprovidersummary) GetId() *string { return m.Id } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m configurationsourceprovidersummary) GetCompartmentId() *string { return m.CompartmentId } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m configurationsourceprovidersummary) GetDisplayName() *string { return m.DisplayName } -//GetDescription returns Description +// GetDescription returns Description func (m configurationsourceprovidersummary) GetDescription() *string { return m.Description } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m configurationsourceprovidersummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m configurationsourceprovidersummary) GetLifecycleState() ConfigurationSourceProviderLifecycleStateEnum { return m.LifecycleState } -//GetPrivateServerConfigDetails returns PrivateServerConfigDetails +// GetPrivateServerConfigDetails returns PrivateServerConfigDetails func (m configurationsourceprovidersummary) GetPrivateServerConfigDetails() *PrivateServerConfigDetails { return m.PrivateServerConfigDetails } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m configurationsourceprovidersummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m configurationsourceprovidersummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/resourcemanager/create_config_source_details.go b/resourcemanager/create_config_source_details.go index a616291cec..995a7e214b 100644 --- a/resourcemanager/create_config_source_details.go +++ b/resourcemanager/create_config_source_details.go @@ -101,7 +101,7 @@ func (m *createconfigsourcedetails) UnmarshalPolymorphicJSON(data []byte) (inter } } -//GetWorkingDirectory returns WorkingDirectory +// GetWorkingDirectory returns WorkingDirectory func (m createconfigsourcedetails) GetWorkingDirectory() *string { return m.WorkingDirectory } diff --git a/resourcemanager/create_configuration_source_provider_details.go b/resourcemanager/create_configuration_source_provider_details.go index 4ecdda9e47..f31834205d 100644 --- a/resourcemanager/create_configuration_source_provider_details.go +++ b/resourcemanager/create_configuration_source_provider_details.go @@ -109,32 +109,32 @@ func (m *createconfigurationsourceproviderdetails) UnmarshalPolymorphicJSON(data } } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m createconfigurationsourceproviderdetails) GetCompartmentId() *string { return m.CompartmentId } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createconfigurationsourceproviderdetails) GetDisplayName() *string { return m.DisplayName } -//GetDescription returns Description +// GetDescription returns Description func (m createconfigurationsourceproviderdetails) GetDescription() *string { return m.Description } -//GetPrivateServerConfigDetails returns PrivateServerConfigDetails +// GetPrivateServerConfigDetails returns PrivateServerConfigDetails func (m createconfigurationsourceproviderdetails) GetPrivateServerConfigDetails() *PrivateServerConfigDetails { return m.PrivateServerConfigDetails } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createconfigurationsourceproviderdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createconfigurationsourceproviderdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/resourcemanager/create_job_operation_details.go b/resourcemanager/create_job_operation_details.go index a50c76be76..309ceffd63 100644 --- a/resourcemanager/create_job_operation_details.go +++ b/resourcemanager/create_job_operation_details.go @@ -90,7 +90,7 @@ func (m *createjoboperationdetails) UnmarshalPolymorphicJSON(data []byte) (inter } } -//GetIsProviderUpgradeRequired returns IsProviderUpgradeRequired +// GetIsProviderUpgradeRequired returns IsProviderUpgradeRequired func (m createjoboperationdetails) GetIsProviderUpgradeRequired() *bool { return m.IsProviderUpgradeRequired } diff --git a/resourcemanager/resourcemanager_client.go b/resourcemanager/resourcemanager_client.go index 6a75b158db..6f7d62e4c9 100644 --- a/resourcemanager/resourcemanager_client.go +++ b/resourcemanager/resourcemanager_client.go @@ -83,7 +83,7 @@ func (client *ResourceManagerClient) setConfigurationProvider(configProvider com 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/resourcemanager/update_config_source_details.go b/resourcemanager/update_config_source_details.go index 0d78d39a2e..3cb5fa7692 100644 --- a/resourcemanager/update_config_source_details.go +++ b/resourcemanager/update_config_source_details.go @@ -93,7 +93,7 @@ func (m *updateconfigsourcedetails) UnmarshalPolymorphicJSON(data []byte) (inter } } -//GetWorkingDirectory returns WorkingDirectory +// GetWorkingDirectory returns WorkingDirectory func (m updateconfigsourcedetails) GetWorkingDirectory() *string { return m.WorkingDirectory } diff --git a/resourcemanager/update_configuration_source_provider_details.go b/resourcemanager/update_configuration_source_provider_details.go index 2211c705e6..9e1bf7e9d8 100644 --- a/resourcemanager/update_configuration_source_provider_details.go +++ b/resourcemanager/update_configuration_source_provider_details.go @@ -103,27 +103,27 @@ func (m *updateconfigurationsourceproviderdetails) UnmarshalPolymorphicJSON(data } } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m updateconfigurationsourceproviderdetails) GetDisplayName() *string { return m.DisplayName } -//GetDescription returns Description +// GetDescription returns Description func (m updateconfigurationsourceproviderdetails) GetDescription() *string { return m.Description } -//GetPrivateServerConfigDetails returns PrivateServerConfigDetails +// GetPrivateServerConfigDetails returns PrivateServerConfigDetails func (m updateconfigurationsourceproviderdetails) GetPrivateServerConfigDetails() *PrivateServerConfigDetails { return m.PrivateServerConfigDetails } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updateconfigurationsourceproviderdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updateconfigurationsourceproviderdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/resourcesearch/resourcesearch_client.go b/resourcesearch/resourcesearch_client.go index 515a63b626..610451d823 100644 --- a/resourcesearch/resourcesearch_client.go +++ b/resourcesearch/resourcesearch_client.go @@ -80,7 +80,7 @@ func (client *ResourceSearchClient) setConfigurationProvider(configProvider comm 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/resourcesearch/search_details.go b/resourcesearch/search_details.go index dcc6d9df58..0fd3d5b994 100644 --- a/resourcesearch/search_details.go +++ b/resourcesearch/search_details.go @@ -69,7 +69,7 @@ func (m *searchdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, erro } } -//GetMatchingContextType returns MatchingContextType +// GetMatchingContextType returns MatchingContextType func (m searchdetails) GetMatchingContextType() SearchDetailsMatchingContextTypeEnum { return m.MatchingContextType } diff --git a/rover/rover_roverbundle_client.go b/rover/rover_roverbundle_client.go index 4c46e52fef..b9e455e747 100644 --- a/rover/rover_roverbundle_client.go +++ b/rover/rover_roverbundle_client.go @@ -80,7 +80,7 @@ func (client *RoverBundleClient) setConfigurationProvider(configProvider common. 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/rover/rover_rovercluster_client.go b/rover/rover_rovercluster_client.go index 2f445ba769..41eb555482 100644 --- a/rover/rover_rovercluster_client.go +++ b/rover/rover_rovercluster_client.go @@ -80,7 +80,7 @@ func (client *RoverClusterClient) setConfigurationProvider(configProvider common 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/rover/rover_roverentitlement_client.go b/rover/rover_roverentitlement_client.go index c3197ed46a..c8adbff6d5 100644 --- a/rover/rover_roverentitlement_client.go +++ b/rover/rover_roverentitlement_client.go @@ -80,7 +80,7 @@ func (client *RoverEntitlementClient) setConfigurationProvider(configProvider co 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/rover/rover_rovernode_client.go b/rover/rover_rovernode_client.go index d9595a9d84..8aebebf69f 100644 --- a/rover/rover_rovernode_client.go +++ b/rover/rover_rovernode_client.go @@ -80,7 +80,7 @@ func (client *RoverNodeClient) setConfigurationProvider(configProvider common.Co 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/rover/rover_shape_client.go b/rover/rover_shape_client.go index 61812c9414..1961d43a8b 100644 --- a/rover/rover_shape_client.go +++ b/rover/rover_shape_client.go @@ -80,7 +80,7 @@ func (client *ShapeClient) setConfigurationProvider(configProvider common.Config 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/rover/rover_workrequests_client.go b/rover/rover_workrequests_client.go index 844d2b5821..b9d929359a 100644 --- a/rover/rover_workrequests_client.go +++ b/rover/rover_workrequests_client.go @@ -80,7 +80,7 @@ func (client *WorkRequestsClient) setConfigurationProvider(configProvider common 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/sch/create_service_connector_details.go b/sch/create_service_connector_details.go index 27554c4c2d..ba5b122b39 100644 --- a/sch/create_service_connector_details.go +++ b/sch/create_service_connector_details.go @@ -96,7 +96,6 @@ func (m *CreateServiceConnectorDetails) UnmarshalJSON(data []byte) (e error) { m.Tasks[i] = nil } } - m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/sch/sch_serviceconnector_client.go b/sch/sch_serviceconnector_client.go index 12b62f7ce2..a2c041a281 100644 --- a/sch/sch_serviceconnector_client.go +++ b/sch/sch_serviceconnector_client.go @@ -82,7 +82,7 @@ func (client *ServiceConnectorClient) setConfigurationProvider(configProvider co 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/sch/service_connector.go b/sch/service_connector.go index ba97ea9d58..c545fb7f98 100644 --- a/sch/service_connector.go +++ b/sch/service_connector.go @@ -144,7 +144,6 @@ func (m *ServiceConnector) UnmarshalJSON(data []byte) (e error) { m.Tasks[i] = nil } } - nn, e = model.Target.UnmarshalPolymorphicJSON(model.Target.JsonData) if e != nil { return diff --git a/sch/update_service_connector_details.go b/sch/update_service_connector_details.go index f18b1197f4..d8f4f20378 100644 --- a/sch/update_service_connector_details.go +++ b/sch/update_service_connector_details.go @@ -103,7 +103,6 @@ func (m *UpdateServiceConnectorDetails) UnmarshalJSON(data []byte) (e error) { m.Tasks[i] = nil } } - nn, e = model.Target.UnmarshalPolymorphicJSON(model.Target.JsonData) if e != nil { return diff --git a/secrets/secret_bundle.go b/secrets/secret_bundle.go index 77a2b4878c..9c3b60bb3b 100644 --- a/secrets/secret_bundle.go +++ b/secrets/secret_bundle.go @@ -108,10 +108,7 @@ func (m *SecretBundle) UnmarshalJSON(data []byte) (e error) { m.TimeOfExpiry = model.TimeOfExpiry m.Stages = make([]SecretBundleStagesEnum, len(model.Stages)) - for i, n := range model.Stages { - m.Stages[i] = n - } - + copy(m.Stages, model.Stages) m.Metadata = model.Metadata m.SecretId = model.SecretId diff --git a/secrets/secrets_client.go b/secrets/secrets_client.go index 34a3c5e2dc..94d617c9ea 100644 --- a/secrets/secrets_client.go +++ b/secrets/secrets_client.go @@ -80,7 +80,7 @@ func (client *SecretsClient) setConfigurationProvider(configProvider common.Conf 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/servicecatalog/create_private_application_package.go b/servicecatalog/create_private_application_package.go index a838a04f4b..6658590a77 100644 --- a/servicecatalog/create_private_application_package.go +++ b/servicecatalog/create_private_application_package.go @@ -65,7 +65,7 @@ func (m *createprivateapplicationpackage) UnmarshalPolymorphicJSON(data []byte) } } -//GetVersion returns Version +// GetVersion returns Version func (m createprivateapplicationpackage) GetVersion() *string { return m.Version } diff --git a/servicecatalog/private_application_package.go b/servicecatalog/private_application_package.go index d4640992e8..bf6b7c8ee4 100644 --- a/servicecatalog/private_application_package.go +++ b/servicecatalog/private_application_package.go @@ -39,11 +39,11 @@ type PrivateApplicationPackage interface { type privateapplicationpackage struct { JsonData []byte + DisplayName *string `mandatory:"false" json:"displayName"` Id *string `mandatory:"true" json:"id"` PrivateApplicationId *string `mandatory:"true" json:"privateApplicationId"` Version *string `mandatory:"true" json:"version"` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - DisplayName *string `mandatory:"false" json:"displayName"` PackageType string `json:"packageType"` } @@ -87,31 +87,31 @@ func (m *privateapplicationpackage) UnmarshalPolymorphicJSON(data []byte) (inter } } -//GetId returns Id +// GetDisplayName returns DisplayName +func (m privateapplicationpackage) GetDisplayName() *string { + return m.DisplayName +} + +// GetId returns Id func (m privateapplicationpackage) GetId() *string { return m.Id } -//GetPrivateApplicationId returns PrivateApplicationId +// GetPrivateApplicationId returns PrivateApplicationId func (m privateapplicationpackage) GetPrivateApplicationId() *string { return m.PrivateApplicationId } -//GetVersion returns Version +// GetVersion returns Version func (m privateapplicationpackage) GetVersion() *string { return m.Version } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m privateapplicationpackage) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetDisplayName returns DisplayName -func (m privateapplicationpackage) GetDisplayName() *string { - return m.DisplayName -} - func (m privateapplicationpackage) String() string { return common.PointerString(m) } diff --git a/servicecatalog/servicecatalog_client.go b/servicecatalog/servicecatalog_client.go index 4b5ecad401..e563f79c35 100644 --- a/servicecatalog/servicecatalog_client.go +++ b/servicecatalog/servicecatalog_client.go @@ -80,7 +80,7 @@ func (client *ServiceCatalogClient) setConfigurationProvider(configProvider comm 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/servicemanagerproxy/servicemanagerproxy_client.go b/servicemanagerproxy/servicemanagerproxy_client.go index defdd79404..0d9ae9aa08 100644 --- a/servicemanagerproxy/servicemanagerproxy_client.go +++ b/servicemanagerproxy/servicemanagerproxy_client.go @@ -81,7 +81,7 @@ func (client *ServiceManagerProxyClient) setConfigurationProvider(configProvider 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/servicemesh/create_ingress_gateway_route_table_details.go b/servicemesh/create_ingress_gateway_route_table_details.go index bc8742053d..2c0637bee1 100644 --- a/servicemesh/create_ingress_gateway_route_table_details.go +++ b/servicemesh/create_ingress_gateway_route_table_details.go @@ -108,7 +108,6 @@ func (m *CreateIngressGatewayRouteTableDetails) UnmarshalJSON(data []byte) (e er m.RouteRules[i] = nil } } - m.CompartmentId = model.CompartmentId return diff --git a/servicemesh/create_virtual_deployment_details.go b/servicemesh/create_virtual_deployment_details.go index b8082b15ec..88efb8ae55 100644 --- a/servicemesh/create_virtual_deployment_details.go +++ b/servicemesh/create_virtual_deployment_details.go @@ -99,10 +99,7 @@ func (m *CreateVirtualDeploymentDetails) UnmarshalJSON(data []byte) (e error) { } m.Listeners = make([]VirtualDeploymentListener, len(model.Listeners)) - for i, n := range model.Listeners { - m.Listeners[i] = n - } - + copy(m.Listeners, model.Listeners) m.AccessLogging = model.AccessLogging m.FreeformTags = model.FreeformTags diff --git a/servicemesh/create_virtual_service_route_table_details.go b/servicemesh/create_virtual_service_route_table_details.go index e16ec715e2..0ee29ba23a 100644 --- a/servicemesh/create_virtual_service_route_table_details.go +++ b/servicemesh/create_virtual_service_route_table_details.go @@ -108,7 +108,6 @@ func (m *CreateVirtualServiceRouteTableDetails) UnmarshalJSON(data []byte) (e er m.RouteRules[i] = nil } } - m.CompartmentId = model.CompartmentId return diff --git a/servicemesh/ingress_gateway_route_table.go b/servicemesh/ingress_gateway_route_table.go index 37405b5988..25cd3e5876 100644 --- a/servicemesh/ingress_gateway_route_table.go +++ b/servicemesh/ingress_gateway_route_table.go @@ -128,7 +128,6 @@ func (m *IngressGatewayRouteTable) UnmarshalJSON(data []byte) (e error) { m.RouteRules[i] = nil } } - m.LifecycleDetails = model.LifecycleDetails m.FreeformTags = model.FreeformTags diff --git a/servicemesh/ingress_gateway_traffic_route_rule.go b/servicemesh/ingress_gateway_traffic_route_rule.go index 0252534ba7..9e70aa1b0f 100644 --- a/servicemesh/ingress_gateway_traffic_route_rule.go +++ b/servicemesh/ingress_gateway_traffic_route_rule.go @@ -27,8 +27,8 @@ type IngressGatewayTrafficRouteRule interface { type ingressgatewaytrafficrouterule struct { JsonData []byte - Destinations []VirtualServiceTrafficRuleTarget `mandatory:"true" json:"destinations"` IngressGatewayHost *IngressGatewayHostRef `mandatory:"false" json:"ingressGatewayHost"` + Destinations []VirtualServiceTrafficRuleTarget `mandatory:"true" json:"destinations"` Type string `json:"type"` } @@ -77,16 +77,16 @@ func (m *ingressgatewaytrafficrouterule) UnmarshalPolymorphicJSON(data []byte) ( } } -//GetDestinations returns Destinations -func (m ingressgatewaytrafficrouterule) GetDestinations() []VirtualServiceTrafficRuleTarget { - return m.Destinations -} - -//GetIngressGatewayHost returns IngressGatewayHost +// GetIngressGatewayHost returns IngressGatewayHost func (m ingressgatewaytrafficrouterule) GetIngressGatewayHost() *IngressGatewayHostRef { return m.IngressGatewayHost } +// GetDestinations returns Destinations +func (m ingressgatewaytrafficrouterule) GetDestinations() []VirtualServiceTrafficRuleTarget { + return m.Destinations +} + func (m ingressgatewaytrafficrouterule) String() string { return common.PointerString(m) } diff --git a/servicemesh/ingress_gateway_traffic_route_rule_details.go b/servicemesh/ingress_gateway_traffic_route_rule_details.go index d00dfdac6b..3a1b1f2a79 100644 --- a/servicemesh/ingress_gateway_traffic_route_rule_details.go +++ b/servicemesh/ingress_gateway_traffic_route_rule_details.go @@ -27,8 +27,8 @@ type IngressGatewayTrafficRouteRuleDetails interface { type ingressgatewaytrafficrouteruledetails struct { JsonData []byte - Destinations []VirtualServiceTrafficRuleTargetDetails `mandatory:"true" json:"destinations"` IngressGatewayHost *IngressGatewayHostRef `mandatory:"false" json:"ingressGatewayHost"` + Destinations []VirtualServiceTrafficRuleTargetDetails `mandatory:"true" json:"destinations"` Type string `json:"type"` } @@ -77,16 +77,16 @@ func (m *ingressgatewaytrafficrouteruledetails) UnmarshalPolymorphicJSON(data [] } } -//GetDestinations returns Destinations -func (m ingressgatewaytrafficrouteruledetails) GetDestinations() []VirtualServiceTrafficRuleTargetDetails { - return m.Destinations -} - -//GetIngressGatewayHost returns IngressGatewayHost +// GetIngressGatewayHost returns IngressGatewayHost func (m ingressgatewaytrafficrouteruledetails) GetIngressGatewayHost() *IngressGatewayHostRef { return m.IngressGatewayHost } +// GetDestinations returns Destinations +func (m ingressgatewaytrafficrouteruledetails) GetDestinations() []VirtualServiceTrafficRuleTargetDetails { + return m.Destinations +} + func (m ingressgatewaytrafficrouteruledetails) String() string { return common.PointerString(m) } diff --git a/servicemesh/ingress_listener_client_validation_config.go b/servicemesh/ingress_listener_client_validation_config.go index 06d84182c7..15811b4b90 100644 --- a/servicemesh/ingress_listener_client_validation_config.go +++ b/servicemesh/ingress_listener_client_validation_config.go @@ -63,9 +63,6 @@ func (m *IngressListenerClientValidationConfig) UnmarshalJSON(data []byte) (e er } m.SubjectAlternateNames = make([]string, len(model.SubjectAlternateNames)) - for i, n := range model.SubjectAlternateNames { - m.SubjectAlternateNames[i] = n - } - + copy(m.SubjectAlternateNames, model.SubjectAlternateNames) return } diff --git a/servicemesh/servicemesh_client.go b/servicemesh/servicemesh_client.go index 4cf0208da5..ad138a8f6c 100644 --- a/servicemesh/servicemesh_client.go +++ b/servicemesh/servicemesh_client.go @@ -80,7 +80,7 @@ func (client *ServiceMeshClient) setConfigurationProvider(configProvider common. 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/servicemesh/update_ingress_gateway_route_table_details.go b/servicemesh/update_ingress_gateway_route_table_details.go index beac872b46..62403dae05 100644 --- a/servicemesh/update_ingress_gateway_route_table_details.go +++ b/servicemesh/update_ingress_gateway_route_table_details.go @@ -86,7 +86,6 @@ func (m *UpdateIngressGatewayRouteTableDetails) UnmarshalJSON(data []byte) (e er m.RouteRules[i] = nil } } - m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/servicemesh/update_virtual_deployment_details.go b/servicemesh/update_virtual_deployment_details.go index 540375cd0a..321d2a8e88 100644 --- a/servicemesh/update_virtual_deployment_details.go +++ b/servicemesh/update_virtual_deployment_details.go @@ -85,10 +85,7 @@ func (m *UpdateVirtualDeploymentDetails) UnmarshalJSON(data []byte) (e error) { } m.Listeners = make([]VirtualDeploymentListener, len(model.Listeners)) - for i, n := range model.Listeners { - m.Listeners[i] = n - } - + copy(m.Listeners, model.Listeners) m.AccessLogging = model.AccessLogging m.FreeformTags = model.FreeformTags diff --git a/servicemesh/update_virtual_service_route_table_details.go b/servicemesh/update_virtual_service_route_table_details.go index d91547b77b..982f2e17cd 100644 --- a/servicemesh/update_virtual_service_route_table_details.go +++ b/servicemesh/update_virtual_service_route_table_details.go @@ -86,7 +86,6 @@ func (m *UpdateVirtualServiceRouteTableDetails) UnmarshalJSON(data []byte) (e er m.RouteRules[i] = nil } } - m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/servicemesh/virtual_deployment.go b/servicemesh/virtual_deployment.go index f494134330..7b36f318a9 100644 --- a/servicemesh/virtual_deployment.go +++ b/servicemesh/virtual_deployment.go @@ -127,10 +127,7 @@ func (m *VirtualDeployment) UnmarshalJSON(data []byte) (e error) { } m.Listeners = make([]VirtualDeploymentListener, len(model.Listeners)) - for i, n := range model.Listeners { - m.Listeners[i] = n - } - + copy(m.Listeners, model.Listeners) m.AccessLogging = model.AccessLogging m.LifecycleDetails = model.LifecycleDetails diff --git a/servicemesh/virtual_service_route_table.go b/servicemesh/virtual_service_route_table.go index eaee83bea4..df1c44fccb 100644 --- a/servicemesh/virtual_service_route_table.go +++ b/servicemesh/virtual_service_route_table.go @@ -128,7 +128,6 @@ func (m *VirtualServiceRouteTable) UnmarshalJSON(data []byte) (e error) { m.RouteRules[i] = nil } } - m.LifecycleDetails = model.LifecycleDetails m.FreeformTags = model.FreeformTags diff --git a/servicemesh/virtual_service_traffic_route_rule.go b/servicemesh/virtual_service_traffic_route_rule.go index 62836f7d05..6c6dc94ec6 100644 --- a/servicemesh/virtual_service_traffic_route_rule.go +++ b/servicemesh/virtual_service_traffic_route_rule.go @@ -73,7 +73,7 @@ func (m *virtualservicetrafficrouterule) UnmarshalPolymorphicJSON(data []byte) ( } } -//GetDestinations returns Destinations +// GetDestinations returns Destinations func (m virtualservicetrafficrouterule) GetDestinations() []VirtualDeploymentTrafficRuleTarget { return m.Destinations } diff --git a/servicemesh/virtual_service_traffic_route_rule_details.go b/servicemesh/virtual_service_traffic_route_rule_details.go index 088c01de82..2d1ac0ef29 100644 --- a/servicemesh/virtual_service_traffic_route_rule_details.go +++ b/servicemesh/virtual_service_traffic_route_rule_details.go @@ -73,7 +73,7 @@ func (m *virtualservicetrafficrouteruledetails) UnmarshalPolymorphicJSON(data [] } } -//GetDestinations returns Destinations +// GetDestinations returns Destinations func (m virtualservicetrafficrouteruledetails) GetDestinations() []VirtualDeploymentTrafficRuleTargetDetails { return m.Destinations } diff --git a/stackmonitoring/create_monitored_resource_details.go b/stackmonitoring/create_monitored_resource_details.go index 88e545ae05..b96fa899da 100644 --- a/stackmonitoring/create_monitored_resource_details.go +++ b/stackmonitoring/create_monitored_resource_details.go @@ -135,10 +135,7 @@ func (m *CreateMonitoredResourceDetails) UnmarshalJSON(data []byte) (e error) { m.ResourceTimeZone = model.ResourceTimeZone m.Properties = make([]MonitoredResourceProperty, len(model.Properties)) - for i, n := range model.Properties { - m.Properties[i] = n - } - + copy(m.Properties, model.Properties) m.DatabaseConnectionDetails = model.DatabaseConnectionDetails nn, e = model.Credentials.UnmarshalPolymorphicJSON(model.Credentials.JsonData) @@ -165,12 +162,8 @@ func (m *CreateMonitoredResourceDetails) UnmarshalJSON(data []byte) (e error) { m.AdditionalCredentials[i] = nil } } - m.AdditionalAliases = make([]MonitoredResourceAliasCredential, len(model.AdditionalAliases)) - for i, n := range model.AdditionalAliases { - m.AdditionalAliases[i] = n - } - + copy(m.AdditionalAliases, model.AdditionalAliases) m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/stackmonitoring/monitored_resource.go b/stackmonitoring/monitored_resource.go index f742abcd07..f1355db0b7 100644 --- a/stackmonitoring/monitored_resource.go +++ b/stackmonitoring/monitored_resource.go @@ -153,10 +153,7 @@ func (m *MonitoredResource) UnmarshalJSON(data []byte) (e error) { m.LifecycleState = model.LifecycleState m.Properties = make([]MonitoredResourceProperty, len(model.Properties)) - for i, n := range model.Properties { - m.Properties[i] = n - } - + copy(m.Properties, model.Properties) m.DatabaseConnectionDetails = model.DatabaseConnectionDetails nn, e = model.Credentials.UnmarshalPolymorphicJSON(model.Credentials.JsonData) diff --git a/stackmonitoring/monitored_resource_credential.go b/stackmonitoring/monitored_resource_credential.go index 29393ee30e..cb84a88688 100644 --- a/stackmonitoring/monitored_resource_credential.go +++ b/stackmonitoring/monitored_resource_credential.go @@ -89,22 +89,22 @@ func (m *monitoredresourcecredential) UnmarshalPolymorphicJSON(data []byte) (int } } -//GetSource returns Source +// GetSource returns Source func (m monitoredresourcecredential) GetSource() *string { return m.Source } -//GetName returns Name +// GetName returns Name func (m monitoredresourcecredential) GetName() *string { return m.Name } -//GetType returns Type +// GetType returns Type func (m monitoredresourcecredential) GetType() *string { return m.Type } -//GetDescription returns Description +// GetDescription returns Description func (m monitoredresourcecredential) GetDescription() *string { return m.Description } diff --git a/stackmonitoring/stackmonitoring_client.go b/stackmonitoring/stackmonitoring_client.go index 74d4c629f9..06191d4045 100644 --- a/stackmonitoring/stackmonitoring_client.go +++ b/stackmonitoring/stackmonitoring_client.go @@ -80,7 +80,7 @@ func (client *StackMonitoringClient) setConfigurationProvider(configProvider com 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/stackmonitoring/update_monitored_resource_details.go b/stackmonitoring/update_monitored_resource_details.go index ea3ff42e2f..0db6cc7f76 100644 --- a/stackmonitoring/update_monitored_resource_details.go +++ b/stackmonitoring/update_monitored_resource_details.go @@ -108,10 +108,7 @@ func (m *UpdateMonitoredResourceDetails) UnmarshalJSON(data []byte) (e error) { m.ResourceTimeZone = model.ResourceTimeZone m.Properties = make([]MonitoredResourceProperty, len(model.Properties)) - for i, n := range model.Properties { - m.Properties[i] = n - } - + copy(m.Properties, model.Properties) m.DatabaseConnectionDetails = model.DatabaseConnectionDetails nn, e = model.Credentials.UnmarshalPolymorphicJSON(model.Credentials.JsonData) @@ -138,12 +135,8 @@ func (m *UpdateMonitoredResourceDetails) UnmarshalJSON(data []byte) (e error) { m.AdditionalCredentials[i] = nil } } - m.AdditionalAliases = make([]MonitoredResourceAliasCredential, len(model.AdditionalAliases)) - for i, n := range model.AdditionalAliases { - m.AdditionalAliases[i] = n - } - + copy(m.AdditionalAliases, model.AdditionalAliases) m.FreeformTags = model.FreeformTags m.DefinedTags = model.DefinedTags diff --git a/streaming/streaming_streamadmin_client.go b/streaming/streaming_streamadmin_client.go index 6963147040..3a8892f09a 100644 --- a/streaming/streaming_streamadmin_client.go +++ b/streaming/streaming_streamadmin_client.go @@ -80,7 +80,7 @@ func (client *StreamAdminClient) setConfigurationProvider(configProvider common. 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/tenantmanagercontrolplane/assigned_subscription.go b/tenantmanagercontrolplane/assigned_subscription.go index e521d086a5..d35b6b9cd5 100644 --- a/tenantmanagercontrolplane/assigned_subscription.go +++ b/tenantmanagercontrolplane/assigned_subscription.go @@ -101,37 +101,37 @@ func (m *assignedsubscription) UnmarshalPolymorphicJSON(data []byte) (interface{ } } -//GetId returns Id +// GetId returns Id func (m assignedsubscription) GetId() *string { return m.Id } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m assignedsubscription) GetCompartmentId() *string { return m.CompartmentId } -//GetServiceName returns ServiceName +// GetServiceName returns ServiceName func (m assignedsubscription) GetServiceName() *string { return m.ServiceName } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m assignedsubscription) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m assignedsubscription) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m assignedsubscription) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m assignedsubscription) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/tenantmanagercontrolplane/assigned_subscription_collection.go b/tenantmanagercontrolplane/assigned_subscription_collection.go index 975a3cfecb..819afe3406 100644 --- a/tenantmanagercontrolplane/assigned_subscription_collection.go +++ b/tenantmanagercontrolplane/assigned_subscription_collection.go @@ -62,6 +62,5 @@ func (m *AssignedSubscriptionCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/tenantmanagercontrolplane/assigned_subscription_summary.go b/tenantmanagercontrolplane/assigned_subscription_summary.go index 77746591f4..d83d283c7a 100644 --- a/tenantmanagercontrolplane/assigned_subscription_summary.go +++ b/tenantmanagercontrolplane/assigned_subscription_summary.go @@ -101,37 +101,37 @@ func (m *assignedsubscriptionsummary) UnmarshalPolymorphicJSON(data []byte) (int } } -//GetId returns Id +// GetId returns Id func (m assignedsubscriptionsummary) GetId() *string { return m.Id } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m assignedsubscriptionsummary) GetCompartmentId() *string { return m.CompartmentId } -//GetServiceName returns ServiceName +// GetServiceName returns ServiceName func (m assignedsubscriptionsummary) GetServiceName() *string { return m.ServiceName } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m assignedsubscriptionsummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m assignedsubscriptionsummary) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m assignedsubscriptionsummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m assignedsubscriptionsummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/tenantmanagercontrolplane/subscription.go b/tenantmanagercontrolplane/subscription.go index 437fe0d324..b470cce16e 100644 --- a/tenantmanagercontrolplane/subscription.go +++ b/tenantmanagercontrolplane/subscription.go @@ -101,37 +101,37 @@ func (m *subscription) UnmarshalPolymorphicJSON(data []byte) (interface{}, error } } -//GetId returns Id +// GetId returns Id func (m subscription) GetId() *string { return m.Id } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m subscription) GetCompartmentId() *string { return m.CompartmentId } -//GetServiceName returns ServiceName +// GetServiceName returns ServiceName func (m subscription) GetServiceName() *string { return m.ServiceName } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m subscription) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m subscription) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m subscription) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m subscription) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/tenantmanagercontrolplane/subscription_collection.go b/tenantmanagercontrolplane/subscription_collection.go index 1fff85e15f..34a4b03128 100644 --- a/tenantmanagercontrolplane/subscription_collection.go +++ b/tenantmanagercontrolplane/subscription_collection.go @@ -62,6 +62,5 @@ func (m *SubscriptionCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/tenantmanagercontrolplane/subscription_summary.go b/tenantmanagercontrolplane/subscription_summary.go index 2eb36c93dd..cf1eaac5d3 100644 --- a/tenantmanagercontrolplane/subscription_summary.go +++ b/tenantmanagercontrolplane/subscription_summary.go @@ -101,37 +101,37 @@ func (m *subscriptionsummary) UnmarshalPolymorphicJSON(data []byte) (interface{} } } -//GetId returns Id +// GetId returns Id func (m subscriptionsummary) GetId() *string { return m.Id } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m subscriptionsummary) GetCompartmentId() *string { return m.CompartmentId } -//GetServiceName returns ServiceName +// GetServiceName returns ServiceName func (m subscriptionsummary) GetServiceName() *string { return m.ServiceName } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m subscriptionsummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetTimeUpdated returns TimeUpdated +// GetTimeUpdated returns TimeUpdated func (m subscriptionsummary) GetTimeUpdated() *common.SDKTime { return m.TimeUpdated } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m subscriptionsummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m subscriptionsummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } diff --git a/tenantmanagercontrolplane/tenantmanagercontrolplane_domain_client.go b/tenantmanagercontrolplane/tenantmanagercontrolplane_domain_client.go index 21323d5484..b8da7ccaeb 100644 --- a/tenantmanagercontrolplane/tenantmanagercontrolplane_domain_client.go +++ b/tenantmanagercontrolplane/tenantmanagercontrolplane_domain_client.go @@ -80,7 +80,7 @@ func (client *DomainClient) setConfigurationProvider(configProvider common.Confi 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/tenantmanagercontrolplane/tenantmanagercontrolplane_domaingovernance_client.go b/tenantmanagercontrolplane/tenantmanagercontrolplane_domaingovernance_client.go index 484a495bec..e2f61ce58d 100644 --- a/tenantmanagercontrolplane/tenantmanagercontrolplane_domaingovernance_client.go +++ b/tenantmanagercontrolplane/tenantmanagercontrolplane_domaingovernance_client.go @@ -80,7 +80,7 @@ func (client *DomainGovernanceClient) setConfigurationProvider(configProvider co 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/tenantmanagercontrolplane/tenantmanagercontrolplane_governance_client.go b/tenantmanagercontrolplane/tenantmanagercontrolplane_governance_client.go index 9a34d7537c..c3360b9dbb 100644 --- a/tenantmanagercontrolplane/tenantmanagercontrolplane_governance_client.go +++ b/tenantmanagercontrolplane/tenantmanagercontrolplane_governance_client.go @@ -80,7 +80,7 @@ func (client *GovernanceClient) setConfigurationProvider(configProvider common.C 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/tenantmanagercontrolplane/tenantmanagercontrolplane_link_client.go b/tenantmanagercontrolplane/tenantmanagercontrolplane_link_client.go index 535d0b2891..8d24f2d335 100644 --- a/tenantmanagercontrolplane/tenantmanagercontrolplane_link_client.go +++ b/tenantmanagercontrolplane/tenantmanagercontrolplane_link_client.go @@ -80,7 +80,7 @@ func (client *LinkClient) setConfigurationProvider(configProvider common.Configu 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/tenantmanagercontrolplane/tenantmanagercontrolplane_orders_client.go b/tenantmanagercontrolplane/tenantmanagercontrolplane_orders_client.go index 775c006d5b..816cc9a624 100644 --- a/tenantmanagercontrolplane/tenantmanagercontrolplane_orders_client.go +++ b/tenantmanagercontrolplane/tenantmanagercontrolplane_orders_client.go @@ -80,7 +80,7 @@ func (client *OrdersClient) setConfigurationProvider(configProvider common.Confi 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/tenantmanagercontrolplane/tenantmanagercontrolplane_organization_client.go b/tenantmanagercontrolplane/tenantmanagercontrolplane_organization_client.go index 653b2905b6..f3becbc9d8 100644 --- a/tenantmanagercontrolplane/tenantmanagercontrolplane_organization_client.go +++ b/tenantmanagercontrolplane/tenantmanagercontrolplane_organization_client.go @@ -80,7 +80,7 @@ func (client *OrganizationClient) setConfigurationProvider(configProvider common 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/tenantmanagercontrolplane/tenantmanagercontrolplane_recipientinvitation_client.go b/tenantmanagercontrolplane/tenantmanagercontrolplane_recipientinvitation_client.go index 1672956418..ecaf67a728 100644 --- a/tenantmanagercontrolplane/tenantmanagercontrolplane_recipientinvitation_client.go +++ b/tenantmanagercontrolplane/tenantmanagercontrolplane_recipientinvitation_client.go @@ -80,7 +80,7 @@ func (client *RecipientInvitationClient) setConfigurationProvider(configProvider 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/tenantmanagercontrolplane/tenantmanagercontrolplane_senderinvitation_client.go b/tenantmanagercontrolplane/tenantmanagercontrolplane_senderinvitation_client.go index f5f187613d..fdeaf89de1 100644 --- a/tenantmanagercontrolplane/tenantmanagercontrolplane_senderinvitation_client.go +++ b/tenantmanagercontrolplane/tenantmanagercontrolplane_senderinvitation_client.go @@ -80,7 +80,7 @@ func (client *SenderInvitationClient) setConfigurationProvider(configProvider co 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/tenantmanagercontrolplane/tenantmanagercontrolplane_subscription_client.go b/tenantmanagercontrolplane/tenantmanagercontrolplane_subscription_client.go index 729f12a78e..e317c6e6ac 100644 --- a/tenantmanagercontrolplane/tenantmanagercontrolplane_subscription_client.go +++ b/tenantmanagercontrolplane/tenantmanagercontrolplane_subscription_client.go @@ -80,7 +80,7 @@ func (client *SubscriptionClient) setConfigurationProvider(configProvider common 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/tenantmanagercontrolplane/tenantmanagercontrolplane_workrequest_client.go b/tenantmanagercontrolplane/tenantmanagercontrolplane_workrequest_client.go index 5ace9226eb..c34fd3fceb 100644 --- a/tenantmanagercontrolplane/tenantmanagercontrolplane_workrequest_client.go +++ b/tenantmanagercontrolplane/tenantmanagercontrolplane_workrequest_client.go @@ -80,7 +80,7 @@ func (client *WorkRequestClient) setConfigurationProvider(configProvider common. 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/threatintelligence/indicator_relationship.go b/threatintelligence/indicator_relationship.go index aac732358d..3fbce35cd0 100644 --- a/threatintelligence/indicator_relationship.go +++ b/threatintelligence/indicator_relationship.go @@ -70,9 +70,6 @@ func (m *IndicatorRelationship) UnmarshalJSON(data []byte) (e error) { } m.Attribution = make([]DataAttribution, len(model.Attribution)) - for i, n := range model.Attribution { - m.Attribution[i] = n - } - + copy(m.Attribution, model.Attribution) return } diff --git a/threatintelligence/threatintelligence_threatintel_client.go b/threatintelligence/threatintelligence_threatintel_client.go index 98eaa1c9fc..f3a1497085 100644 --- a/threatintelligence/threatintelligence_threatintel_client.go +++ b/threatintelligence/threatintelligence_threatintel_client.go @@ -80,7 +80,7 @@ func (client *ThreatintelClient) setConfigurationProvider(configProvider common. 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/usage/usage_resources_client.go b/usage/usage_resources_client.go index 534ad90346..05bbc8e38e 100644 --- a/usage/usage_resources_client.go +++ b/usage/usage_resources_client.go @@ -80,7 +80,7 @@ func (client *ResourcesClient) setConfigurationProvider(configProvider common.Co 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/usage/usage_rewards_client.go b/usage/usage_rewards_client.go index a9938e3c16..378753d59a 100644 --- a/usage/usage_rewards_client.go +++ b/usage/usage_rewards_client.go @@ -80,7 +80,7 @@ func (client *RewardsClient) setConfigurationProvider(configProvider common.Conf 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/usage/usage_usagelimits_client.go b/usage/usage_usagelimits_client.go index 60ec143d5a..e85984388e 100644 --- a/usage/usage_usagelimits_client.go +++ b/usage/usage_usagelimits_client.go @@ -80,7 +80,7 @@ func (client *UsagelimitsClient) setConfigurationProvider(configProvider common. 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/usageapi/query_properties.go b/usageapi/query_properties.go index b995a26907..2ee3dd405d 100644 --- a/usageapi/query_properties.go +++ b/usageapi/query_properties.go @@ -90,15 +90,9 @@ func (m *QueryProperties) UnmarshalJSON(data []byte) (e error) { } var nn interface{} m.GroupBy = make([]string, len(model.GroupBy)) - for i, n := range model.GroupBy { - m.GroupBy[i] = n - } - + copy(m.GroupBy, model.GroupBy) m.GroupByTag = make([]Tag, len(model.GroupByTag)) - for i, n := range model.GroupByTag { - m.GroupByTag[i] = n - } - + copy(m.GroupByTag, model.GroupByTag) m.Filter = model.Filter m.CompartmentDepth = model.CompartmentDepth diff --git a/usageapi/usageapi_client.go b/usageapi/usageapi_client.go index 3f1c9fba8f..88cf11bf09 100644 --- a/usageapi/usageapi_client.go +++ b/usageapi/usageapi_client.go @@ -80,7 +80,7 @@ func (client *UsageapiClient) setConfigurationProvider(configProvider common.Con 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/vault/create_secret_details.go b/vault/create_secret_details.go index 9ff912e2da..9cb5117830 100644 --- a/vault/create_secret_details.go +++ b/vault/create_secret_details.go @@ -113,7 +113,6 @@ func (m *CreateSecretDetails) UnmarshalJSON(data []byte) (e error) { m.SecretRules[i] = nil } } - m.CompartmentId = model.CompartmentId nn, e = model.SecretContent.UnmarshalPolymorphicJSON(model.SecretContent.JsonData) diff --git a/vault/secret.go b/vault/secret.go index 3ae561d9fd..f676b80b49 100644 --- a/vault/secret.go +++ b/vault/secret.go @@ -148,7 +148,6 @@ func (m *Secret) UnmarshalJSON(data []byte) (e error) { m.SecretRules[i] = nil } } - m.TimeOfCurrentVersionExpiry = model.TimeOfCurrentVersionExpiry m.TimeOfDeletion = model.TimeOfDeletion diff --git a/vault/secret_content_details.go b/vault/secret_content_details.go index 56a5e9381e..1768a8b2ae 100644 --- a/vault/secret_content_details.go +++ b/vault/secret_content_details.go @@ -74,12 +74,12 @@ func (m *secretcontentdetails) UnmarshalPolymorphicJSON(data []byte) (interface{ } } -//GetName returns Name +// GetName returns Name func (m secretcontentdetails) GetName() *string { return m.Name } -//GetStage returns Stage +// GetStage returns Stage func (m secretcontentdetails) GetStage() SecretContentDetailsStageEnum { return m.Stage } diff --git a/vault/update_secret_details.go b/vault/update_secret_details.go index f85a7cb37c..8ef019c97f 100644 --- a/vault/update_secret_details.go +++ b/vault/update_secret_details.go @@ -113,6 +113,5 @@ func (m *UpdateSecretDetails) UnmarshalJSON(data []byte) (e error) { m.SecretRules[i] = nil } } - return } diff --git a/vault/vault_vaults_client.go b/vault/vault_vaults_client.go index 50732fbeda..3db0220a02 100644 --- a/vault/vault_vaults_client.go +++ b/vault/vault_vaults_client.go @@ -80,7 +80,7 @@ func (client *VaultsClient) setConfigurationProvider(configProvider common.Confi 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/vbsinst/vbsinst_vbsinstance_client.go b/vbsinst/vbsinst_vbsinstance_client.go index 0ee10c0fd9..e5cc49ec34 100644 --- a/vbsinst/vbsinst_vbsinstance_client.go +++ b/vbsinst/vbsinst_vbsinstance_client.go @@ -80,7 +80,7 @@ func (client *VbsInstanceClient) setConfigurationProvider(configProvider common. 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/visualbuilder/visualbuilder_vbinstance_client.go b/visualbuilder/visualbuilder_vbinstance_client.go index 660bec17ea..2c390f9fdd 100644 --- a/visualbuilder/visualbuilder_vbinstance_client.go +++ b/visualbuilder/visualbuilder_vbinstance_client.go @@ -81,7 +81,7 @@ func (client *VbInstanceClient) setConfigurationProvider(configProvider common.C 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/vnmonitoring/add_drg_route_distribution_statement_details.go b/vnmonitoring/add_drg_route_distribution_statement_details.go index 784f0f2462..c003a04dab 100644 --- a/vnmonitoring/add_drg_route_distribution_statement_details.go +++ b/vnmonitoring/add_drg_route_distribution_statement_details.go @@ -78,7 +78,6 @@ func (m *AddDrgRouteDistributionStatementDetails) UnmarshalJSON(data []byte) (e m.MatchCriteria[i] = nil } } - m.Action = model.Action m.Priority = model.Priority diff --git a/vnmonitoring/cpe.go b/vnmonitoring/cpe.go index 781ce06962..9f959e07dc 100644 --- a/vnmonitoring/cpe.go +++ b/vnmonitoring/cpe.go @@ -64,6 +64,9 @@ type Cpe struct { // The date and time the CPE was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). // Example: `2016-08-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Indicates whether this CPE is of type `private` or not. + IsPrivate *bool `mandatory:"false" json:"isPrivate"` } func (m Cpe) String() string { diff --git a/vnmonitoring/create_cpe_details.go b/vnmonitoring/create_cpe_details.go index 6e241c0af8..8862517a53 100644 --- a/vnmonitoring/create_cpe_details.go +++ b/vnmonitoring/create_cpe_details.go @@ -49,6 +49,9 @@ type CreateCpeDetails struct { // * GetTunnelCpeDeviceConfigContent // * GetTunnelCpeDeviceConfig CpeDeviceShapeId *string `mandatory:"false" json:"cpeDeviceShapeId"` + + // Indicates whether this CPE is of type `private` or not. + IsPrivate *bool `mandatory:"false" json:"isPrivate"` } func (m CreateCpeDetails) String() string { diff --git a/vnmonitoring/create_dhcp_details.go b/vnmonitoring/create_dhcp_details.go index 358c092981..a731650cde 100644 --- a/vnmonitoring/create_dhcp_details.go +++ b/vnmonitoring/create_dhcp_details.go @@ -103,7 +103,6 @@ func (m *CreateDhcpDetails) UnmarshalJSON(data []byte) (e error) { m.Options[i] = nil } } - m.VcnId = model.VcnId return diff --git a/vnmonitoring/create_ip_sec_connection_details.go b/vnmonitoring/create_ip_sec_connection_details.go index 2d5f609e13..1113bfae9b 100644 --- a/vnmonitoring/create_ip_sec_connection_details.go +++ b/vnmonitoring/create_ip_sec_connection_details.go @@ -72,6 +72,10 @@ type CreateIpSecConnectionDetails struct { // maximum of 2 `tunnelConfiguration` objects in the array (one for each of the // two tunnels). TunnelConfiguration []CreateIpSecConnectionTunnelDetails `mandatory:"false" json:"tunnelConfiguration"` + + // The count of tunnels in the IPsec connection. This value should be equal to the number of + // `tunnelConfiguration` objects specified in the `CreateIPSecConnection` request. + TunnelCount *int `mandatory:"false" json:"tunnelCount"` } func (m CreateIpSecConnectionDetails) String() string { diff --git a/vnmonitoring/create_ip_sec_connection_tunnel_details.go b/vnmonitoring/create_ip_sec_connection_tunnel_details.go index 8d5fcce63d..e4126754aa 100644 --- a/vnmonitoring/create_ip_sec_connection_tunnel_details.go +++ b/vnmonitoring/create_ip_sec_connection_tunnel_details.go @@ -54,6 +54,16 @@ type CreateIpSecConnectionTunnelDetails struct { DpdConfig *DpdConfig `mandatory:"false" json:"dpdConfig"` + // The headend IP that you can choose on the Oracle side to terminate your private IPSec tunnel. + OracleTunnelIp *string `mandatory:"false" json:"oracleTunnelIp"` + + // The list of virtual circuit OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)s over which your network can reach this tunnel. + AssociatedVirtualCircuits []string `mandatory:"false" json:"associatedVirtualCircuits"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DRG route table assigned to this attachment. + // The DRG route table manages traffic inside the DRG. + DrgRouteTableId *string `mandatory:"false" json:"drgRouteTableId"` + EncryptionDomainConfig *CreateIpSecTunnelEncryptionDomainDetails `mandatory:"false" json:"encryptionDomainConfig"` } diff --git a/vnmonitoring/create_virtual_circuit_details.go b/vnmonitoring/create_virtual_circuit_details.go index e6c268fa97..a07dbcd36d 100644 --- a/vnmonitoring/create_virtual_circuit_details.go +++ b/vnmonitoring/create_virtual_circuit_details.go @@ -49,6 +49,9 @@ type CreateVirtualCircuitDetails struct { // Set to `true` to enable BFD for IPv4 BGP peering, or set to `false` to disable BFD. If this is not set, the default is `false`. IsBfdEnabled *bool `mandatory:"false" json:"isBfdEnabled"` + // Set to `true` for the virtual circuit to carry only encrypted traffic, or set to `false` for the virtual circuit to carry unencrypted traffic. If this is not set, the default is `false`. + IsTransportMode *bool `mandatory:"false" json:"isTransportMode"` + // Deprecated. Instead use `customerAsn`. // If you specify values for both, the request will be rejected. CustomerBgpAsn *int `mandatory:"false" json:"customerBgpAsn"` diff --git a/vnmonitoring/dhcp_options.go b/vnmonitoring/dhcp_options.go index 9d4d528fa2..cc22ffc10e 100644 --- a/vnmonitoring/dhcp_options.go +++ b/vnmonitoring/dhcp_options.go @@ -133,7 +133,6 @@ func (m *DhcpOptions) UnmarshalJSON(data []byte) (e error) { m.Options[i] = nil } } - m.TimeCreated = model.TimeCreated m.VcnId = model.VcnId diff --git a/vnmonitoring/drg_attachment_network_create_details.go b/vnmonitoring/drg_attachment_network_create_details.go index 4d4eff8f7e..294f73a222 100644 --- a/vnmonitoring/drg_attachment_network_create_details.go +++ b/vnmonitoring/drg_attachment_network_create_details.go @@ -26,7 +26,7 @@ type DrgAttachmentNetworkCreateDetails interface { type drgattachmentnetworkcreatedetails struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` + Id *string `mandatory:"false" json:"id"` Type string `json:"type"` } @@ -66,7 +66,7 @@ func (m *drgattachmentnetworkcreatedetails) UnmarshalPolymorphicJSON(data []byte } } -//GetId returns Id +// GetId returns Id func (m drgattachmentnetworkcreatedetails) GetId() *string { return m.Id } diff --git a/vnmonitoring/drg_attachment_network_details.go b/vnmonitoring/drg_attachment_network_details.go index 1be4246ba8..ab1501bfa1 100644 --- a/vnmonitoring/drg_attachment_network_details.go +++ b/vnmonitoring/drg_attachment_network_details.go @@ -26,7 +26,7 @@ type DrgAttachmentNetworkDetails interface { type drgattachmentnetworkdetails struct { JsonData []byte - Id *string `mandatory:"true" json:"id"` + Id *string `mandatory:"false" json:"id"` Type string `json:"type"` } @@ -60,6 +60,10 @@ func (m *drgattachmentnetworkdetails) UnmarshalPolymorphicJSON(data []byte) (int mm := VcnDrgAttachmentNetworkDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "LOOPBACK": + mm := LoopBackDrgAttachmentNetworkDetails{} + err = json.Unmarshal(data, &mm) + return mm, err case "IPSEC_TUNNEL": mm := IpsecTunnelDrgAttachmentNetworkDetails{} err = json.Unmarshal(data, &mm) @@ -78,7 +82,7 @@ func (m *drgattachmentnetworkdetails) UnmarshalPolymorphicJSON(data []byte) (int } } -//GetId returns Id +// GetId returns Id func (m drgattachmentnetworkdetails) GetId() *string { return m.Id } diff --git a/vnmonitoring/drg_route_distribution_statement.go b/vnmonitoring/drg_route_distribution_statement.go index 2f5db86d59..042c52d77a 100644 --- a/vnmonitoring/drg_route_distribution_statement.go +++ b/vnmonitoring/drg_route_distribution_statement.go @@ -85,7 +85,6 @@ func (m *DrgRouteDistributionStatement) UnmarshalJSON(data []byte) (e error) { m.MatchCriteria[i] = nil } } - m.Action = model.Action m.Priority = model.Priority diff --git a/vnmonitoring/ip_sec_connection.go b/vnmonitoring/ip_sec_connection.go index bb35128c64..de1af314f1 100644 --- a/vnmonitoring/ip_sec_connection.go +++ b/vnmonitoring/ip_sec_connection.go @@ -93,6 +93,9 @@ type IpSecConnection struct { // The date and time the IPSec connection was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). // Example: `2016-08-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The transport type used for the IPSec connection. + TransportType IpSecConnectionTransportTypeEnum `mandatory:"false" json:"transportType,omitempty"` } func (m IpSecConnection) String() string { @@ -111,6 +114,9 @@ func (m IpSecConnection) ValidateEnumValue() (bool, error) { if _, ok := GetMappingIpSecConnectionCpeLocalIdentifierTypeEnum(string(m.CpeLocalIdentifierType)); !ok && m.CpeLocalIdentifierType != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CpeLocalIdentifierType: %s. Supported values are: %s.", m.CpeLocalIdentifierType, strings.Join(GetIpSecConnectionCpeLocalIdentifierTypeEnumStringValues(), ","))) } + if _, ok := GetMappingIpSecConnectionTransportTypeEnum(string(m.TransportType)); !ok && m.TransportType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TransportType: %s. Supported values are: %s.", m.TransportType, strings.Join(GetIpSecConnectionTransportTypeEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } @@ -208,3 +214,45 @@ func GetMappingIpSecConnectionCpeLocalIdentifierTypeEnum(val string) (IpSecConne enum, ok := mappingIpSecConnectionCpeLocalIdentifierTypeEnumLowerCase[strings.ToLower(val)] return enum, ok } + +// IpSecConnectionTransportTypeEnum Enum with underlying type: string +type IpSecConnectionTransportTypeEnum string + +// Set of constants representing the allowable values for IpSecConnectionTransportTypeEnum +const ( + IpSecConnectionTransportTypeInternet IpSecConnectionTransportTypeEnum = "INTERNET" + IpSecConnectionTransportTypeFastconnect IpSecConnectionTransportTypeEnum = "FASTCONNECT" +) + +var mappingIpSecConnectionTransportTypeEnum = map[string]IpSecConnectionTransportTypeEnum{ + "INTERNET": IpSecConnectionTransportTypeInternet, + "FASTCONNECT": IpSecConnectionTransportTypeFastconnect, +} + +var mappingIpSecConnectionTransportTypeEnumLowerCase = map[string]IpSecConnectionTransportTypeEnum{ + "internet": IpSecConnectionTransportTypeInternet, + "fastconnect": IpSecConnectionTransportTypeFastconnect, +} + +// GetIpSecConnectionTransportTypeEnumValues Enumerates the set of values for IpSecConnectionTransportTypeEnum +func GetIpSecConnectionTransportTypeEnumValues() []IpSecConnectionTransportTypeEnum { + values := make([]IpSecConnectionTransportTypeEnum, 0) + for _, v := range mappingIpSecConnectionTransportTypeEnum { + values = append(values, v) + } + return values +} + +// GetIpSecConnectionTransportTypeEnumStringValues Enumerates the set of values in String for IpSecConnectionTransportTypeEnum +func GetIpSecConnectionTransportTypeEnumStringValues() []string { + return []string{ + "INTERNET", + "FASTCONNECT", + } +} + +// GetMappingIpSecConnectionTransportTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIpSecConnectionTransportTypeEnum(val string) (IpSecConnectionTransportTypeEnum, bool) { + enum, ok := mappingIpSecConnectionTransportTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vnmonitoring/ip_sec_connection_tunnel.go b/vnmonitoring/ip_sec_connection_tunnel.go index 74dae6c781..eaaedb085d 100644 --- a/vnmonitoring/ip_sec_connection_tunnel.go +++ b/vnmonitoring/ip_sec_connection_tunnel.go @@ -87,6 +87,9 @@ type IpSecConnectionTunnel struct { PhaseOneDetails *TunnelPhaseOneDetails `mandatory:"false" json:"phaseOneDetails"` PhaseTwoDetails *TunnelPhaseTwoDetails `mandatory:"false" json:"phaseTwoDetails"` + + // The list of virtual circuit OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)s over which your network can reach this tunnel. + AssociatedVirtualCircuits []string `mandatory:"false" json:"associatedVirtualCircuits"` } func (m IpSecConnectionTunnel) String() string { diff --git a/vnmonitoring/ipsec_tunnel_drg_attachment_network_details.go b/vnmonitoring/ipsec_tunnel_drg_attachment_network_details.go index 3f5fc3ca36..49b72745d0 100644 --- a/vnmonitoring/ipsec_tunnel_drg_attachment_network_details.go +++ b/vnmonitoring/ipsec_tunnel_drg_attachment_network_details.go @@ -21,10 +21,13 @@ import ( type IpsecTunnelDrgAttachmentNetworkDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. - Id *string `mandatory:"true" json:"id"` + Id *string `mandatory:"false" json:"id"` // The IPSec connection that contains the attached IPSec tunnel. IpsecConnectionId *string `mandatory:"false" json:"ipsecConnectionId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the virtual circuit's DRG attachment. + TransportAttachmentId *string `mandatory:"false" json:"transportAttachmentId"` } //GetId returns Id diff --git a/vnmonitoring/loop_back_drg_attachment_network_details.go b/vnmonitoring/loop_back_drg_attachment_network_details.go new file mode 100644 index 0000000000..76c1f228c7 --- /dev/null +++ b/vnmonitoring/loop_back_drg_attachment_network_details.go @@ -0,0 +1,63 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Network Monitoring API +// +// Use the Network Monitoring API to troubleshoot routing and security issues for resources such as virtual cloud networks (VCNs) and compute instances. For more information, see the console +// documentation for the Network Path Analyzer (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/path_analyzer.htm) tool. +// + +package vnmonitoring + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LoopBackDrgAttachmentNetworkDetails Specifies the loopback attachment on the DRG. A loopback attachment can be used to terminate a virtual circuit that is carrying an IPSec tunnel, routing traffic directly to the IPSec tunnel attachment where the tunnel can terminate. +type LoopBackDrgAttachmentNetworkDetails struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. + Id *string `mandatory:"false" json:"id"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the target IPSec tunnel attachment. + Ids []string `mandatory:"false" json:"ids"` +} + +//GetId returns Id +func (m LoopBackDrgAttachmentNetworkDetails) GetId() *string { + return m.Id +} + +func (m LoopBackDrgAttachmentNetworkDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m LoopBackDrgAttachmentNetworkDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m LoopBackDrgAttachmentNetworkDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeLoopBackDrgAttachmentNetworkDetails LoopBackDrgAttachmentNetworkDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeLoopBackDrgAttachmentNetworkDetails + }{ + "LOOPBACK", + (MarshalTypeLoopBackDrgAttachmentNetworkDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vnmonitoring/networking_topology.go b/vnmonitoring/networking_topology.go index a1b2258ab6..4117c1a9c9 100644 --- a/vnmonitoring/networking_topology.go +++ b/vnmonitoring/networking_topology.go @@ -100,10 +100,7 @@ func (m *NetworkingTopology) UnmarshalJSON(data []byte) (e error) { } var nn interface{} m.Entities = make([]interface{}, len(model.Entities)) - for i, n := range model.Entities { - m.Entities[i] = n - } - + copy(m.Entities, model.Entities) m.Relationships = make([]TopologyEntityRelationship, len(model.Relationships)) for i, n := range model.Relationships { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -116,12 +113,8 @@ func (m *NetworkingTopology) UnmarshalJSON(data []byte) (e error) { m.Relationships[i] = nil } } - m.LimitedEntities = make([]string, len(model.LimitedEntities)) - for i, n := range model.LimitedEntities { - m.LimitedEntities[i] = n - } - + copy(m.LimitedEntities, model.LimitedEntities) m.TimeCreated = model.TimeCreated return diff --git a/vnmonitoring/path_topology.go b/vnmonitoring/path_topology.go index ad179a6d1d..c371f1003d 100644 --- a/vnmonitoring/path_topology.go +++ b/vnmonitoring/path_topology.go @@ -100,10 +100,7 @@ func (m *PathTopology) UnmarshalJSON(data []byte) (e error) { } var nn interface{} m.Entities = make([]interface{}, len(model.Entities)) - for i, n := range model.Entities { - m.Entities[i] = n - } - + copy(m.Entities, model.Entities) m.Relationships = make([]TopologyEntityRelationship, len(model.Relationships)) for i, n := range model.Relationships { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -116,12 +113,8 @@ func (m *PathTopology) UnmarshalJSON(data []byte) (e error) { m.Relationships[i] = nil } } - m.LimitedEntities = make([]string, len(model.LimitedEntities)) - for i, n := range model.LimitedEntities { - m.LimitedEntities[i] = n - } - + copy(m.LimitedEntities, model.LimitedEntities) m.TimeCreated = model.TimeCreated return diff --git a/vnmonitoring/remote_peering_connection_drg_attachment_network_details.go b/vnmonitoring/remote_peering_connection_drg_attachment_network_details.go index 2bb53c8011..2fa3034186 100644 --- a/vnmonitoring/remote_peering_connection_drg_attachment_network_details.go +++ b/vnmonitoring/remote_peering_connection_drg_attachment_network_details.go @@ -21,7 +21,7 @@ import ( type RemotePeeringConnectionDrgAttachmentNetworkDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. - Id *string `mandatory:"true" json:"id"` + Id *string `mandatory:"false" json:"id"` } //GetId returns Id diff --git a/vnmonitoring/routing_action.go b/vnmonitoring/routing_action.go index ec98b48d80..fc260add28 100644 --- a/vnmonitoring/routing_action.go +++ b/vnmonitoring/routing_action.go @@ -74,7 +74,7 @@ func (m *routingaction) UnmarshalPolymorphicJSON(data []byte) (interface{}, erro } } -//GetActionType returns ActionType +// GetActionType returns ActionType func (m routingaction) GetActionType() RoutingActionActionTypeEnum { return m.ActionType } diff --git a/vnmonitoring/security_action.go b/vnmonitoring/security_action.go index 81aca03894..f9d6c80757 100644 --- a/vnmonitoring/security_action.go +++ b/vnmonitoring/security_action.go @@ -70,7 +70,7 @@ func (m *securityaction) UnmarshalPolymorphicJSON(data []byte) (interface{}, err } } -//GetActionType returns ActionType +// GetActionType returns ActionType func (m securityaction) GetActionType() SecurityActionActionTypeEnum { return m.ActionType } diff --git a/vnmonitoring/subnet_topology.go b/vnmonitoring/subnet_topology.go index 8a1fef0873..513efd6809 100644 --- a/vnmonitoring/subnet_topology.go +++ b/vnmonitoring/subnet_topology.go @@ -106,10 +106,7 @@ func (m *SubnetTopology) UnmarshalJSON(data []byte) (e error) { m.SubnetId = model.SubnetId m.Entities = make([]interface{}, len(model.Entities)) - for i, n := range model.Entities { - m.Entities[i] = n - } - + copy(m.Entities, model.Entities) m.Relationships = make([]TopologyEntityRelationship, len(model.Relationships)) for i, n := range model.Relationships { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -122,12 +119,8 @@ func (m *SubnetTopology) UnmarshalJSON(data []byte) (e error) { m.Relationships[i] = nil } } - m.LimitedEntities = make([]string, len(model.LimitedEntities)) - for i, n := range model.LimitedEntities { - m.LimitedEntities[i] = n - } - + copy(m.LimitedEntities, model.LimitedEntities) m.TimeCreated = model.TimeCreated return diff --git a/vnmonitoring/topology.go b/vnmonitoring/topology.go index 4ca0db9019..6bcfa53cc5 100644 --- a/vnmonitoring/topology.go +++ b/vnmonitoring/topology.go @@ -95,22 +95,22 @@ func (m *topology) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetEntities returns Entities +// GetEntities returns Entities func (m topology) GetEntities() []interface{} { return m.Entities } -//GetRelationships returns Relationships +// GetRelationships returns Relationships func (m topology) GetRelationships() json.RawMessage { return m.Relationships } -//GetLimitedEntities returns LimitedEntities +// GetLimitedEntities returns LimitedEntities func (m topology) GetLimitedEntities() []string { return m.LimitedEntities } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m topology) GetTimeCreated() *common.SDKTime { return m.TimeCreated } diff --git a/vnmonitoring/topology_entity_relationship.go b/vnmonitoring/topology_entity_relationship.go index 056e24bc1d..13692a1d26 100644 --- a/vnmonitoring/topology_entity_relationship.go +++ b/vnmonitoring/topology_entity_relationship.go @@ -79,12 +79,12 @@ func (m *topologyentityrelationship) UnmarshalPolymorphicJSON(data []byte) (inte } } -//GetId1 returns Id1 +// GetId1 returns Id1 func (m topologyentityrelationship) GetId1() *string { return m.Id1 } -//GetId2 returns Id2 +// GetId2 returns Id2 func (m topologyentityrelationship) GetId2() *string { return m.Id2 } diff --git a/vnmonitoring/traffic_node.go b/vnmonitoring/traffic_node.go index 584a15f641..1a06ce4b60 100644 --- a/vnmonitoring/traffic_node.go +++ b/vnmonitoring/traffic_node.go @@ -31,9 +31,9 @@ type TrafficNode interface { type trafficnode struct { JsonData []byte EgressTraffic *EgressTrafficSpec `mandatory:"false" json:"egressTraffic"` - NextHopRoutingAction RoutingAction `mandatory:"false" json:"nextHopRoutingAction"` - EgressSecurityAction SecurityAction `mandatory:"false" json:"egressSecurityAction"` - IngressSecurityAction SecurityAction `mandatory:"false" json:"ingressSecurityAction"` + NextHopRoutingAction routingaction `mandatory:"false" json:"nextHopRoutingAction"` + EgressSecurityAction securityaction `mandatory:"false" json:"egressSecurityAction"` + IngressSecurityAction securityaction `mandatory:"false" json:"ingressSecurityAction"` Type string `json:"type"` } @@ -80,23 +80,23 @@ func (m *trafficnode) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) } } -//GetEgressTraffic returns EgressTraffic +// GetEgressTraffic returns EgressTraffic func (m trafficnode) GetEgressTraffic() *EgressTrafficSpec { return m.EgressTraffic } -//GetNextHopRoutingAction returns NextHopRoutingAction -func (m trafficnode) GetNextHopRoutingAction() RoutingAction { +// GetNextHopRoutingAction returns NextHopRoutingAction +func (m trafficnode) GetNextHopRoutingAction() routingaction { return m.NextHopRoutingAction } -//GetEgressSecurityAction returns EgressSecurityAction -func (m trafficnode) GetEgressSecurityAction() SecurityAction { +// GetEgressSecurityAction returns EgressSecurityAction +func (m trafficnode) GetEgressSecurityAction() securityaction { return m.EgressSecurityAction } -//GetIngressSecurityAction returns IngressSecurityAction -func (m trafficnode) GetIngressSecurityAction() SecurityAction { +// GetIngressSecurityAction returns IngressSecurityAction +func (m trafficnode) GetIngressSecurityAction() securityaction { return m.IngressSecurityAction } diff --git a/vnmonitoring/traffic_route.go b/vnmonitoring/traffic_route.go index ff8113e1b9..43a2dcf400 100644 --- a/vnmonitoring/traffic_route.go +++ b/vnmonitoring/traffic_route.go @@ -79,7 +79,6 @@ func (m *TrafficRoute) UnmarshalJSON(data []byte) (e error) { m.Nodes[i] = nil } } - return } diff --git a/vnmonitoring/update_dhcp_details.go b/vnmonitoring/update_dhcp_details.go index e311209466..6cd75ee6ed 100644 --- a/vnmonitoring/update_dhcp_details.go +++ b/vnmonitoring/update_dhcp_details.go @@ -90,7 +90,6 @@ func (m *UpdateDhcpDetails) UnmarshalJSON(data []byte) (e error) { m.Options[i] = nil } } - m.DomainNameType = model.DomainNameType return diff --git a/vnmonitoring/update_drg_route_distribution_statement_details.go b/vnmonitoring/update_drg_route_distribution_statement_details.go index 376d055eb3..e4d4205256 100644 --- a/vnmonitoring/update_drg_route_distribution_statement_details.go +++ b/vnmonitoring/update_drg_route_distribution_statement_details.go @@ -71,7 +71,6 @@ func (m *UpdateDrgRouteDistributionStatementDetails) UnmarshalJSON(data []byte) m.MatchCriteria[i] = nil } } - m.Priority = model.Priority m.Id = model.Id diff --git a/vnmonitoring/update_virtual_circuit_details.go b/vnmonitoring/update_virtual_circuit_details.go index ae1c28885f..3714f7d11e 100644 --- a/vnmonitoring/update_virtual_circuit_details.go +++ b/vnmonitoring/update_virtual_circuit_details.go @@ -44,6 +44,9 @@ type UpdateVirtualCircuitDetails struct { // Set to `true` to enable BFD for IPv4 BGP peering, or set to `false` to disable BFD. If this is not set, the default is `false`. IsBfdEnabled *bool `mandatory:"false" json:"isBfdEnabled"` + // Set to `true` for the virtual circuit to carry only encrypted traffic, or set to `false` for the virtual circuit to carry unencrypted traffic. If this is not set, the default is `false`. + IsTransportMode *bool `mandatory:"false" json:"isTransportMode"` + // Deprecated. Instead use `customerAsn`. // If you specify values for both, the request will be rejected. CustomerBgpAsn *int `mandatory:"false" json:"customerBgpAsn"` diff --git a/vnmonitoring/vcn_drg_attachment_network_create_details.go b/vnmonitoring/vcn_drg_attachment_network_create_details.go index 5181649ccc..f642ee8845 100644 --- a/vnmonitoring/vcn_drg_attachment_network_create_details.go +++ b/vnmonitoring/vcn_drg_attachment_network_create_details.go @@ -21,7 +21,7 @@ import ( type VcnDrgAttachmentNetworkCreateDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. - Id *string `mandatory:"true" json:"id"` + Id *string `mandatory:"false" json:"id"` // This is the OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table that is used to route the traffic as it enters a VCN through this attachment. // For information about why you would associate a route table with a DRG attachment, see diff --git a/vnmonitoring/vcn_drg_attachment_network_details.go b/vnmonitoring/vcn_drg_attachment_network_details.go index a36adf9ce0..aa5a5c6488 100644 --- a/vnmonitoring/vcn_drg_attachment_network_details.go +++ b/vnmonitoring/vcn_drg_attachment_network_details.go @@ -21,7 +21,7 @@ import ( type VcnDrgAttachmentNetworkDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. - Id *string `mandatory:"true" json:"id"` + Id *string `mandatory:"false" json:"id"` // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the route table the DRG attachment is using. // For information about why you would associate a route table with a DRG attachment, see: diff --git a/vnmonitoring/vcn_topology.go b/vnmonitoring/vcn_topology.go index a49a3d1726..a2d34faa96 100644 --- a/vnmonitoring/vcn_topology.go +++ b/vnmonitoring/vcn_topology.go @@ -106,10 +106,7 @@ func (m *VcnTopology) UnmarshalJSON(data []byte) (e error) { m.VcnId = model.VcnId m.Entities = make([]interface{}, len(model.Entities)) - for i, n := range model.Entities { - m.Entities[i] = n - } - + copy(m.Entities, model.Entities) m.Relationships = make([]TopologyEntityRelationship, len(model.Relationships)) for i, n := range model.Relationships { nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) @@ -122,12 +119,8 @@ func (m *VcnTopology) UnmarshalJSON(data []byte) (e error) { m.Relationships[i] = nil } } - m.LimitedEntities = make([]string, len(model.LimitedEntities)) - for i, n := range model.LimitedEntities { - m.LimitedEntities[i] = n - } - + copy(m.LimitedEntities, model.LimitedEntities) m.TimeCreated = model.TimeCreated return diff --git a/vnmonitoring/virtual_circuit.go b/vnmonitoring/virtual_circuit.go index 2ce7966f84..701347b97e 100644 --- a/vnmonitoring/virtual_circuit.go +++ b/vnmonitoring/virtual_circuit.go @@ -70,6 +70,9 @@ type VirtualCircuit struct { // Set to `true` to enable BFD for IPv4 BGP peering, or set to `false` to disable BFD. If this is not set, the default is `false`. IsBfdEnabled *bool `mandatory:"false" json:"isBfdEnabled"` + // Set to `true` for the virtual circuit to carry only encrypted traffic, or set to `false` for the virtual circuit to carry unencrypted traffic. If this is not set, the default is `false`. + IsTransportMode *bool `mandatory:"false" json:"isTransportMode"` + // Deprecated. Instead use `customerAsn`. // If you specify values for both, the request will be rejected. CustomerBgpAsn *int `mandatory:"false" json:"customerBgpAsn"` diff --git a/vnmonitoring/virtual_circuit_associated_tunnel_details.go b/vnmonitoring/virtual_circuit_associated_tunnel_details.go new file mode 100644 index 0000000000..f022655f03 --- /dev/null +++ b/vnmonitoring/virtual_circuit_associated_tunnel_details.go @@ -0,0 +1,87 @@ +// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Network Monitoring API +// +// Use the Network Monitoring API to troubleshoot routing and security issues for resources such as virtual cloud networks (VCNs) and compute instances. For more information, see the console +// documentation for the Network Path Analyzer (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/path_analyzer.htm) tool. +// + +package vnmonitoring + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VirtualCircuitAssociatedTunnelDetails Detailed private tunnel info associated with the virtual circuit. +type VirtualCircuitAssociatedTunnelDetails struct { + + // The type of the tunnel associated with the virtual circuit. + TunnelType VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum `mandatory:"true" json:"tunnelType"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IPSec tunnel associated with the virtual circuit. + TunnelId *string `mandatory:"true" json:"tunnelId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of IPSec connection associated with the virtual circuit. + IpsecConnectionId *string `mandatory:"false" json:"ipsecConnectionId"` +} + +func (m VirtualCircuitAssociatedTunnelDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VirtualCircuitAssociatedTunnelDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum(string(m.TunnelType)); !ok && m.TunnelType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TunnelType: %s. Supported values are: %s.", m.TunnelType, strings.Join(GetVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum Enum with underlying type: string +type VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum string + +// Set of constants representing the allowable values for VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum +const ( + VirtualCircuitAssociatedTunnelDetailsTunnelTypeIpsec VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum = "IPSEC" +) + +var mappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum = map[string]VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum{ + "IPSEC": VirtualCircuitAssociatedTunnelDetailsTunnelTypeIpsec, +} + +var mappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumLowerCase = map[string]VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum{ + "ipsec": VirtualCircuitAssociatedTunnelDetailsTunnelTypeIpsec, +} + +// GetVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumValues Enumerates the set of values for VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum +func GetVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumValues() []VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum { + values := make([]VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum, 0) + for _, v := range mappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum { + values = append(values, v) + } + return values +} + +// GetVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumStringValues Enumerates the set of values in String for VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum +func GetVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumStringValues() []string { + return []string{ + "IPSEC", + } +} + +// GetMappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum(val string) (VirtualCircuitAssociatedTunnelDetailsTunnelTypeEnum, bool) { + enum, ok := mappingVirtualCircuitAssociatedTunnelDetailsTunnelTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vnmonitoring/virtual_circuit_drg_attachment_network_details.go b/vnmonitoring/virtual_circuit_drg_attachment_network_details.go index 737a492413..d278ca94d4 100644 --- a/vnmonitoring/virtual_circuit_drg_attachment_network_details.go +++ b/vnmonitoring/virtual_circuit_drg_attachment_network_details.go @@ -21,7 +21,11 @@ import ( type VirtualCircuitDrgAttachmentNetworkDetails struct { // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network attached to the DRG. - Id *string `mandatory:"true" json:"id"` + Id *string `mandatory:"false" json:"id"` + + // Boolean flag that determines wether all traffic over the virtual circuits is encrypted. + // Example: `true` + TransportOnlyMode *bool `mandatory:"false" json:"transportOnlyMode"` } //GetId returns Id diff --git a/vnmonitoring/vnmonitoring_client.go b/vnmonitoring/vnmonitoring_client.go index 1fa97b454a..445ff9655a 100644 --- a/vnmonitoring/vnmonitoring_client.go +++ b/vnmonitoring/vnmonitoring_client.go @@ -81,7 +81,7 @@ func (client *VnMonitoringClient) setConfigurationProvider(configProvider common 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/vnmonitoring/work_request_result_collection.go b/vnmonitoring/work_request_result_collection.go index fb4fdd156c..7fb8dc43a1 100644 --- a/vnmonitoring/work_request_result_collection.go +++ b/vnmonitoring/work_request_result_collection.go @@ -63,6 +63,5 @@ func (m *WorkRequestResultCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/vulnerabilityscanning/container_scan_registry.go b/vulnerabilityscanning/container_scan_registry.go index 8259ee380a..17fd59924f 100644 --- a/vulnerabilityscanning/container_scan_registry.go +++ b/vulnerabilityscanning/container_scan_registry.go @@ -65,7 +65,7 @@ func (m *containerscanregistry) UnmarshalPolymorphicJSON(data []byte) (interface } } -//GetUrl returns Url +// GetUrl returns Url func (m containerscanregistry) GetUrl() *string { return m.Url } diff --git a/vulnerabilityscanning/create_container_scan_registry_details.go b/vulnerabilityscanning/create_container_scan_registry_details.go index 5115a8f417..6c4f65919f 100644 --- a/vulnerabilityscanning/create_container_scan_registry_details.go +++ b/vulnerabilityscanning/create_container_scan_registry_details.go @@ -65,7 +65,7 @@ func (m *createcontainerscanregistrydetails) UnmarshalPolymorphicJSON(data []byt } } -//GetUrl returns Url +// GetUrl returns Url func (m createcontainerscanregistrydetails) GetUrl() *string { return m.Url } diff --git a/vulnerabilityscanning/host_scan_agent_configuration.go b/vulnerabilityscanning/host_scan_agent_configuration.go index 86ef3022d4..54c5bb8625 100644 --- a/vulnerabilityscanning/host_scan_agent_configuration.go +++ b/vulnerabilityscanning/host_scan_agent_configuration.go @@ -69,7 +69,7 @@ func (m *hostscanagentconfiguration) UnmarshalPolymorphicJSON(data []byte) (inte } } -//GetVendorType returns VendorType +// GetVendorType returns VendorType func (m hostscanagentconfiguration) GetVendorType() VendorTypeEnum { return m.VendorType } diff --git a/vulnerabilityscanning/update_container_scan_registry_details.go b/vulnerabilityscanning/update_container_scan_registry_details.go index 4cf13add2f..d82dc148e1 100644 --- a/vulnerabilityscanning/update_container_scan_registry_details.go +++ b/vulnerabilityscanning/update_container_scan_registry_details.go @@ -65,7 +65,7 @@ func (m *updatecontainerscanregistrydetails) UnmarshalPolymorphicJSON(data []byt } } -//GetUrl returns Url +// GetUrl returns Url func (m updatecontainerscanregistrydetails) GetUrl() *string { return m.Url } diff --git a/vulnerabilityscanning/vulnerabilityscanning_client.go b/vulnerabilityscanning/vulnerabilityscanning_client.go index 6494031c49..06f8aef941 100644 --- a/vulnerabilityscanning/vulnerabilityscanning_client.go +++ b/vulnerabilityscanning/vulnerabilityscanning_client.go @@ -80,7 +80,7 @@ func (client *VulnerabilityScanningClient) setConfigurationProvider(configProvid 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/waa/create_web_app_acceleration_details.go b/waa/create_web_app_acceleration_details.go index fab76507c7..2ed5446e13 100644 --- a/waa/create_web_app_acceleration_details.go +++ b/waa/create_web_app_acceleration_details.go @@ -45,12 +45,12 @@ type CreateWebAppAccelerationDetails interface { type createwebappaccelerationdetails struct { JsonData []byte - CompartmentId *string `mandatory:"true" json:"compartmentId"` - WebAppAccelerationPolicyId *string `mandatory:"true" json:"webAppAccelerationPolicyId"` DisplayName *string `mandatory:"false" json:"displayName"` 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"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + WebAppAccelerationPolicyId *string `mandatory:"true" json:"webAppAccelerationPolicyId"` BackendType string `json:"backendType"` } @@ -95,36 +95,36 @@ func (m *createwebappaccelerationdetails) UnmarshalPolymorphicJSON(data []byte) } } -//GetCompartmentId returns CompartmentId -func (m createwebappaccelerationdetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetWebAppAccelerationPolicyId returns WebAppAccelerationPolicyId -func (m createwebappaccelerationdetails) GetWebAppAccelerationPolicyId() *string { - return m.WebAppAccelerationPolicyId -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createwebappaccelerationdetails) GetDisplayName() *string { return m.DisplayName } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createwebappaccelerationdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createwebappaccelerationdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m createwebappaccelerationdetails) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetCompartmentId returns CompartmentId +func (m createwebappaccelerationdetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetWebAppAccelerationPolicyId returns WebAppAccelerationPolicyId +func (m createwebappaccelerationdetails) GetWebAppAccelerationPolicyId() *string { + return m.WebAppAccelerationPolicyId +} + func (m createwebappaccelerationdetails) String() string { return common.PointerString(m) } diff --git a/waa/waa_client.go b/waa/waa_client.go index 64efd74c22..1ac74a5fae 100644 --- a/waa/waa_client.go +++ b/waa/waa_client.go @@ -82,7 +82,7 @@ func (client *WaaClient) setConfigurationProvider(configProvider common.Configur 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/waa/waa_workrequest_client.go b/waa/waa_workrequest_client.go index ebe516323f..64ba1cb60f 100644 --- a/waa/waa_workrequest_client.go +++ b/waa/waa_workrequest_client.go @@ -82,7 +82,7 @@ func (client *WorkRequestClient) setConfigurationProvider(configProvider common. 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/waa/web_app_acceleration.go b/waa/web_app_acceleration.go index ce17b8bd40..1ad0cdb7de 100644 --- a/waa/web_app_acceleration.go +++ b/waa/web_app_acceleration.go @@ -61,6 +61,8 @@ type WebAppAcceleration interface { type webappacceleration struct { JsonData []byte + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` Id *string `mandatory:"true" json:"id"` DisplayName *string `mandatory:"true" json:"displayName"` CompartmentId *string `mandatory:"true" json:"compartmentId"` @@ -70,8 +72,6 @@ type webappacceleration struct { FreeformTags map[string]string `mandatory:"true" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` SystemTags map[string]map[string]interface{} `mandatory:"true" json:"systemTags"` - TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` BackendType string `json:"backendType"` } @@ -121,61 +121,61 @@ func (m *webappacceleration) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetId returns Id +// GetTimeUpdated returns TimeUpdated +func (m webappacceleration) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetLifecycleDetails returns LifecycleDetails +func (m webappacceleration) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetId returns Id func (m webappacceleration) GetId() *string { return m.Id } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m webappacceleration) GetDisplayName() *string { return m.DisplayName } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m webappacceleration) GetCompartmentId() *string { return m.CompartmentId } -//GetWebAppAccelerationPolicyId returns WebAppAccelerationPolicyId +// GetWebAppAccelerationPolicyId returns WebAppAccelerationPolicyId func (m webappacceleration) GetWebAppAccelerationPolicyId() *string { return m.WebAppAccelerationPolicyId } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m webappacceleration) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m webappacceleration) GetLifecycleState() WebAppAccelerationLifecycleStateEnum { return m.LifecycleState } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m webappacceleration) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m webappacceleration) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m webappacceleration) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } -//GetTimeUpdated returns TimeUpdated -func (m webappacceleration) GetTimeUpdated() *common.SDKTime { - return m.TimeUpdated -} - -//GetLifecycleDetails returns LifecycleDetails -func (m webappacceleration) GetLifecycleDetails() *string { - return m.LifecycleDetails -} - func (m webappacceleration) String() string { return common.PointerString(m) } diff --git a/waa/web_app_acceleration_collection.go b/waa/web_app_acceleration_collection.go index e40f3b2da9..b083688f7d 100644 --- a/waa/web_app_acceleration_collection.go +++ b/waa/web_app_acceleration_collection.go @@ -64,6 +64,5 @@ func (m *WebAppAccelerationCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/waa/web_app_acceleration_summary.go b/waa/web_app_acceleration_summary.go index 86d0743f66..416c253dc2 100644 --- a/waa/web_app_acceleration_summary.go +++ b/waa/web_app_acceleration_summary.go @@ -61,6 +61,8 @@ type WebAppAccelerationSummary interface { type webappaccelerationsummary struct { JsonData []byte + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` Id *string `mandatory:"true" json:"id"` DisplayName *string `mandatory:"true" json:"displayName"` CompartmentId *string `mandatory:"true" json:"compartmentId"` @@ -70,8 +72,6 @@ type webappaccelerationsummary struct { FreeformTags map[string]string `mandatory:"true" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` SystemTags map[string]map[string]interface{} `mandatory:"true" json:"systemTags"` - TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` BackendType string `json:"backendType"` } @@ -121,61 +121,61 @@ func (m *webappaccelerationsummary) UnmarshalPolymorphicJSON(data []byte) (inter } } -//GetId returns Id +// GetTimeUpdated returns TimeUpdated +func (m webappaccelerationsummary) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetLifecycleDetails returns LifecycleDetails +func (m webappaccelerationsummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetId returns Id func (m webappaccelerationsummary) GetId() *string { return m.Id } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m webappaccelerationsummary) GetDisplayName() *string { return m.DisplayName } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m webappaccelerationsummary) GetCompartmentId() *string { return m.CompartmentId } -//GetWebAppAccelerationPolicyId returns WebAppAccelerationPolicyId +// GetWebAppAccelerationPolicyId returns WebAppAccelerationPolicyId func (m webappaccelerationsummary) GetWebAppAccelerationPolicyId() *string { return m.WebAppAccelerationPolicyId } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m webappaccelerationsummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m webappaccelerationsummary) GetLifecycleState() WebAppAccelerationLifecycleStateEnum { return m.LifecycleState } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m webappaccelerationsummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m webappaccelerationsummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m webappaccelerationsummary) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } -//GetTimeUpdated returns TimeUpdated -func (m webappaccelerationsummary) GetTimeUpdated() *common.SDKTime { - return m.TimeUpdated -} - -//GetLifecycleDetails returns LifecycleDetails -func (m webappaccelerationsummary) GetLifecycleDetails() *string { - return m.LifecycleDetails -} - func (m webappaccelerationsummary) String() string { return common.PointerString(m) } diff --git a/waas/access_rule.go b/waas/access_rule.go index e3a35fee09..2ca7f7d2ff 100644 --- a/waas/access_rule.go +++ b/waas/access_rule.go @@ -149,10 +149,7 @@ func (m *AccessRule) UnmarshalJSON(data []byte) (e error) { m.BlockErrorPageDescription = model.BlockErrorPageDescription m.BypassChallenges = make([]AccessRuleBypassChallengesEnum, len(model.BypassChallenges)) - for i, n := range model.BypassChallenges { - m.BypassChallenges[i] = n - } - + copy(m.BypassChallenges, model.BypassChallenges) m.RedirectUrl = model.RedirectUrl m.RedirectResponseCode = model.RedirectResponseCode @@ -177,14 +174,10 @@ func (m *AccessRule) UnmarshalJSON(data []byte) (e error) { m.ResponseHeaderManipulation[i] = nil } } - m.Name = model.Name m.Criteria = make([]AccessRuleCriteria, len(model.Criteria)) - for i, n := range model.Criteria { - m.Criteria[i] = n - } - + copy(m.Criteria, model.Criteria) m.Action = model.Action return diff --git a/waas/policy_config.go b/waas/policy_config.go index e82beb0bb0..c73e1f95df 100644 --- a/waas/policy_config.go +++ b/waas/policy_config.go @@ -135,10 +135,7 @@ func (m *PolicyConfig) UnmarshalJSON(data []byte) (e error) { m.IsHttpsForced = model.IsHttpsForced m.TlsProtocols = make([]PolicyConfigTlsProtocolsEnum, len(model.TlsProtocols)) - for i, n := range model.TlsProtocols { - m.TlsProtocols[i] = n - } - + copy(m.TlsProtocols, model.TlsProtocols) m.IsOriginCompressionEnabled = model.IsOriginCompressionEnabled m.IsBehindCdn = model.IsBehindCdn @@ -162,10 +159,7 @@ func (m *PolicyConfig) UnmarshalJSON(data []byte) (e error) { } m.WebsocketPathPrefixes = make([]string, len(model.WebsocketPathPrefixes)) - for i, n := range model.WebsocketPathPrefixes { - m.WebsocketPathPrefixes[i] = n - } - + copy(m.WebsocketPathPrefixes, model.WebsocketPathPrefixes) m.IsSniEnabled = model.IsSniEnabled m.HealthChecks = model.HealthChecks diff --git a/waas/waas_client.go b/waas/waas_client.go index d73a250b10..8193a28ada 100644 --- a/waas/waas_client.go +++ b/waas/waas_client.go @@ -80,7 +80,7 @@ func (client *WaasClient) setConfigurationProvider(configProvider common.Configu 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/waas/waas_redirect_client.go b/waas/waas_redirect_client.go index 9f3e5bb814..74d789a6e3 100644 --- a/waas/waas_redirect_client.go +++ b/waas/waas_redirect_client.go @@ -80,7 +80,7 @@ func (client *RedirectClient) setConfigurationProvider(configProvider common.Con 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/waf/action.go b/waf/action.go index 917751c9ad..0930b3288c 100644 --- a/waf/action.go +++ b/waf/action.go @@ -76,7 +76,7 @@ func (m *action) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { } } -//GetName returns Name +// GetName returns Name func (m action) GetName() *string { return m.Name } diff --git a/waf/create_network_address_list_details.go b/waf/create_network_address_list_details.go index 9f2e3a435c..4427b5234e 100644 --- a/waf/create_network_address_list_details.go +++ b/waf/create_network_address_list_details.go @@ -41,11 +41,11 @@ type CreateNetworkAddressListDetails interface { type createnetworkaddresslistdetails struct { JsonData []byte - CompartmentId *string `mandatory:"true" json:"compartmentId"` DisplayName *string `mandatory:"false" json:"displayName"` 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"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` Type string `json:"type"` } @@ -93,31 +93,31 @@ func (m *createnetworkaddresslistdetails) UnmarshalPolymorphicJSON(data []byte) } } -//GetCompartmentId returns CompartmentId -func (m createnetworkaddresslistdetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createnetworkaddresslistdetails) GetDisplayName() *string { return m.DisplayName } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createnetworkaddresslistdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createnetworkaddresslistdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m createnetworkaddresslistdetails) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetCompartmentId returns CompartmentId +func (m createnetworkaddresslistdetails) GetCompartmentId() *string { + return m.CompartmentId +} + func (m createnetworkaddresslistdetails) String() string { return common.PointerString(m) } diff --git a/waf/create_web_app_firewall_details.go b/waf/create_web_app_firewall_details.go index b18b0f45f8..2655e92b81 100644 --- a/waf/create_web_app_firewall_details.go +++ b/waf/create_web_app_firewall_details.go @@ -44,12 +44,12 @@ type CreateWebAppFirewallDetails interface { type createwebappfirewalldetails struct { JsonData []byte - CompartmentId *string `mandatory:"true" json:"compartmentId"` - WebAppFirewallPolicyId *string `mandatory:"true" json:"webAppFirewallPolicyId"` DisplayName *string `mandatory:"false" json:"displayName"` 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"` + CompartmentId *string `mandatory:"true" json:"compartmentId"` + WebAppFirewallPolicyId *string `mandatory:"true" json:"webAppFirewallPolicyId"` BackendType string `json:"backendType"` } @@ -94,36 +94,36 @@ func (m *createwebappfirewalldetails) UnmarshalPolymorphicJSON(data []byte) (int } } -//GetCompartmentId returns CompartmentId -func (m createwebappfirewalldetails) GetCompartmentId() *string { - return m.CompartmentId -} - -//GetWebAppFirewallPolicyId returns WebAppFirewallPolicyId -func (m createwebappfirewalldetails) GetWebAppFirewallPolicyId() *string { - return m.WebAppFirewallPolicyId -} - -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m createwebappfirewalldetails) GetDisplayName() *string { return m.DisplayName } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m createwebappfirewalldetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m createwebappfirewalldetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m createwebappfirewalldetails) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } +// GetCompartmentId returns CompartmentId +func (m createwebappfirewalldetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetWebAppFirewallPolicyId returns WebAppFirewallPolicyId +func (m createwebappfirewalldetails) GetWebAppFirewallPolicyId() *string { + return m.WebAppFirewallPolicyId +} + func (m createwebappfirewalldetails) String() string { return common.PointerString(m) } diff --git a/waf/create_web_app_firewall_policy_details.go b/waf/create_web_app_firewall_policy_details.go index 22be877f45..94f08ec1ac 100644 --- a/waf/create_web_app_firewall_policy_details.go +++ b/waf/create_web_app_firewall_policy_details.go @@ -105,7 +105,6 @@ func (m *CreateWebAppFirewallPolicyDetails) UnmarshalJSON(data []byte) (e error) m.Actions[i] = nil } } - m.RequestAccessControl = model.RequestAccessControl m.RequestRateLimiting = model.RequestRateLimiting diff --git a/waf/network_address_list.go b/waf/network_address_list.go index 1eeb627785..0c90fb4257 100644 --- a/waf/network_address_list.go +++ b/waf/network_address_list.go @@ -57,6 +57,8 @@ type NetworkAddressList interface { type networkaddresslist struct { JsonData []byte + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` Id *string `mandatory:"true" json:"id"` DisplayName *string `mandatory:"true" json:"displayName"` CompartmentId *string `mandatory:"true" json:"compartmentId"` @@ -65,8 +67,6 @@ type networkaddresslist struct { FreeformTags map[string]string `mandatory:"true" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` SystemTags map[string]map[string]interface{} `mandatory:"true" json:"systemTags"` - TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` Type string `json:"type"` } @@ -119,56 +119,56 @@ func (m *networkaddresslist) UnmarshalPolymorphicJSON(data []byte) (interface{}, } } -//GetId returns Id +// GetTimeUpdated returns TimeUpdated +func (m networkaddresslist) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetLifecycleDetails returns LifecycleDetails +func (m networkaddresslist) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetId returns Id func (m networkaddresslist) GetId() *string { return m.Id } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m networkaddresslist) GetDisplayName() *string { return m.DisplayName } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m networkaddresslist) GetCompartmentId() *string { return m.CompartmentId } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m networkaddresslist) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m networkaddresslist) GetLifecycleState() NetworkAddressListLifecycleStateEnum { return m.LifecycleState } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m networkaddresslist) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m networkaddresslist) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m networkaddresslist) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } -//GetTimeUpdated returns TimeUpdated -func (m networkaddresslist) GetTimeUpdated() *common.SDKTime { - return m.TimeUpdated -} - -//GetLifecycleDetails returns LifecycleDetails -func (m networkaddresslist) GetLifecycleDetails() *string { - return m.LifecycleDetails -} - func (m networkaddresslist) String() string { return common.PointerString(m) } diff --git a/waf/network_address_list_collection.go b/waf/network_address_list_collection.go index 9327cab1b6..80269e3ecf 100644 --- a/waf/network_address_list_collection.go +++ b/waf/network_address_list_collection.go @@ -63,6 +63,5 @@ func (m *NetworkAddressListCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/waf/network_address_list_summary.go b/waf/network_address_list_summary.go index 28fabd6e9d..751a0ec723 100644 --- a/waf/network_address_list_summary.go +++ b/waf/network_address_list_summary.go @@ -57,6 +57,8 @@ type NetworkAddressListSummary interface { type networkaddresslistsummary struct { JsonData []byte + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` Id *string `mandatory:"true" json:"id"` DisplayName *string `mandatory:"true" json:"displayName"` CompartmentId *string `mandatory:"true" json:"compartmentId"` @@ -65,8 +67,6 @@ type networkaddresslistsummary struct { FreeformTags map[string]string `mandatory:"true" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` SystemTags map[string]map[string]interface{} `mandatory:"true" json:"systemTags"` - TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` Type string `json:"type"` } @@ -119,56 +119,56 @@ func (m *networkaddresslistsummary) UnmarshalPolymorphicJSON(data []byte) (inter } } -//GetId returns Id +// GetTimeUpdated returns TimeUpdated +func (m networkaddresslistsummary) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetLifecycleDetails returns LifecycleDetails +func (m networkaddresslistsummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetId returns Id func (m networkaddresslistsummary) GetId() *string { return m.Id } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m networkaddresslistsummary) GetDisplayName() *string { return m.DisplayName } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m networkaddresslistsummary) GetCompartmentId() *string { return m.CompartmentId } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m networkaddresslistsummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m networkaddresslistsummary) GetLifecycleState() NetworkAddressListLifecycleStateEnum { return m.LifecycleState } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m networkaddresslistsummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m networkaddresslistsummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m networkaddresslistsummary) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } -//GetTimeUpdated returns TimeUpdated -func (m networkaddresslistsummary) GetTimeUpdated() *common.SDKTime { - return m.TimeUpdated -} - -//GetLifecycleDetails returns LifecycleDetails -func (m networkaddresslistsummary) GetLifecycleDetails() *string { - return m.LifecycleDetails -} - func (m networkaddresslistsummary) String() string { return common.PointerString(m) } diff --git a/waf/return_http_response_action.go b/waf/return_http_response_action.go index 234c3b66a0..d4b1b23cdf 100644 --- a/waf/return_http_response_action.go +++ b/waf/return_http_response_action.go @@ -131,10 +131,7 @@ func (m *ReturnHttpResponseAction) UnmarshalJSON(data []byte) (e error) { } var nn interface{} m.Headers = make([]ResponseHeader, len(model.Headers)) - for i, n := range model.Headers { - m.Headers[i] = n - } - + copy(m.Headers, model.Headers) nn, e = model.Body.UnmarshalPolymorphicJSON(model.Body.JsonData) if e != nil { return diff --git a/waf/update_network_address_list_details.go b/waf/update_network_address_list_details.go index d5860241c7..530a1c9e74 100644 --- a/waf/update_network_address_list_details.go +++ b/waf/update_network_address_list_details.go @@ -88,22 +88,22 @@ func (m *updatenetworkaddresslistdetails) UnmarshalPolymorphicJSON(data []byte) } } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m updatenetworkaddresslistdetails) GetDisplayName() *string { return m.DisplayName } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m updatenetworkaddresslistdetails) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m updatenetworkaddresslistdetails) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m updatenetworkaddresslistdetails) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } diff --git a/waf/update_web_app_firewall_policy_details.go b/waf/update_web_app_firewall_policy_details.go index 73f9ed67b2..bf8ebcaa97 100644 --- a/waf/update_web_app_firewall_policy_details.go +++ b/waf/update_web_app_firewall_policy_details.go @@ -104,7 +104,6 @@ func (m *UpdateWebAppFirewallPolicyDetails) UnmarshalJSON(data []byte) (e error) m.Actions[i] = nil } } - m.RequestAccessControl = model.RequestAccessControl m.RequestRateLimiting = model.RequestRateLimiting diff --git a/waf/waf_client.go b/waf/waf_client.go index 0c6a08abf2..6a11288e0c 100644 --- a/waf/waf_client.go +++ b/waf/waf_client.go @@ -81,7 +81,7 @@ func (client *WafClient) setConfigurationProvider(configProvider common.Configur 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil diff --git a/waf/web_app_firewall.go b/waf/web_app_firewall.go index 2f19448798..100c3136aa 100644 --- a/waf/web_app_firewall.go +++ b/waf/web_app_firewall.go @@ -60,6 +60,8 @@ type WebAppFirewall interface { type webappfirewall struct { JsonData []byte + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` Id *string `mandatory:"true" json:"id"` DisplayName *string `mandatory:"true" json:"displayName"` CompartmentId *string `mandatory:"true" json:"compartmentId"` @@ -69,8 +71,6 @@ type webappfirewall struct { FreeformTags map[string]string `mandatory:"true" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` SystemTags map[string]map[string]interface{} `mandatory:"true" json:"systemTags"` - TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` BackendType string `json:"backendType"` } @@ -120,61 +120,61 @@ func (m *webappfirewall) UnmarshalPolymorphicJSON(data []byte) (interface{}, err } } -//GetId returns Id +// GetTimeUpdated returns TimeUpdated +func (m webappfirewall) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetLifecycleDetails returns LifecycleDetails +func (m webappfirewall) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetId returns Id func (m webappfirewall) GetId() *string { return m.Id } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m webappfirewall) GetDisplayName() *string { return m.DisplayName } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m webappfirewall) GetCompartmentId() *string { return m.CompartmentId } -//GetWebAppFirewallPolicyId returns WebAppFirewallPolicyId +// GetWebAppFirewallPolicyId returns WebAppFirewallPolicyId func (m webappfirewall) GetWebAppFirewallPolicyId() *string { return m.WebAppFirewallPolicyId } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m webappfirewall) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m webappfirewall) GetLifecycleState() WebAppFirewallLifecycleStateEnum { return m.LifecycleState } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m webappfirewall) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m webappfirewall) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m webappfirewall) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } -//GetTimeUpdated returns TimeUpdated -func (m webappfirewall) GetTimeUpdated() *common.SDKTime { - return m.TimeUpdated -} - -//GetLifecycleDetails returns LifecycleDetails -func (m webappfirewall) GetLifecycleDetails() *string { - return m.LifecycleDetails -} - func (m webappfirewall) String() string { return common.PointerString(m) } diff --git a/waf/web_app_firewall_collection.go b/waf/web_app_firewall_collection.go index 712eb72fc5..1b67b52a12 100644 --- a/waf/web_app_firewall_collection.go +++ b/waf/web_app_firewall_collection.go @@ -63,6 +63,5 @@ func (m *WebAppFirewallCollection) UnmarshalJSON(data []byte) (e error) { m.Items[i] = nil } } - return } diff --git a/waf/web_app_firewall_policy.go b/waf/web_app_firewall_policy.go index 86e80f47fc..9bd90771a4 100644 --- a/waf/web_app_firewall_policy.go +++ b/waf/web_app_firewall_policy.go @@ -141,7 +141,6 @@ func (m *WebAppFirewallPolicy) UnmarshalJSON(data []byte) (e error) { m.Actions[i] = nil } } - m.RequestAccessControl = model.RequestAccessControl m.RequestRateLimiting = model.RequestRateLimiting diff --git a/waf/web_app_firewall_policy_rule.go b/waf/web_app_firewall_policy_rule.go index be749d9228..d2080f20e1 100644 --- a/waf/web_app_firewall_policy_rule.go +++ b/waf/web_app_firewall_policy_rule.go @@ -36,10 +36,10 @@ type WebAppFirewallPolicyRule interface { type webappfirewallpolicyrule struct { JsonData []byte - Name *string `mandatory:"true" json:"name"` - ActionName *string `mandatory:"true" json:"actionName"` ConditionLanguage WebAppFirewallPolicyRuleConditionLanguageEnum `mandatory:"false" json:"conditionLanguage,omitempty"` Condition *string `mandatory:"false" json:"condition"` + Name *string `mandatory:"true" json:"name"` + ActionName *string `mandatory:"true" json:"actionName"` Type string `json:"type"` } @@ -90,26 +90,26 @@ func (m *webappfirewallpolicyrule) UnmarshalPolymorphicJSON(data []byte) (interf } } -//GetName returns Name -func (m webappfirewallpolicyrule) GetName() *string { - return m.Name -} - -//GetActionName returns ActionName -func (m webappfirewallpolicyrule) GetActionName() *string { - return m.ActionName -} - -//GetConditionLanguage returns ConditionLanguage +// GetConditionLanguage returns ConditionLanguage func (m webappfirewallpolicyrule) GetConditionLanguage() WebAppFirewallPolicyRuleConditionLanguageEnum { return m.ConditionLanguage } -//GetCondition returns Condition +// GetCondition returns Condition func (m webappfirewallpolicyrule) GetCondition() *string { return m.Condition } +// GetName returns Name +func (m webappfirewallpolicyrule) GetName() *string { + return m.Name +} + +// GetActionName returns ActionName +func (m webappfirewallpolicyrule) GetActionName() *string { + return m.ActionName +} + func (m webappfirewallpolicyrule) String() string { return common.PointerString(m) } diff --git a/waf/web_app_firewall_summary.go b/waf/web_app_firewall_summary.go index 47fda59e22..0c4a90be9e 100644 --- a/waf/web_app_firewall_summary.go +++ b/waf/web_app_firewall_summary.go @@ -60,6 +60,8 @@ type WebAppFirewallSummary interface { type webappfirewallsummary struct { JsonData []byte + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` Id *string `mandatory:"true" json:"id"` DisplayName *string `mandatory:"true" json:"displayName"` CompartmentId *string `mandatory:"true" json:"compartmentId"` @@ -69,8 +71,6 @@ type webappfirewallsummary struct { FreeformTags map[string]string `mandatory:"true" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` SystemTags map[string]map[string]interface{} `mandatory:"true" json:"systemTags"` - TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` BackendType string `json:"backendType"` } @@ -120,61 +120,61 @@ func (m *webappfirewallsummary) UnmarshalPolymorphicJSON(data []byte) (interface } } -//GetId returns Id +// GetTimeUpdated returns TimeUpdated +func (m webappfirewallsummary) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetLifecycleDetails returns LifecycleDetails +func (m webappfirewallsummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetId returns Id func (m webappfirewallsummary) GetId() *string { return m.Id } -//GetDisplayName returns DisplayName +// GetDisplayName returns DisplayName func (m webappfirewallsummary) GetDisplayName() *string { return m.DisplayName } -//GetCompartmentId returns CompartmentId +// GetCompartmentId returns CompartmentId func (m webappfirewallsummary) GetCompartmentId() *string { return m.CompartmentId } -//GetWebAppFirewallPolicyId returns WebAppFirewallPolicyId +// GetWebAppFirewallPolicyId returns WebAppFirewallPolicyId func (m webappfirewallsummary) GetWebAppFirewallPolicyId() *string { return m.WebAppFirewallPolicyId } -//GetTimeCreated returns TimeCreated +// GetTimeCreated returns TimeCreated func (m webappfirewallsummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } -//GetLifecycleState returns LifecycleState +// GetLifecycleState returns LifecycleState func (m webappfirewallsummary) GetLifecycleState() WebAppFirewallLifecycleStateEnum { return m.LifecycleState } -//GetFreeformTags returns FreeformTags +// GetFreeformTags returns FreeformTags func (m webappfirewallsummary) GetFreeformTags() map[string]string { return m.FreeformTags } -//GetDefinedTags returns DefinedTags +// GetDefinedTags returns DefinedTags func (m webappfirewallsummary) GetDefinedTags() map[string]map[string]interface{} { return m.DefinedTags } -//GetSystemTags returns SystemTags +// GetSystemTags returns SystemTags func (m webappfirewallsummary) GetSystemTags() map[string]map[string]interface{} { return m.SystemTags } -//GetTimeUpdated returns TimeUpdated -func (m webappfirewallsummary) GetTimeUpdated() *common.SDKTime { - return m.TimeUpdated -} - -//GetLifecycleDetails returns LifecycleDetails -func (m webappfirewallsummary) GetLifecycleDetails() *string { - return m.LifecycleDetails -} - func (m webappfirewallsummary) String() string { return common.PointerString(m) } diff --git a/workrequests/workrequests_workrequest_client.go b/workrequests/workrequests_workrequest_client.go index 1fa8b2ca1a..6f6d99ae09 100644 --- a/workrequests/workrequests_workrequest_client.go +++ b/workrequests/workrequests_workrequest_client.go @@ -84,7 +84,7 @@ func (client *WorkRequestClient) setConfigurationProvider(configProvider common. 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") + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") } client.config = &configProvider return nil